@perses-dev/plugin-system 0.0.0-snapshot-scatter-chart-embed-8efdfab → 0.0.0-snapshot-explorer-plugin-c4a7621
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/dist/cjs/components/CalculationSelector/CalculationSelector.js +1 -1
- package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +83 -163
- package/dist/cjs/components/DatasourceSelect.js +12 -15
- package/dist/cjs/components/HTTPSettingsEditor/HTTPSettingsEditor.js +528 -0
- package/dist/cjs/components/{TimeSeriesQueryEditor → HTTPSettingsEditor}/index.js +2 -2
- package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +8 -7
- package/dist/cjs/components/MetricLabelInput/MetricLabelInput.js +41 -0
- package/dist/cjs/{validation/resource.js → components/MetricLabelInput/index.js} +15 -9
- package/dist/cjs/components/{TraceQueryEditor/TraceQueryEditor.js → MultiQueryEditor/MultiQueryEditor.js} +39 -40
- package/dist/cjs/components/{TimeSeriesQueryEditor/TimeSeriesQueryInput.js → MultiQueryEditor/QueryEditorContainer.js} +23 -11
- package/dist/cjs/components/MultiQueryEditor/index.js +30 -0
- package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +3 -3
- package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
- package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
- package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +54 -62
- package/dist/cjs/components/PluginEditor/PluginEditor.js +16 -13
- package/dist/cjs/components/PluginEditor/plugin-editor-api.js +44 -33
- package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +55 -7
- package/dist/cjs/components/PluginRegistry/PluginRegistry.js +9 -10
- package/dist/cjs/components/PluginRegistry/plugin-indexes.js +20 -17
- package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
- package/dist/cjs/components/ProjectSelect.js +7 -7
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +131 -0
- package/dist/cjs/components/{TraceQueryEditor → TimeRangeControls}/index.js +1 -1
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +394 -439
- package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +17 -15
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +7 -12
- package/dist/cjs/components/Variables/variable-model.js +35 -37
- package/dist/cjs/components/index.js +4 -1
- package/dist/cjs/constants/user-interface-text.js +4 -1
- package/dist/cjs/context/ProjectStoreProvider.js +12 -9
- package/dist/cjs/context/ValidationProvider.js +69 -0
- package/dist/cjs/context/index.js +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/{components/TimeSeriesQueryEditor/index.js → cjs/model/explore.js} +4 -3
- package/dist/cjs/model/legend.js +5 -5
- package/dist/cjs/remote/PersesPlugin.types.js +16 -0
- package/dist/cjs/remote/PluginLoaderComponent.js +75 -0
- package/dist/cjs/remote/PluginRuntime.js +267 -0
- package/dist/cjs/{validation → remote}/index.js +2 -4
- package/dist/cjs/remote/remotePluginLoader.js +61 -0
- package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +23 -14
- package/dist/cjs/runtime/DataQueriesProvider/model.js +10 -9
- package/dist/cjs/runtime/QueryCountProvider.js +83 -0
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +37 -13
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +3 -3
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +100 -0
- package/dist/cjs/runtime/TimeRangeProvider/index.js +2 -1
- package/dist/cjs/runtime/TimeRangeProvider/query-params.js +20 -23
- package/dist/cjs/runtime/UsageMetricsProvider.js +99 -0
- package/dist/cjs/runtime/builtin-variables.js +7 -7
- package/dist/cjs/runtime/datasources.js +30 -21
- package/dist/cjs/runtime/index.js +4 -2
- package/dist/cjs/runtime/plugin-registry.js +48 -36
- package/dist/cjs/runtime/time-series-queries.js +35 -40
- package/dist/cjs/runtime/trace-queries.js +9 -6
- package/dist/cjs/runtime/{template-variables.js → variables.js} +38 -48
- package/dist/cjs/stories/shared-utils/decorators/WithDataQueries.js +1 -1
- package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +1 -65
- package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +1 -1
- package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +5 -5
- package/dist/cjs/stories/shared-utils/decorators/{WithPluginSystemTemplateVariables.js → WithPluginSystemVariables.js} +9 -9
- package/dist/cjs/stories/shared-utils/decorators/WithTimeRange.js +1 -1
- package/dist/cjs/stories/shared-utils/decorators/index.js +2 -2
- package/dist/cjs/test/mock-data.js +25 -4
- package/dist/cjs/test/render.js +2 -11
- package/dist/cjs/test/test-plugins/bert/index.js +21 -20
- package/dist/cjs/test/test-plugins/ernie/index.js +2 -2
- package/dist/cjs/test/test-plugins/index.js +3 -1
- package/dist/cjs/test-utils/mock-plugin-registry.js +13 -13
- package/dist/cjs/utils/action.js +3 -3
- package/dist/cjs/utils/variables.js +24 -24
- package/dist/components/CalculationSelector/CalculationSelector.d.ts +2 -2
- package/dist/components/CalculationSelector/CalculationSelector.d.ts.map +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +7 -7
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +86 -166
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -1
- package/dist/components/DatasourceSelect.d.ts +4 -4
- package/dist/components/DatasourceSelect.d.ts.map +1 -1
- package/dist/components/DatasourceSelect.js +9 -12
- package/dist/components/DatasourceSelect.js.map +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts +11 -0
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts.map +1 -0
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js +474 -0
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +1 -0
- package/dist/components/HTTPSettingsEditor/index.d.ts +2 -0
- package/dist/components/HTTPSettingsEditor/index.d.ts.map +1 -0
- package/dist/components/HTTPSettingsEditor/index.js +15 -0
- package/dist/components/HTTPSettingsEditor/index.js.map +1 -0
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts +3 -2
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +10 -9
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
- package/dist/components/MetricLabelInput/MetricLabelInput.d.ts +7 -0
- package/dist/components/MetricLabelInput/MetricLabelInput.d.ts.map +1 -0
- package/dist/components/MetricLabelInput/MetricLabelInput.js +33 -0
- package/dist/components/MetricLabelInput/MetricLabelInput.js.map +1 -0
- package/dist/components/MetricLabelInput/index.d.ts +2 -0
- package/dist/components/MetricLabelInput/index.d.ts.map +1 -0
- package/dist/components/MetricLabelInput/index.js +15 -0
- package/dist/components/MetricLabelInput/index.js.map +1 -0
- package/dist/components/MultiQueryEditor/MultiQueryEditor.d.ts +17 -0
- package/dist/components/MultiQueryEditor/MultiQueryEditor.d.ts.map +1 -0
- package/dist/components/{TimeSeriesQueryEditor/TimeSeriesQueryEditor.js → MultiQueryEditor/MultiQueryEditor.js} +42 -39
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js.map +1 -0
- package/dist/components/MultiQueryEditor/QueryEditorContainer.d.ts +29 -0
- package/dist/components/MultiQueryEditor/QueryEditorContainer.d.ts.map +1 -0
- package/dist/components/{TimeSeriesQueryEditor/TimeSeriesQueryInput.js → MultiQueryEditor/QueryEditorContainer.js} +33 -10
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js.map +1 -0
- package/dist/components/MultiQueryEditor/index.d.ts +2 -0
- package/dist/components/MultiQueryEditor/index.d.ts.map +1 -0
- package/dist/components/MultiQueryEditor/index.js +15 -0
- package/dist/components/{TraceQueryEditor → MultiQueryEditor}/index.js.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +4 -4
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +3 -3
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts +2 -2
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts.map +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts +5 -5
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +5 -3
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js +56 -64
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.d.ts +2 -2
- package/dist/components/PluginEditor/PluginEditor.d.ts.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.js +16 -13
- package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.d.ts +16 -10
- package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js +44 -33
- package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +11 -5
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js +61 -10
- package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.d.ts +4 -4
- package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js +9 -10
- package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
- package/dist/components/PluginRegistry/plugin-indexes.d.ts +4 -4
- package/dist/components/PluginRegistry/plugin-indexes.d.ts.map +1 -1
- package/dist/components/PluginRegistry/plugin-indexes.js +17 -14
- package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts +5 -5
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
- package/dist/components/ProjectSelect.d.ts +3 -3
- package/dist/components/ProjectSelect.d.ts.map +1 -1
- package/dist/components/ProjectSelect.js +7 -7
- package/dist/components/ProjectSelect.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +14 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.js +110 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -0
- package/dist/components/TimeRangeControls/index.d.ts +2 -0
- package/dist/components/TimeRangeControls/index.d.ts.map +1 -0
- package/dist/components/{TraceQueryEditor → TimeRangeControls}/index.js +1 -1
- package/dist/components/TimeRangeControls/index.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +4 -3
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +395 -442
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts +3 -3
- package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js +11 -11
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +3 -3
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +7 -12
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
- package/dist/components/Variables/variable-model.d.ts +2 -1
- package/dist/components/Variables/variable-model.d.ts.map +1 -1
- package/dist/components/Variables/variable-model.js +29 -31
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -1
- package/dist/components/index.js.map +1 -1
- package/dist/constants/user-interface-text.d.ts +2 -0
- package/dist/constants/user-interface-text.d.ts.map +1 -1
- package/dist/constants/user-interface-text.js +4 -1
- package/dist/constants/user-interface-text.js.map +1 -1
- package/dist/context/ProjectStoreProvider.d.ts +4 -4
- package/dist/context/ProjectStoreProvider.d.ts.map +1 -1
- package/dist/context/ProjectStoreProvider.js +9 -6
- package/dist/context/ProjectStoreProvider.js.map +1 -1
- package/dist/context/ValidationProvider.d.ts +19 -0
- package/dist/context/ValidationProvider.d.ts.map +1 -0
- package/dist/context/ValidationProvider.js +52 -0
- package/dist/context/ValidationProvider.js.map +1 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +1 -0
- package/dist/context/index.js.map +1 -1
- package/dist/context/query-params.d.ts.map +1 -1
- package/dist/context/query-params.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/datasource.js +3 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/explore.d.ts +13 -0
- package/dist/model/explore.d.ts.map +1 -0
- package/dist/{validation/resource.js → model/explore.js} +4 -3
- package/dist/model/explore.js.map +1 -0
- package/dist/model/legend.d.ts +2 -2
- package/dist/model/legend.d.ts.map +1 -1
- package/dist/model/legend.js.map +1 -1
- package/dist/model/panels.d.ts +17 -5
- package/dist/model/panels.d.ts.map +1 -1
- package/dist/model/panels.js.map +1 -1
- package/dist/model/plugin-base.d.ts +0 -1
- package/dist/model/plugin-base.d.ts.map +1 -1
- package/dist/model/plugin-base.js.map +1 -1
- package/dist/model/plugin-loading.js.map +1 -1
- package/dist/model/plugins.d.ts +35 -21
- package/dist/model/plugins.d.ts.map +1 -1
- package/dist/model/plugins.js.map +1 -1
- package/dist/model/time-series-queries.d.ts +4 -3
- package/dist/model/time-series-queries.d.ts.map +1 -1
- package/dist/model/time-series-queries.js.map +1 -1
- package/dist/model/trace-queries.d.ts +1 -1
- package/dist/model/trace-queries.d.ts.map +1 -1
- package/dist/model/trace-queries.js.map +1 -1
- package/dist/model/variables.d.ts +2 -2
- package/dist/model/variables.d.ts.map +1 -1
- package/dist/model/variables.js +3 -1
- package/dist/model/variables.js.map +1 -1
- package/dist/remote/PersesPlugin.types.d.ts +7 -0
- package/dist/remote/PersesPlugin.types.d.ts.map +1 -0
- package/dist/remote/PersesPlugin.types.js +15 -0
- package/dist/remote/PersesPlugin.types.js.map +1 -0
- package/dist/remote/PluginLoaderComponent.d.ts +10 -0
- package/dist/remote/PluginLoaderComponent.d.ts.map +1 -0
- package/dist/remote/PluginLoaderComponent.js +67 -0
- package/dist/remote/PluginLoaderComponent.js.map +1 -0
- package/dist/remote/PluginRuntime.d.ts +11 -0
- package/dist/remote/PluginRuntime.d.ts.map +1 -0
- package/dist/remote/PluginRuntime.js +202 -0
- package/dist/remote/PluginRuntime.js.map +1 -0
- package/dist/remote/index.d.ts +3 -0
- package/dist/remote/index.d.ts.map +1 -0
- package/dist/{validation → remote}/index.js +2 -4
- package/dist/remote/index.js.map +1 -0
- package/dist/remote/remotePluginLoader.d.ts +3 -0
- package/dist/remote/remotePluginLoader.d.ts.map +1 -0
- package/dist/remote/remotePluginLoader.js +53 -0
- package/dist/remote/remotePluginLoader.js.map +1 -0
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +2 -2
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +19 -10
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.d.ts +6 -7
- package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.js +10 -9
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
- package/dist/runtime/QueryCountProvider.d.ts +9 -0
- package/dist/runtime/QueryCountProvider.d.ts.map +1 -0
- package/dist/{validation/datasource.js → runtime/QueryCountProvider.js} +14 -10
- package/dist/runtime/QueryCountProvider.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts +6 -2
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +30 -9
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts +2 -2
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +3 -3
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.d.ts +32 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.d.ts.map +1 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +82 -0
- package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js.map +1 -0
- package/dist/runtime/TimeRangeProvider/index.d.ts +1 -0
- package/dist/runtime/TimeRangeProvider/index.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/index.js +2 -1
- package/dist/runtime/TimeRangeProvider/index.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.d.ts +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.js +8 -11
- package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/refresh-interval.js.map +1 -1
- package/dist/runtime/UsageMetricsProvider.d.ts +25 -0
- package/dist/runtime/UsageMetricsProvider.d.ts.map +1 -0
- package/dist/runtime/UsageMetricsProvider.js +77 -0
- package/dist/runtime/UsageMetricsProvider.js.map +1 -0
- package/dist/runtime/builtin-variables.d.ts +2 -2
- package/dist/runtime/builtin-variables.d.ts.map +1 -1
- package/dist/runtime/builtin-variables.js +4 -4
- package/dist/runtime/builtin-variables.js.map +1 -1
- package/dist/runtime/datasources.d.ts +5 -4
- package/dist/runtime/datasources.d.ts.map +1 -1
- package/dist/runtime/datasources.js +24 -15
- package/dist/runtime/datasources.js.map +1 -1
- package/dist/runtime/index.d.ts +3 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +4 -2
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/plugin-registry.d.ts +11 -11
- package/dist/runtime/plugin-registry.d.ts.map +1 -1
- package/dist/runtime/plugin-registry.js +40 -28
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/dist/runtime/time-series-queries.d.ts +5 -4
- package/dist/runtime/time-series-queries.d.ts.map +1 -1
- package/dist/runtime/time-series-queries.js +28 -33
- package/dist/runtime/time-series-queries.js.map +1 -1
- package/dist/runtime/trace-queries.d.ts +5 -4
- package/dist/runtime/trace-queries.d.ts.map +1 -1
- package/dist/runtime/trace-queries.js +10 -7
- package/dist/runtime/trace-queries.js.map +1 -1
- package/dist/runtime/{template-variables.d.ts → variables.d.ts} +7 -7
- package/dist/runtime/variables.d.ts.map +1 -0
- package/dist/runtime/{template-variables.js → variables.js} +35 -44
- package/dist/runtime/variables.js.map +1 -0
- package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts +3 -3
- package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithDataQueries.js +1 -1
- package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts +2 -2
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.js +2 -22
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +3 -3
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts +3 -3
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +5 -5
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemVariables.d.ts +13 -0
- package/dist/stories/shared-utils/decorators/WithPluginSystemVariables.d.ts.map +1 -0
- package/dist/stories/shared-utils/decorators/{WithPluginSystemTemplateVariables.js → WithPluginSystemVariables.js} +10 -10
- package/dist/stories/shared-utils/decorators/WithPluginSystemVariables.js.map +1 -0
- package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts +3 -3
- package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithTimeRange.js +1 -1
- package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +1 -1
- package/dist/stories/shared-utils/decorators/index.d.ts +1 -1
- package/dist/stories/shared-utils/decorators/index.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/index.js +2 -2
- package/dist/stories/shared-utils/decorators/index.js.map +1 -1
- package/dist/test/mock-data.d.ts.map +1 -1
- package/dist/test/mock-data.js +25 -4
- package/dist/test/mock-data.js.map +1 -1
- package/dist/test/render.d.ts +4 -4
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +2 -11
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/test-plugins/bert/index.d.ts.map +1 -1
- package/dist/test/test-plugins/bert/index.js +21 -20
- package/dist/test/test-plugins/bert/index.js.map +1 -1
- package/dist/test/test-plugins/ernie/index.js +2 -2
- package/dist/test/test-plugins/ernie/index.js.map +1 -1
- package/dist/test-utils/mock-plugin-registry.d.ts +6 -4
- package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
- package/dist/test-utils/mock-plugin-registry.js +10 -10
- package/dist/test-utils/mock-plugin-registry.js.map +1 -1
- package/dist/utils/variables.d.ts +4 -4
- package/dist/utils/variables.d.ts.map +1 -1
- package/dist/utils/variables.js +19 -19
- package/dist/utils/variables.js.map +1 -1
- package/package.json +7 -6
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +0 -146
- package/dist/cjs/components/TraceQueryEditor/TraceQueryInput.js +0 -96
- package/dist/cjs/validation/datasource.js +0 -30
- package/dist/cjs/validation/role.js +0 -85
- package/dist/cjs/validation/rolebinding.js +0 -55
- package/dist/cjs/validation/secret.js +0 -176
- package/dist/cjs/validation/variable.js +0 -48
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +0 -8
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +0 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +0 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +0 -13
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts.map +0 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +0 -1
- package/dist/components/TimeSeriesQueryEditor/index.d.ts +0 -2
- package/dist/components/TimeSeriesQueryEditor/index.d.ts.map +0 -1
- package/dist/components/TimeSeriesQueryEditor/index.js.map +0 -1
- package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts +0 -9
- package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts.map +0 -1
- package/dist/components/TraceQueryEditor/TraceQueryEditor.js +0 -130
- package/dist/components/TraceQueryEditor/TraceQueryEditor.js.map +0 -1
- package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts +0 -13
- package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts.map +0 -1
- package/dist/components/TraceQueryEditor/TraceQueryInput.js +0 -83
- package/dist/components/TraceQueryEditor/TraceQueryInput.js.map +0 -1
- package/dist/components/TraceQueryEditor/index.d.ts +0 -2
- package/dist/components/TraceQueryEditor/index.d.ts.map +0 -1
- package/dist/runtime/template-variables.d.ts.map +0 -1
- package/dist/runtime/template-variables.js.map +0 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts +0 -13
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts.map +0 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js.map +0 -1
- package/dist/validation/datasource.d.ts +0 -19
- package/dist/validation/datasource.d.ts.map +0 -1
- package/dist/validation/datasource.js.map +0 -1
- package/dist/validation/index.d.ts +0 -5
- package/dist/validation/index.d.ts.map +0 -1
- package/dist/validation/index.js.map +0 -1
- package/dist/validation/resource.d.ts +0 -3
- package/dist/validation/resource.d.ts.map +0 -1
- package/dist/validation/resource.js.map +0 -1
- package/dist/validation/role.d.ts +0 -228
- package/dist/validation/role.d.ts.map +0 -1
- package/dist/validation/role.js +0 -66
- package/dist/validation/role.js.map +0 -1
- package/dist/validation/rolebinding.d.ts +0 -137
- package/dist/validation/rolebinding.d.ts.map +0 -1
- package/dist/validation/rolebinding.js +0 -47
- package/dist/validation/rolebinding.js.map +0 -1
- package/dist/validation/secret.d.ts +0 -964
- package/dist/validation/secret.d.ts.map +0 -1
- package/dist/validation/secret.js +0 -157
- package/dist/validation/secret.js.map +0 -1
- package/dist/validation/variable.d.ts +0 -96
- package/dist/validation/variable.d.ts.map +0 -1
- package/dist/validation/variable.js +0 -40
- package/dist/validation/variable.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WithPluginSystemTemplateVariables.d.ts","sourceRoot":"","sources":["../../../../src/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAA2B,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,UAAU;QAClB,iCAAiC,CAAC,EAAE,yCAAyC,CAAC;KAC/E;CACF;AAED,oBAAY,yCAAyC,GAAG;IACtD,KAAK,EAAE,mBAAmB,CAAC;CAC5B,CAAC;AAcF,eAAO,MAAM,iCAAiC,UAAW,OAAO,WAAW,aAAa,OAAO,CAAC,gBAc/F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { StoryFn, StoryContext } from '@storybook/react';\nimport { TemplateVariableContext, TemplateVariableSrv } from '../../../runtime';\n\ndeclare module '@storybook/react' {\n interface Parameters {\n withPluginSystemTemplateVariables?: WithPluginSystemTemplateVariableParameter;\n }\n}\n\nexport type WithPluginSystemTemplateVariableParameter = {\n props: TemplateVariableSrv;\n};\n\n// Type guard because storybook types parameters as `any`\nfunction isWithTemplateVariableParameter(\n parameter: unknown | WithPluginSystemTemplateVariableParameter\n): parameter is WithPluginSystemTemplateVariableParameter {\n return !!parameter && typeof parameter === 'object' && 'props' in parameter;\n}\n\n// This decorator is used for non-dashboards package template variable needs.\n// Use the more specific decorator in the dashboards package when working with\n// dashboards.\n// This decorator includes \"PluginSystem\" in the name to differentiate it from\n// the datasource store decorator in the `dashboards` package.\nexport const WithPluginSystemTemplateVariables = (Story: StoryFn, context: StoryContext<unknown>) => {\n const initParameter = context.parameters.withPluginSystemTemplateVariables;\n const defaultValue: TemplateVariableSrv = {\n state: {},\n };\n const parameter = isWithTemplateVariableParameter(initParameter) ? initParameter : { props: defaultValue };\n\n const props = parameter?.props;\n\n return (\n <TemplateVariableContext.Provider value={props}>\n <Story />\n </TemplateVariableContext.Provider>\n );\n};\n"],"names":["TemplateVariableContext","isWithTemplateVariableParameter","parameter","WithPluginSystemTemplateVariables","Story","context","initParameter","parameters","withPluginSystemTemplateVariables","defaultValue","state","props","Provider","value"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,uBAAuB,QAA6B,mBAAmB;AAYhF,yDAAyD;AACzD,SAASC,gCACPC,SAA8D;IAE9D,OAAO,CAAC,CAACA,aAAa,OAAOA,cAAc,YAAY,WAAWA;AACpE;AAEA,6EAA6E;AAC7E,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAC9E,8DAA8D;AAC9D,OAAO,MAAMC,oCAAoC,CAACC,OAAgBC;IAChE,MAAMC,gBAAgBD,QAAQE,WAAWC;IACzC,MAAMC,eAAoC;QACxCC,OAAO,CAAC;IACV;IACA,MAAMR,YAAYD,gCAAgCK,iBAAiBA,gBAAgB;QAAEK,OAAOF;IAAa;IAEzG,MAAME,QAAQT,sBAAAA,uBAAAA,KAAAA,IAAAA,UAAWS;IAEzB,qBACE,KAACX,wBAAwBY;QAASC,OAAOF;kBACvC,cAAA,KAACP;;AAGP,EAAE"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const datasourceEditValidationSchema: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
title: z.ZodOptional<z.ZodString>;
|
|
5
|
-
description: z.ZodOptional<z.ZodString>;
|
|
6
|
-
default: z.ZodBoolean;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
name: string;
|
|
9
|
-
default: boolean;
|
|
10
|
-
title?: string | undefined;
|
|
11
|
-
description?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
name: string;
|
|
14
|
-
default: boolean;
|
|
15
|
-
title?: string | undefined;
|
|
16
|
-
description?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export declare type DatasourceEditValidationType = z.infer<typeof datasourceEditValidationSchema>;
|
|
19
|
-
//# sourceMappingURL=datasource.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../src/validation/datasource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;EAKzC,CAAC;AAEH,oBAAY,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/validation/datasource.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { z } from 'zod';\nimport { resourceIdValidationSchema } from './resource';\n\nexport const datasourceEditValidationSchema = z.object({\n name: resourceIdValidationSchema,\n title: z.string().optional(), // display name\n description: z.string().optional(),\n default: z.boolean(),\n});\n\nexport type DatasourceEditValidationType = z.infer<typeof datasourceEditValidationSchema>;\n"],"names":["z","resourceIdValidationSchema","datasourceEditValidationSchema","object","name","title","string","optional","description","default","boolean"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AACxB,SAASC,0BAA0B,QAAQ,aAAa;AAExD,OAAO,MAAMC,iCAAiCF,EAAEG,OAAO;IACrDC,MAAMH;IACNI,OAAOL,EAAEM,SAASC;IAClBC,aAAaR,EAAEM,SAASC;IACxBE,SAAST,EAAEU;AACb,GAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/validation/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './datasource';\nexport * from './resource';\nexport * from './secret';\nexport * from './variable';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,eAAe;AAC7B,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/validation/resource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B,aAImE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/validation/resource.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { z } from 'zod';\n\nexport const resourceIdValidationSchema = z\n .string()\n .nonempty('Required')\n .max(75, 'Must be 75 or fewer characters long')\n .regex(/^[a-zA-Z0-9_.-]+$/, 'Must only contains alphanumerical characters and special characters _ . -');\n"],"names":["z","resourceIdValidationSchema","string","nonempty","max","regex"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AAExB,OAAO,MAAMC,6BAA6BD,EACvCE,SACAC,SAAS,YACTC,IAAI,IAAI,uCACRC,MAAM,qBAAqB,6EAA6E"}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const roleValidationSchema: z.ZodObject<{
|
|
3
|
-
kind: z.ZodLiteral<"Role">;
|
|
4
|
-
metadata: z.ZodObject<{
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
project: z.ZodString;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
name: string;
|
|
9
|
-
project: string;
|
|
10
|
-
}, {
|
|
11
|
-
name: string;
|
|
12
|
-
project: string;
|
|
13
|
-
}>;
|
|
14
|
-
spec: z.ZodObject<{
|
|
15
|
-
permissions: z.ZodArray<z.ZodObject<{
|
|
16
|
-
actions: z.ZodArray<z.ZodEnum<["*", "create", "read", "update", "delete"]>, "atleastone">;
|
|
17
|
-
scopes: z.ZodArray<z.ZodEnum<["*", "Dashboard", "Datasource", "Folder", "GlobalDatasource", "GlobalRole", "GlobalRoleBinding", "GlobalSecret", "GlobalVariable", "Project", "Role", "RoleBinding", "Secret", "User", "Variable"]>, "atleastone">;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
20
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
21
|
-
}, {
|
|
22
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
23
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
24
|
-
}>, "many">;
|
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
permissions: {
|
|
27
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
28
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
29
|
-
}[];
|
|
30
|
-
}, {
|
|
31
|
-
permissions: {
|
|
32
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
33
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
34
|
-
}[];
|
|
35
|
-
}>;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
metadata: {
|
|
38
|
-
name: string;
|
|
39
|
-
project: string;
|
|
40
|
-
};
|
|
41
|
-
kind: "Role";
|
|
42
|
-
spec: {
|
|
43
|
-
permissions: {
|
|
44
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
45
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
46
|
-
}[];
|
|
47
|
-
};
|
|
48
|
-
}, {
|
|
49
|
-
metadata: {
|
|
50
|
-
name: string;
|
|
51
|
-
project: string;
|
|
52
|
-
};
|
|
53
|
-
kind: "Role";
|
|
54
|
-
spec: {
|
|
55
|
-
permissions: {
|
|
56
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
57
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
58
|
-
}[];
|
|
59
|
-
};
|
|
60
|
-
}>;
|
|
61
|
-
export declare const globalRoleValidationSchema: z.ZodObject<{
|
|
62
|
-
kind: z.ZodLiteral<"GlobalRole">;
|
|
63
|
-
metadata: z.ZodObject<{
|
|
64
|
-
name: z.ZodString;
|
|
65
|
-
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
name: string;
|
|
67
|
-
}, {
|
|
68
|
-
name: string;
|
|
69
|
-
}>;
|
|
70
|
-
spec: z.ZodObject<{
|
|
71
|
-
permissions: z.ZodArray<z.ZodObject<{
|
|
72
|
-
actions: z.ZodArray<z.ZodEnum<["*", "create", "read", "update", "delete"]>, "atleastone">;
|
|
73
|
-
scopes: z.ZodArray<z.ZodEnum<["*", "Dashboard", "Datasource", "Folder", "GlobalDatasource", "GlobalRole", "GlobalRoleBinding", "GlobalSecret", "GlobalVariable", "Project", "Role", "RoleBinding", "Secret", "User", "Variable"]>, "atleastone">;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
76
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
77
|
-
}, {
|
|
78
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
79
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
80
|
-
}>, "many">;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
permissions: {
|
|
83
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
84
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
85
|
-
}[];
|
|
86
|
-
}, {
|
|
87
|
-
permissions: {
|
|
88
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
89
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
90
|
-
}[];
|
|
91
|
-
}>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
metadata: {
|
|
94
|
-
name: string;
|
|
95
|
-
};
|
|
96
|
-
kind: "GlobalRole";
|
|
97
|
-
spec: {
|
|
98
|
-
permissions: {
|
|
99
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
100
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
101
|
-
}[];
|
|
102
|
-
};
|
|
103
|
-
}, {
|
|
104
|
-
metadata: {
|
|
105
|
-
name: string;
|
|
106
|
-
};
|
|
107
|
-
kind: "GlobalRole";
|
|
108
|
-
spec: {
|
|
109
|
-
permissions: {
|
|
110
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
111
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
112
|
-
}[];
|
|
113
|
-
};
|
|
114
|
-
}>;
|
|
115
|
-
export declare const rolesEditorValidationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
116
|
-
kind: z.ZodLiteral<"Role">;
|
|
117
|
-
metadata: z.ZodObject<{
|
|
118
|
-
name: z.ZodString;
|
|
119
|
-
project: z.ZodString;
|
|
120
|
-
}, "strip", z.ZodTypeAny, {
|
|
121
|
-
name: string;
|
|
122
|
-
project: string;
|
|
123
|
-
}, {
|
|
124
|
-
name: string;
|
|
125
|
-
project: string;
|
|
126
|
-
}>;
|
|
127
|
-
spec: z.ZodObject<{
|
|
128
|
-
permissions: z.ZodArray<z.ZodObject<{
|
|
129
|
-
actions: z.ZodArray<z.ZodEnum<["*", "create", "read", "update", "delete"]>, "atleastone">;
|
|
130
|
-
scopes: z.ZodArray<z.ZodEnum<["*", "Dashboard", "Datasource", "Folder", "GlobalDatasource", "GlobalRole", "GlobalRoleBinding", "GlobalSecret", "GlobalVariable", "Project", "Role", "RoleBinding", "Secret", "User", "Variable"]>, "atleastone">;
|
|
131
|
-
}, "strip", z.ZodTypeAny, {
|
|
132
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
133
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
134
|
-
}, {
|
|
135
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
136
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
137
|
-
}>, "many">;
|
|
138
|
-
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
permissions: {
|
|
140
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
141
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
142
|
-
}[];
|
|
143
|
-
}, {
|
|
144
|
-
permissions: {
|
|
145
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
146
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
147
|
-
}[];
|
|
148
|
-
}>;
|
|
149
|
-
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
metadata: {
|
|
151
|
-
name: string;
|
|
152
|
-
project: string;
|
|
153
|
-
};
|
|
154
|
-
kind: "Role";
|
|
155
|
-
spec: {
|
|
156
|
-
permissions: {
|
|
157
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
158
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
159
|
-
}[];
|
|
160
|
-
};
|
|
161
|
-
}, {
|
|
162
|
-
metadata: {
|
|
163
|
-
name: string;
|
|
164
|
-
project: string;
|
|
165
|
-
};
|
|
166
|
-
kind: "Role";
|
|
167
|
-
spec: {
|
|
168
|
-
permissions: {
|
|
169
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
170
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
171
|
-
}[];
|
|
172
|
-
};
|
|
173
|
-
}>, z.ZodObject<{
|
|
174
|
-
kind: z.ZodLiteral<"GlobalRole">;
|
|
175
|
-
metadata: z.ZodObject<{
|
|
176
|
-
name: z.ZodString;
|
|
177
|
-
}, "strip", z.ZodTypeAny, {
|
|
178
|
-
name: string;
|
|
179
|
-
}, {
|
|
180
|
-
name: string;
|
|
181
|
-
}>;
|
|
182
|
-
spec: z.ZodObject<{
|
|
183
|
-
permissions: z.ZodArray<z.ZodObject<{
|
|
184
|
-
actions: z.ZodArray<z.ZodEnum<["*", "create", "read", "update", "delete"]>, "atleastone">;
|
|
185
|
-
scopes: z.ZodArray<z.ZodEnum<["*", "Dashboard", "Datasource", "Folder", "GlobalDatasource", "GlobalRole", "GlobalRoleBinding", "GlobalSecret", "GlobalVariable", "Project", "Role", "RoleBinding", "Secret", "User", "Variable"]>, "atleastone">;
|
|
186
|
-
}, "strip", z.ZodTypeAny, {
|
|
187
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
188
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
189
|
-
}, {
|
|
190
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
191
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
192
|
-
}>, "many">;
|
|
193
|
-
}, "strip", z.ZodTypeAny, {
|
|
194
|
-
permissions: {
|
|
195
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
196
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
197
|
-
}[];
|
|
198
|
-
}, {
|
|
199
|
-
permissions: {
|
|
200
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
201
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
202
|
-
}[];
|
|
203
|
-
}>;
|
|
204
|
-
}, "strip", z.ZodTypeAny, {
|
|
205
|
-
metadata: {
|
|
206
|
-
name: string;
|
|
207
|
-
};
|
|
208
|
-
kind: "GlobalRole";
|
|
209
|
-
spec: {
|
|
210
|
-
permissions: {
|
|
211
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
212
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
213
|
-
}[];
|
|
214
|
-
};
|
|
215
|
-
}, {
|
|
216
|
-
metadata: {
|
|
217
|
-
name: string;
|
|
218
|
-
};
|
|
219
|
-
kind: "GlobalRole";
|
|
220
|
-
spec: {
|
|
221
|
-
permissions: {
|
|
222
|
-
actions: ["create" | "read" | "update" | "delete" | "*", ...("create" | "read" | "update" | "delete" | "*")[]];
|
|
223
|
-
scopes: ["*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User", ...("*" | "Datasource" | "Secret" | "GlobalSecret" | "Variable" | "Project" | "Dashboard" | "Folder" | "GlobalDatasource" | "GlobalRole" | "GlobalRoleBinding" | "GlobalVariable" | "Role" | "RoleBinding" | "User")[]];
|
|
224
|
-
}[];
|
|
225
|
-
};
|
|
226
|
-
}>]>;
|
|
227
|
-
export declare type RolesEditorValidationType = z.infer<typeof rolesEditorValidationSchema>;
|
|
228
|
-
//# sourceMappingURL=role.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../../src/validation/role.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6BxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS/B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQrC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGtC,CAAC;AAEH,oBAAY,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
package/dist/validation/role.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
import { z } from 'zod';
|
|
14
|
-
import { resourceIdValidationSchema } from './resource';
|
|
15
|
-
const permissionValidationSchema = z.object({
|
|
16
|
-
// TODO: use SCOPE & ACTIONS constants
|
|
17
|
-
actions: z.array(z.enum([
|
|
18
|
-
'*',
|
|
19
|
-
'create',
|
|
20
|
-
'read',
|
|
21
|
-
'update',
|
|
22
|
-
'delete'
|
|
23
|
-
])).nonempty('Must contains at least 1 action'),
|
|
24
|
-
scopes: z.array(z.enum([
|
|
25
|
-
'*',
|
|
26
|
-
'Dashboard',
|
|
27
|
-
'Datasource',
|
|
28
|
-
'Folder',
|
|
29
|
-
'GlobalDatasource',
|
|
30
|
-
'GlobalRole',
|
|
31
|
-
'GlobalRoleBinding',
|
|
32
|
-
'GlobalSecret',
|
|
33
|
-
'GlobalVariable',
|
|
34
|
-
'Project',
|
|
35
|
-
'Role',
|
|
36
|
-
'RoleBinding',
|
|
37
|
-
'Secret',
|
|
38
|
-
'User',
|
|
39
|
-
'Variable'
|
|
40
|
-
])).nonempty('Must contains at least 1 scope')
|
|
41
|
-
});
|
|
42
|
-
export const roleValidationSchema = z.object({
|
|
43
|
-
kind: z.literal('Role'),
|
|
44
|
-
metadata: z.object({
|
|
45
|
-
name: resourceIdValidationSchema,
|
|
46
|
-
project: resourceIdValidationSchema
|
|
47
|
-
}),
|
|
48
|
-
spec: z.object({
|
|
49
|
-
permissions: z.array(permissionValidationSchema)
|
|
50
|
-
})
|
|
51
|
-
});
|
|
52
|
-
export const globalRoleValidationSchema = z.object({
|
|
53
|
-
kind: z.literal('GlobalRole'),
|
|
54
|
-
metadata: z.object({
|
|
55
|
-
name: resourceIdValidationSchema
|
|
56
|
-
}),
|
|
57
|
-
spec: z.object({
|
|
58
|
-
permissions: z.array(permissionValidationSchema)
|
|
59
|
-
})
|
|
60
|
-
});
|
|
61
|
-
export const rolesEditorValidationSchema = z.discriminatedUnion('kind', [
|
|
62
|
-
roleValidationSchema,
|
|
63
|
-
globalRoleValidationSchema
|
|
64
|
-
]);
|
|
65
|
-
|
|
66
|
-
//# sourceMappingURL=role.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/validation/role.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { z } from 'zod';\nimport { resourceIdValidationSchema } from './resource';\n\nconst permissionValidationSchema = z.object({\n // TODO: use SCOPE & ACTIONS constants\n actions: z.array(z.enum(['*', 'create', 'read', 'update', 'delete'])).nonempty('Must contains at least 1 action'),\n scopes: z\n .array(\n z.enum([\n '*',\n 'Dashboard',\n 'Datasource',\n 'Folder',\n 'GlobalDatasource',\n 'GlobalRole',\n 'GlobalRoleBinding',\n 'GlobalSecret',\n 'GlobalVariable',\n 'Project',\n 'Role',\n 'RoleBinding',\n 'Secret',\n 'User',\n 'Variable',\n ])\n )\n .nonempty('Must contains at least 1 scope'), // TODO: limit project role\n});\n\nexport const roleValidationSchema = z.object({\n kind: z.literal('Role'),\n metadata: z.object({\n name: resourceIdValidationSchema,\n project: resourceIdValidationSchema,\n }),\n spec: z.object({\n permissions: z.array(permissionValidationSchema),\n }),\n});\n\nexport const globalRoleValidationSchema = z.object({\n kind: z.literal('GlobalRole'),\n metadata: z.object({\n name: resourceIdValidationSchema,\n }),\n spec: z.object({\n permissions: z.array(permissionValidationSchema),\n }),\n});\n\nexport const rolesEditorValidationSchema = z.discriminatedUnion('kind', [\n roleValidationSchema,\n globalRoleValidationSchema,\n]);\n\nexport type RolesEditorValidationType = z.infer<typeof rolesEditorValidationSchema>;\n"],"names":["z","resourceIdValidationSchema","permissionValidationSchema","object","actions","array","enum","nonempty","scopes","roleValidationSchema","kind","literal","metadata","name","project","spec","permissions","globalRoleValidationSchema","rolesEditorValidationSchema","discriminatedUnion"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AACxB,SAASC,0BAA0B,QAAQ,aAAa;AAExD,MAAMC,6BAA6BF,EAAEG,OAAO;IAC1C,sCAAsC;IACtCC,SAASJ,EAAEK,MAAML,EAAEM,KAAK;QAAC;QAAK;QAAU;QAAQ;QAAU;KAAS,GAAGC,SAAS;IAC/EC,QAAQR,EACLK,MACCL,EAAEM,KAAK;QACL;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD,GAEFC,SAAS;AACd;AAEA,OAAO,MAAME,uBAAuBT,EAAEG,OAAO;IAC3CO,MAAMV,EAAEW,QAAQ;IAChBC,UAAUZ,EAAEG,OAAO;QACjBU,MAAMZ;QACNa,SAASb;IACX;IACAc,MAAMf,EAAEG,OAAO;QACba,aAAahB,EAAEK,MAAMH;IACvB;AACF,GAAG;AAEH,OAAO,MAAMe,6BAA6BjB,EAAEG,OAAO;IACjDO,MAAMV,EAAEW,QAAQ;IAChBC,UAAUZ,EAAEG,OAAO;QACjBU,MAAMZ;IACR;IACAc,MAAMf,EAAEG,OAAO;QACba,aAAahB,EAAEK,MAAMH;IACvB;AACF,GAAG;AAEH,OAAO,MAAMgB,8BAA8BlB,EAAEmB,mBAAmB,QAAQ;IACtEV;IACAQ;CACD,EAAE"}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const roleBindingsEditorValidationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
3
|
-
kind: z.ZodLiteral<"RoleBinding">;
|
|
4
|
-
metadata: z.ZodObject<{
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
project: z.ZodString;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
name: string;
|
|
9
|
-
project: string;
|
|
10
|
-
}, {
|
|
11
|
-
name: string;
|
|
12
|
-
project: string;
|
|
13
|
-
}>;
|
|
14
|
-
spec: z.ZodObject<{
|
|
15
|
-
role: z.ZodString;
|
|
16
|
-
subjects: z.ZodArray<z.ZodObject<{
|
|
17
|
-
kind: z.ZodEnum<["User"]>;
|
|
18
|
-
name: z.ZodString;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
name: string;
|
|
21
|
-
kind: "User";
|
|
22
|
-
}, {
|
|
23
|
-
name: string;
|
|
24
|
-
kind: "User";
|
|
25
|
-
}>, "atleastone">;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
role: string;
|
|
28
|
-
subjects: [{
|
|
29
|
-
name: string;
|
|
30
|
-
kind: "User";
|
|
31
|
-
}, ...{
|
|
32
|
-
name: string;
|
|
33
|
-
kind: "User";
|
|
34
|
-
}[]];
|
|
35
|
-
}, {
|
|
36
|
-
role: string;
|
|
37
|
-
subjects: [{
|
|
38
|
-
name: string;
|
|
39
|
-
kind: "User";
|
|
40
|
-
}, ...{
|
|
41
|
-
name: string;
|
|
42
|
-
kind: "User";
|
|
43
|
-
}[]];
|
|
44
|
-
}>;
|
|
45
|
-
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
metadata: {
|
|
47
|
-
name: string;
|
|
48
|
-
project: string;
|
|
49
|
-
};
|
|
50
|
-
kind: "RoleBinding";
|
|
51
|
-
spec: {
|
|
52
|
-
role: string;
|
|
53
|
-
subjects: [{
|
|
54
|
-
name: string;
|
|
55
|
-
kind: "User";
|
|
56
|
-
}, ...{
|
|
57
|
-
name: string;
|
|
58
|
-
kind: "User";
|
|
59
|
-
}[]];
|
|
60
|
-
};
|
|
61
|
-
}, {
|
|
62
|
-
metadata: {
|
|
63
|
-
name: string;
|
|
64
|
-
project: string;
|
|
65
|
-
};
|
|
66
|
-
kind: "RoleBinding";
|
|
67
|
-
spec: {
|
|
68
|
-
role: string;
|
|
69
|
-
subjects: [{
|
|
70
|
-
name: string;
|
|
71
|
-
kind: "User";
|
|
72
|
-
}, ...{
|
|
73
|
-
name: string;
|
|
74
|
-
kind: "User";
|
|
75
|
-
}[]];
|
|
76
|
-
};
|
|
77
|
-
}>, z.ZodObject<{
|
|
78
|
-
kind: z.ZodLiteral<"GlobalRoleBinding">;
|
|
79
|
-
metadata: z.ZodObject<{
|
|
80
|
-
name: z.ZodString;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
name: string;
|
|
83
|
-
}, {
|
|
84
|
-
name: string;
|
|
85
|
-
}>;
|
|
86
|
-
spec: z.ZodObject<{
|
|
87
|
-
role: z.ZodString;
|
|
88
|
-
subjects: z.ZodArray<z.ZodObject<{
|
|
89
|
-
kind: z.ZodEnum<["User"]>;
|
|
90
|
-
name: z.ZodString;
|
|
91
|
-
}, "strip", z.ZodTypeAny, {
|
|
92
|
-
name: string;
|
|
93
|
-
kind: "User";
|
|
94
|
-
}, {
|
|
95
|
-
name: string;
|
|
96
|
-
kind: "User";
|
|
97
|
-
}>, "many">;
|
|
98
|
-
}, "strip", z.ZodTypeAny, {
|
|
99
|
-
role: string;
|
|
100
|
-
subjects: {
|
|
101
|
-
name: string;
|
|
102
|
-
kind: "User";
|
|
103
|
-
}[];
|
|
104
|
-
}, {
|
|
105
|
-
role: string;
|
|
106
|
-
subjects: {
|
|
107
|
-
name: string;
|
|
108
|
-
kind: "User";
|
|
109
|
-
}[];
|
|
110
|
-
}>;
|
|
111
|
-
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
metadata: {
|
|
113
|
-
name: string;
|
|
114
|
-
};
|
|
115
|
-
kind: "GlobalRoleBinding";
|
|
116
|
-
spec: {
|
|
117
|
-
role: string;
|
|
118
|
-
subjects: {
|
|
119
|
-
name: string;
|
|
120
|
-
kind: "User";
|
|
121
|
-
}[];
|
|
122
|
-
};
|
|
123
|
-
}, {
|
|
124
|
-
metadata: {
|
|
125
|
-
name: string;
|
|
126
|
-
};
|
|
127
|
-
kind: "GlobalRoleBinding";
|
|
128
|
-
spec: {
|
|
129
|
-
role: string;
|
|
130
|
-
subjects: {
|
|
131
|
-
name: string;
|
|
132
|
-
kind: "User";
|
|
133
|
-
}[];
|
|
134
|
-
};
|
|
135
|
-
}>]>;
|
|
136
|
-
export declare type RoleBindingsEditorValidationType = z.infer<typeof roleBindingsEditorValidationSchema>;
|
|
137
|
-
//# sourceMappingURL=rolebinding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolebinding.d.ts","sourceRoot":"","sources":["../../src/validation/rolebinding.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+BxB,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG7C,CAAC;AAEH,oBAAY,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
import { z } from 'zod';
|
|
14
|
-
import { resourceIdValidationSchema } from './resource';
|
|
15
|
-
const subjectValidationSchema = z.object({
|
|
16
|
-
kind: z.enum([
|
|
17
|
-
'User'
|
|
18
|
-
]),
|
|
19
|
-
name: resourceIdValidationSchema
|
|
20
|
-
});
|
|
21
|
-
const roleBindingValidationSchema = z.object({
|
|
22
|
-
kind: z.literal('RoleBinding'),
|
|
23
|
-
metadata: z.object({
|
|
24
|
-
name: resourceIdValidationSchema,
|
|
25
|
-
project: resourceIdValidationSchema
|
|
26
|
-
}),
|
|
27
|
-
spec: z.object({
|
|
28
|
-
role: resourceIdValidationSchema,
|
|
29
|
-
subjects: z.array(subjectValidationSchema).nonempty()
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
const globalRoleBindingValidationSchema = z.object({
|
|
33
|
-
kind: z.literal('GlobalRoleBinding'),
|
|
34
|
-
metadata: z.object({
|
|
35
|
-
name: resourceIdValidationSchema
|
|
36
|
-
}),
|
|
37
|
-
spec: z.object({
|
|
38
|
-
role: resourceIdValidationSchema,
|
|
39
|
-
subjects: z.array(subjectValidationSchema)
|
|
40
|
-
})
|
|
41
|
-
});
|
|
42
|
-
export const roleBindingsEditorValidationSchema = z.discriminatedUnion('kind', [
|
|
43
|
-
roleBindingValidationSchema,
|
|
44
|
-
globalRoleBindingValidationSchema
|
|
45
|
-
]);
|
|
46
|
-
|
|
47
|
-
//# sourceMappingURL=rolebinding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/validation/rolebinding.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { z } from 'zod';\nimport { resourceIdValidationSchema } from './resource';\n\nconst subjectValidationSchema = z.object({\n kind: z.enum(['User']),\n name: resourceIdValidationSchema,\n});\n\nconst roleBindingValidationSchema = z.object({\n kind: z.literal('RoleBinding'),\n metadata: z.object({\n name: resourceIdValidationSchema,\n project: resourceIdValidationSchema,\n }),\n spec: z.object({\n role: resourceIdValidationSchema,\n subjects: z.array(subjectValidationSchema).nonempty(),\n }),\n});\n\nconst globalRoleBindingValidationSchema = z.object({\n kind: z.literal('GlobalRoleBinding'),\n metadata: z.object({\n name: resourceIdValidationSchema,\n }),\n spec: z.object({\n role: resourceIdValidationSchema,\n subjects: z.array(subjectValidationSchema),\n }),\n});\n\nexport const roleBindingsEditorValidationSchema = z.discriminatedUnion('kind', [\n roleBindingValidationSchema,\n globalRoleBindingValidationSchema,\n]);\n\nexport type RoleBindingsEditorValidationType = z.infer<typeof roleBindingsEditorValidationSchema>;\n"],"names":["z","resourceIdValidationSchema","subjectValidationSchema","object","kind","enum","name","roleBindingValidationSchema","literal","metadata","project","spec","role","subjects","array","nonempty","globalRoleBindingValidationSchema","roleBindingsEditorValidationSchema","discriminatedUnion"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AACxB,SAASC,0BAA0B,QAAQ,aAAa;AAExD,MAAMC,0BAA0BF,EAAEG,OAAO;IACvCC,MAAMJ,EAAEK,KAAK;QAAC;KAAO;IACrBC,MAAML;AACR;AAEA,MAAMM,8BAA8BP,EAAEG,OAAO;IAC3CC,MAAMJ,EAAEQ,QAAQ;IAChBC,UAAUT,EAAEG,OAAO;QACjBG,MAAML;QACNS,SAAST;IACX;IACAU,MAAMX,EAAEG,OAAO;QACbS,MAAMX;QACNY,UAAUb,EAAEc,MAAMZ,yBAAyBa;IAC7C;AACF;AAEA,MAAMC,oCAAoChB,EAAEG,OAAO;IACjDC,MAAMJ,EAAEQ,QAAQ;IAChBC,UAAUT,EAAEG,OAAO;QACjBG,MAAML;IACR;IACAU,MAAMX,EAAEG,OAAO;QACbS,MAAMX;QACNY,UAAUb,EAAEc,MAAMZ;IACpB;AACF;AAEA,OAAO,MAAMe,qCAAqCjB,EAAEkB,mBAAmB,QAAQ;IAC7EX;IACAS;CACD,EAAE"}
|