@perses-dev/client 0.54.0-beta.10

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 (137) hide show
  1. package/README.md +3 -0
  2. package/dist/cjs/index.js +32 -0
  3. package/dist/cjs/model/dashboard.js +16 -0
  4. package/dist/cjs/model/datasource-api.js +16 -0
  5. package/dist/cjs/model/datasource.js +16 -0
  6. package/dist/cjs/model/ephemeralDashboard.js +16 -0
  7. package/dist/cjs/model/folder.js +16 -0
  8. package/dist/cjs/model/http.js +16 -0
  9. package/dist/cjs/model/index.js +42 -0
  10. package/dist/cjs/model/kind.js +39 -0
  11. package/dist/cjs/model/resource.js +36 -0
  12. package/dist/cjs/model/role.js +60 -0
  13. package/dist/cjs/model/roleBindings.js +16 -0
  14. package/dist/cjs/model/secret.js +16 -0
  15. package/dist/cjs/model/user.js +16 -0
  16. package/dist/cjs/model/variable.js +34 -0
  17. package/dist/cjs/schema/datasource.js +66 -0
  18. package/dist/cjs/schema/index.js +35 -0
  19. package/dist/cjs/schema/metadata.js +41 -0
  20. package/dist/cjs/schema/role.js +86 -0
  21. package/dist/cjs/schema/rolebinding.js +65 -0
  22. package/dist/cjs/schema/secret.js +211 -0
  23. package/dist/cjs/schema/user.js +57 -0
  24. package/dist/cjs/test/index.js +30 -0
  25. package/dist/cjs/test/render.js +38 -0
  26. package/dist/cjs/test/setup-tests.js +18 -0
  27. package/dist/cjs/util/fetch.js +82 -0
  28. package/dist/cjs/util/index.js +30 -0
  29. package/dist/index.d.ts +4 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +17 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/model/dashboard.d.ts +9 -0
  34. package/dist/model/dashboard.d.ts.map +1 -0
  35. package/dist/model/dashboard.js +15 -0
  36. package/dist/model/dashboard.js.map +1 -0
  37. package/dist/model/datasource-api.d.ts +41 -0
  38. package/dist/model/datasource-api.d.ts.map +1 -0
  39. package/dist/model/datasource-api.js +19 -0
  40. package/dist/model/datasource-api.js.map +1 -0
  41. package/dist/model/datasource.d.ts +28 -0
  42. package/dist/model/datasource.d.ts.map +1 -0
  43. package/dist/model/datasource.js +15 -0
  44. package/dist/model/datasource.js.map +1 -0
  45. package/dist/model/ephemeralDashboard.d.ts +14 -0
  46. package/dist/model/ephemeralDashboard.d.ts.map +1 -0
  47. package/dist/model/ephemeralDashboard.js +15 -0
  48. package/dist/model/ephemeralDashboard.js.map +1 -0
  49. package/dist/model/folder.d.ts +19 -0
  50. package/dist/model/folder.d.ts.map +1 -0
  51. package/dist/model/folder.js +15 -0
  52. package/dist/model/folder.js.map +1 -0
  53. package/dist/model/http.d.ts +2 -0
  54. package/dist/model/http.d.ts.map +1 -0
  55. package/dist/model/http.js +15 -0
  56. package/dist/model/http.js.map +1 -0
  57. package/dist/model/index.d.ts +14 -0
  58. package/dist/model/index.d.ts.map +1 -0
  59. package/dist/model/index.js +27 -0
  60. package/dist/model/index.js.map +1 -0
  61. package/dist/model/kind.d.ts +3 -0
  62. package/dist/model/kind.d.ts.map +1 -0
  63. package/dist/model/kind.js +31 -0
  64. package/dist/model/kind.js.map +1 -0
  65. package/dist/model/resource.d.ts +28 -0
  66. package/dist/model/resource.d.ts.map +1 -0
  67. package/dist/model/resource.js +20 -0
  68. package/dist/model/resource.js.map +1 -0
  69. package/dist/model/role.d.ts +31 -0
  70. package/dist/model/role.d.ts.map +1 -0
  71. package/dist/model/role.js +41 -0
  72. package/dist/model/role.js.map +1 -0
  73. package/dist/model/roleBindings.d.ts +27 -0
  74. package/dist/model/roleBindings.d.ts.map +1 -0
  75. package/dist/model/roleBindings.js +15 -0
  76. package/dist/model/roleBindings.js.map +1 -0
  77. package/dist/model/secret.d.ts +54 -0
  78. package/dist/model/secret.d.ts.map +1 -0
  79. package/dist/model/secret.js +15 -0
  80. package/dist/model/secret.js.map +1 -0
  81. package/dist/model/user.d.ts +21 -0
  82. package/dist/model/user.d.ts.map +1 -0
  83. package/dist/model/user.js +15 -0
  84. package/dist/model/user.js.map +1 -0
  85. package/dist/model/variable.d.ts +58 -0
  86. package/dist/model/variable.d.ts.map +1 -0
  87. package/dist/model/variable.js +18 -0
  88. package/dist/model/variable.js.map +1 -0
  89. package/dist/schema/datasource.d.ts +59 -0
  90. package/dist/schema/datasource.d.ts.map +1 -0
  91. package/dist/schema/datasource.js +41 -0
  92. package/dist/schema/datasource.js.map +1 -0
  93. package/dist/schema/index.d.ts +7 -0
  94. package/dist/schema/index.d.ts.map +1 -0
  95. package/dist/schema/index.js +20 -0
  96. package/dist/schema/index.js.map +1 -0
  97. package/dist/schema/metadata.d.ts +21 -0
  98. package/dist/schema/metadata.d.ts.map +1 -0
  99. package/dist/schema/metadata.js +22 -0
  100. package/dist/schema/metadata.js.map +1 -0
  101. package/dist/schema/role.d.ts +58 -0
  102. package/dist/schema/role.d.ts.map +1 -0
  103. package/dist/schema/role.js +61 -0
  104. package/dist/schema/role.js.map +1 -0
  105. package/dist/schema/rolebinding.d.ts +58 -0
  106. package/dist/schema/rolebinding.d.ts.map +1 -0
  107. package/dist/schema/rolebinding.js +40 -0
  108. package/dist/schema/rolebinding.js.map +1 -0
  109. package/dist/schema/secret.d.ts +1597 -0
  110. package/dist/schema/secret.d.ts.map +1 -0
  111. package/dist/schema/secret.js +189 -0
  112. package/dist/schema/secret.js.map +1 -0
  113. package/dist/schema/user.d.ts +8 -0
  114. package/dist/schema/user.d.ts.map +1 -0
  115. package/dist/schema/user.js +36 -0
  116. package/dist/schema/user.js.map +1 -0
  117. package/dist/test/index.d.ts +2 -0
  118. package/dist/test/index.d.ts.map +1 -0
  119. package/dist/test/index.js +15 -0
  120. package/dist/test/index.js.map +1 -0
  121. package/dist/test/render.d.ts +7 -0
  122. package/dist/test/render.d.ts.map +1 -0
  123. package/dist/test/render.js +32 -0
  124. package/dist/test/render.js.map +1 -0
  125. package/dist/test/setup-tests.d.ts +2 -0
  126. package/dist/test/setup-tests.d.ts.map +1 -0
  127. package/dist/test/setup-tests.js +16 -0
  128. package/dist/test/setup-tests.js.map +1 -0
  129. package/dist/util/fetch.d.ts +28 -0
  130. package/dist/util/fetch.d.ts.map +1 -0
  131. package/dist/util/fetch.js +68 -0
  132. package/dist/util/fetch.js.map +1 -0
  133. package/dist/util/index.d.ts +2 -0
  134. package/dist/util/index.d.ts.map +1 -0
  135. package/dist/util/index.js +15 -0
  136. package/dist/util/index.js.map +1 -0
  137. package/package.json +37 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/datasource-api.ts"],"sourcesContent":["// Copyright 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 { DatasourceResource, DatasourceSelector, GlobalDatasourceResource } from './datasource';\n\n/**\n * Parameters for building a datasource proxy URL\n */\nexport interface BuildDatasourceProxyUrlParams {\n project?: string;\n dashboard?: string;\n name: string;\n}\n\n/**\n * Function type for building datasource proxy URLs\n */\nexport type BuildDatasourceProxyUrlFunc = (params: BuildDatasourceProxyUrlParams) => string;\n\n/**\n * The external API contract for fetching datasource resources.\n * This defines the interface that must be implemented to provide\n * datasource functionality to the dashboard.\n */\nexport interface DatasourceApi {\n /**\n * Optional function to build proxy URLs for datasources\n */\n buildProxyUrl?: BuildDatasourceProxyUrlFunc;\n /**\n * Get a datasource resource for a specific project\n */\n getDatasource: (project: string, selector: DatasourceSelector) => Promise<DatasourceResource | undefined>;\n /**\n * Get a global datasource resource\n */\n getGlobalDatasource: (selector: DatasourceSelector) => Promise<GlobalDatasourceResource | undefined>;\n /**\n * List all datasources for a project, optionally filtered by plugin kind\n */\n listDatasources: (project: string, pluginKind?: string) => Promise<DatasourceResource[]>;\n /**\n * List all global datasources, optionally filtered by plugin kind\n */\n listGlobalDatasources: (pluginKind?: string) => Promise<GlobalDatasourceResource[]>;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAkBjC;;;;CAIC,GACD,WAqBC"}
@@ -0,0 +1,28 @@
1
+ import { DatasourceSpec, DatasourceSelector } from '@perses-dev/spec';
2
+ import { Metadata, ProjectMetadata } from './resource';
3
+ export type { DatasourceSelector, DatasourceSpec };
4
+ /**
5
+ * A Datasource that's available across all projects.
6
+ */
7
+ export interface GlobalDatasourceResource {
8
+ kind: 'GlobalDatasource';
9
+ metadata: Metadata;
10
+ spec: DatasourceSpec;
11
+ }
12
+ /**
13
+ * A Datasource resource, that belongs to a project.
14
+ */
15
+ export interface DatasourceResource {
16
+ kind: 'Datasource';
17
+ metadata: ProjectMetadata;
18
+ spec: DatasourceSpec;
19
+ }
20
+ /**
21
+ * An intermediary type to regroup the name and the spec of a datasource.
22
+ */
23
+ export interface DatasourceDefinition {
24
+ name: string;
25
+ spec: DatasourceSpec;
26
+ }
27
+ export type Datasource = DatasourceResource | GlobalDatasourceResource;
28
+ //# sourceMappingURL=datasource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../src/model/datasource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,kBAAkB,GAAG,wBAAwB,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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
+ export { };
14
+
15
+ //# sourceMappingURL=datasource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/datasource.ts"],"sourcesContent":["// Copyright 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 { DatasourceSpec, DatasourceSelector } from '@perses-dev/spec';\nimport { Metadata, ProjectMetadata } from './resource';\nexport type { DatasourceSelector, DatasourceSpec };\n\n/**\n * A Datasource that's available across all projects.\n */\nexport interface GlobalDatasourceResource {\n kind: 'GlobalDatasource';\n metadata: Metadata;\n spec: DatasourceSpec;\n}\n\n/**\n * A Datasource resource, that belongs to a project.\n */\nexport interface DatasourceResource {\n kind: 'Datasource';\n metadata: ProjectMetadata;\n spec: DatasourceSpec;\n}\n\n/**\n * An intermediary type to regroup the name and the spec of a datasource.\n */\nexport interface DatasourceDefinition {\n name: string;\n spec: DatasourceSpec;\n}\n\nexport type Datasource = DatasourceResource | GlobalDatasourceResource;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAgCjC,WAAuE"}
@@ -0,0 +1,14 @@
1
+ import { ProjectMetadata } from '@perses-dev/client';
2
+ import { DashboardSelector, DashboardSpec, DurationString } from '@perses-dev/spec';
3
+ export interface EphemeralDashboardResource {
4
+ kind: 'EphemeralDashboard';
5
+ metadata: ProjectMetadata;
6
+ spec: EphemeralDashboardSpec;
7
+ }
8
+ export interface EphemeralDashboardSpec extends DashboardSpec {
9
+ ttl: DurationString;
10
+ }
11
+ export interface EphemeralDashboardInfo extends DashboardSelector {
12
+ ttl: DurationString;
13
+ }
14
+ //# sourceMappingURL=ephemeralDashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ephemeralDashboard.d.ts","sourceRoot":"","sources":["../../src/model/ephemeralDashboard.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpF,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,GAAG,EAAE,cAAc,CAAC;CACrB;AAED,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,GAAG,EAAE,cAAc,CAAC;CACrB"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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
+ export { };
14
+
15
+ //# sourceMappingURL=ephemeralDashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/ephemeralDashboard.ts"],"sourcesContent":["// Copyright 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 { ProjectMetadata } from '@perses-dev/client';\nimport { DashboardSelector, DashboardSpec, DurationString } from '@perses-dev/spec';\n\nexport interface EphemeralDashboardResource {\n kind: 'EphemeralDashboard';\n metadata: ProjectMetadata;\n spec: EphemeralDashboardSpec;\n}\n\nexport interface EphemeralDashboardSpec extends DashboardSpec {\n ttl: DurationString;\n}\n\nexport interface EphemeralDashboardInfo extends DashboardSelector {\n ttl: DurationString;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAejC,WAEC"}
@@ -0,0 +1,19 @@
1
+ import { ProjectMetadata } from './resource';
2
+ export interface FolderDisplay {
3
+ name?: string;
4
+ }
5
+ export interface FolderSpec {
6
+ display?: FolderDisplay;
7
+ items?: FolderItem[];
8
+ }
9
+ export interface FolderItem {
10
+ kind: 'Folder' | 'Dashboard';
11
+ name: string;
12
+ items?: FolderItem[];
13
+ }
14
+ export interface FolderResource {
15
+ kind: 'Folder';
16
+ metadata: ProjectMetadata;
17
+ spec: FolderSpec;
18
+ }
19
+ //# sourceMappingURL=folder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../src/model/folder.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;CAClB"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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
+ export { };
14
+
15
+ //# sourceMappingURL=folder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/folder.ts"],"sourcesContent":["// Copyright 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 { ProjectMetadata } from './resource';\n\nexport interface FolderDisplay {\n name?: string;\n}\n\nexport interface FolderSpec {\n display?: FolderDisplay;\n items?: FolderItem[];\n}\n\nexport interface FolderItem {\n kind: 'Folder' | 'Dashboard';\n name: string;\n items?: FolderItem[];\n}\n\nexport interface FolderResource {\n kind: 'Folder';\n metadata: ProjectMetadata;\n spec: FolderSpec;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAmBjC,WAIC"}
@@ -0,0 +1,2 @@
1
+ export type RequestHeaders = Record<string, string>;
2
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/model/http.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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
+ export { };
14
+
15
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/http.ts"],"sourcesContent":["// Copyright 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 type RequestHeaders = Record<string, string>;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WAAoD"}
@@ -0,0 +1,14 @@
1
+ export * from './datasource';
2
+ export * from './folder';
3
+ export * from './kind';
4
+ export * from './resource';
5
+ export * from './datasource-api';
6
+ export * from './http';
7
+ export * from './secret';
8
+ export * from './role';
9
+ export * from './roleBindings';
10
+ export * from './user';
11
+ export * from './ephemeralDashboard';
12
+ export * from './variable';
13
+ export * from './dashboard';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,27 @@
1
+ // Copyright 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
+ export * from './datasource';
14
+ export * from './folder';
15
+ export * from './kind';
16
+ export * from './resource';
17
+ export * from './datasource-api';
18
+ export * from './http';
19
+ export * from './secret';
20
+ export * from './role';
21
+ export * from './roleBindings';
22
+ export * from './user';
23
+ export * from './ephemeralDashboard';
24
+ export * from './variable';
25
+ export * from './dashboard';
26
+
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/index.ts"],"sourcesContent":["// Copyright 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 './folder';\nexport * from './kind';\nexport * from './resource';\nexport * from './datasource-api';\nexport * from './http';\nexport * from './secret';\nexport * from './role';\nexport * from './roleBindings';\nexport * from './user';\nexport * from './ephemeralDashboard';\nexport * from './variable';\nexport * from './dashboard';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,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,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,iBAAiB;AAC/B,cAAc,SAAS;AACvB,cAAc,uBAAuB;AACrC,cAAc,aAAa;AAC3B,cAAc,cAAc"}
@@ -0,0 +1,3 @@
1
+ export type Kind = 'Dashboard' | 'Datasource' | 'EphemeralDashboard' | 'Folder' | 'GlobalDatasource' | 'GlobalRole' | 'GlobalRoleBinding' | 'GlobalSecret' | 'GlobalVariable' | 'Project' | 'Role' | 'RoleBinding' | 'Secret' | 'User' | 'Variable';
2
+ export declare const KINDS: Kind[];
3
+ //# sourceMappingURL=kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kind.d.ts","sourceRoot":"","sources":["../../src/model/kind.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,IAAI,GACZ,WAAW,GACX,YAAY,GACZ,oBAAoB,GACpB,QAAQ,GACR,kBAAkB,GAClB,YAAY,GACZ,mBAAmB,GACnB,cAAc,GACd,gBAAgB,GAChB,SAAS,GACT,MAAM,GACN,aAAa,GACb,QAAQ,GACR,MAAM,GACN,UAAU,CAAC;AAEf,eAAO,MAAM,KAAK,EAAE,IAAI,EAgBvB,CAAC"}
@@ -0,0 +1,31 @@
1
+ // Copyright 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
+ export const KINDS = [
14
+ 'Dashboard',
15
+ 'Datasource',
16
+ 'EphemeralDashboard',
17
+ 'Folder',
18
+ 'GlobalDatasource',
19
+ 'GlobalRole',
20
+ 'GlobalRoleBinding',
21
+ 'GlobalSecret',
22
+ 'GlobalVariable',
23
+ 'Project',
24
+ 'Role',
25
+ 'RoleBinding',
26
+ 'Secret',
27
+ 'User',
28
+ 'Variable'
29
+ ];
30
+
31
+ //# sourceMappingURL=kind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/kind.ts"],"sourcesContent":["// Copyright 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 type Kind =\n | 'Dashboard'\n | 'Datasource'\n | 'EphemeralDashboard'\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\nexport const KINDS: Kind[] = [\n 'Dashboard',\n 'Datasource',\n 'EphemeralDashboard',\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"],"names":["KINDS"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAmBjC,OAAO,MAAMA,QAAgB;IAC3B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { Display } from '@perses-dev/spec';
2
+ import { Kind } from './kind';
3
+ export declare function isProjectMetadata(metadata: Metadata | ProjectMetadata): metadata is ProjectMetadata;
4
+ export interface Metadata {
5
+ name: string;
6
+ createdAt?: string;
7
+ updatedAt?: string;
8
+ version?: number;
9
+ tags?: string[];
10
+ }
11
+ export interface ProjectMetadata extends Metadata {
12
+ project: string;
13
+ }
14
+ export interface Resource {
15
+ kind: Kind;
16
+ metadata: Metadata | ProjectMetadata;
17
+ spec?: any;
18
+ }
19
+ export interface ProjectResource {
20
+ kind: 'Project';
21
+ metadata: Metadata;
22
+ spec?: ProjectSpec;
23
+ }
24
+ export interface ProjectSpec {
25
+ display?: Display;
26
+ }
27
+ export declare function getMetadataProject(metadata: ProjectMetadata | Metadata): string | undefined;
28
+ //# sourceMappingURL=resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/model/resource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,eAAe,GAAG,QAAQ,IAAI,eAAe,CAEnG;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,GAAG,eAAe,CAAC;IAErC,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAE3F"}
@@ -0,0 +1,20 @@
1
+ // Copyright 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
+ export function isProjectMetadata(metadata) {
14
+ return 'project' in metadata;
15
+ }
16
+ export function getMetadataProject(metadata) {
17
+ return 'project' in metadata ? metadata.project : undefined;
18
+ }
19
+
20
+ //# sourceMappingURL=resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/resource.ts"],"sourcesContent":["// Copyright 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 { Display } from '@perses-dev/spec';\nimport { Kind } from './kind';\n\nexport function isProjectMetadata(metadata: Metadata | ProjectMetadata): metadata is ProjectMetadata {\n return 'project' in metadata;\n}\n\nexport interface Metadata {\n name: string;\n createdAt?: string;\n updatedAt?: string;\n version?: number;\n tags?: string[];\n}\n\nexport interface ProjectMetadata extends Metadata {\n project: string;\n}\n\nexport interface Resource {\n kind: Kind;\n metadata: Metadata | ProjectMetadata;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n spec?: any;\n}\n\nexport interface ProjectResource {\n kind: 'Project';\n metadata: Metadata;\n spec?: ProjectSpec;\n}\n\nexport interface ProjectSpec {\n display?: Display;\n}\n\nexport function getMetadataProject(metadata: ProjectMetadata | Metadata): string | undefined {\n return 'project' in metadata ? metadata.project : undefined;\n}\n"],"names":["isProjectMetadata","metadata","getMetadataProject","project","undefined"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAKjC,OAAO,SAASA,kBAAkBC,QAAoC;IACpE,OAAO,aAAaA;AACtB;AA+BA,OAAO,SAASC,mBAAmBD,QAAoC;IACrE,OAAO,aAAaA,WAAWA,SAASE,OAAO,GAAGC;AACpD"}
@@ -0,0 +1,31 @@
1
+ import { Kind, Metadata, ProjectMetadata } from '@perses-dev/client';
2
+ export type Action = 'create' | 'read' | 'update' | 'delete' | '*';
3
+ export declare const ACTIONS: string[];
4
+ export type Scope = Kind | '*';
5
+ export declare const PROJECT_SCOPES: string[];
6
+ export declare const GLOBAL_SCOPES: string[];
7
+ export interface Permission {
8
+ actions: Action[];
9
+ scopes: Scope[];
10
+ }
11
+ export interface RoleSpec {
12
+ permissions: Permission[];
13
+ }
14
+ /**
15
+ * A role that belongs to a project.
16
+ */
17
+ export interface RoleResource {
18
+ kind: 'Role';
19
+ metadata: ProjectMetadata;
20
+ spec: RoleSpec;
21
+ }
22
+ /**
23
+ * A global role that doesn´t belong to a project.
24
+ */
25
+ export interface GlobalRoleResource {
26
+ kind: 'GlobalRole';
27
+ metadata: Metadata;
28
+ spec: RoleSpec;
29
+ }
30
+ export type Role = RoleResource | GlobalRoleResource;
31
+ //# sourceMappingURL=role.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../../src/model/role.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErE,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,CAAC;AACnE,eAAO,MAAM,OAAO,UAA8C,CAAC;AACnE,MAAM,MAAM,KAAK,GAAG,IAAI,GAAG,GAAG,CAAC;AAC/B,eAAO,MAAM,cAAc,UAW1B,CAAC;AAEF,eAAO,MAAM,aAAa,UAOzB,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,IAAI,GAAG,YAAY,GAAG,kBAAkB,CAAC"}
@@ -0,0 +1,41 @@
1
+ // Copyright 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
+ export const ACTIONS = [
14
+ '*',
15
+ 'create',
16
+ 'read',
17
+ 'update',
18
+ 'delete'
19
+ ];
20
+ export const PROJECT_SCOPES = [
21
+ '*',
22
+ 'Dashboard',
23
+ 'Datasource',
24
+ 'EphemeralDashboard',
25
+ 'Folder',
26
+ 'Project',
27
+ 'Role',
28
+ 'RoleBinding',
29
+ 'Secret',
30
+ 'Variable'
31
+ ];
32
+ export const GLOBAL_SCOPES = [
33
+ 'GlobalDatasource',
34
+ 'GlobalRole',
35
+ 'GlobalRoleBinding',
36
+ 'GlobalSecret',
37
+ 'GlobalVariable',
38
+ 'User'
39
+ ];
40
+
41
+ //# sourceMappingURL=role.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/role.ts"],"sourcesContent":["// Copyright 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 { Kind, Metadata, ProjectMetadata } from '@perses-dev/client';\n\nexport type Action = 'create' | 'read' | 'update' | 'delete' | '*';\nexport const ACTIONS = ['*', 'create', 'read', 'update', 'delete'];\nexport type Scope = Kind | '*';\nexport const PROJECT_SCOPES = [\n '*',\n 'Dashboard',\n 'Datasource',\n 'EphemeralDashboard',\n 'Folder',\n 'Project',\n 'Role',\n 'RoleBinding',\n 'Secret',\n 'Variable',\n];\n\nexport const GLOBAL_SCOPES = [\n 'GlobalDatasource',\n 'GlobalRole',\n 'GlobalRoleBinding',\n 'GlobalSecret',\n 'GlobalVariable',\n 'User',\n];\n\nexport interface Permission {\n actions: Action[];\n scopes: Scope[];\n}\n\nexport interface RoleSpec {\n permissions: Permission[];\n}\n\n/**\n * A role that belongs to a project.\n */\nexport interface RoleResource {\n kind: 'Role';\n metadata: ProjectMetadata;\n spec: RoleSpec;\n}\n\n/**\n * A global role that doesn´t belong to a project.\n */\nexport interface GlobalRoleResource {\n kind: 'GlobalRole';\n metadata: Metadata;\n spec: RoleSpec;\n}\n\nexport type Role = RoleResource | GlobalRoleResource;\n"],"names":["ACTIONS","PROJECT_SCOPES","GLOBAL_SCOPES"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAKjC,OAAO,MAAMA,UAAU;IAAC;IAAK;IAAU;IAAQ;IAAU;CAAS,CAAC;AAEnE,OAAO,MAAMC,iBAAiB;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAC;AAEF,OAAO,MAAMC,gBAAgB;IAC3B;IACA;IACA;IACA;IACA;IACA;CACD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { Metadata, ProjectMetadata } from './resource';
2
+ export interface Subject {
3
+ kind: 'User';
4
+ name: string;
5
+ }
6
+ export interface RoleBindingSpec {
7
+ role: string;
8
+ subjects: Subject[];
9
+ }
10
+ /**
11
+ * A role binding that belongs to a project.
12
+ */
13
+ export interface RoleBindingResource {
14
+ kind: 'RoleBinding';
15
+ metadata: ProjectMetadata;
16
+ spec: RoleBindingSpec;
17
+ }
18
+ /**
19
+ * A global role binding that doesn´t belong to a project.
20
+ */
21
+ export interface GlobalRoleBindingResource {
22
+ kind: 'GlobalRoleBinding';
23
+ metadata: Metadata;
24
+ spec: RoleBindingSpec;
25
+ }
26
+ export type RoleBinding = RoleBindingResource | GlobalRoleBindingResource;
27
+ //# sourceMappingURL=roleBindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roleBindings.d.ts","sourceRoot":"","sources":["../../src/model/roleBindings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAE9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,yBAAyB,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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
+ export { };
14
+
15
+ //# sourceMappingURL=roleBindings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/roleBindings.ts"],"sourcesContent":["// Copyright 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 { Metadata, ProjectMetadata } from './resource';\n\nexport interface Subject {\n kind: 'User';\n name: string;\n}\n\nexport interface RoleBindingSpec {\n // name of the role or global role (metadata.name)\n role: string;\n subjects: Subject[];\n}\n\n/**\n * A role binding that belongs to a project.\n */\nexport interface RoleBindingResource {\n kind: 'RoleBinding';\n metadata: ProjectMetadata;\n spec: RoleBindingSpec;\n}\n\n/**\n * A global role binding that doesn´t belong to a project.\n */\nexport interface GlobalRoleBindingResource {\n kind: 'GlobalRoleBinding';\n metadata: Metadata;\n spec: RoleBindingSpec;\n}\n\nexport type RoleBinding = RoleBindingResource | GlobalRoleBindingResource;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAiCjC,WAA0E"}
@@ -0,0 +1,54 @@
1
+ import { Metadata, ProjectMetadata } from '@perses-dev/client';
2
+ export interface BasicAuth {
3
+ username: string;
4
+ password?: string;
5
+ passwordFile?: string;
6
+ }
7
+ export interface Authorization {
8
+ type?: string;
9
+ credentials?: string;
10
+ credentialsFile?: string;
11
+ }
12
+ export interface OAuth {
13
+ clientID: string;
14
+ clientSecret?: string;
15
+ clientSecretFile?: string;
16
+ tokenURL: string;
17
+ scopes?: string[];
18
+ endpointParams?: Record<string, string[]>;
19
+ authStyle?: 0 | 1 | 2;
20
+ }
21
+ export interface TLSConfig {
22
+ ca?: string;
23
+ cert?: string;
24
+ key?: string;
25
+ caFile?: string;
26
+ certFile?: string;
27
+ keyFile?: string;
28
+ serverName?: string;
29
+ insecureSkipVerify?: boolean;
30
+ }
31
+ export interface SecretSpec {
32
+ basicAuth?: BasicAuth;
33
+ authorization?: Authorization;
34
+ oauth?: OAuth;
35
+ tlsConfig?: TLSConfig;
36
+ }
37
+ /**
38
+ * A secret that belongs to a project.
39
+ */
40
+ export interface SecretResource {
41
+ kind: 'Secret';
42
+ metadata: ProjectMetadata;
43
+ spec: SecretSpec;
44
+ }
45
+ /**
46
+ * A global secret that doesn´t belong to a project.
47
+ */
48
+ export interface GlobalSecretResource {
49
+ kind: 'GlobalSecret';
50
+ metadata: Metadata;
51
+ spec: SecretSpec;
52
+ }
53
+ export type Secret = SecretResource | GlobalSecretResource;
54
+ //# sourceMappingURL=secret.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secret.d.ts","sourceRoot":"","sources":["../../src/model/secret.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,MAAM,MAAM,GAAG,cAAc,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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
+ export { };
14
+
15
+ //# sourceMappingURL=secret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/secret.ts"],"sourcesContent":["// Copyright 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 { Metadata, ProjectMetadata } from '@perses-dev/client';\n\nexport interface BasicAuth {\n username: string;\n password?: string;\n passwordFile?: string;\n}\n\nexport interface Authorization {\n type?: string;\n credentials?: string;\n credentialsFile?: string;\n}\n\nexport interface OAuth {\n clientID: string;\n clientSecret?: string;\n clientSecretFile?: string;\n tokenURL: string;\n scopes?: string[];\n endpointParams?: Record<string, string[]>;\n authStyle?: 0 | 1 | 2;\n}\n\nexport interface TLSConfig {\n ca?: string;\n cert?: string;\n key?: string;\n caFile?: string;\n certFile?: string;\n keyFile?: string;\n serverName?: string;\n insecureSkipVerify?: boolean;\n}\n\nexport interface SecretSpec {\n basicAuth?: BasicAuth;\n authorization?: Authorization;\n oauth?: OAuth;\n tlsConfig?: TLSConfig;\n}\n\n/**\n * A secret that belongs to a project.\n */\nexport interface SecretResource {\n kind: 'Secret';\n metadata: ProjectMetadata;\n spec: SecretSpec;\n}\n\n/**\n * A global secret that doesn´t belong to a project.\n */\nexport interface GlobalSecretResource {\n kind: 'GlobalSecret';\n metadata: Metadata;\n spec: SecretSpec;\n}\n\nexport type Secret = SecretResource | GlobalSecretResource;\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA8DjC,WAA2D"}
@@ -0,0 +1,21 @@
1
+ import { Metadata } from './resource';
2
+ export interface NativeProvider {
3
+ password?: string;
4
+ }
5
+ export interface OAuthProvider {
6
+ issuer?: string;
7
+ email?: string;
8
+ subject?: string;
9
+ }
10
+ export interface UserSpec {
11
+ firstName?: string;
12
+ lastName?: string;
13
+ nativeProvider?: NativeProvider;
14
+ oauthProviders?: OAuthProvider[];
15
+ }
16
+ export interface UserResource {
17
+ kind: 'User';
18
+ metadata: Metadata;
19
+ spec: UserSpec;
20
+ }
21
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/model/user.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;CAChB"}
@@ -0,0 +1,15 @@
1
+ // Copyright 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
+ export { };
14
+
15
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/user.ts"],"sourcesContent":["// Copyright 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 { Metadata } from './resource';\n\nexport interface NativeProvider {\n password?: string;\n}\n\nexport interface OAuthProvider {\n issuer?: string;\n email?: string;\n subject?: string;\n}\n\nexport interface UserSpec {\n firstName?: string;\n lastName?: string;\n nativeProvider?: NativeProvider;\n oauthProviders?: OAuthProvider[];\n}\n\nexport interface UserResource {\n kind: 'User';\n metadata: Metadata;\n spec: UserSpec;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAqBjC,WAIC"}