@perses-dev/core 0.53.1 → 0.54.0-beta.1

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.
Files changed (104) hide show
  1. package/dist/cjs/constants/dashboard-defaults.js +3 -3
  2. package/dist/cjs/model/calculations.js +6 -6
  3. package/dist/cjs/model/definitions.js +1 -3
  4. package/dist/cjs/model/folder.js +16 -0
  5. package/dist/cjs/model/index.js +1 -0
  6. package/dist/cjs/model/legend.js +11 -11
  7. package/dist/cjs/model/otlp/index.js +4 -4
  8. package/dist/cjs/model/otlp/trace/v1/trace.js +4 -4
  9. package/dist/cjs/model/resource.js +3 -3
  10. package/dist/cjs/model/roles.js +4 -4
  11. package/dist/cjs/model/time.js +21 -309
  12. package/dist/cjs/model/units/bits.js +4 -4
  13. package/dist/cjs/model/units/bytes.js +4 -4
  14. package/dist/cjs/model/units/currency.js +4 -4
  15. package/dist/cjs/model/units/date.js +4 -4
  16. package/dist/cjs/model/units/decimal.js +4 -4
  17. package/dist/cjs/model/units/formatterCache.js +3 -3
  18. package/dist/cjs/model/units/percent.js +4 -4
  19. package/dist/cjs/model/units/temperature.js +4 -4
  20. package/dist/cjs/model/units/throughput.js +4 -4
  21. package/dist/cjs/model/units/time.js +5 -5
  22. package/dist/cjs/model/units/units.js +18 -18
  23. package/dist/cjs/model/units/utils.js +4 -4
  24. package/dist/cjs/model/variables.js +3 -3
  25. package/dist/cjs/schema/datasource.js +13 -29
  26. package/dist/cjs/schema/display.js +2 -6
  27. package/dist/cjs/schema/duration.js +2 -4
  28. package/dist/cjs/schema/metadata.js +4 -4
  29. package/dist/cjs/schema/panel.js +20 -73
  30. package/dist/cjs/schema/plugin.js +2 -6
  31. package/dist/cjs/schema/role.js +6 -6
  32. package/dist/cjs/schema/rolebinding.js +6 -6
  33. package/dist/cjs/schema/secret.js +5 -5
  34. package/dist/cjs/schema/user.js +5 -5
  35. package/dist/cjs/schema/variable.js +24 -137
  36. package/dist/cjs/utils/fetch.js +5 -5
  37. package/dist/cjs/utils/panel-refs.js +4 -4
  38. package/dist/cjs/utils/regexp.js +3 -3
  39. package/dist/cjs/utils/text.js +7 -7
  40. package/dist/cjs/utils/time-series-data.js +4 -4
  41. package/dist/cjs/utils/transform-data.js +6 -6
  42. package/dist/model/dashboard.d.ts +2 -21
  43. package/dist/model/dashboard.d.ts.map +1 -1
  44. package/dist/model/dashboard.js.map +1 -1
  45. package/dist/model/datasource.d.ts +3 -22
  46. package/dist/model/datasource.d.ts.map +1 -1
  47. package/dist/model/datasource.js +1 -3
  48. package/dist/model/datasource.js.map +1 -1
  49. package/dist/model/definitions.d.ts +1 -12
  50. package/dist/model/definitions.d.ts.map +1 -1
  51. package/dist/model/definitions.js +1 -6
  52. package/dist/model/definitions.js.map +1 -1
  53. package/dist/model/display.d.ts +1 -4
  54. package/dist/model/display.d.ts.map +1 -1
  55. package/dist/model/display.js.map +1 -1
  56. package/dist/model/folder.d.ts +19 -0
  57. package/dist/model/folder.d.ts.map +1 -0
  58. package/dist/model/folder.js +15 -0
  59. package/dist/model/folder.js.map +1 -0
  60. package/dist/model/index.d.ts +1 -0
  61. package/dist/model/index.d.ts.map +1 -1
  62. package/dist/model/index.js +1 -0
  63. package/dist/model/index.js.map +1 -1
  64. package/dist/model/project.d.ts +1 -1
  65. package/dist/model/project.d.ts.map +1 -1
  66. package/dist/model/project.js.map +1 -1
  67. package/dist/model/resource.d.ts +1 -1
  68. package/dist/model/resource.d.ts.map +1 -1
  69. package/dist/model/resource.js.map +1 -1
  70. package/dist/model/time.d.ts +3 -54
  71. package/dist/model/time.d.ts.map +1 -1
  72. package/dist/model/time.js +2 -299
  73. package/dist/model/time.js.map +1 -1
  74. package/dist/schema/datasource.d.ts +10 -9
  75. package/dist/schema/datasource.d.ts.map +1 -1
  76. package/dist/schema/datasource.js +2 -14
  77. package/dist/schema/datasource.js.map +1 -1
  78. package/dist/schema/display.d.ts +1 -11
  79. package/dist/schema/display.d.ts.map +1 -1
  80. package/dist/schema/display.js +1 -5
  81. package/dist/schema/display.js.map +1 -1
  82. package/dist/schema/duration.d.ts +1 -2
  83. package/dist/schema/duration.d.ts.map +1 -1
  84. package/dist/schema/duration.js +1 -3
  85. package/dist/schema/duration.js.map +1 -1
  86. package/dist/schema/panel.d.ts +1 -12
  87. package/dist/schema/panel.d.ts.map +1 -1
  88. package/dist/schema/panel.js +1 -54
  89. package/dist/schema/panel.js.map +1 -1
  90. package/dist/schema/plugin.d.ts +2 -13
  91. package/dist/schema/plugin.d.ts.map +1 -1
  92. package/dist/schema/plugin.js +1 -5
  93. package/dist/schema/plugin.js.map +1 -1
  94. package/dist/schema/role.d.ts +4 -4
  95. package/dist/schema/rolebinding.d.ts +4 -4
  96. package/dist/schema/secret.d.ts +70 -70
  97. package/dist/schema/variable.d.ts +1 -91
  98. package/dist/schema/variable.d.ts.map +1 -1
  99. package/dist/schema/variable.js +1 -105
  100. package/dist/schema/variable.js.map +1 -1
  101. package/dist/utils/fetch.js.map +1 -1
  102. package/dist/utils/text.js +4 -4
  103. package/dist/utils/text.js.map +1 -1
  104. package/package.json +3 -2
@@ -17,17 +17,17 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- DECIMAL_GROUP_CONFIG: function() {
24
+ get DECIMAL_GROUP_CONFIG () {
25
25
  return DECIMAL_GROUP_CONFIG;
26
26
  },
27
- DECIMAL_UNIT_CONFIG: function() {
27
+ get DECIMAL_UNIT_CONFIG () {
28
28
  return DECIMAL_UNIT_CONFIG;
29
29
  },
30
- formatDecimal: function() {
30
+ get formatDecimal () {
31
31
  return formatDecimal;
32
32
  }
33
33
  });
@@ -17,14 +17,14 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- getFormatterFromCache: function() {
24
+ get getFormatterFromCache () {
25
25
  return getFormatterFromCache;
26
26
  },
27
- getFormatterStats: function() {
27
+ get getFormatterStats () {
28
28
  return getFormatterStats;
29
29
  }
30
30
  });
@@ -17,17 +17,17 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- PERCENT_GROUP_CONFIG: function() {
24
+ get PERCENT_GROUP_CONFIG () {
25
25
  return PERCENT_GROUP_CONFIG;
26
26
  },
27
- PERCENT_UNIT_CONFIG: function() {
27
+ get PERCENT_UNIT_CONFIG () {
28
28
  return PERCENT_UNIT_CONFIG;
29
29
  },
30
- formatPercent: function() {
30
+ get formatPercent () {
31
31
  return formatPercent;
32
32
  }
33
33
  });
@@ -17,17 +17,17 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- TEMPERATURE_GROUP_CONFIG: function() {
24
+ get TEMPERATURE_GROUP_CONFIG () {
25
25
  return TEMPERATURE_GROUP_CONFIG;
26
26
  },
27
- TEMPERATURE_UNIT_CONFIG: function() {
27
+ get TEMPERATURE_UNIT_CONFIG () {
28
28
  return TEMPERATURE_UNIT_CONFIG;
29
29
  },
30
- formatTemperature: function() {
30
+ get formatTemperature () {
31
31
  return formatTemperature;
32
32
  }
33
33
  });
@@ -17,17 +17,17 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- THROUGHPUT_GROUP_CONFIG: function() {
24
+ get THROUGHPUT_GROUP_CONFIG () {
25
25
  return THROUGHPUT_GROUP_CONFIG;
26
26
  },
27
- THROUGHPUT_UNIT_CONFIG: function() {
27
+ get THROUGHPUT_UNIT_CONFIG () {
28
28
  return THROUGHPUT_UNIT_CONFIG;
29
29
  },
30
- formatThroughput: function() {
30
+ get formatThroughput () {
31
31
  return formatThroughput;
32
32
  }
33
33
  });
@@ -17,20 +17,20 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- PersesTimeToIntlTime: function() {
24
+ get PersesTimeToIntlTime () {
25
25
  return PersesTimeToIntlTime;
26
26
  },
27
- TIME_GROUP_CONFIG: function() {
27
+ get TIME_GROUP_CONFIG () {
28
28
  return TIME_GROUP_CONFIG;
29
29
  },
30
- TIME_UNIT_CONFIG: function() {
30
+ get TIME_UNIT_CONFIG () {
31
31
  return TIME_UNIT_CONFIG;
32
32
  },
33
- formatTime: function() {
33
+ get formatTime () {
34
34
  return formatTime;
35
35
  }
36
36
  });
@@ -17,59 +17,59 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- UNIT_CONFIG: function() {
24
+ get UNIT_CONFIG () {
25
25
  return UNIT_CONFIG;
26
26
  },
27
- UNIT_GROUP_CONFIG: function() {
27
+ get UNIT_GROUP_CONFIG () {
28
28
  return UNIT_GROUP_CONFIG;
29
29
  },
30
- formatValue: function() {
30
+ get formatValue () {
31
31
  return formatValue;
32
32
  },
33
- getUnitConfig: function() {
33
+ get getUnitConfig () {
34
34
  return getUnitConfig;
35
35
  },
36
- getUnitGroup: function() {
36
+ get getUnitGroup () {
37
37
  return getUnitGroup;
38
38
  },
39
- getUnitGroupConfig: function() {
39
+ get getUnitGroupConfig () {
40
40
  return getUnitGroupConfig;
41
41
  },
42
- isBitsUnit: function() {
42
+ get isBitsUnit () {
43
43
  return isBitsUnit;
44
44
  },
45
- isBytesUnit: function() {
45
+ get isBytesUnit () {
46
46
  return isBytesUnit;
47
47
  },
48
- isCurrencyUnit: function() {
48
+ get isCurrencyUnit () {
49
49
  return isCurrencyUnit;
50
50
  },
51
- isDateUnit: function() {
51
+ get isDateUnit () {
52
52
  return isDateUnit;
53
53
  },
54
- isDecimalUnit: function() {
54
+ get isDecimalUnit () {
55
55
  return isDecimalUnit;
56
56
  },
57
- isPercentUnit: function() {
57
+ get isPercentUnit () {
58
58
  return isPercentUnit;
59
59
  },
60
- isTemperatureUnit: function() {
60
+ get isTemperatureUnit () {
61
61
  return isTemperatureUnit;
62
62
  },
63
- isThroughputUnit: function() {
63
+ get isThroughputUnit () {
64
64
  return isThroughputUnit;
65
65
  },
66
- isTimeUnit: function() {
66
+ get isTimeUnit () {
67
67
  return isTimeUnit;
68
68
  },
69
- isUnitWithDecimalPlaces: function() {
69
+ get isUnitWithDecimalPlaces () {
70
70
  return isUnitWithDecimalPlaces;
71
71
  },
72
- isUnitWithShortValues: function() {
72
+ get isUnitWithShortValues () {
73
73
  return isUnitWithShortValues;
74
74
  }
75
75
  });
@@ -17,17 +17,17 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- hasDecimalPlaces: function() {
24
+ get hasDecimalPlaces () {
25
25
  return hasDecimalPlaces;
26
26
  },
27
- limitDecimalPlaces: function() {
27
+ get limitDecimalPlaces () {
28
28
  return limitDecimalPlaces;
29
29
  },
30
- shouldShortenValues: function() {
30
+ get shouldShortenValues () {
31
31
  return shouldShortenValues;
32
32
  }
33
33
  });
@@ -17,14 +17,14 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- DEFAULT_ALL_VALUE: function() {
24
+ get DEFAULT_ALL_VALUE () {
25
25
  return DEFAULT_ALL_VALUE;
26
26
  },
27
- getVariableProject: function() {
27
+ get getVariableProject () {
28
28
  return getVariableProject;
29
29
  }
30
30
  });
@@ -17,57 +17,41 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- buildDatasourceDefinitionSchema: function() {
24
+ get buildDatasourceDefinitionSchema () {
25
25
  return buildDatasourceDefinitionSchema;
26
26
  },
27
- buildDatasourceSpecSchema: function() {
28
- return buildDatasourceSpecSchema;
27
+ get buildDatasourceSpecSchema () {
28
+ return _spec.buildDatasourceSpecSchema;
29
29
  },
30
- datasourceDefinitionSchema: function() {
30
+ get datasourceDefinitionSchema () {
31
31
  return datasourceDefinitionSchema;
32
32
  },
33
- datasourceSchema: function() {
33
+ get datasourceSchema () {
34
34
  return datasourceSchema;
35
35
  },
36
- datasourceSpecSchema: function() {
37
- return datasourceSpecSchema;
38
- },
39
- datasourcesSchema: function() {
36
+ get datasourcesSchema () {
40
37
  return datasourcesSchema;
41
38
  },
42
- globalDatasourceSchema: function() {
39
+ get globalDatasourceSchema () {
43
40
  return globalDatasourceSchema;
44
41
  }
45
42
  });
43
+ const _spec = require("@perses-dev/spec");
46
44
  const _zod = require("zod");
47
45
  const _metadata = require("./metadata");
48
- const _plugin = require("./plugin");
49
- const _display = require("./display");
50
- const datasourceSpecSchema = _zod.z.object({
51
- display: _display.displaySchema.optional(),
52
- default: _zod.z.boolean(),
53
- plugin: _plugin.pluginSchema
54
- });
55
- function buildDatasourceSpecSchema(pluginSchema) {
56
- return _zod.z.object({
57
- display: _display.displaySchema.optional(),
58
- default: _zod.z.boolean(),
59
- plugin: pluginSchema
60
- });
61
- }
62
46
  const datasourceSchema = _zod.z.object({
63
47
  kind: _zod.z.literal('Datasource'),
64
48
  metadata: _metadata.projectMetadataSchema,
65
- spec: datasourceSpecSchema
49
+ spec: _spec.datasourceSpecSchema
66
50
  });
67
51
  const globalDatasourceSchema = _zod.z.object({
68
52
  kind: _zod.z.literal('GlobalDatasource'),
69
53
  metadata: _metadata.metadataSchema,
70
- spec: datasourceSpecSchema
54
+ spec: _spec.datasourceSpecSchema
71
55
  });
72
56
  const datasourcesSchema = _zod.z.discriminatedUnion('kind', [
73
57
  datasourceSchema,
@@ -75,11 +59,11 @@ const datasourcesSchema = _zod.z.discriminatedUnion('kind', [
75
59
  ]);
76
60
  const datasourceDefinitionSchema = _zod.z.object({
77
61
  name: _zod.z.string().min(1),
78
- spec: datasourceSpecSchema
62
+ spec: _spec.datasourceSpecSchema
79
63
  });
80
64
  function buildDatasourceDefinitionSchema(pluginSchema) {
81
65
  return _zod.z.object({
82
66
  name: _zod.z.string().min(1),
83
- spec: buildDatasourceSpecSchema(pluginSchema)
67
+ spec: (0, _spec.buildDatasourceSpecSchema)(pluginSchema)
84
68
  });
85
69
  }
@@ -17,11 +17,7 @@ Object.defineProperty(exports, "__esModule", {
17
17
  Object.defineProperty(exports, "displaySchema", {
18
18
  enumerable: true,
19
19
  get: function() {
20
- return displaySchema;
20
+ return _spec.displaySchema;
21
21
  }
22
22
  });
23
- const _zod = require("zod");
24
- const displaySchema = _zod.z.object({
25
- name: _zod.z.string().optional(),
26
- description: _zod.z.string().optional()
27
- });
23
+ const _spec = require("@perses-dev/spec");
@@ -17,9 +17,7 @@ Object.defineProperty(exports, "__esModule", {
17
17
  Object.defineProperty(exports, "durationValidationSchema", {
18
18
  enumerable: true,
19
19
  get: function() {
20
- return durationValidationSchema;
20
+ return _spec.durationValidationSchema;
21
21
  }
22
22
  });
23
- const _zod = require("zod");
24
- const _model = require("../model");
25
- const durationValidationSchema = _zod.z.string().min(1, 'Required').regex(_model.DURATION_REGEX, 'Must be a valid duration string');
23
+ const _spec = require("@perses-dev/spec");
@@ -17,17 +17,17 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- metadataSchema: function() {
24
+ get metadataSchema () {
25
25
  return metadataSchema;
26
26
  },
27
- nameSchema: function() {
27
+ get nameSchema () {
28
28
  return nameSchema;
29
29
  },
30
- projectMetadataSchema: function() {
30
+ get projectMetadataSchema () {
31
31
  return projectMetadataSchema;
32
32
  }
33
33
  });
@@ -17,89 +17,36 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- buildPanelDefinitionSchema: function() {
25
- return buildPanelDefinitionSchema;
24
+ get buildPanelDefinitionSchema () {
25
+ return _spec.buildPanelDefinitionSchema;
26
26
  },
27
- buildPanelEditorSchema: function() {
28
- return buildPanelEditorSchema;
27
+ get buildPanelEditorSchema () {
28
+ return _spec.buildPanelEditorSchema;
29
29
  },
30
- buildPanelSpecSchema: function() {
31
- return buildPanelSpecSchema;
30
+ get buildPanelSpecSchema () {
31
+ return _spec.buildPanelSpecSchema;
32
32
  },
33
- linkSchema: function() {
34
- return linkSchema;
33
+ get linkSchema () {
34
+ return _spec.linkSchema;
35
35
  },
36
- panelDefinitionSchema: function() {
37
- return panelDefinitionSchema;
36
+ get panelDefinitionSchema () {
37
+ return _spec.panelDefinitionSchema;
38
38
  },
39
- panelDisplaySpec: function() {
40
- return panelDisplaySpec;
39
+ get panelDisplaySpec () {
40
+ return _spec.panelDisplaySpec;
41
41
  },
42
- panelEditorSchema: function() {
43
- return panelEditorSchema;
42
+ get panelEditorSchema () {
43
+ return _spec.panelEditorSchema;
44
44
  },
45
- panelSpecSchema: function() {
46
- return panelSpecSchema;
45
+ get panelSpecSchema () {
46
+ return _spec.panelSpecSchema;
47
47
  },
48
- querySpecSchema: function() {
49
- return querySpecSchema;
48
+ get querySpecSchema () {
49
+ return _spec.querySpecSchema;
50
50
  }
51
51
  });
52
- const _zod = require("zod");
53
- const _plugin = require("./plugin");
54
- const panelDisplaySpec = _zod.z.object({
55
- name: _zod.z.string().optional(),
56
- description: _zod.z.string().optional()
57
- });
58
- const querySpecSchema = _zod.z.object({
59
- kind: _zod.z.string().min(1),
60
- spec: _zod.z.object({
61
- name: _zod.z.string().optional(),
62
- plugin: _plugin.pluginSchema
63
- })
64
- });
65
- const linkSchema = _zod.z.object({
66
- name: _zod.z.string().optional(),
67
- url: _zod.z.string().min(1),
68
- tooltip: _zod.z.string().optional(),
69
- renderVariables: _zod.z.boolean().optional(),
70
- targetBlank: _zod.z.boolean().optional()
71
- });
72
- const panelSpecSchema = _zod.z.object({
73
- display: panelDisplaySpec.optional(),
74
- plugin: _plugin.pluginSchema,
75
- queries: _zod.z.array(querySpecSchema).optional(),
76
- links: _zod.z.array(linkSchema).optional()
77
- });
78
- function buildPanelSpecSchema(pluginSchema) {
79
- return _zod.z.object({
80
- display: panelDisplaySpec.optional(),
81
- plugin: pluginSchema,
82
- queries: _zod.z.array(querySpecSchema).optional(),
83
- links: _zod.z.array(linkSchema).optional()
84
- });
85
- }
86
- const panelDefinitionSchema = _zod.z.object({
87
- kind: _zod.z.literal('Panel'),
88
- spec: panelSpecSchema
89
- });
90
- function buildPanelDefinitionSchema(pluginSchema) {
91
- return _zod.z.object({
92
- kind: _zod.z.literal('Panel'),
93
- spec: buildPanelSpecSchema(pluginSchema)
94
- });
95
- }
96
- const panelEditorSchema = _zod.z.object({
97
- groupId: _zod.z.number(),
98
- panelDefinition: panelDefinitionSchema
99
- });
100
- function buildPanelEditorSchema(pluginSchema) {
101
- return _zod.z.object({
102
- groupId: _zod.z.number(),
103
- panelDefinition: buildPanelDefinitionSchema(pluginSchema)
104
- });
105
- }
52
+ const _spec = require("@perses-dev/spec");
@@ -17,11 +17,7 @@ Object.defineProperty(exports, "__esModule", {
17
17
  Object.defineProperty(exports, "pluginSchema", {
18
18
  enumerable: true,
19
19
  get: function() {
20
- return pluginSchema;
20
+ return _spec.pluginSchema;
21
21
  }
22
22
  });
23
- const _zod = require("zod");
24
- const pluginSchema = _zod.z.object({
25
- kind: _zod.z.string().min(1, 'Required'),
26
- spec: _zod.z.record(_zod.z.string(), _zod.z.any())
27
- });
23
+ const _spec = require("@perses-dev/spec");
@@ -17,23 +17,23 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- globalRoleSchema: function() {
24
+ get globalRoleSchema () {
25
25
  return globalRoleSchema;
26
26
  },
27
- permissionSchema: function() {
27
+ get permissionSchema () {
28
28
  return permissionSchema;
29
29
  },
30
- roleSchema: function() {
30
+ get roleSchema () {
31
31
  return roleSchema;
32
32
  },
33
- roleSpecSchema: function() {
33
+ get roleSpecSchema () {
34
34
  return roleSpecSchema;
35
35
  },
36
- rolesEditorSchema: function() {
36
+ get rolesEditorSchema () {
37
37
  return rolesEditorSchema;
38
38
  }
39
39
  });
@@ -17,23 +17,23 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- globalRoleBindingSchema: function() {
24
+ get globalRoleBindingSchema () {
25
25
  return globalRoleBindingSchema;
26
26
  },
27
- roleBindingSchema: function() {
27
+ get roleBindingSchema () {
28
28
  return roleBindingSchema;
29
29
  },
30
- roleBindingSpecSchema: function() {
30
+ get roleBindingSpecSchema () {
31
31
  return roleBindingSpecSchema;
32
32
  },
33
- roleBindingsEditorSchema: function() {
33
+ get roleBindingsEditorSchema () {
34
34
  return roleBindingsEditorSchema;
35
35
  },
36
- subjectSchema: function() {
36
+ get subjectSchema () {
37
37
  return subjectSchema;
38
38
  }
39
39
  });
@@ -17,20 +17,20 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- globalSecretSchema: function() {
24
+ get globalSecretSchema () {
25
25
  return globalSecretSchema;
26
26
  },
27
- secretSchema: function() {
27
+ get secretSchema () {
28
28
  return secretSchema;
29
29
  },
30
- secretSpecSchema: function() {
30
+ get secretSpecSchema () {
31
31
  return secretSpecSchema;
32
32
  },
33
- secretsEditorSchema: function() {
33
+ get secretsEditorSchema () {
34
34
  return secretsEditorSchema;
35
35
  }
36
36
  });
@@ -17,20 +17,20 @@ Object.defineProperty(exports, "__esModule", {
17
17
  function _export(target, all) {
18
18
  for(var name in all)Object.defineProperty(target, name, {
19
19
  enumerable: true,
20
- get: all[name]
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- nativeProviderSchema: function() {
24
+ get nativeProviderSchema () {
25
25
  return nativeProviderSchema;
26
26
  },
27
- oauthProvidersSchema: function() {
27
+ get oauthProvidersSchema () {
28
28
  return oauthProvidersSchema;
29
29
  },
30
- userSchema: function() {
30
+ get userSchema () {
31
31
  return userSchema;
32
32
  },
33
- userSpecSchema: function() {
33
+ get userSpecSchema () {
34
34
  return userSpecSchema;
35
35
  }
36
36
  });