@mongodb-js/compass-web 0.28.2 → 0.30.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.
@@ -1,4 +1,5 @@
1
1
  import { default as React_2 } from 'react';
2
+ import { z } from 'zod';
2
3
 
3
4
  /**
4
5
  * Valid statuses for activeOrLaunchedExperimentsToStatus
@@ -88,7 +89,7 @@ declare interface AsyncStatus {
88
89
  message?: string;
89
90
  }
90
91
 
91
- declare const ATLAS_CLOUD_FEATURE_FLAGS: "DATA_EXPLORER_COMPASS_WEB_ENABLE_DATA_MODELING"[];
92
+ declare const ATLAS_CLOUD_FEATURE_FLAGS: NonNullable<"DATA_EXPLORER_COMPASS_WEB_ENABLE_DATA_MODELING" | "DATA_EXPLORER_COMPASS_WEB_ENABLE_RESTORE_WORKSPACES" | null>[];
92
93
 
93
94
  export declare type AtlasCloudFeatureFlags = Record<(typeof ATLAS_CLOUD_FEATURE_FLAGS)[number], boolean>;
94
95
 
@@ -227,14 +228,28 @@ declare type CliOnlyPreferences = {
227
228
  trustedConnectionString?: boolean;
228
229
  };
229
230
 
230
- declare type CollectionSubtab = 'Documents' | 'Aggregations' | 'Schema' | 'Indexes' | 'Validation' | 'GlobalWrites';
231
+ declare type CollectionSubtab = z.output<typeof CollectionSubtabSchema>;
231
232
 
232
- declare type CollectionsWorkspace = {
233
- type: 'Collections';
233
+ declare const CollectionSubtabSchema: z.ZodEnum<["Documents", "Aggregations", "Schema", "Indexes", "Validation", "GlobalWrites"]>;
234
+
235
+ declare type CollectionsWorkspace = z.output<typeof CollectionsWorkspaceSchema>;
236
+
237
+ declare const CollectionsWorkspaceSchema: z.ZodObject<{
238
+ type: z.ZodLiteral<"Collections">;
239
+ connectionId: z.ZodString;
240
+ namespace: z.ZodString;
241
+ inferredFromPrivileges: z.ZodOptional<z.ZodBoolean>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ type: "Collections";
234
244
  connectionId: string;
235
245
  namespace: string;
236
- inferredFromPrivileges?: boolean;
237
- };
246
+ inferredFromPrivileges?: boolean | undefined;
247
+ }, {
248
+ type: "Collections";
249
+ connectionId: string;
250
+ namespace: string;
251
+ inferredFromPrivileges?: boolean | undefined;
252
+ }>;
238
253
 
239
254
  export declare type CollectionTabInfo = {
240
255
  isTimeSeries: boolean;
@@ -243,19 +258,44 @@ export declare type CollectionTabInfo = {
243
258
  inferredFromPrivileges: boolean;
244
259
  };
245
260
 
246
- declare type CollectionWorkspace = {
261
+ declare type CollectionWorkspace = z.output<typeof CollectionWorkspaceSchema> & {
247
262
  tabId: string;
248
- type: 'Collection';
263
+ };
264
+
265
+ declare const CollectionWorkspaceSchema: z.ZodObject<{
266
+ type: z.ZodLiteral<"Collection">;
267
+ subTab: z.ZodEnum<["Documents", "Aggregations", "Schema", "Indexes", "Validation", "GlobalWrites"]>;
268
+ initialQuery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
269
+ initialPipeline: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
270
+ initialPipelineText: z.ZodOptional<z.ZodString>;
271
+ initialAggregation: z.ZodOptional<z.ZodUnknown>;
272
+ editViewName: z.ZodOptional<z.ZodString>;
273
+ connectionId: z.ZodString;
274
+ namespace: z.ZodString;
275
+ inferredFromPrivileges: z.ZodOptional<z.ZodBoolean>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ type: "Collection";
249
278
  connectionId: string;
250
279
  namespace: string;
251
- subTab: CollectionSubtab;
252
- initialQuery?: unknown;
253
- initialPipeline?: unknown[];
254
- initialPipelineText?: string;
280
+ subTab: "Documents" | "Aggregations" | "Schema" | "Indexes" | "Validation" | "GlobalWrites";
281
+ inferredFromPrivileges?: boolean | undefined;
282
+ initialQuery?: Record<string, any> | undefined;
283
+ initialPipeline?: unknown[] | undefined;
284
+ initialPipelineText?: string | undefined;
255
285
  initialAggregation?: unknown;
256
- editViewName?: string;
257
- inferredFromPrivileges?: boolean;
258
- };
286
+ editViewName?: string | undefined;
287
+ }, {
288
+ type: "Collection";
289
+ connectionId: string;
290
+ namespace: string;
291
+ subTab: "Documents" | "Aggregations" | "Schema" | "Indexes" | "Validation" | "GlobalWrites";
292
+ inferredFromPrivileges?: boolean | undefined;
293
+ initialQuery?: Record<string, any> | undefined;
294
+ initialPipeline?: unknown[] | undefined;
295
+ initialPipelineText?: string | undefined;
296
+ initialAggregation?: unknown;
297
+ editViewName?: string | undefined;
298
+ }>;
259
299
 
260
300
  export declare const CompassExperimentationProvider: React_2.FC<{
261
301
  children: React_2.ReactNode;
@@ -364,14 +404,28 @@ declare interface ConstructorOptions<T extends TypeData> {
364
404
  trackerOptions?: TrackerOptions<T['experimentViewedProps']>;
365
405
  }
366
406
 
367
- declare type DatabasesWorkspace = {
368
- type: 'Databases';
407
+ declare type DatabasesWorkspace = z.output<typeof DatabasesWorkspaceSchema>;
408
+
409
+ declare const DatabasesWorkspaceSchema: z.ZodObject<{
410
+ type: z.ZodLiteral<"Databases">;
411
+ connectionId: z.ZodString;
412
+ }, "strip", z.ZodTypeAny, {
413
+ type: "Databases";
369
414
  connectionId: string;
370
- };
415
+ }, {
416
+ type: "Databases";
417
+ connectionId: string;
418
+ }>;
371
419
 
372
- declare type DataModelingWorkspace = {
373
- type: 'Data Modeling';
374
- };
420
+ declare type DataModelingWorkspace = z.output<typeof DataModelingWorkspaceSchema>;
421
+
422
+ declare const DataModelingWorkspaceSchema: z.ZodObject<{
423
+ type: z.ZodLiteral<"Data Modeling">;
424
+ }, "strip", z.ZodTypeAny, {
425
+ type: "Data Modeling";
426
+ }, {
427
+ type: "Data Modeling";
428
+ }>;
375
429
 
376
430
  /** @public */
377
431
  export declare type DebugFunction = (...args: any[]) => void;
@@ -1055,6 +1109,13 @@ declare const FEATURE_FLAG_DEFINITIONS: readonly [{
1055
1109
  readonly description: {
1056
1110
  readonly short: "Design, Visualize, and Evolve your Data Model";
1057
1111
  };
1112
+ }, {
1113
+ readonly name: "enableDataModelingCollapse";
1114
+ readonly stage: "development";
1115
+ readonly atlasCloudFeatureFlagName: null;
1116
+ readonly description: {
1117
+ readonly short: "Enable Collapse / Expand functionality in Data Modeling";
1118
+ };
1058
1119
  }, {
1059
1120
  readonly name: "enableIndexesGuidanceExp";
1060
1121
  readonly stage: "development";
@@ -1104,6 +1165,13 @@ declare const FEATURE_FLAG_DEFINITIONS: readonly [{
1104
1165
  readonly description: {
1105
1166
  readonly short: "Enable the performance insights AI Assistant entrypoints";
1106
1167
  };
1168
+ }, {
1169
+ readonly name: "enableRestoreWorkspaces";
1170
+ readonly stage: "development";
1171
+ readonly atlasCloudFeatureFlagName: "DATA_EXPLORER_COMPASS_WEB_ENABLE_RESTORE_WORKSPACES";
1172
+ readonly description: {
1173
+ readonly short: "Enable restoring previous workspace tabs on startup";
1174
+ };
1107
1175
  }, {
1108
1176
  readonly name: "enableAutomaticRelationshipInference";
1109
1177
  readonly stage: "released";
@@ -1196,6 +1264,7 @@ declare type InternalUserPreferences = {
1196
1264
  isMaximized?: boolean;
1197
1265
  isFullScreen?: boolean;
1198
1266
  };
1267
+ enableGuideCues: boolean;
1199
1268
  };
1200
1269
 
1201
1270
  /**
@@ -1262,9 +1331,15 @@ export declare type LogMessage = {
1262
1331
  attr?: any;
1263
1332
  };
1264
1333
 
1265
- declare type MyQueriesWorkspace = {
1266
- type: 'My Queries';
1267
- };
1334
+ declare type MyQueriesWorkspace = z.output<typeof MyQueriesWorkspaceSchema>;
1335
+
1336
+ declare const MyQueriesWorkspaceSchema: z.ZodObject<{
1337
+ type: z.ZodLiteral<"My Queries">;
1338
+ }, "strip", z.ZodTypeAny, {
1339
+ type: "My Queries";
1340
+ }, {
1341
+ type: "My Queries";
1342
+ }>;
1268
1343
 
1269
1344
  declare type NonUserPreferences = {
1270
1345
  ignoreAdditionalCommandLineFlags?: boolean;
@@ -1455,10 +1530,18 @@ declare interface ServerGhostAssignment<ExperimentName, ExperimentVariantName> e
1455
1530
  linkedHoldoutTestName: string;
1456
1531
  }
1457
1532
 
1458
- declare type ServerStatsWorkspace = {
1459
- type: 'Performance';
1533
+ declare type ServerStatsWorkspace = z.output<typeof ServerStatsWorkspaceSchema>;
1534
+
1535
+ declare const ServerStatsWorkspaceSchema: z.ZodObject<{
1536
+ type: z.ZodLiteral<"Performance">;
1537
+ connectionId: z.ZodString;
1538
+ }, "strip", z.ZodTypeAny, {
1539
+ type: "Performance";
1460
1540
  connectionId: string;
1461
- };
1541
+ }, {
1542
+ type: "Performance";
1543
+ connectionId: string;
1544
+ }>;
1462
1545
 
1463
1546
  /**
1464
1547
  * The different values of severity for logging
@@ -1469,12 +1552,24 @@ declare enum Severity {
1469
1552
  ERROR = "error"
1470
1553
  }
1471
1554
 
1472
- declare type ShellWorkspace = {
1473
- type: 'Shell';
1555
+ declare type ShellWorkspace = z.output<typeof ShellWorkspaceSchema>;
1556
+
1557
+ declare const ShellWorkspaceSchema: z.ZodObject<{
1558
+ type: z.ZodLiteral<"Shell">;
1559
+ connectionId: z.ZodString;
1560
+ initialEvaluate: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1561
+ initialInput: z.ZodOptional<z.ZodString>;
1562
+ }, "strip", z.ZodTypeAny, {
1563
+ type: "Shell";
1474
1564
  connectionId: string;
1475
- initialEvaluate?: string | string[];
1476
- initialInput?: string;
1477
- };
1565
+ initialEvaluate?: string | string[] | undefined;
1566
+ initialInput?: string | undefined;
1567
+ }, {
1568
+ type: "Shell";
1569
+ connectionId: string;
1570
+ initialEvaluate?: string | string[] | undefined;
1571
+ initialInput?: string | undefined;
1572
+ }>;
1478
1573
 
1479
1574
  declare const SORT_ORDER_VALUES: readonly ["", "{ _id: 1 }", "{ _id: -1 }", "{ $natural: -1 }"];
1480
1575
 
@@ -1781,20 +1876,127 @@ declare interface Tracker<ExperimentViewedProps> {
1781
1876
  team?: LoggerTeam;
1782
1877
  }
1783
1878
 
1784
- declare type WelcomeWorkspace = {
1785
- type: 'Welcome';
1786
- };
1879
+ declare type WelcomeWorkspace = z.output<typeof WelcomeWorkspaceSchema>;
1880
+
1881
+ declare const WelcomeWorkspaceSchema: z.ZodObject<{
1882
+ type: z.ZodLiteral<"Welcome">;
1883
+ }, "strip", z.ZodTypeAny, {
1884
+ type: "Welcome";
1885
+ }, {
1886
+ type: "Welcome";
1887
+ }>;
1787
1888
 
1788
1889
  declare type Workspace<T extends AnyWorkspace['type']> = Extract<AnyWorkspace, {
1789
1890
  type: T;
1790
1891
  }>;
1791
1892
 
1792
- export declare type WorkspaceTab = {
1893
+ export declare type WorkspaceTab = z.output<typeof WorkspaceTabSchema>;
1894
+
1895
+ declare const WorkspaceTabSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1896
+ type: z.ZodLiteral<"Welcome">;
1897
+ }, "strip", z.ZodTypeAny, {
1898
+ type: "Welcome";
1899
+ }, {
1900
+ type: "Welcome";
1901
+ }>, z.ZodObject<{
1902
+ type: z.ZodLiteral<"My Queries">;
1903
+ }, "strip", z.ZodTypeAny, {
1904
+ type: "My Queries";
1905
+ }, {
1906
+ type: "My Queries";
1907
+ }>, z.ZodObject<{
1908
+ type: z.ZodLiteral<"Data Modeling">;
1909
+ }, "strip", z.ZodTypeAny, {
1910
+ type: "Data Modeling";
1911
+ }, {
1912
+ type: "Data Modeling";
1913
+ }>, z.ZodObject<{
1914
+ type: z.ZodLiteral<"Databases">;
1915
+ connectionId: z.ZodString;
1916
+ }, "strip", z.ZodTypeAny, {
1917
+ type: "Databases";
1918
+ connectionId: string;
1919
+ }, {
1920
+ type: "Databases";
1921
+ connectionId: string;
1922
+ }>, z.ZodObject<{
1923
+ type: z.ZodLiteral<"Performance">;
1924
+ connectionId: z.ZodString;
1925
+ }, "strip", z.ZodTypeAny, {
1926
+ type: "Performance";
1927
+ connectionId: string;
1928
+ }, {
1929
+ type: "Performance";
1930
+ connectionId: string;
1931
+ }>, z.ZodObject<{
1932
+ type: z.ZodLiteral<"Shell">;
1933
+ connectionId: z.ZodString;
1934
+ initialEvaluate: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1935
+ initialInput: z.ZodOptional<z.ZodString>;
1936
+ }, "strip", z.ZodTypeAny, {
1937
+ type: "Shell";
1938
+ connectionId: string;
1939
+ initialEvaluate?: string | string[] | undefined;
1940
+ initialInput?: string | undefined;
1941
+ }, {
1942
+ type: "Shell";
1943
+ connectionId: string;
1944
+ initialEvaluate?: string | string[] | undefined;
1945
+ initialInput?: string | undefined;
1946
+ }>, z.ZodObject<{
1947
+ type: z.ZodLiteral<"Collections">;
1948
+ connectionId: z.ZodString;
1949
+ namespace: z.ZodString;
1950
+ inferredFromPrivileges: z.ZodOptional<z.ZodBoolean>;
1951
+ }, "strip", z.ZodTypeAny, {
1952
+ type: "Collections";
1953
+ connectionId: string;
1954
+ namespace: string;
1955
+ inferredFromPrivileges?: boolean | undefined;
1956
+ }, {
1957
+ type: "Collections";
1958
+ connectionId: string;
1959
+ namespace: string;
1960
+ inferredFromPrivileges?: boolean | undefined;
1961
+ }>, z.ZodObject<{
1962
+ type: z.ZodLiteral<"Collection">;
1963
+ subTab: z.ZodEnum<["Documents", "Aggregations", "Schema", "Indexes", "Validation", "GlobalWrites"]>;
1964
+ initialQuery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1965
+ initialPipeline: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
1966
+ initialPipelineText: z.ZodOptional<z.ZodString>;
1967
+ initialAggregation: z.ZodOptional<z.ZodUnknown>;
1968
+ editViewName: z.ZodOptional<z.ZodString>;
1969
+ connectionId: z.ZodString;
1970
+ namespace: z.ZodString;
1971
+ inferredFromPrivileges: z.ZodOptional<z.ZodBoolean>;
1972
+ }, "strip", z.ZodTypeAny, {
1973
+ type: "Collection";
1974
+ connectionId: string;
1975
+ namespace: string;
1976
+ subTab: "Documents" | "Aggregations" | "Schema" | "Indexes" | "Validation" | "GlobalWrites";
1977
+ inferredFromPrivileges?: boolean | undefined;
1978
+ initialQuery?: Record<string, any> | undefined;
1979
+ initialPipeline?: unknown[] | undefined;
1980
+ initialPipelineText?: string | undefined;
1981
+ initialAggregation?: unknown;
1982
+ editViewName?: string | undefined;
1983
+ }, {
1984
+ type: "Collection";
1985
+ connectionId: string;
1986
+ namespace: string;
1987
+ subTab: "Documents" | "Aggregations" | "Schema" | "Indexes" | "Validation" | "GlobalWrites";
1988
+ inferredFromPrivileges?: boolean | undefined;
1989
+ initialQuery?: Record<string, any> | undefined;
1990
+ initialPipeline?: unknown[] | undefined;
1991
+ initialPipelineText?: string | undefined;
1992
+ initialAggregation?: unknown;
1993
+ editViewName?: string | undefined;
1994
+ }>]>, z.ZodObject<{
1995
+ id: z.ZodString;
1996
+ }, "strip", z.ZodTypeAny, {
1793
1997
  id: string;
1794
- } & WorkspaceTabProps;
1795
-
1796
- declare type WorkspaceTabProps = WelcomeWorkspace | MyQueriesWorkspace | DataModelingWorkspace | ShellWorkspace | ServerStatsWorkspace | DatabasesWorkspace | CollectionsWorkspace | (Omit<CollectionWorkspace, 'tabId'> & {
1797
- subTab: CollectionSubtab;
1798
- });
1998
+ }, {
1999
+ id: string;
2000
+ }>>;
1799
2001
 
1800
2002
  export { }