diff --git a/images/CarouselImage1.svg b/images/CarouselImage1.svg new file mode 100644 index 000000000..7901e733f --- /dev/null +++ b/images/CarouselImage1.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/CarouselImage2.svg b/images/CarouselImage2.svg new file mode 100644 index 000000000..83441d9e1 --- /dev/null +++ b/images/CarouselImage2.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/Cost.svg b/images/Cost.svg deleted file mode 100644 index f46733a8e..000000000 --- a/images/Cost.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/images/Green_check.svg b/images/Green_check.svg deleted file mode 100644 index 3bee1e456..000000000 --- a/images/Green_check.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/images/Notebooks.svg b/images/Notebooks.svg index b313b90ea..96de71b63 100644 --- a/images/Notebooks.svg +++ b/images/Notebooks.svg @@ -1,28 +1,23 @@ - - - - - - - - - - - + + + + + + + + + - + - + - - - diff --git a/package-lock.json b/package-lock.json index 03f5b1646..6218f002a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "dependencies": { "@azure/arm-cosmosdb": "9.1.0", - "@azure/cosmos": "3.10.5", + "@azure/cosmos": "3.16.2", "@azure/cosmos-language-service": "0.0.5", "@azure/identity": "1.2.1", "@azure/ms-rest-nodeauth": "3.0.7", @@ -96,6 +96,7 @@ "react-notification-system": "0.2.17", "react-redux": "7.1.3", "react-splitter-layout": "4.0.0", + "react-youtube": "9.0.1", "redux": "4.0.4", "reflect-metadata": "0.1.13", "rx-jupyter": "5.5.12", @@ -135,6 +136,7 @@ "@types/sinon": "2.3.3", "@types/styled-components": "5.1.1", "@types/underscore": "1.7.36", + "@types/youtube-player": "5.5.6", "@typescript-eslint/eslint-plugin": "4.22.0", "@typescript-eslint/parser": "4.22.0", "@webpack-cli/serve": "1.5.2", @@ -358,21 +360,21 @@ } }, "node_modules/@azure/core-auth": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.1.4.tgz", - "integrity": "sha512-+j1embyH1jqf04AIfJPdLafd5SC1y6z1Jz4i+USR1XkTp6KM8P5u4/AjmWMVoEQdM/M29PJcRDZcCEWjK9S1bw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.2.tgz", + "integrity": "sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA==", "dependencies": { "@azure/abort-controller": "^1.0.0", - "tslib": "^2.0.0" + "tslib": "^2.2.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=12.0.0" } }, "node_modules/@azure/core-auth/node_modules/tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "node_modules/@azure/core-http": { "version": "1.2.2", @@ -438,6 +440,63 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/@azure/core-rest-pipeline": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.8.1.tgz", + "integrity": "sha512-R/XpxZcDgGbnneEifnsAcjLoR2NCmlDxKDmzd8oi5jx5YEnPE6gsxHQWAk2+uY55Ka717x/fdctyoCYKnumrqw==", + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-tracing": "^1.0.1", + "@azure/core-util": "^1.0.0", + "@azure/logger": "^1.0.0", + "form-data": "^4.0.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "tslib": "^2.2.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-rest-pipeline/node_modules/@azure/core-tracing": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", + "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-rest-pipeline/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@azure/core-rest-pipeline/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/@azure/core-rest-pipeline/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@azure/core-tracing": { "version": "1.0.0-preview.9", "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.9.tgz", @@ -456,25 +515,41 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" }, - "node_modules/@azure/cosmos": { - "version": "3.10.5", - "resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.10.5.tgz", - "integrity": "sha512-if1uApYNjNXzB+reNFvzEBHvinxdQOzU8fni9e9Fs9jcPv9m76t2pzmYJNrxxCiFLP0vbNr/QCfQzIPQVw6v/A==", + "node_modules/@azure/core-util": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.0.0.tgz", + "integrity": "sha512-yWshY9cdPthlebnb3Zuz/j0Lv4kjU6u7PR5sW7A9FF7EX+0irMRJAtyTq5TPiDHJfjH8gTSlnIYFj9m7Ed76IQ==", "dependencies": { - "@azure/core-auth": "^1.2.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-util/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/@azure/cosmos": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.16.2.tgz", + "integrity": "sha512-sceY5LWj0BHGj8PSyaVCfDRQLVZyoCfIY78kyIROJVEw0k+p9XFs8fhpykN8JklkCftL0WlaVY+X25SQwnhZsw==", + "dependencies": { + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.2.0", "debug": "^4.1.1", - "fast-json-stable-stringify": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", "jsbi": "^3.1.3", - "node-abort-controller": "^1.2.0", - "node-fetch": "^2.6.0", + "node-abort-controller": "^3.0.0", "priorityqueuejs": "^1.0.0", "semaphore": "^1.0.5", - "tslib": "^2.0.0", + "tslib": "^2.2.0", "universal-user-agent": "^6.0.0", "uuid": "^8.3.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=12.0.0" } }, "node_modules/@azure/cosmos-language-service": { @@ -502,18 +577,6 @@ "node": ">=0.10.0" } }, - "node_modules/@azure/cosmos/node_modules/@azure/core-auth": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.0.tgz", - "integrity": "sha512-kSDSZBL6c0CYdhb+7KuutnKGf2geeT+bCJAgccB0DD7wmNJSsQPcF7TcuoZX83B7VK4tLz/u+8sOO/CnCsYp8A==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@azure/cosmos/node_modules/tslib": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", @@ -9232,6 +9295,12 @@ "@types/node": "*" } }, + "node_modules/@types/youtube-player": { + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/@types/youtube-player/-/youtube-player-5.5.6.tgz", + "integrity": "sha512-RcWWUEuAZZX24dG55Xk558/HHCZxYf798/xPnV6wTwDlUF8HZNAmqyXyi+4QgN2l9juP9GRjCwILxXLSPKQBBw==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", @@ -31453,9 +31522,9 @@ } }, "node_modules/node-abort-controller": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-1.2.1.tgz", - "integrity": "sha512-79PYeJuj6S9+yOHirR0JBLFOgjB6sQCir10uN6xRx25iD+ZD4ULqgRn3MwWBRaQGB0vEgReJzWwJo42T1R6YbQ==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.0.1.tgz", + "integrity": "sha512-/ujIVxthRs+7q6hsdjHMaj8hRG9NuWmwrz+JdRwZ14jdFoKSkm+vDsCbF9PLpnSqjaWQJuTmVtcWHNLr+vrOFw==" }, "node_modules/node-fetch": { "version": "2.6.1", @@ -35054,13 +35123,13 @@ } }, "node_modules/prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", - "react-is": "^16.8.1" + "react-is": "^16.13.1" } }, "node_modules/prop-types-exact": { @@ -36085,6 +36154,22 @@ "react-dom": ">=15.0.0" } }, + "node_modules/react-youtube": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/react-youtube/-/react-youtube-9.0.1.tgz", + "integrity": "sha512-w2yt3o1H0fjlMjoqn8zEmtCqgiV+bYS1JfMSUfh70zky2rwWVORQzpt2DWoDio1+nZ1X9kSTzakdif6gaJdFuQ==", + "dependencies": { + "fast-deep-equal": "3.1.3", + "prop-types": "15.8.1", + "youtube-player": "5.5.2" + }, + "engines": { + "node": ">= 14.x" + }, + "peerDependencies": { + "react": ">=0.14.1" + } + }, "node_modules/reactcss": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/reactcss/-/reactcss-1.2.3.tgz", @@ -37603,6 +37688,11 @@ "node": ">= 10" } }, + "node_modules/sister": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sister/-/sister-3.0.2.tgz", + "integrity": "sha512-p19rtTs+NksBRKW9qn0UhZ8/TUI9BPw9lmtHny+Y3TinWlOa9jWh9xB0AtPSdmOy49NJJJSSe0Ey4C7h0TrcYA==" + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -41602,6 +41692,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/youtube-player": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/youtube-player/-/youtube-player-5.5.2.tgz", + "integrity": "sha512-ZGtsemSpXnDky2AUYWgxjaopgB+shFHgXVpiJFeNB5nWEugpW1KWYDaHKuLqh2b67r24GtP6HoSW5swvf0fFIQ==", + "dependencies": { + "debug": "^2.6.6", + "load-script": "^1.0.0", + "sister": "^3.0.0" + } + }, + "node_modules/youtube-player/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/youtube-player/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, "node_modules/zalgo-promise": { "version": "1.0.46", "resolved": "https://registry.npmjs.org/zalgo-promise/-/zalgo-promise-1.0.46.tgz", @@ -41652,18 +41765,18 @@ } }, "@azure/core-auth": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.1.4.tgz", - "integrity": "sha512-+j1embyH1jqf04AIfJPdLafd5SC1y6z1Jz4i+USR1XkTp6KM8P5u4/AjmWMVoEQdM/M29PJcRDZcCEWjK9S1bw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.2.tgz", + "integrity": "sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA==", "requires": { "@azure/abort-controller": "^1.0.0", - "tslib": "^2.0.0" + "tslib": "^2.2.0" }, "dependencies": { "tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" } } }, @@ -41721,6 +41834,53 @@ } } }, + "@azure/core-rest-pipeline": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.8.1.tgz", + "integrity": "sha512-R/XpxZcDgGbnneEifnsAcjLoR2NCmlDxKDmzd8oi5jx5YEnPE6gsxHQWAk2+uY55Ka717x/fdctyoCYKnumrqw==", + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-tracing": "^1.0.1", + "@azure/core-util": "^1.0.0", + "@azure/logger": "^1.0.0", + "form-data": "^4.0.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "tslib": "^2.2.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/core-tracing": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", + "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", + "requires": { + "tslib": "^2.2.0" + } + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, "@azure/core-tracing": { "version": "1.0.0-preview.9", "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.9.tgz", @@ -41738,33 +41898,39 @@ } } }, - "@azure/cosmos": { - "version": "3.10.5", - "resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.10.5.tgz", - "integrity": "sha512-if1uApYNjNXzB+reNFvzEBHvinxdQOzU8fni9e9Fs9jcPv9m76t2pzmYJNrxxCiFLP0vbNr/QCfQzIPQVw6v/A==", + "@azure/core-util": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.0.0.tgz", + "integrity": "sha512-yWshY9cdPthlebnb3Zuz/j0Lv4kjU6u7PR5sW7A9FF7EX+0irMRJAtyTq5TPiDHJfjH8gTSlnIYFj9m7Ed76IQ==", "requires": { - "@azure/core-auth": "^1.2.0", + "tslib": "^2.2.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } + } + }, + "@azure/cosmos": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.16.2.tgz", + "integrity": "sha512-sceY5LWj0BHGj8PSyaVCfDRQLVZyoCfIY78kyIROJVEw0k+p9XFs8fhpykN8JklkCftL0WlaVY+X25SQwnhZsw==", + "requires": { + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.2.0", "debug": "^4.1.1", - "fast-json-stable-stringify": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", "jsbi": "^3.1.3", - "node-abort-controller": "^1.2.0", - "node-fetch": "^2.6.0", + "node-abort-controller": "^3.0.0", "priorityqueuejs": "^1.0.0", "semaphore": "^1.0.5", - "tslib": "^2.0.0", + "tslib": "^2.2.0", "universal-user-agent": "^6.0.0", "uuid": "^8.3.0" }, "dependencies": { - "@azure/core-auth": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.0.tgz", - "integrity": "sha512-kSDSZBL6c0CYdhb+7KuutnKGf2geeT+bCJAgccB0DD7wmNJSsQPcF7TcuoZX83B7VK4tLz/u+8sOO/CnCsYp8A==", - "requires": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.0.0" - } - }, "tslib": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", @@ -49323,6 +49489,12 @@ "@types/node": "*" } }, + "@types/youtube-player": { + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/@types/youtube-player/-/youtube-player-5.5.6.tgz", + "integrity": "sha512-RcWWUEuAZZX24dG55Xk558/HHCZxYf798/xPnV6wTwDlUF8HZNAmqyXyi+4QgN2l9juP9GRjCwILxXLSPKQBBw==", + "dev": true + }, "@typescript-eslint/eslint-plugin": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", @@ -66394,9 +66566,9 @@ } }, "node-abort-controller": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-1.2.1.tgz", - "integrity": "sha512-79PYeJuj6S9+yOHirR0JBLFOgjB6sQCir10uN6xRx25iD+ZD4ULqgRn3MwWBRaQGB0vEgReJzWwJo42T1R6YbQ==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.0.1.tgz", + "integrity": "sha512-/ujIVxthRs+7q6hsdjHMaj8hRG9NuWmwrz+JdRwZ14jdFoKSkm+vDsCbF9PLpnSqjaWQJuTmVtcWHNLr+vrOFw==" }, "node-fetch": { "version": "2.6.1", @@ -69035,13 +69207,13 @@ } }, "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", - "react-is": "^16.8.1" + "react-is": "^16.13.1" } }, "prop-types-exact": { @@ -69833,6 +70005,16 @@ "react-lifecycles-compat": "^3.0.4" } }, + "react-youtube": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/react-youtube/-/react-youtube-9.0.1.tgz", + "integrity": "sha512-w2yt3o1H0fjlMjoqn8zEmtCqgiV+bYS1JfMSUfh70zky2rwWVORQzpt2DWoDio1+nZ1X9kSTzakdif6gaJdFuQ==", + "requires": { + "fast-deep-equal": "3.1.3", + "prop-types": "15.8.1", + "youtube-player": "5.5.2" + } + }, "reactcss": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/reactcss/-/reactcss-1.2.3.tgz", @@ -71066,6 +71248,11 @@ "totalist": "^1.0.0" } }, + "sister": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sister/-/sister-3.0.2.tgz", + "integrity": "sha512-p19rtTs+NksBRKW9qn0UhZ8/TUI9BPw9lmtHny+Y3TinWlOa9jWh9xB0AtPSdmOy49NJJJSSe0Ey4C7h0TrcYA==" + }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -74158,6 +74345,31 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" }, + "youtube-player": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/youtube-player/-/youtube-player-5.5.2.tgz", + "integrity": "sha512-ZGtsemSpXnDky2AUYWgxjaopgB+shFHgXVpiJFeNB5nWEugpW1KWYDaHKuLqh2b67r24GtP6HoSW5swvf0fFIQ==", + "requires": { + "debug": "^2.6.6", + "load-script": "^1.0.0", + "sister": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "zalgo-promise": { "version": "1.0.46", "resolved": "https://registry.npmjs.org/zalgo-promise/-/zalgo-promise-1.0.46.tgz", diff --git a/package.json b/package.json index e8bf0c371..4075ef0aa 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "dependencies": { "@azure/arm-cosmosdb": "9.1.0", - "@azure/cosmos": "3.10.5", + "@azure/cosmos": "3.16.2", "@azure/cosmos-language-service": "0.0.5", "@azure/identity": "1.2.1", "@azure/ms-rest-nodeauth": "3.0.7", @@ -92,6 +92,7 @@ "react-notification-system": "0.2.17", "react-redux": "7.1.3", "react-splitter-layout": "4.0.0", + "react-youtube": "9.0.1", "redux": "4.0.4", "reflect-metadata": "0.1.13", "rx-jupyter": "5.5.12", @@ -131,6 +132,7 @@ "@types/sinon": "2.3.3", "@types/styled-components": "5.1.1", "@types/underscore": "1.7.36", + "@types/youtube-player": "5.5.6", "@typescript-eslint/eslint-plugin": "4.22.0", "@typescript-eslint/parser": "4.22.0", "@webpack-cli/serve": "1.5.2", diff --git a/sampleData/sqlSampleData.json b/sampleData/sqlSampleData.json index 46b607a50..1cde20e57 100644 --- a/sampleData/sqlSampleData.json +++ b/sampleData/sqlSampleData.json @@ -1,26 +1,25 @@ { - "databaseId": "SampleDB", - "offerThroughput": 400, - "databaseLevelThroughput": false, - "collectionId": "Persons", - "createNewDatabase": true, - "partitionKey": { "kind": "Hash", "paths": ["/firstname"], "version": 1 }, "data": [ - { - "firstname": "Eva", - "age": 44 - }, - { - "firstname": "Véronique", - "age": 50 - }, - { - "firstname": "亜妃子", - "age": 5 - }, - { - "firstname": "John", - "age": 23 - } + { "address": "2007, NE 37TH PL" }, + { "address": "11635, SE MAY CREEK PARK DR" }, + { "address": "8923, 133RD AVE SE" }, + { "address": "1124, N 33RD ST" }, + { "address": "4288, 131ST PL SE" }, + { "address": "10900, SE 66TH ST" }, + { "address": "6260, 139TH AVE NE" }, + { "address": "13427, NE SPRING BLVD" }, + { "address": "13812, NE SPRING BLVD" }, + { "address": "5029, 159TH PL SE" }, + { "address": "8604, 117TH AVE SE" }, + { "address": "1561, 139TH LN NE" }, + { "address": "1575, 139TH CT NE" }, + { "address": "13901, NE 15TH CT" }, + { "address": "16365, NE 12TH PL" }, + { "address": "12226, NE 37TH ST" }, + { "address": "4021, 129TH CT SE" }, + { "address": "1455, 159TH PL NE" }, + { "address": "15825, NE 14TH RD" }, + { "address": "1418, 157TH CT NE" }, + { "address": "889, 131ST PL NE" } ] } diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts index 537685a2c..2e877f872 100644 --- a/src/Common/Constants.ts +++ b/src/Common/Constants.ts @@ -354,6 +354,10 @@ export enum ContainerStatusType { Disconnected = "Disconnected", } +export enum PoolIdType { + DefaultPoolId = "default", +} + export const EmulatorMasterKey = //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Well known public masterKey for emulator")] "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="; diff --git a/src/Common/CosmosClient.test.ts b/src/Common/CosmosClient.test.ts index 96505f208..ddac0de7d 100644 --- a/src/Common/CosmosClient.test.ts +++ b/src/Common/CosmosClient.test.ts @@ -1,4 +1,4 @@ -import { ResourceType } from "@azure/cosmos/dist-esm/common/constants"; +import { ResourceType } from "@azure/cosmos"; import { Platform, resetConfigContext, updateConfigContext } from "../ConfigContext"; import { updateUserContext } from "../UserContext"; import { endpoint, getTokenFromAuthService, requestPlugin, tokenProvider } from "./CosmosClient"; diff --git a/src/Common/CosmosClient.ts b/src/Common/CosmosClient.ts index 75359e363..f973df855 100644 --- a/src/Common/CosmosClient.ts +++ b/src/Common/CosmosClient.ts @@ -1,6 +1,4 @@ import * as Cosmos from "@azure/cosmos"; -import { RequestInfo, setAuthorizationTokenHeaderUsingMasterKey } from "@azure/cosmos"; -import { CosmosHeaders } from "@azure/cosmos/dist-esm"; import { configContext, Platform } from "../ConfigContext"; import { userContext } from "../UserContext"; import { logConsoleError } from "../Utils/NotificationConsoleUtils"; @@ -9,7 +7,7 @@ import { getErrorMessage } from "./ErrorHandlingUtils"; const _global = typeof self === "undefined" ? window : self; -export const tokenProvider = async (requestInfo: RequestInfo) => { +export const tokenProvider = async (requestInfo: Cosmos.RequestInfo) => { const { verb, resourceId, resourceType, headers } = requestInfo; if (userContext.features.enableAadDataPlane && userContext.aadToken) { @@ -20,13 +18,13 @@ export const tokenProvider = async (requestInfo: RequestInfo) => { if (configContext.platform === Platform.Emulator) { // TODO This SDK method mutates the headers object. Find a better one or fix the SDK. - await setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, EmulatorMasterKey); + await Cosmos.setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, EmulatorMasterKey); return decodeURIComponent(headers.authorization); } if (userContext.masterKey) { // TODO This SDK method mutates the headers object. Find a better one or fix the SDK. - await setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, EmulatorMasterKey); + await Cosmos.setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, EmulatorMasterKey); return decodeURIComponent(headers.authorization); } @@ -89,7 +87,7 @@ let _client: Cosmos.CosmosClient; export function client(): Cosmos.CosmosClient { if (_client) return _client; - let _defaultHeaders: CosmosHeaders = {}; + let _defaultHeaders: Cosmos.CosmosHeaders = {}; _defaultHeaders["x-ms-cosmos-sdk-supportedcapabilities"] = SDKSupportedCapabilities.None | SDKSupportedCapabilities.PartitionMerge; diff --git a/src/Common/dataAccess/createCollection.ts b/src/Common/dataAccess/createCollection.ts index 791b29fcc..64911ff28 100644 --- a/src/Common/dataAccess/createCollection.ts +++ b/src/Common/dataAccess/createCollection.ts @@ -1,7 +1,4 @@ -import { ContainerResponse, DatabaseResponse } from "@azure/cosmos"; -import { RequestOptions } from "@azure/cosmos/dist-esm"; -import { ContainerRequest } from "@azure/cosmos/dist-esm/client/Container/ContainerRequest"; -import { DatabaseRequest } from "@azure/cosmos/dist-esm/client/Database/DatabaseRequest"; +import { ContainerRequest, ContainerResponse, DatabaseRequest, DatabaseResponse, RequestOptions } from "@azure/cosmos"; import { AuthType } from "../../AuthType"; import * as DataModels from "../../Contracts/DataModels"; import { useDatabases } from "../../Explorer/useDatabases"; @@ -27,7 +24,7 @@ export const createCollection = async (params: DataModels.CreateCollectionParams ); try { let collection: DataModels.Collection; - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations) { + if (userContext.authType === AuthType.AAD && !userContext.features.enableSDKoperations) { if (params.createNewDatabase) { const createDatabaseParams: DataModels.CreateDatabaseParams = { autoPilotMaxThroughput: params.autoPilotMaxThroughput, diff --git a/src/Common/dataAccess/createDatabase.ts b/src/Common/dataAccess/createDatabase.ts index 2467b7975..d54c94133 100644 --- a/src/Common/dataAccess/createDatabase.ts +++ b/src/Common/dataAccess/createDatabase.ts @@ -1,5 +1,4 @@ -import { DatabaseResponse } from "@azure/cosmos"; -import { DatabaseRequest } from "@azure/cosmos/dist-esm/client/Database/DatabaseRequest"; +import { DatabaseRequest, DatabaseResponse } from "@azure/cosmos"; import { AuthType } from "../../AuthType"; import * as DataModels from "../../Contracts/DataModels"; import { useDatabases } from "../../Explorer/useDatabases"; @@ -26,7 +25,8 @@ export async function createDatabase(params: DataModels.CreateDatabaseParams): P if (userContext.apiType === "Tables") { throw new Error("Creating database resources is not allowed for tables accounts"); } - const database: DataModels.Database = await (userContext.authType === AuthType.AAD && !userContext.useSDKOperations + const database: DataModels.Database = await (userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations ? createDatabaseWithARM(params) : createDatabaseWithSDK(params)); diff --git a/src/Common/dataAccess/createStoredProcedure.ts b/src/Common/dataAccess/createStoredProcedure.ts index 579835277..96ae4b7b0 100644 --- a/src/Common/dataAccess/createStoredProcedure.ts +++ b/src/Common/dataAccess/createStoredProcedure.ts @@ -20,7 +20,11 @@ export async function createStoredProcedure( ): Promise { const clearMessage = logConsoleProgress(`Creating stored procedure ${storedProcedure.id}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType === "SQL" + ) { try { const getResponse = await getSqlStoredProcedure( userContext.subscriptionId, diff --git a/src/Common/dataAccess/createTrigger.ts b/src/Common/dataAccess/createTrigger.ts index ad825820f..d5cdd5661 100644 --- a/src/Common/dataAccess/createTrigger.ts +++ b/src/Common/dataAccess/createTrigger.ts @@ -14,7 +14,11 @@ export async function createTrigger( ): Promise { const clearMessage = logConsoleProgress(`Creating trigger ${trigger.id}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType === "SQL" + ) { try { const getResponse = await getSqlTrigger( userContext.subscriptionId, diff --git a/src/Common/dataAccess/createUserDefinedFunction.ts b/src/Common/dataAccess/createUserDefinedFunction.ts index 3b7dd4a12..175b0af9f 100644 --- a/src/Common/dataAccess/createUserDefinedFunction.ts +++ b/src/Common/dataAccess/createUserDefinedFunction.ts @@ -20,7 +20,11 @@ export async function createUserDefinedFunction( ): Promise { const clearMessage = logConsoleProgress(`Creating user defined function ${userDefinedFunction.id}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType === "SQL" + ) { try { const getResponse = await getSqlUserDefinedFunction( userContext.subscriptionId, diff --git a/src/Common/dataAccess/deleteCollection.ts b/src/Common/dataAccess/deleteCollection.ts index 63e58b8c8..f83126dd1 100644 --- a/src/Common/dataAccess/deleteCollection.ts +++ b/src/Common/dataAccess/deleteCollection.ts @@ -12,7 +12,7 @@ import { handleError } from "../ErrorHandlingUtils"; export async function deleteCollection(databaseId: string, collectionId: string): Promise { const clearMessage = logConsoleProgress(`Deleting container ${collectionId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations) { + if (userContext.authType === AuthType.AAD && !userContext.features.enableSDKoperations) { await deleteCollectionWithARM(databaseId, collectionId); } else { await client().database(databaseId).container(collectionId).delete(); diff --git a/src/Common/dataAccess/deleteDatabase.ts b/src/Common/dataAccess/deleteDatabase.ts index c6c744e35..fc16fe205 100644 --- a/src/Common/dataAccess/deleteDatabase.ts +++ b/src/Common/dataAccess/deleteDatabase.ts @@ -12,10 +12,7 @@ export async function deleteDatabase(databaseId: string): Promise { const clearMessage = logConsoleProgress(`Deleting database ${databaseId}`); try { - if (userContext.apiType === "Tables") { - throw new Error("Deleting database resources is not allowed for tables accounts"); - } - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations) { + if (userContext.authType === AuthType.AAD && !userContext.features.enableSDKoperations) { await deleteDatabaseWithARM(databaseId); } else { await client().database(databaseId).delete(); diff --git a/src/Common/dataAccess/deleteDocument.ts b/src/Common/dataAccess/deleteDocument.ts index 0ab2e6999..51713e791 100644 --- a/src/Common/dataAccess/deleteDocument.ts +++ b/src/Common/dataAccess/deleteDocument.ts @@ -1,9 +1,9 @@ import { CollectionBase } from "../../Contracts/ViewModels"; +import DocumentId from "../../Explorer/Tree/DocumentId"; +import { logConsoleInfo, logConsoleProgress } from "../../Utils/NotificationConsoleUtils"; import { client } from "../CosmosClient"; import { getEntityName } from "../DocumentUtility"; import { handleError } from "../ErrorHandlingUtils"; -import { logConsoleInfo, logConsoleProgress } from "../../Utils/NotificationConsoleUtils"; -import DocumentId from "../../Explorer/Tree/DocumentId"; export const deleteDocument = async (collection: CollectionBase, documentId: DocumentId): Promise => { const entityName: string = getEntityName(); @@ -13,7 +13,7 @@ export const deleteDocument = async (collection: CollectionBase, documentId: Doc await client() .database(collection.databaseId) .container(collection.id()) - .item(documentId.id(), documentId.partitionKeyValue) + .item(documentId.id(), documentId.partitionKeyValue?.length === 0 ? undefined : documentId.partitionKeyValue) .delete(); logConsoleInfo(`Successfully deleted ${entityName} ${documentId.id()}`); } catch (error) { diff --git a/src/Common/dataAccess/deleteStoredProcedure.ts b/src/Common/dataAccess/deleteStoredProcedure.ts index daaf8315a..6bc5f2fbd 100644 --- a/src/Common/dataAccess/deleteStoredProcedure.ts +++ b/src/Common/dataAccess/deleteStoredProcedure.ts @@ -12,7 +12,11 @@ export async function deleteStoredProcedure( ): Promise { const clearMessage = logConsoleProgress(`Deleting stored procedure ${storedProcedureId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType === "SQL" + ) { await deleteSqlStoredProcedure( userContext.subscriptionId, userContext.resourceGroup, diff --git a/src/Common/dataAccess/deleteTrigger.ts b/src/Common/dataAccess/deleteTrigger.ts index b4a7aa7ad..a3b31369e 100644 --- a/src/Common/dataAccess/deleteTrigger.ts +++ b/src/Common/dataAccess/deleteTrigger.ts @@ -8,7 +8,11 @@ import { handleError } from "../ErrorHandlingUtils"; export async function deleteTrigger(databaseId: string, collectionId: string, triggerId: string): Promise { const clearMessage = logConsoleProgress(`Deleting trigger ${triggerId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType === "SQL" + ) { await deleteSqlTrigger( userContext.subscriptionId, userContext.resourceGroup, diff --git a/src/Common/dataAccess/deleteUserDefinedFunction.ts b/src/Common/dataAccess/deleteUserDefinedFunction.ts index c9683c1ab..d91d9d55b 100644 --- a/src/Common/dataAccess/deleteUserDefinedFunction.ts +++ b/src/Common/dataAccess/deleteUserDefinedFunction.ts @@ -8,7 +8,11 @@ import { handleError } from "../ErrorHandlingUtils"; export async function deleteUserDefinedFunction(databaseId: string, collectionId: string, id: string): Promise { const clearMessage = logConsoleProgress(`Deleting user defined function ${id}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType === "SQL" + ) { await deleteSqlUserDefinedFunction( userContext.subscriptionId, userContext.resourceGroup, diff --git a/src/Common/dataAccess/readCollectionOffer.ts b/src/Common/dataAccess/readCollectionOffer.ts index c307242d8..8bd5d589e 100644 --- a/src/Common/dataAccess/readCollectionOffer.ts +++ b/src/Common/dataAccess/readCollectionOffer.ts @@ -14,7 +14,11 @@ export const readCollectionOffer = async (params: ReadCollectionOfferParams): Pr const clearMessage = logConsoleProgress(`Querying offer for collection ${params.collectionId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType !== "Tables") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType !== "Tables" + ) { return await readCollectionOfferWithARM(params.databaseId, params.collectionId); } diff --git a/src/Common/dataAccess/readCollections.ts b/src/Common/dataAccess/readCollections.ts index 92be4f57e..a5c8dd928 100644 --- a/src/Common/dataAccess/readCollections.ts +++ b/src/Common/dataAccess/readCollections.ts @@ -13,7 +13,11 @@ import { handleError } from "../ErrorHandlingUtils"; export async function readCollections(databaseId: string): Promise { const clearMessage = logConsoleProgress(`Querying containers for database ${databaseId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType !== "Tables") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType !== "Tables" + ) { return await readCollectionsWithARM(databaseId); } diff --git a/src/Common/dataAccess/readDatabaseOffer.ts b/src/Common/dataAccess/readDatabaseOffer.ts index d27d68078..bb7366ac9 100644 --- a/src/Common/dataAccess/readDatabaseOffer.ts +++ b/src/Common/dataAccess/readDatabaseOffer.ts @@ -13,7 +13,11 @@ export const readDatabaseOffer = async (params: ReadDatabaseOfferParams): Promis const clearMessage = logConsoleProgress(`Querying offer for database ${params.databaseId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType !== "Tables") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType !== "Tables" + ) { return await readDatabaseOfferWithARM(params.databaseId); } diff --git a/src/Common/dataAccess/readDatabases.ts b/src/Common/dataAccess/readDatabases.ts index e5136676e..cd1ae1843 100644 --- a/src/Common/dataAccess/readDatabases.ts +++ b/src/Common/dataAccess/readDatabases.ts @@ -13,7 +13,11 @@ export async function readDatabases(): Promise { let databases: DataModels.Database[]; const clearMessage = logConsoleProgress(`Querying databases`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType !== "Tables") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType !== "Tables" + ) { databases = await readDatabasesWithARM(); } else { const sdkResponse = await client().databases.readAll().fetchAll(); diff --git a/src/Common/dataAccess/readOfferWithSDK.ts b/src/Common/dataAccess/readOfferWithSDK.ts index 761d9b282..7332a4e4f 100644 --- a/src/Common/dataAccess/readOfferWithSDK.ts +++ b/src/Common/dataAccess/readOfferWithSDK.ts @@ -1,6 +1,6 @@ -import { HttpHeaders } from "../Constants"; +import { RequestOptions } from "@azure/cosmos"; import { Offer } from "../../Contracts/DataModels"; -import { RequestOptions } from "@azure/cosmos/dist-esm"; +import { HttpHeaders } from "../Constants"; import { client } from "../CosmosClient"; import { parseSDKOfferResponse } from "../OfferUtility"; import { readOffers } from "./readOffers"; diff --git a/src/Common/dataAccess/readStoredProcedures.ts b/src/Common/dataAccess/readStoredProcedures.ts index 65edb54c2..2e8652933 100644 --- a/src/Common/dataAccess/readStoredProcedures.ts +++ b/src/Common/dataAccess/readStoredProcedures.ts @@ -12,7 +12,11 @@ export async function readStoredProcedures( ): Promise<(StoredProcedureDefinition & Resource)[]> { const clearMessage = logConsoleProgress(`Querying stored procedures for container ${collectionId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType === "SQL" + ) { const rpResponse = await listSqlStoredProcedures( userContext.subscriptionId, userContext.resourceGroup, diff --git a/src/Common/dataAccess/readTriggers.ts b/src/Common/dataAccess/readTriggers.ts index 764f3ace1..dd51db372 100644 --- a/src/Common/dataAccess/readTriggers.ts +++ b/src/Common/dataAccess/readTriggers.ts @@ -13,7 +13,11 @@ export async function readTriggers( ): Promise { const clearMessage = logConsoleProgress(`Querying triggers for container ${collectionId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType === "SQL" + ) { const rpResponse = await listSqlTriggers( userContext.subscriptionId, userContext.resourceGroup, diff --git a/src/Common/dataAccess/readUserDefinedFunctions.ts b/src/Common/dataAccess/readUserDefinedFunctions.ts index a55ad0ca6..a103291f9 100644 --- a/src/Common/dataAccess/readUserDefinedFunctions.ts +++ b/src/Common/dataAccess/readUserDefinedFunctions.ts @@ -11,9 +11,9 @@ export async function readUserDefinedFunctions( collectionId: string ): Promise<(UserDefinedFunctionDefinition & Resource)[]> { const clearMessage = logConsoleProgress(`Querying user defined functions for container ${collectionId}`); - const { authType, useSDKOperations, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext; + const { authType, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext; try { - if (authType === AuthType.AAD && !useSDKOperations && apiType === "SQL") { + if (authType === AuthType.AAD && !userContext.features.enableSDKoperations && apiType === "SQL") { const rpResponse = await listSqlUserDefinedFunctions( subscriptionId, resourceGroup, diff --git a/src/Common/dataAccess/updateCollection.ts b/src/Common/dataAccess/updateCollection.ts index cb553b77f..5a0006697 100644 --- a/src/Common/dataAccess/updateCollection.ts +++ b/src/Common/dataAccess/updateCollection.ts @@ -1,5 +1,4 @@ -import { ContainerDefinition } from "@azure/cosmos"; -import { RequestOptions } from "@azure/cosmos/dist-esm"; +import { ContainerDefinition, RequestOptions } from "@azure/cosmos"; import { AuthType } from "../../AuthType"; import { Collection } from "../../Contracts/DataModels"; import { userContext } from "../../UserContext"; @@ -34,7 +33,11 @@ export async function updateCollection( const clearMessage = logConsoleProgress(`Updating container ${collectionId}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType !== "Tables") { + if ( + userContext.authType === AuthType.AAD && + !userContext.features.enableSDKoperations && + userContext.apiType !== "Tables" + ) { collection = await updateCollectionWithARM(databaseId, collectionId, newCollection); } else { const sdkResponse = await client() diff --git a/src/Common/dataAccess/updateDocument.ts b/src/Common/dataAccess/updateDocument.ts index 7cda6566d..8aa100bbc 100644 --- a/src/Common/dataAccess/updateDocument.ts +++ b/src/Common/dataAccess/updateDocument.ts @@ -25,7 +25,7 @@ export const updateDocument = async ( const response = await client() .database(collection.databaseId) .container(collection.id()) - .item(documentId.id(), documentId.partitionKeyValue) + .item(documentId.id(), documentId.partitionKeyValue?.length === 0 ? undefined : documentId.partitionKeyValue) .replace(newDocument, options); logConsoleInfo(`Successfully updated ${entityName} ${documentId.id()}`); diff --git a/src/Common/dataAccess/updateOffer.ts b/src/Common/dataAccess/updateOffer.ts index 380de430d..7f3a26da1 100644 --- a/src/Common/dataAccess/updateOffer.ts +++ b/src/Common/dataAccess/updateOffer.ts @@ -1,5 +1,4 @@ -import { OfferDefinition } from "@azure/cosmos"; -import { RequestOptions } from "@azure/cosmos/dist-esm"; +import { OfferDefinition, RequestOptions } from "@azure/cosmos"; import { AuthType } from "../../AuthType"; import { Offer, SDKOfferDefinition, UpdateOfferParams } from "../../Contracts/DataModels"; import { userContext } from "../../UserContext"; @@ -57,7 +56,7 @@ export const updateOffer = async (params: UpdateOfferParams): Promise => const clearMessage = logConsoleProgress(`Updating offer for ${offerResourceText}`); try { - if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations) { + if (userContext.authType === AuthType.AAD && !userContext.features.enableSDKoperations) { if (params.collectionId) { updatedOffer = await updateCollectionOfferWithARM(params); } else if (userContext.apiType === "Tables") { diff --git a/src/Common/dataAccess/updateStoredProcedure.ts b/src/Common/dataAccess/updateStoredProcedure.ts index b3cf875a0..6e6d841e6 100644 --- a/src/Common/dataAccess/updateStoredProcedure.ts +++ b/src/Common/dataAccess/updateStoredProcedure.ts @@ -20,9 +20,9 @@ export async function updateStoredProcedure( ): Promise { const clearMessage = logConsoleProgress(`Updating stored procedure ${storedProcedure.id}`); try { - const { authType, useSDKOperations, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext; + const { authType, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext; - if (authType === AuthType.AAD && !useSDKOperations && apiType === "SQL") { + if (authType === AuthType.AAD && !userContext.features.enableSDKoperations && apiType === "SQL") { const getResponse = await getSqlStoredProcedure( subscriptionId, resourceGroup, diff --git a/src/Common/dataAccess/updateTrigger.ts b/src/Common/dataAccess/updateTrigger.ts index 6d5afb4be..56e27a905 100644 --- a/src/Common/dataAccess/updateTrigger.ts +++ b/src/Common/dataAccess/updateTrigger.ts @@ -13,9 +13,9 @@ export async function updateTrigger( trigger: SqlTriggerResource ): Promise { const clearMessage = logConsoleProgress(`Updating trigger ${trigger.id}`); - const { authType, useSDKOperations, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext; + const { authType, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext; try { - if (authType === AuthType.AAD && !useSDKOperations && apiType === "SQL") { + if (authType === AuthType.AAD && !userContext.features.enableSDKoperations && apiType === "SQL") { const getResponse = await getSqlTrigger( subscriptionId, resourceGroup, diff --git a/src/Common/dataAccess/updateUserDefinedFunction.ts b/src/Common/dataAccess/updateUserDefinedFunction.ts index f3b28bf51..21780774b 100644 --- a/src/Common/dataAccess/updateUserDefinedFunction.ts +++ b/src/Common/dataAccess/updateUserDefinedFunction.ts @@ -19,9 +19,9 @@ export async function updateUserDefinedFunction( userDefinedFunction: UserDefinedFunctionDefinition ): Promise { const clearMessage = logConsoleProgress(`Updating user defined function ${userDefinedFunction.id}`); - const { authType, useSDKOperations, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext; + const { authType, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext; try { - if (authType === AuthType.AAD && !useSDKOperations && apiType === "SQL") { + if (authType === AuthType.AAD && !userContext.features.enableSDKoperations && apiType === "SQL") { const getResponse = await getSqlUserDefinedFunction( subscriptionId, resourceGroup, diff --git a/src/Contracts/DataModels.ts b/src/Contracts/DataModels.ts index ca76351cf..8bec7e6f9 100644 --- a/src/Contracts/DataModels.ts +++ b/src/Contracts/DataModels.ts @@ -7,6 +7,11 @@ export interface DatabaseAccount { type: string; kind: string; properties: DatabaseAccountExtendedProperties; + systemData?: DatabaseAccountSystemData; +} + +export interface DatabaseAccountSystemData { + createdAt: string; } export interface DatabaseAccountExtendedProperties { @@ -433,44 +438,51 @@ export interface NotebookWorkspaceConnectionInfo { export interface ContainerInfo { durationLeftInMinutes: number; - notebookServerInfo: NotebookWorkspaceConnectionInfo; + phoenixServerInfo: NotebookWorkspaceConnectionInfo; status: ContainerStatusType; } export interface IProvisionData { cosmosEndpoint: string; + poolId: string; } export interface IContainerData { forwardingId: string; } +export interface IDbAccountAllow { + status: number; + message?: string; + type?: string; +} + export interface IResponse { status: number; data: T; } -export interface IValidationError { +export interface IPhoenixError { message: string; type: string; } -export interface IMaxAllocationTimeExceeded extends IValidationError { +export interface IMaxAllocationTimeExceeded extends IPhoenixError { earliestAllocationTimestamp: string; maxAllocationTimePerDayPerUserInMinutes: string; } -export interface IMaxDbAccountsPerUserExceeded extends IValidationError { +export interface IMaxDbAccountsPerUserExceeded extends IPhoenixError { maxSimultaneousConnectionsPerUser: string; } -export interface IMaxUsersPerDbAccountExceeded extends IValidationError { +export interface IMaxUsersPerDbAccountExceeded extends IPhoenixError { maxSimultaneousUsersPerDbAccount: string; } export interface IPhoenixConnectionInfoResult { - readonly notebookAuthToken?: string; - readonly notebookServerUrl?: string; + readonly authToken?: string; + readonly phoenixServiceUrl?: string; readonly forwardingId?: string; } @@ -557,4 +569,6 @@ export enum PhoenixErrorType { AllocationValidationResult = "AllocationValidationResult", RegionNotServicable = "RegionNotServicable", SubscriptionNotAllowed = "SubscriptionNotAllowed", + UnknownError = "UnknownError", + PhoenixFlightFallback = "PhoenixFlightFallback", } diff --git a/src/Contracts/ExplorerContracts.ts b/src/Contracts/ExplorerContracts.ts index 09a271194..7fd127bec 100644 --- a/src/Contracts/ExplorerContracts.ts +++ b/src/Contracts/ExplorerContracts.ts @@ -34,6 +34,7 @@ export enum MessageTypes { CreateSparkPool, RefreshDatabaseAccount, CloseTab, + OpenQuickstartBlade, } export { Versions, ActionContracts, Diagnostics }; diff --git a/src/Contracts/ViewModels.ts b/src/Contracts/ViewModels.ts index ef775e2ce..9e89807e2 100644 --- a/src/Contracts/ViewModels.ts +++ b/src/Contracts/ViewModels.ts @@ -86,6 +86,7 @@ export interface Database extends TreeNode { offer: ko.Observable; isDatabaseExpanded: ko.Observable; isDatabaseShared: ko.Computed; + isSampleDB?: boolean; selectedSubnodeKind: ko.Observable; @@ -112,6 +113,7 @@ export interface CollectionBase extends TreeNode { selectedSubnodeKind: ko.Observable; children: ko.ObservableArray; isCollectionExpanded: ko.Observable; + isSampleCollection?: boolean; onDocumentDBDocumentsClick(): void; onNewQueryClick(source: any, event?: MouseEvent, queryText?: string): void; diff --git a/src/Explorer/ContextMenuButtonFactory.tsx b/src/Explorer/ContextMenuButtonFactory.tsx index 8f85ddbdb..426287068 100644 --- a/src/Explorer/ContextMenuButtonFactory.tsx +++ b/src/Explorer/ContextMenuButtonFactory.tsx @@ -44,7 +44,7 @@ export const createDatabaseContextMenu = (container: Explorer, databaseId: strin }, ]; - if (userContext.apiType !== "Tables") { + if (userContext.apiType !== "Tables" || userContext.features.enableSDKoperations) { items.push({ iconSrc: DeleteDatabaseIcon, onClick: () => diff --git a/src/Explorer/Controls/Settings/__snapshots__/SettingsComponent.test.tsx.snap b/src/Explorer/Controls/Settings/__snapshots__/SettingsComponent.test.tsx.snap index ea8341d10..fd3b28ed5 100644 --- a/src/Explorer/Controls/Settings/__snapshots__/SettingsComponent.test.tsx.snap +++ b/src/Explorer/Controls/Settings/__snapshots__/SettingsComponent.test.tsx.snap @@ -32,1611 +32,6 @@ exports[`SettingsComponent renders 1`] = ` "_resetNotebookWorkspace": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], "isTabsContentExpanded": [Function], - "notebookManager": NotebookManager { - "gitHubClient": GitHubClient { - "errorCallback": [Function], - "ocktokit": OctokitWithDefaults { - "actions": Object { - "addSelectedRepoToOrgSecret": [Function], - "cancelWorkflowRun": [Function], - "createOrUpdateOrgSecret": [Function], - "createOrUpdateRepoSecret": [Function], - "createOrUpdateSecretForRepo": [Function], - "createRegistrationToken": [Function], - "createRegistrationTokenForOrg": [Function], - "createRegistrationTokenForRepo": [Function], - "createRemoveToken": [Function], - "createRemoveTokenForOrg": [Function], - "createRemoveTokenForRepo": [Function], - "deleteArtifact": [Function], - "deleteOrgSecret": [Function], - "deleteRepoSecret": [Function], - "deleteSecretFromRepo": [Function], - "deleteSelfHostedRunnerFromOrg": [Function], - "deleteSelfHostedRunnerFromRepo": [Function], - "deleteWorkflowRunLogs": [Function], - "downloadArtifact": [Function], - "downloadJobLogsForWorkflowRun": [Function], - "downloadWorkflowJobLogs": [Function], - "downloadWorkflowRunLogs": [Function], - "getArtifact": [Function], - "getJobForWorkflowRun": [Function], - "getOrgPublicKey": [Function], - "getOrgSecret": [Function], - "getPublicKey": [Function], - "getRepoPublicKey": [Function], - "getRepoSecret": [Function], - "getSecret": [Function], - "getSelfHostedRunner": [Function], - "getSelfHostedRunnerForOrg": [Function], - "getSelfHostedRunnerForRepo": [Function], - "getWorkflow": [Function], - "getWorkflowJob": [Function], - "getWorkflowRun": [Function], - "getWorkflowRunUsage": [Function], - "getWorkflowUsage": [Function], - "listArtifactsForRepo": [Function], - "listDownloadsForSelfHostedRunnerApplication": [Function], - "listJobsForWorkflowRun": [Function], - "listOrgSecrets": [Function], - "listRepoSecrets": [Function], - "listRepoWorkflowRuns": [Function], - "listRepoWorkflows": [Function], - "listRunnerApplicationsForOrg": [Function], - "listRunnerApplicationsForRepo": [Function], - "listSecretsForRepo": [Function], - "listSelectedReposForOrgSecret": [Function], - "listSelfHostedRunnersForOrg": [Function], - "listSelfHostedRunnersForRepo": [Function], - "listWorkflowJobLogs": [Function], - "listWorkflowRunArtifacts": [Function], - "listWorkflowRunLogs": [Function], - "listWorkflowRuns": [Function], - "listWorkflowRunsForRepo": [Function], - "reRunWorkflow": [Function], - "removeSelectedRepoFromOrgSecret": [Function], - "removeSelfHostedRunner": [Function], - "setSelectedReposForOrgSecret": [Function], - }, - "activity": Object { - "checkRepoIsStarredByAuthenticatedUser": [Function], - "checkStarringRepo": [Function], - "deleteRepoSubscription": [Function], - "deleteThreadSubscription": [Function], - "getFeeds": [Function], - "getRepoSubscription": [Function], - "getThread": [Function], - "getThreadSubscription": [Function], - "getThreadSubscriptionForAuthenticatedUser": [Function], - "listEventsForAuthenticatedUser": [Function], - "listEventsForOrg": [Function], - "listEventsForUser": [Function], - "listFeeds": [Function], - "listNotifications": [Function], - "listNotificationsForAuthenticatedUser": [Function], - "listNotificationsForRepo": [Function], - "listOrgEventsForAuthenticatedUser": [Function], - "listPublicEvents": [Function], - "listPublicEventsForOrg": [Function], - "listPublicEventsForRepoNetwork": [Function], - "listPublicEventsForUser": [Function], - "listPublicOrgEvents": [Function], - "listReceivedEventsForUser": [Function], - "listReceivedPublicEventsForUser": [Function], - "listRepoEvents": [Function], - "listRepoNotificationsForAuthenticatedUser": [Function], - "listReposStarredByAuthenticatedUser": [Function], - "listReposStarredByUser": [Function], - "listReposWatchedByUser": [Function], - "listStargazersForRepo": [Function], - "listWatchedReposForAuthenticatedUser": [Function], - "listWatchersForRepo": [Function], - "markAsRead": [Function], - "markNotificationsAsRead": [Function], - "markNotificationsAsReadForRepo": [Function], - "markRepoNotificationsAsRead": [Function], - "markThreadAsRead": [Function], - "setRepoSubscription": [Function], - "setThreadSubscription": [Function], - "starRepo": [Function], - "starRepoForAuthenticatedUser": [Function], - "unstarRepo": [Function], - "unstarRepoForAuthenticatedUser": [Function], - }, - "apps": Object { - "addRepoToInstallation": [Function], - "checkAccountIsAssociatedWithAny": [Function], - "checkAccountIsAssociatedWithAnyStubbed": [Function], - "checkToken": [Function], - "createContentAttachment": [Function], - "createFromManifest": [Function], - "createInstallationAccessToken": [Function], - "createInstallationToken": [Function], - "deleteAuthorization": [Function], - "deleteInstallation": [Function], - "deleteToken": [Function], - "getAuthenticated": [Function], - "getBySlug": [Function], - "getInstallation": [Function], - "getOrgInstallation": [Function], - "getRepoInstallation": [Function], - "getSubscriptionPlanForAccount": [Function], - "getSubscriptionPlanForAccountStubbed": [Function], - "getUserInstallation": [Function], - "listAccountsForPlan": [Function], - "listAccountsForPlanStubbed": [Function], - "listAccountsUserOrOrgOnPlan": [Function], - "listAccountsUserOrOrgOnPlanStubbed": [Function], - "listInstallationReposForAuthenticatedUser": [Function], - "listInstallations": [Function], - "listInstallationsForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], - "listPlans": [Function], - "listPlansStubbed": [Function], - "listRepos": [Function], - "listReposAccessibleToInstallation": [Function], - "listSubscriptionsForAuthenticatedUser": [Function], - "listSubscriptionsForAuthenticatedUserStubbed": [Function], - "removeRepoFromInstallation": [Function], - "resetToken": [Function], - "revokeInstallationAccessToken": [Function], - "revokeInstallationToken": [Function], - "suspendInstallation": [Function], - "unsuspendInstallation": [Function], - }, - "auth": [Function], - "checks": Object { - "create": [Function], - "createSuite": [Function], - "get": [Function], - "getSuite": [Function], - "listAnnotations": [Function], - "listForRef": [Function], - "listForSuite": [Function], - "listSuitesForRef": [Function], - "rerequestSuite": [Function], - "setSuitesPreferences": [Function], - "update": [Function], - }, - "codeScanning": Object { - "getAlert": [Function], - "listAlertsForRepo": [Function], - }, - "codesOfConduct": Object { - "getAllCodesOfConduct": [Function], - "getConductCode": [Function], - "getForRepo": [Function], - "listConductCodes": [Function], - }, - "emojis": Object { - "get": [Function], - }, - "gists": Object { - "checkIsStarred": [Function], - "create": [Function], - "createComment": [Function], - "delete": [Function], - "deleteComment": [Function], - "fork": [Function], - "get": [Function], - "getComment": [Function], - "getRevision": [Function], - "list": [Function], - "listComments": [Function], - "listCommits": [Function], - "listForUser": [Function], - "listForks": [Function], - "listPublic": [Function], - "listPublicForUser": [Function], - "listStarred": [Function], - "star": [Function], - "unstar": [Function], - "update": [Function], - "updateComment": [Function], - }, - "git": Object { - "createBlob": [Function], - "createCommit": [Function], - "createRef": [Function], - "createTag": [Function], - "createTree": [Function], - "deleteRef": [Function], - "getBlob": [Function], - "getCommit": [Function], - "getRef": [Function], - "getTag": [Function], - "getTree": [Function], - "listMatchingRefs": [Function], - "updateRef": [Function], - }, - "gitignore": Object { - "getAllTemplates": [Function], - "getTemplate": [Function], - "listTemplates": [Function], - }, - "graphql": [Function], - "hook": [Function], - "interactions": Object { - "addOrUpdateRestrictionsForOrg": [Function], - "addOrUpdateRestrictionsForRepo": [Function], - "getRestrictionsForOrg": [Function], - "getRestrictionsForRepo": [Function], - "removeRestrictionsForOrg": [Function], - "removeRestrictionsForRepo": [Function], - "setRestrictionsForOrg": [Function], - "setRestrictionsForRepo": [Function], - }, - "issues": Object { - "addAssignees": [Function], - "addLabels": [Function], - "checkAssignee": [Function], - "checkUserCanBeAssigned": [Function], - "create": [Function], - "createComment": [Function], - "createLabel": [Function], - "createMilestone": [Function], - "deleteComment": [Function], - "deleteLabel": [Function], - "deleteMilestone": [Function], - "get": [Function], - "getComment": [Function], - "getEvent": [Function], - "getLabel": [Function], - "getMilestone": [Function], - "list": [Function], - "listAssignees": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listEvents": [Function], - "listEventsForRepo": [Function], - "listEventsForTimeline": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listLabelsForMilestone": [Function], - "listLabelsForRepo": [Function], - "listLabelsOnIssue": [Function], - "listMilestones": [Function], - "listMilestonesForRepo": [Function], - "lock": [Function], - "removeAllLabels": [Function], - "removeAssignees": [Function], - "removeLabel": [Function], - "removeLabels": [Function], - "replaceAllLabels": [Function], - "replaceLabels": [Function], - "setLabels": [Function], - "unlock": [Function], - "update": [Function], - "updateComment": [Function], - "updateLabel": [Function], - "updateMilestone": [Function], - }, - "licenses": Object { - "get": [Function], - "getAllCommonlyUsed": [Function], - "getForRepo": [Function], - "listCommonlyUsed": [Function], - }, - "log": Object { - "debug": [Function], - "error": [Function], - "info": [Function], - "warn": [Function], - }, - "markdown": Object { - "render": [Function], - "renderRaw": [Function], - }, - "meta": Object { - "get": [Function], - }, - "migrations": Object { - "cancelImport": [Function], - "deleteArchiveForAuthenticatedUser": [Function], - "deleteArchiveForOrg": [Function], - "downloadArchiveForOrg": [Function], - "getArchiveForAuthenticatedUser": [Function], - "getCommitAuthors": [Function], - "getImportProgress": [Function], - "getImportStatus": [Function], - "getLargeFiles": [Function], - "getStatusForAuthenticatedUser": [Function], - "getStatusForOrg": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listReposForOrg": [Function], - "listReposForUser": [Function], - "mapCommitAuthor": [Function], - "setLfsPreference": [Function], - "startForAuthenticatedUser": [Function], - "startForOrg": [Function], - "startImport": [Function], - "unlockRepoForAuthenticatedUser": [Function], - "unlockRepoForOrg": [Function], - "updateImport": [Function], - }, - "orgs": Object { - "addOrUpdateMembership": [Function], - "blockUser": [Function], - "checkBlockedUser": [Function], - "checkMembership": [Function], - "checkMembershipForUser": [Function], - "checkPublicMembership": [Function], - "checkPublicMembershipForUser": [Function], - "concealMembership": [Function], - "convertMemberToOutsideCollaborator": [Function], - "createHook": [Function], - "createInvitation": [Function], - "createWebhook": [Function], - "deleteHook": [Function], - "deleteWebhook": [Function], - "get": [Function], - "getHook": [Function], - "getMembership": [Function], - "getMembershipForAuthenticatedUser": [Function], - "getMembershipForUser": [Function], - "getWebhook": [Function], - "list": [Function], - "listAppInstallations": [Function], - "listBlockedUsers": [Function], - "listForAuthenticatedUser": [Function], - "listForUser": [Function], - "listHooks": [Function], - "listInstallations": [Function], - "listInvitationTeams": [Function], - "listMembers": [Function], - "listMemberships": [Function], - "listMembershipsForAuthenticatedUser": [Function], - "listOutsideCollaborators": [Function], - "listPendingInvitations": [Function], - "listPublicMembers": [Function], - "listWebhooks": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "publicizeMembership": [Function], - "removeMember": [Function], - "removeMembership": [Function], - "removeMembershipForUser": [Function], - "removeOutsideCollaborator": [Function], - "removePublicMembershipForAuthenticatedUser": [Function], - "setMembershipForUser": [Function], - "setPublicMembershipForAuthenticatedUser": [Function], - "unblockUser": [Function], - "update": [Function], - "updateHook": [Function], - "updateMembership": [Function], - "updateMembershipForAuthenticatedUser": [Function], - "updateWebhook": [Function], - }, - "paginate": [Function], - "projects": Object { - "addCollaborator": [Function], - "createCard": [Function], - "createColumn": [Function], - "createForAuthenticatedUser": [Function], - "createForOrg": [Function], - "createForRepo": [Function], - "delete": [Function], - "deleteCard": [Function], - "deleteColumn": [Function], - "get": [Function], - "getCard": [Function], - "getColumn": [Function], - "getPermissionForUser": [Function], - "listCards": [Function], - "listCollaborators": [Function], - "listColumns": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listForUser": [Function], - "moveCard": [Function], - "moveColumn": [Function], - "removeCollaborator": [Function], - "reviewUserPermissionLevel": [Function], - "update": [Function], - "updateCard": [Function], - "updateColumn": [Function], - }, - "pulls": Object { - "checkIfMerged": [Function], - "create": [Function], - "createComment": [Function], - "createReplyForReviewComment": [Function], - "createReview": [Function], - "createReviewComment": [Function], - "createReviewCommentReply": [Function], - "createReviewRequest": [Function], - "deleteComment": [Function], - "deletePendingReview": [Function], - "deleteReviewComment": [Function], - "deleteReviewRequest": [Function], - "dismissReview": [Function], - "get": [Function], - "getComment": [Function], - "getCommentsForReview": [Function], - "getReview": [Function], - "getReviewComment": [Function], - "list": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listCommentsForReview": [Function], - "listCommits": [Function], - "listFiles": [Function], - "listRequestedReviewers": [Function], - "listReviewComments": [Function], - "listReviewCommentsForRepo": [Function], - "listReviewRequests": [Function], - "listReviews": [Function], - "merge": [Function], - "removeRequestedReviewers": [Function], - "requestReviewers": [Function], - "submitReview": [Function], - "update": [Function], - "updateBranch": [Function], - "updateComment": [Function], - "updateReview": [Function], - "updateReviewComment": [Function], - }, - "rateLimit": Object { - "get": [Function], - }, - "reactions": Object { - "createForCommitComment": [Function], - "createForIssue": [Function], - "createForIssueComment": [Function], - "createForPullRequestReviewComment": [Function], - "createForTeamDiscussionCommentInOrg": [Function], - "createForTeamDiscussionInOrg": [Function], - "delete": [Function], - "deleteForCommitComment": [Function], - "deleteForIssue": [Function], - "deleteForIssueComment": [Function], - "deleteForPullRequestComment": [Function], - "deleteForTeamDiscussion": [Function], - "deleteForTeamDiscussionComment": [Function], - "deleteLegacy": [Function], - "listForCommitComment": [Function], - "listForIssue": [Function], - "listForIssueComment": [Function], - "listForPullRequestReviewComment": [Function], - "listForTeamDiscussionCommentInOrg": [Function], - "listForTeamDiscussionInOrg": [Function], - }, - "repos": Object { - "acceptInvitation": [Function], - "addAppAccessRestrictions": [Function], - "addCollaborator": [Function], - "addDeployKey": [Function], - "addProtectedBranchAdminEnforcement": [Function], - "addProtectedBranchAppRestrictions": [Function], - "addProtectedBranchRequiredSignatures": [Function], - "addProtectedBranchRequiredStatusChecksContexts": [Function], - "addProtectedBranchTeamRestrictions": [Function], - "addProtectedBranchUserRestrictions": [Function], - "addStatusCheckContexts": [Function], - "addTeamAccessRestrictions": [Function], - "addUserAccessRestrictions": [Function], - "checkCollaborator": [Function], - "checkVulnerabilityAlerts": [Function], - "compareCommits": [Function], - "createCommitComment": [Function], - "createCommitSignatureProtection": [Function], - "createCommitStatus": [Function], - "createDeployKey": [Function], - "createDeployment": [Function], - "createDeploymentStatus": [Function], - "createDispatchEvent": [Function], - "createForAuthenticatedUser": [Function], - "createFork": [Function], - "createHook": [Function], - "createInOrg": [Function], - "createOrUpdateFile": [Function], - "createOrUpdateFileContents": [Function], - "createPagesSite": [Function], - "createRelease": [Function], - "createStatus": [Function], - "createUsingTemplate": [Function], - "createWebhook": [Function], - "declineInvitation": [Function], - "delete": [Function], - "deleteAccessRestrictions": [Function], - "deleteAdminBranchProtection": [Function], - "deleteBranchProtection": [Function], - "deleteCommitComment": [Function], - "deleteCommitSignatureProtection": [Function], - "deleteDeployKey": [Function], - "deleteDeployment": [Function], - "deleteDownload": [Function], - "deleteFile": [Function], - "deleteHook": [Function], - "deleteInvitation": [Function], - "deletePagesSite": [Function], - "deletePullRequestReviewProtection": [Function], - "deleteRelease": [Function], - "deleteReleaseAsset": [Function], - "deleteWebhook": [Function], - "disableAutomatedSecurityFixes": [Function], - "disablePagesSite": [Function], - "disableVulnerabilityAlerts": [Function], - "downloadArchive": [Function], - "enableAutomatedSecurityFixes": [Function], - "enablePagesSite": [Function], - "enableVulnerabilityAlerts": [Function], - "get": [Function], - "getAccessRestrictions": [Function], - "getAdminBranchProtection": [Function], - "getAllStatusCheckContexts": [Function], - "getAllTopics": [Function], - "getAppsWithAccessToProtectedBranch": [Function], - "getArchiveLink": [Function], - "getBranch": [Function], - "getBranchProtection": [Function], - "getClones": [Function], - "getCodeFrequencyStats": [Function], - "getCollaboratorPermissionLevel": [Function], - "getCombinedStatusForRef": [Function], - "getCommit": [Function], - "getCommitActivityStats": [Function], - "getCommitComment": [Function], - "getCommitSignatureProtection": [Function], - "getCommunityProfileMetrics": [Function], - "getContent": [Function], - "getContents": [Function], - "getContributorsStats": [Function], - "getDeployKey": [Function], - "getDeployment": [Function], - "getDeploymentStatus": [Function], - "getDownload": [Function], - "getHook": [Function], - "getLatestPagesBuild": [Function], - "getLatestRelease": [Function], - "getPages": [Function], - "getPagesBuild": [Function], - "getParticipationStats": [Function], - "getProtectedBranchAdminEnforcement": [Function], - "getProtectedBranchPullRequestReviewEnforcement": [Function], - "getProtectedBranchRequiredSignatures": [Function], - "getProtectedBranchRequiredStatusChecks": [Function], - "getProtectedBranchRestrictions": [Function], - "getPullRequestReviewProtection": [Function], - "getPunchCardStats": [Function], - "getReadme": [Function], - "getRelease": [Function], - "getReleaseAsset": [Function], - "getReleaseByTag": [Function], - "getStatusChecksProtection": [Function], - "getTeamsWithAccessToProtectedBranch": [Function], - "getTopPaths": [Function], - "getTopReferrers": [Function], - "getUsersWithAccessToProtectedBranch": [Function], - "getViews": [Function], - "getWebhook": [Function], - "list": [Function], - "listAssetsForRelease": [Function], - "listBranches": [Function], - "listBranchesForHeadCommit": [Function], - "listCollaborators": [Function], - "listCommentsForCommit": [Function], - "listCommitComments": [Function], - "listCommitCommentsForRepo": [Function], - "listCommitStatusesForRef": [Function], - "listCommits": [Function], - "listContributors": [Function], - "listDeployKeys": [Function], - "listDeploymentStatuses": [Function], - "listDeployments": [Function], - "listDownloads": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForUser": [Function], - "listForks": [Function], - "listHooks": [Function], - "listInvitations": [Function], - "listInvitationsForAuthenticatedUser": [Function], - "listLanguages": [Function], - "listPagesBuilds": [Function], - "listProtectedBranchRequiredStatusChecksContexts": [Function], - "listPublic": [Function], - "listPullRequestsAssociatedWithCommit": [Function], - "listReleaseAssets": [Function], - "listReleases": [Function], - "listStatusesForRef": [Function], - "listTags": [Function], - "listTeams": [Function], - "listTopics": [Function], - "listWebhooks": [Function], - "merge": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "removeAppAccessRestrictions": [Function], - "removeBranchProtection": [Function], - "removeCollaborator": [Function], - "removeDeployKey": [Function], - "removeProtectedBranchAdminEnforcement": [Function], - "removeProtectedBranchAppRestrictions": [Function], - "removeProtectedBranchPullRequestReviewEnforcement": [Function], - "removeProtectedBranchRequiredSignatures": [Function], - "removeProtectedBranchRequiredStatusChecks": [Function], - "removeProtectedBranchRequiredStatusChecksContexts": [Function], - "removeProtectedBranchRestrictions": [Function], - "removeProtectedBranchTeamRestrictions": [Function], - "removeProtectedBranchUserRestrictions": [Function], - "removeStatusCheckContexts": [Function], - "removeStatusCheckProtection": [Function], - "removeTeamAccessRestrictions": [Function], - "removeUserAccessRestrictions": [Function], - "replaceAllTopics": [Function], - "replaceProtectedBranchAppRestrictions": [Function], - "replaceProtectedBranchRequiredStatusChecksContexts": [Function], - "replaceProtectedBranchTeamRestrictions": [Function], - "replaceProtectedBranchUserRestrictions": [Function], - "replaceTopics": [Function], - "requestPageBuild": [Function], - "requestPagesBuild": [Function], - "retrieveCommunityProfileMetrics": [Function], - "setAdminBranchProtection": [Function], - "setAppAccessRestrictions": [Function], - "setStatusCheckContexts": [Function], - "setTeamAccessRestrictions": [Function], - "setUserAccessRestrictions": [Function], - "testPushHook": [Function], - "testPushWebhook": [Function], - "transfer": [Function], - "update": [Function], - "updateBranchProtection": [Function], - "updateCommitComment": [Function], - "updateHook": [Function], - "updateInformationAboutPagesSite": [Function], - "updateInvitation": [Function], - "updateProtectedBranchPullRequestReviewEnforcement": [Function], - "updateProtectedBranchRequiredStatusChecks": [Function], - "updatePullRequestReviewProtection": [Function], - "updateRelease": [Function], - "updateReleaseAsset": [Function], - "updateStatusCheckPotection": [Function], - "updateWebhook": [Function], - "uploadReleaseAsset": [Function], - }, - "request": [Function], - "search": Object { - "code": [Function], - "commits": [Function], - "issuesAndPullRequests": [Function], - "labels": [Function], - "repos": [Function], - "topics": [Function], - "users": [Function], - }, - "teams": Object { - "addOrUpdateMembershipForUserInOrg": [Function], - "addOrUpdateMembershipInOrg": [Function], - "addOrUpdateProjectInOrg": [Function], - "addOrUpdateProjectPermissionsInOrg": [Function], - "addOrUpdateRepoInOrg": [Function], - "addOrUpdateRepoPermissionsInOrg": [Function], - "checkManagesRepoInOrg": [Function], - "checkPermissionsForProjectInOrg": [Function], - "checkPermissionsForRepoInOrg": [Function], - "create": [Function], - "createDiscussionCommentInOrg": [Function], - "createDiscussionInOrg": [Function], - "deleteDiscussionCommentInOrg": [Function], - "deleteDiscussionInOrg": [Function], - "deleteInOrg": [Function], - "getByName": [Function], - "getDiscussionCommentInOrg": [Function], - "getDiscussionInOrg": [Function], - "getMembershipForUserInOrg": [Function], - "getMembershipInOrg": [Function], - "list": [Function], - "listChildInOrg": [Function], - "listDiscussionCommentsInOrg": [Function], - "listDiscussionsInOrg": [Function], - "listForAuthenticatedUser": [Function], - "listMembersInOrg": [Function], - "listPendingInvitationsInOrg": [Function], - "listProjectsInOrg": [Function], - "listReposInOrg": [Function], - "removeMembershipForUserInOrg": [Function], - "removeMembershipInOrg": [Function], - "removeProjectInOrg": [Function], - "removeRepoInOrg": [Function], - "reviewProjectInOrg": [Function], - "updateDiscussionCommentInOrg": [Function], - "updateDiscussionInOrg": [Function], - "updateInOrg": [Function], - }, - "users": Object { - "addEmailForAuthenticated": [Function], - "addEmails": [Function], - "block": [Function], - "checkBlocked": [Function], - "checkFollowing": [Function], - "checkFollowingForUser": [Function], - "checkPersonIsFollowedByAuthenticated": [Function], - "createGpgKey": [Function], - "createGpgKeyForAuthenticated": [Function], - "createPublicKey": [Function], - "createPublicSshKeyForAuthenticated": [Function], - "deleteEmailForAuthenticated": [Function], - "deleteEmails": [Function], - "deleteGpgKey": [Function], - "deleteGpgKeyForAuthenticated": [Function], - "deletePublicKey": [Function], - "deletePublicSshKeyForAuthenticated": [Function], - "follow": [Function], - "getAuthenticated": [Function], - "getByUsername": [Function], - "getContextForUser": [Function], - "getGpgKey": [Function], - "getGpgKeyForAuthenticated": [Function], - "getPublicKey": [Function], - "getPublicSshKeyForAuthenticated": [Function], - "list": [Function], - "listBlocked": [Function], - "listBlockedByAuthenticated": [Function], - "listEmails": [Function], - "listEmailsForAuthenticated": [Function], - "listFollowedByAuthenticated": [Function], - "listFollowersForAuthenticatedUser": [Function], - "listFollowersForUser": [Function], - "listFollowingForAuthenticatedUser": [Function], - "listFollowingForUser": [Function], - "listGpgKeys": [Function], - "listGpgKeysForAuthenticated": [Function], - "listGpgKeysForUser": [Function], - "listPublicEmails": [Function], - "listPublicEmailsForAuthenticated": [Function], - "listPublicKeys": [Function], - "listPublicKeysForUser": [Function], - "listPublicSshKeysForAuthenticated": [Function], - "setPrimaryEmailVisibilityForAuthenticated": [Function], - "togglePrimaryEmailVisibility": [Function], - "unblock": [Function], - "unfollow": [Function], - "updateAuthenticated": [Function], - }, - }, - }, - "gitHubContentProvider": GitHubContentProvider { - "params": Object { - "gitHubClient": GitHubClient { - "errorCallback": [Function], - "ocktokit": OctokitWithDefaults { - "actions": Object { - "addSelectedRepoToOrgSecret": [Function], - "cancelWorkflowRun": [Function], - "createOrUpdateOrgSecret": [Function], - "createOrUpdateRepoSecret": [Function], - "createOrUpdateSecretForRepo": [Function], - "createRegistrationToken": [Function], - "createRegistrationTokenForOrg": [Function], - "createRegistrationTokenForRepo": [Function], - "createRemoveToken": [Function], - "createRemoveTokenForOrg": [Function], - "createRemoveTokenForRepo": [Function], - "deleteArtifact": [Function], - "deleteOrgSecret": [Function], - "deleteRepoSecret": [Function], - "deleteSecretFromRepo": [Function], - "deleteSelfHostedRunnerFromOrg": [Function], - "deleteSelfHostedRunnerFromRepo": [Function], - "deleteWorkflowRunLogs": [Function], - "downloadArtifact": [Function], - "downloadJobLogsForWorkflowRun": [Function], - "downloadWorkflowJobLogs": [Function], - "downloadWorkflowRunLogs": [Function], - "getArtifact": [Function], - "getJobForWorkflowRun": [Function], - "getOrgPublicKey": [Function], - "getOrgSecret": [Function], - "getPublicKey": [Function], - "getRepoPublicKey": [Function], - "getRepoSecret": [Function], - "getSecret": [Function], - "getSelfHostedRunner": [Function], - "getSelfHostedRunnerForOrg": [Function], - "getSelfHostedRunnerForRepo": [Function], - "getWorkflow": [Function], - "getWorkflowJob": [Function], - "getWorkflowRun": [Function], - "getWorkflowRunUsage": [Function], - "getWorkflowUsage": [Function], - "listArtifactsForRepo": [Function], - "listDownloadsForSelfHostedRunnerApplication": [Function], - "listJobsForWorkflowRun": [Function], - "listOrgSecrets": [Function], - "listRepoSecrets": [Function], - "listRepoWorkflowRuns": [Function], - "listRepoWorkflows": [Function], - "listRunnerApplicationsForOrg": [Function], - "listRunnerApplicationsForRepo": [Function], - "listSecretsForRepo": [Function], - "listSelectedReposForOrgSecret": [Function], - "listSelfHostedRunnersForOrg": [Function], - "listSelfHostedRunnersForRepo": [Function], - "listWorkflowJobLogs": [Function], - "listWorkflowRunArtifacts": [Function], - "listWorkflowRunLogs": [Function], - "listWorkflowRuns": [Function], - "listWorkflowRunsForRepo": [Function], - "reRunWorkflow": [Function], - "removeSelectedRepoFromOrgSecret": [Function], - "removeSelfHostedRunner": [Function], - "setSelectedReposForOrgSecret": [Function], - }, - "activity": Object { - "checkRepoIsStarredByAuthenticatedUser": [Function], - "checkStarringRepo": [Function], - "deleteRepoSubscription": [Function], - "deleteThreadSubscription": [Function], - "getFeeds": [Function], - "getRepoSubscription": [Function], - "getThread": [Function], - "getThreadSubscription": [Function], - "getThreadSubscriptionForAuthenticatedUser": [Function], - "listEventsForAuthenticatedUser": [Function], - "listEventsForOrg": [Function], - "listEventsForUser": [Function], - "listFeeds": [Function], - "listNotifications": [Function], - "listNotificationsForAuthenticatedUser": [Function], - "listNotificationsForRepo": [Function], - "listOrgEventsForAuthenticatedUser": [Function], - "listPublicEvents": [Function], - "listPublicEventsForOrg": [Function], - "listPublicEventsForRepoNetwork": [Function], - "listPublicEventsForUser": [Function], - "listPublicOrgEvents": [Function], - "listReceivedEventsForUser": [Function], - "listReceivedPublicEventsForUser": [Function], - "listRepoEvents": [Function], - "listRepoNotificationsForAuthenticatedUser": [Function], - "listReposStarredByAuthenticatedUser": [Function], - "listReposStarredByUser": [Function], - "listReposWatchedByUser": [Function], - "listStargazersForRepo": [Function], - "listWatchedReposForAuthenticatedUser": [Function], - "listWatchersForRepo": [Function], - "markAsRead": [Function], - "markNotificationsAsRead": [Function], - "markNotificationsAsReadForRepo": [Function], - "markRepoNotificationsAsRead": [Function], - "markThreadAsRead": [Function], - "setRepoSubscription": [Function], - "setThreadSubscription": [Function], - "starRepo": [Function], - "starRepoForAuthenticatedUser": [Function], - "unstarRepo": [Function], - "unstarRepoForAuthenticatedUser": [Function], - }, - "apps": Object { - "addRepoToInstallation": [Function], - "checkAccountIsAssociatedWithAny": [Function], - "checkAccountIsAssociatedWithAnyStubbed": [Function], - "checkToken": [Function], - "createContentAttachment": [Function], - "createFromManifest": [Function], - "createInstallationAccessToken": [Function], - "createInstallationToken": [Function], - "deleteAuthorization": [Function], - "deleteInstallation": [Function], - "deleteToken": [Function], - "getAuthenticated": [Function], - "getBySlug": [Function], - "getInstallation": [Function], - "getOrgInstallation": [Function], - "getRepoInstallation": [Function], - "getSubscriptionPlanForAccount": [Function], - "getSubscriptionPlanForAccountStubbed": [Function], - "getUserInstallation": [Function], - "listAccountsForPlan": [Function], - "listAccountsForPlanStubbed": [Function], - "listAccountsUserOrOrgOnPlan": [Function], - "listAccountsUserOrOrgOnPlanStubbed": [Function], - "listInstallationReposForAuthenticatedUser": [Function], - "listInstallations": [Function], - "listInstallationsForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], - "listPlans": [Function], - "listPlansStubbed": [Function], - "listRepos": [Function], - "listReposAccessibleToInstallation": [Function], - "listSubscriptionsForAuthenticatedUser": [Function], - "listSubscriptionsForAuthenticatedUserStubbed": [Function], - "removeRepoFromInstallation": [Function], - "resetToken": [Function], - "revokeInstallationAccessToken": [Function], - "revokeInstallationToken": [Function], - "suspendInstallation": [Function], - "unsuspendInstallation": [Function], - }, - "auth": [Function], - "checks": Object { - "create": [Function], - "createSuite": [Function], - "get": [Function], - "getSuite": [Function], - "listAnnotations": [Function], - "listForRef": [Function], - "listForSuite": [Function], - "listSuitesForRef": [Function], - "rerequestSuite": [Function], - "setSuitesPreferences": [Function], - "update": [Function], - }, - "codeScanning": Object { - "getAlert": [Function], - "listAlertsForRepo": [Function], - }, - "codesOfConduct": Object { - "getAllCodesOfConduct": [Function], - "getConductCode": [Function], - "getForRepo": [Function], - "listConductCodes": [Function], - }, - "emojis": Object { - "get": [Function], - }, - "gists": Object { - "checkIsStarred": [Function], - "create": [Function], - "createComment": [Function], - "delete": [Function], - "deleteComment": [Function], - "fork": [Function], - "get": [Function], - "getComment": [Function], - "getRevision": [Function], - "list": [Function], - "listComments": [Function], - "listCommits": [Function], - "listForUser": [Function], - "listForks": [Function], - "listPublic": [Function], - "listPublicForUser": [Function], - "listStarred": [Function], - "star": [Function], - "unstar": [Function], - "update": [Function], - "updateComment": [Function], - }, - "git": Object { - "createBlob": [Function], - "createCommit": [Function], - "createRef": [Function], - "createTag": [Function], - "createTree": [Function], - "deleteRef": [Function], - "getBlob": [Function], - "getCommit": [Function], - "getRef": [Function], - "getTag": [Function], - "getTree": [Function], - "listMatchingRefs": [Function], - "updateRef": [Function], - }, - "gitignore": Object { - "getAllTemplates": [Function], - "getTemplate": [Function], - "listTemplates": [Function], - }, - "graphql": [Function], - "hook": [Function], - "interactions": Object { - "addOrUpdateRestrictionsForOrg": [Function], - "addOrUpdateRestrictionsForRepo": [Function], - "getRestrictionsForOrg": [Function], - "getRestrictionsForRepo": [Function], - "removeRestrictionsForOrg": [Function], - "removeRestrictionsForRepo": [Function], - "setRestrictionsForOrg": [Function], - "setRestrictionsForRepo": [Function], - }, - "issues": Object { - "addAssignees": [Function], - "addLabels": [Function], - "checkAssignee": [Function], - "checkUserCanBeAssigned": [Function], - "create": [Function], - "createComment": [Function], - "createLabel": [Function], - "createMilestone": [Function], - "deleteComment": [Function], - "deleteLabel": [Function], - "deleteMilestone": [Function], - "get": [Function], - "getComment": [Function], - "getEvent": [Function], - "getLabel": [Function], - "getMilestone": [Function], - "list": [Function], - "listAssignees": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listEvents": [Function], - "listEventsForRepo": [Function], - "listEventsForTimeline": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listLabelsForMilestone": [Function], - "listLabelsForRepo": [Function], - "listLabelsOnIssue": [Function], - "listMilestones": [Function], - "listMilestonesForRepo": [Function], - "lock": [Function], - "removeAllLabels": [Function], - "removeAssignees": [Function], - "removeLabel": [Function], - "removeLabels": [Function], - "replaceAllLabels": [Function], - "replaceLabels": [Function], - "setLabels": [Function], - "unlock": [Function], - "update": [Function], - "updateComment": [Function], - "updateLabel": [Function], - "updateMilestone": [Function], - }, - "licenses": Object { - "get": [Function], - "getAllCommonlyUsed": [Function], - "getForRepo": [Function], - "listCommonlyUsed": [Function], - }, - "log": Object { - "debug": [Function], - "error": [Function], - "info": [Function], - "warn": [Function], - }, - "markdown": Object { - "render": [Function], - "renderRaw": [Function], - }, - "meta": Object { - "get": [Function], - }, - "migrations": Object { - "cancelImport": [Function], - "deleteArchiveForAuthenticatedUser": [Function], - "deleteArchiveForOrg": [Function], - "downloadArchiveForOrg": [Function], - "getArchiveForAuthenticatedUser": [Function], - "getCommitAuthors": [Function], - "getImportProgress": [Function], - "getImportStatus": [Function], - "getLargeFiles": [Function], - "getStatusForAuthenticatedUser": [Function], - "getStatusForOrg": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listReposForOrg": [Function], - "listReposForUser": [Function], - "mapCommitAuthor": [Function], - "setLfsPreference": [Function], - "startForAuthenticatedUser": [Function], - "startForOrg": [Function], - "startImport": [Function], - "unlockRepoForAuthenticatedUser": [Function], - "unlockRepoForOrg": [Function], - "updateImport": [Function], - }, - "orgs": Object { - "addOrUpdateMembership": [Function], - "blockUser": [Function], - "checkBlockedUser": [Function], - "checkMembership": [Function], - "checkMembershipForUser": [Function], - "checkPublicMembership": [Function], - "checkPublicMembershipForUser": [Function], - "concealMembership": [Function], - "convertMemberToOutsideCollaborator": [Function], - "createHook": [Function], - "createInvitation": [Function], - "createWebhook": [Function], - "deleteHook": [Function], - "deleteWebhook": [Function], - "get": [Function], - "getHook": [Function], - "getMembership": [Function], - "getMembershipForAuthenticatedUser": [Function], - "getMembershipForUser": [Function], - "getWebhook": [Function], - "list": [Function], - "listAppInstallations": [Function], - "listBlockedUsers": [Function], - "listForAuthenticatedUser": [Function], - "listForUser": [Function], - "listHooks": [Function], - "listInstallations": [Function], - "listInvitationTeams": [Function], - "listMembers": [Function], - "listMemberships": [Function], - "listMembershipsForAuthenticatedUser": [Function], - "listOutsideCollaborators": [Function], - "listPendingInvitations": [Function], - "listPublicMembers": [Function], - "listWebhooks": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "publicizeMembership": [Function], - "removeMember": [Function], - "removeMembership": [Function], - "removeMembershipForUser": [Function], - "removeOutsideCollaborator": [Function], - "removePublicMembershipForAuthenticatedUser": [Function], - "setMembershipForUser": [Function], - "setPublicMembershipForAuthenticatedUser": [Function], - "unblockUser": [Function], - "update": [Function], - "updateHook": [Function], - "updateMembership": [Function], - "updateMembershipForAuthenticatedUser": [Function], - "updateWebhook": [Function], - }, - "paginate": [Function], - "projects": Object { - "addCollaborator": [Function], - "createCard": [Function], - "createColumn": [Function], - "createForAuthenticatedUser": [Function], - "createForOrg": [Function], - "createForRepo": [Function], - "delete": [Function], - "deleteCard": [Function], - "deleteColumn": [Function], - "get": [Function], - "getCard": [Function], - "getColumn": [Function], - "getPermissionForUser": [Function], - "listCards": [Function], - "listCollaborators": [Function], - "listColumns": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listForUser": [Function], - "moveCard": [Function], - "moveColumn": [Function], - "removeCollaborator": [Function], - "reviewUserPermissionLevel": [Function], - "update": [Function], - "updateCard": [Function], - "updateColumn": [Function], - }, - "pulls": Object { - "checkIfMerged": [Function], - "create": [Function], - "createComment": [Function], - "createReplyForReviewComment": [Function], - "createReview": [Function], - "createReviewComment": [Function], - "createReviewCommentReply": [Function], - "createReviewRequest": [Function], - "deleteComment": [Function], - "deletePendingReview": [Function], - "deleteReviewComment": [Function], - "deleteReviewRequest": [Function], - "dismissReview": [Function], - "get": [Function], - "getComment": [Function], - "getCommentsForReview": [Function], - "getReview": [Function], - "getReviewComment": [Function], - "list": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listCommentsForReview": [Function], - "listCommits": [Function], - "listFiles": [Function], - "listRequestedReviewers": [Function], - "listReviewComments": [Function], - "listReviewCommentsForRepo": [Function], - "listReviewRequests": [Function], - "listReviews": [Function], - "merge": [Function], - "removeRequestedReviewers": [Function], - "requestReviewers": [Function], - "submitReview": [Function], - "update": [Function], - "updateBranch": [Function], - "updateComment": [Function], - "updateReview": [Function], - "updateReviewComment": [Function], - }, - "rateLimit": Object { - "get": [Function], - }, - "reactions": Object { - "createForCommitComment": [Function], - "createForIssue": [Function], - "createForIssueComment": [Function], - "createForPullRequestReviewComment": [Function], - "createForTeamDiscussionCommentInOrg": [Function], - "createForTeamDiscussionInOrg": [Function], - "delete": [Function], - "deleteForCommitComment": [Function], - "deleteForIssue": [Function], - "deleteForIssueComment": [Function], - "deleteForPullRequestComment": [Function], - "deleteForTeamDiscussion": [Function], - "deleteForTeamDiscussionComment": [Function], - "deleteLegacy": [Function], - "listForCommitComment": [Function], - "listForIssue": [Function], - "listForIssueComment": [Function], - "listForPullRequestReviewComment": [Function], - "listForTeamDiscussionCommentInOrg": [Function], - "listForTeamDiscussionInOrg": [Function], - }, - "repos": Object { - "acceptInvitation": [Function], - "addAppAccessRestrictions": [Function], - "addCollaborator": [Function], - "addDeployKey": [Function], - "addProtectedBranchAdminEnforcement": [Function], - "addProtectedBranchAppRestrictions": [Function], - "addProtectedBranchRequiredSignatures": [Function], - "addProtectedBranchRequiredStatusChecksContexts": [Function], - "addProtectedBranchTeamRestrictions": [Function], - "addProtectedBranchUserRestrictions": [Function], - "addStatusCheckContexts": [Function], - "addTeamAccessRestrictions": [Function], - "addUserAccessRestrictions": [Function], - "checkCollaborator": [Function], - "checkVulnerabilityAlerts": [Function], - "compareCommits": [Function], - "createCommitComment": [Function], - "createCommitSignatureProtection": [Function], - "createCommitStatus": [Function], - "createDeployKey": [Function], - "createDeployment": [Function], - "createDeploymentStatus": [Function], - "createDispatchEvent": [Function], - "createForAuthenticatedUser": [Function], - "createFork": [Function], - "createHook": [Function], - "createInOrg": [Function], - "createOrUpdateFile": [Function], - "createOrUpdateFileContents": [Function], - "createPagesSite": [Function], - "createRelease": [Function], - "createStatus": [Function], - "createUsingTemplate": [Function], - "createWebhook": [Function], - "declineInvitation": [Function], - "delete": [Function], - "deleteAccessRestrictions": [Function], - "deleteAdminBranchProtection": [Function], - "deleteBranchProtection": [Function], - "deleteCommitComment": [Function], - "deleteCommitSignatureProtection": [Function], - "deleteDeployKey": [Function], - "deleteDeployment": [Function], - "deleteDownload": [Function], - "deleteFile": [Function], - "deleteHook": [Function], - "deleteInvitation": [Function], - "deletePagesSite": [Function], - "deletePullRequestReviewProtection": [Function], - "deleteRelease": [Function], - "deleteReleaseAsset": [Function], - "deleteWebhook": [Function], - "disableAutomatedSecurityFixes": [Function], - "disablePagesSite": [Function], - "disableVulnerabilityAlerts": [Function], - "downloadArchive": [Function], - "enableAutomatedSecurityFixes": [Function], - "enablePagesSite": [Function], - "enableVulnerabilityAlerts": [Function], - "get": [Function], - "getAccessRestrictions": [Function], - "getAdminBranchProtection": [Function], - "getAllStatusCheckContexts": [Function], - "getAllTopics": [Function], - "getAppsWithAccessToProtectedBranch": [Function], - "getArchiveLink": [Function], - "getBranch": [Function], - "getBranchProtection": [Function], - "getClones": [Function], - "getCodeFrequencyStats": [Function], - "getCollaboratorPermissionLevel": [Function], - "getCombinedStatusForRef": [Function], - "getCommit": [Function], - "getCommitActivityStats": [Function], - "getCommitComment": [Function], - "getCommitSignatureProtection": [Function], - "getCommunityProfileMetrics": [Function], - "getContent": [Function], - "getContents": [Function], - "getContributorsStats": [Function], - "getDeployKey": [Function], - "getDeployment": [Function], - "getDeploymentStatus": [Function], - "getDownload": [Function], - "getHook": [Function], - "getLatestPagesBuild": [Function], - "getLatestRelease": [Function], - "getPages": [Function], - "getPagesBuild": [Function], - "getParticipationStats": [Function], - "getProtectedBranchAdminEnforcement": [Function], - "getProtectedBranchPullRequestReviewEnforcement": [Function], - "getProtectedBranchRequiredSignatures": [Function], - "getProtectedBranchRequiredStatusChecks": [Function], - "getProtectedBranchRestrictions": [Function], - "getPullRequestReviewProtection": [Function], - "getPunchCardStats": [Function], - "getReadme": [Function], - "getRelease": [Function], - "getReleaseAsset": [Function], - "getReleaseByTag": [Function], - "getStatusChecksProtection": [Function], - "getTeamsWithAccessToProtectedBranch": [Function], - "getTopPaths": [Function], - "getTopReferrers": [Function], - "getUsersWithAccessToProtectedBranch": [Function], - "getViews": [Function], - "getWebhook": [Function], - "list": [Function], - "listAssetsForRelease": [Function], - "listBranches": [Function], - "listBranchesForHeadCommit": [Function], - "listCollaborators": [Function], - "listCommentsForCommit": [Function], - "listCommitComments": [Function], - "listCommitCommentsForRepo": [Function], - "listCommitStatusesForRef": [Function], - "listCommits": [Function], - "listContributors": [Function], - "listDeployKeys": [Function], - "listDeploymentStatuses": [Function], - "listDeployments": [Function], - "listDownloads": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForUser": [Function], - "listForks": [Function], - "listHooks": [Function], - "listInvitations": [Function], - "listInvitationsForAuthenticatedUser": [Function], - "listLanguages": [Function], - "listPagesBuilds": [Function], - "listProtectedBranchRequiredStatusChecksContexts": [Function], - "listPublic": [Function], - "listPullRequestsAssociatedWithCommit": [Function], - "listReleaseAssets": [Function], - "listReleases": [Function], - "listStatusesForRef": [Function], - "listTags": [Function], - "listTeams": [Function], - "listTopics": [Function], - "listWebhooks": [Function], - "merge": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "removeAppAccessRestrictions": [Function], - "removeBranchProtection": [Function], - "removeCollaborator": [Function], - "removeDeployKey": [Function], - "removeProtectedBranchAdminEnforcement": [Function], - "removeProtectedBranchAppRestrictions": [Function], - "removeProtectedBranchPullRequestReviewEnforcement": [Function], - "removeProtectedBranchRequiredSignatures": [Function], - "removeProtectedBranchRequiredStatusChecks": [Function], - "removeProtectedBranchRequiredStatusChecksContexts": [Function], - "removeProtectedBranchRestrictions": [Function], - "removeProtectedBranchTeamRestrictions": [Function], - "removeProtectedBranchUserRestrictions": [Function], - "removeStatusCheckContexts": [Function], - "removeStatusCheckProtection": [Function], - "removeTeamAccessRestrictions": [Function], - "removeUserAccessRestrictions": [Function], - "replaceAllTopics": [Function], - "replaceProtectedBranchAppRestrictions": [Function], - "replaceProtectedBranchRequiredStatusChecksContexts": [Function], - "replaceProtectedBranchTeamRestrictions": [Function], - "replaceProtectedBranchUserRestrictions": [Function], - "replaceTopics": [Function], - "requestPageBuild": [Function], - "requestPagesBuild": [Function], - "retrieveCommunityProfileMetrics": [Function], - "setAdminBranchProtection": [Function], - "setAppAccessRestrictions": [Function], - "setStatusCheckContexts": [Function], - "setTeamAccessRestrictions": [Function], - "setUserAccessRestrictions": [Function], - "testPushHook": [Function], - "testPushWebhook": [Function], - "transfer": [Function], - "update": [Function], - "updateBranchProtection": [Function], - "updateCommitComment": [Function], - "updateHook": [Function], - "updateInformationAboutPagesSite": [Function], - "updateInvitation": [Function], - "updateProtectedBranchPullRequestReviewEnforcement": [Function], - "updateProtectedBranchRequiredStatusChecks": [Function], - "updatePullRequestReviewProtection": [Function], - "updateRelease": [Function], - "updateReleaseAsset": [Function], - "updateStatusCheckPotection": [Function], - "updateWebhook": [Function], - "uploadReleaseAsset": [Function], - }, - "request": [Function], - "search": Object { - "code": [Function], - "commits": [Function], - "issuesAndPullRequests": [Function], - "labels": [Function], - "repos": [Function], - "topics": [Function], - "users": [Function], - }, - "teams": Object { - "addOrUpdateMembershipForUserInOrg": [Function], - "addOrUpdateMembershipInOrg": [Function], - "addOrUpdateProjectInOrg": [Function], - "addOrUpdateProjectPermissionsInOrg": [Function], - "addOrUpdateRepoInOrg": [Function], - "addOrUpdateRepoPermissionsInOrg": [Function], - "checkManagesRepoInOrg": [Function], - "checkPermissionsForProjectInOrg": [Function], - "checkPermissionsForRepoInOrg": [Function], - "create": [Function], - "createDiscussionCommentInOrg": [Function], - "createDiscussionInOrg": [Function], - "deleteDiscussionCommentInOrg": [Function], - "deleteDiscussionInOrg": [Function], - "deleteInOrg": [Function], - "getByName": [Function], - "getDiscussionCommentInOrg": [Function], - "getDiscussionInOrg": [Function], - "getMembershipForUserInOrg": [Function], - "getMembershipInOrg": [Function], - "list": [Function], - "listChildInOrg": [Function], - "listDiscussionCommentsInOrg": [Function], - "listDiscussionsInOrg": [Function], - "listForAuthenticatedUser": [Function], - "listMembersInOrg": [Function], - "listPendingInvitationsInOrg": [Function], - "listProjectsInOrg": [Function], - "listReposInOrg": [Function], - "removeMembershipForUserInOrg": [Function], - "removeMembershipInOrg": [Function], - "removeProjectInOrg": [Function], - "removeRepoInOrg": [Function], - "reviewProjectInOrg": [Function], - "updateDiscussionCommentInOrg": [Function], - "updateDiscussionInOrg": [Function], - "updateInOrg": [Function], - }, - "users": Object { - "addEmailForAuthenticated": [Function], - "addEmails": [Function], - "block": [Function], - "checkBlocked": [Function], - "checkFollowing": [Function], - "checkFollowingForUser": [Function], - "checkPersonIsFollowedByAuthenticated": [Function], - "createGpgKey": [Function], - "createGpgKeyForAuthenticated": [Function], - "createPublicKey": [Function], - "createPublicSshKeyForAuthenticated": [Function], - "deleteEmailForAuthenticated": [Function], - "deleteEmails": [Function], - "deleteGpgKey": [Function], - "deleteGpgKeyForAuthenticated": [Function], - "deletePublicKey": [Function], - "deletePublicSshKeyForAuthenticated": [Function], - "follow": [Function], - "getAuthenticated": [Function], - "getByUsername": [Function], - "getContextForUser": [Function], - "getGpgKey": [Function], - "getGpgKeyForAuthenticated": [Function], - "getPublicKey": [Function], - "getPublicSshKeyForAuthenticated": [Function], - "list": [Function], - "listBlocked": [Function], - "listBlockedByAuthenticated": [Function], - "listEmails": [Function], - "listEmailsForAuthenticated": [Function], - "listFollowedByAuthenticated": [Function], - "listFollowersForAuthenticatedUser": [Function], - "listFollowersForUser": [Function], - "listFollowingForAuthenticatedUser": [Function], - "listFollowingForUser": [Function], - "listGpgKeys": [Function], - "listGpgKeysForAuthenticated": [Function], - "listGpgKeysForUser": [Function], - "listPublicEmails": [Function], - "listPublicEmailsForAuthenticated": [Function], - "listPublicKeys": [Function], - "listPublicKeysForUser": [Function], - "listPublicSshKeysForAuthenticated": [Function], - "setPrimaryEmailVisibilityForAuthenticated": [Function], - "togglePrimaryEmailVisibility": [Function], - "unblock": [Function], - "unfollow": [Function], - "updateAuthenticated": [Function], - }, - }, - }, - "promptForCommitMsg": [Function], - }, - }, - "gitHubOAuthService": GitHubOAuthService { - "junoClient": JunoClient { - "cachedPinnedRepos": [Function], - }, - "token": [Function], - }, - "inMemoryContentProvider": InMemoryContentProvider { - "params": Object { - "memory://schema-analyzer-component-notebook.ipynb": Object { - "content": Object { - "content": Object { - "cells": Array [ - Object { - "cell_type": "code", - "execution_count": 0, - "metadata": Object {}, - "outputs": Array [], - "source": "", - }, - ], - "metadata": Object { - "kernelspec": Object { - "displayName": "Mongo", - "language": "mongocli", - "name": "mongo", - }, - "language_info": Object { - "file_extension": "ipynb", - "mimetype": "application/json", - "name": "mongo", - "version": "1.0", - }, - }, - "nbformat": 4, - "nbformat_minor": 4, - }, - "created": "", - "format": "json", - "last_modified": "", - "mimetype": "application/x-ipynb+json", - "name": "schema-analyzer-component-notebook.ipynb", - "path": "memory://schema-analyzer-component-notebook.ipynb", - "type": "notebook", - "writable": true, - }, - "readonly": true, - }, - }, - }, - "junoClient": JunoClient { - "cachedPinnedRepos": [Function], - }, - "onGitHubClientError": [Function], - "params": Object { - "container": [Circular], - "refreshCommandBarButtons": [Function], - "refreshNotebookList": [Function], - "resourceTree": ResourceTreeAdapter { - "container": [Circular], - "copyNotebook": [Function], - "parameters": [Function], - }, - }, - "promptForCommitMsg": [Function], - }, "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "phoenixClient": PhoenixClient { @@ -1713,1611 +108,6 @@ exports[`SettingsComponent renders 1`] = ` "_resetNotebookWorkspace": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], "isTabsContentExpanded": [Function], - "notebookManager": NotebookManager { - "gitHubClient": GitHubClient { - "errorCallback": [Function], - "ocktokit": OctokitWithDefaults { - "actions": Object { - "addSelectedRepoToOrgSecret": [Function], - "cancelWorkflowRun": [Function], - "createOrUpdateOrgSecret": [Function], - "createOrUpdateRepoSecret": [Function], - "createOrUpdateSecretForRepo": [Function], - "createRegistrationToken": [Function], - "createRegistrationTokenForOrg": [Function], - "createRegistrationTokenForRepo": [Function], - "createRemoveToken": [Function], - "createRemoveTokenForOrg": [Function], - "createRemoveTokenForRepo": [Function], - "deleteArtifact": [Function], - "deleteOrgSecret": [Function], - "deleteRepoSecret": [Function], - "deleteSecretFromRepo": [Function], - "deleteSelfHostedRunnerFromOrg": [Function], - "deleteSelfHostedRunnerFromRepo": [Function], - "deleteWorkflowRunLogs": [Function], - "downloadArtifact": [Function], - "downloadJobLogsForWorkflowRun": [Function], - "downloadWorkflowJobLogs": [Function], - "downloadWorkflowRunLogs": [Function], - "getArtifact": [Function], - "getJobForWorkflowRun": [Function], - "getOrgPublicKey": [Function], - "getOrgSecret": [Function], - "getPublicKey": [Function], - "getRepoPublicKey": [Function], - "getRepoSecret": [Function], - "getSecret": [Function], - "getSelfHostedRunner": [Function], - "getSelfHostedRunnerForOrg": [Function], - "getSelfHostedRunnerForRepo": [Function], - "getWorkflow": [Function], - "getWorkflowJob": [Function], - "getWorkflowRun": [Function], - "getWorkflowRunUsage": [Function], - "getWorkflowUsage": [Function], - "listArtifactsForRepo": [Function], - "listDownloadsForSelfHostedRunnerApplication": [Function], - "listJobsForWorkflowRun": [Function], - "listOrgSecrets": [Function], - "listRepoSecrets": [Function], - "listRepoWorkflowRuns": [Function], - "listRepoWorkflows": [Function], - "listRunnerApplicationsForOrg": [Function], - "listRunnerApplicationsForRepo": [Function], - "listSecretsForRepo": [Function], - "listSelectedReposForOrgSecret": [Function], - "listSelfHostedRunnersForOrg": [Function], - "listSelfHostedRunnersForRepo": [Function], - "listWorkflowJobLogs": [Function], - "listWorkflowRunArtifacts": [Function], - "listWorkflowRunLogs": [Function], - "listWorkflowRuns": [Function], - "listWorkflowRunsForRepo": [Function], - "reRunWorkflow": [Function], - "removeSelectedRepoFromOrgSecret": [Function], - "removeSelfHostedRunner": [Function], - "setSelectedReposForOrgSecret": [Function], - }, - "activity": Object { - "checkRepoIsStarredByAuthenticatedUser": [Function], - "checkStarringRepo": [Function], - "deleteRepoSubscription": [Function], - "deleteThreadSubscription": [Function], - "getFeeds": [Function], - "getRepoSubscription": [Function], - "getThread": [Function], - "getThreadSubscription": [Function], - "getThreadSubscriptionForAuthenticatedUser": [Function], - "listEventsForAuthenticatedUser": [Function], - "listEventsForOrg": [Function], - "listEventsForUser": [Function], - "listFeeds": [Function], - "listNotifications": [Function], - "listNotificationsForAuthenticatedUser": [Function], - "listNotificationsForRepo": [Function], - "listOrgEventsForAuthenticatedUser": [Function], - "listPublicEvents": [Function], - "listPublicEventsForOrg": [Function], - "listPublicEventsForRepoNetwork": [Function], - "listPublicEventsForUser": [Function], - "listPublicOrgEvents": [Function], - "listReceivedEventsForUser": [Function], - "listReceivedPublicEventsForUser": [Function], - "listRepoEvents": [Function], - "listRepoNotificationsForAuthenticatedUser": [Function], - "listReposStarredByAuthenticatedUser": [Function], - "listReposStarredByUser": [Function], - "listReposWatchedByUser": [Function], - "listStargazersForRepo": [Function], - "listWatchedReposForAuthenticatedUser": [Function], - "listWatchersForRepo": [Function], - "markAsRead": [Function], - "markNotificationsAsRead": [Function], - "markNotificationsAsReadForRepo": [Function], - "markRepoNotificationsAsRead": [Function], - "markThreadAsRead": [Function], - "setRepoSubscription": [Function], - "setThreadSubscription": [Function], - "starRepo": [Function], - "starRepoForAuthenticatedUser": [Function], - "unstarRepo": [Function], - "unstarRepoForAuthenticatedUser": [Function], - }, - "apps": Object { - "addRepoToInstallation": [Function], - "checkAccountIsAssociatedWithAny": [Function], - "checkAccountIsAssociatedWithAnyStubbed": [Function], - "checkToken": [Function], - "createContentAttachment": [Function], - "createFromManifest": [Function], - "createInstallationAccessToken": [Function], - "createInstallationToken": [Function], - "deleteAuthorization": [Function], - "deleteInstallation": [Function], - "deleteToken": [Function], - "getAuthenticated": [Function], - "getBySlug": [Function], - "getInstallation": [Function], - "getOrgInstallation": [Function], - "getRepoInstallation": [Function], - "getSubscriptionPlanForAccount": [Function], - "getSubscriptionPlanForAccountStubbed": [Function], - "getUserInstallation": [Function], - "listAccountsForPlan": [Function], - "listAccountsForPlanStubbed": [Function], - "listAccountsUserOrOrgOnPlan": [Function], - "listAccountsUserOrOrgOnPlanStubbed": [Function], - "listInstallationReposForAuthenticatedUser": [Function], - "listInstallations": [Function], - "listInstallationsForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], - "listPlans": [Function], - "listPlansStubbed": [Function], - "listRepos": [Function], - "listReposAccessibleToInstallation": [Function], - "listSubscriptionsForAuthenticatedUser": [Function], - "listSubscriptionsForAuthenticatedUserStubbed": [Function], - "removeRepoFromInstallation": [Function], - "resetToken": [Function], - "revokeInstallationAccessToken": [Function], - "revokeInstallationToken": [Function], - "suspendInstallation": [Function], - "unsuspendInstallation": [Function], - }, - "auth": [Function], - "checks": Object { - "create": [Function], - "createSuite": [Function], - "get": [Function], - "getSuite": [Function], - "listAnnotations": [Function], - "listForRef": [Function], - "listForSuite": [Function], - "listSuitesForRef": [Function], - "rerequestSuite": [Function], - "setSuitesPreferences": [Function], - "update": [Function], - }, - "codeScanning": Object { - "getAlert": [Function], - "listAlertsForRepo": [Function], - }, - "codesOfConduct": Object { - "getAllCodesOfConduct": [Function], - "getConductCode": [Function], - "getForRepo": [Function], - "listConductCodes": [Function], - }, - "emojis": Object { - "get": [Function], - }, - "gists": Object { - "checkIsStarred": [Function], - "create": [Function], - "createComment": [Function], - "delete": [Function], - "deleteComment": [Function], - "fork": [Function], - "get": [Function], - "getComment": [Function], - "getRevision": [Function], - "list": [Function], - "listComments": [Function], - "listCommits": [Function], - "listForUser": [Function], - "listForks": [Function], - "listPublic": [Function], - "listPublicForUser": [Function], - "listStarred": [Function], - "star": [Function], - "unstar": [Function], - "update": [Function], - "updateComment": [Function], - }, - "git": Object { - "createBlob": [Function], - "createCommit": [Function], - "createRef": [Function], - "createTag": [Function], - "createTree": [Function], - "deleteRef": [Function], - "getBlob": [Function], - "getCommit": [Function], - "getRef": [Function], - "getTag": [Function], - "getTree": [Function], - "listMatchingRefs": [Function], - "updateRef": [Function], - }, - "gitignore": Object { - "getAllTemplates": [Function], - "getTemplate": [Function], - "listTemplates": [Function], - }, - "graphql": [Function], - "hook": [Function], - "interactions": Object { - "addOrUpdateRestrictionsForOrg": [Function], - "addOrUpdateRestrictionsForRepo": [Function], - "getRestrictionsForOrg": [Function], - "getRestrictionsForRepo": [Function], - "removeRestrictionsForOrg": [Function], - "removeRestrictionsForRepo": [Function], - "setRestrictionsForOrg": [Function], - "setRestrictionsForRepo": [Function], - }, - "issues": Object { - "addAssignees": [Function], - "addLabels": [Function], - "checkAssignee": [Function], - "checkUserCanBeAssigned": [Function], - "create": [Function], - "createComment": [Function], - "createLabel": [Function], - "createMilestone": [Function], - "deleteComment": [Function], - "deleteLabel": [Function], - "deleteMilestone": [Function], - "get": [Function], - "getComment": [Function], - "getEvent": [Function], - "getLabel": [Function], - "getMilestone": [Function], - "list": [Function], - "listAssignees": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listEvents": [Function], - "listEventsForRepo": [Function], - "listEventsForTimeline": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listLabelsForMilestone": [Function], - "listLabelsForRepo": [Function], - "listLabelsOnIssue": [Function], - "listMilestones": [Function], - "listMilestonesForRepo": [Function], - "lock": [Function], - "removeAllLabels": [Function], - "removeAssignees": [Function], - "removeLabel": [Function], - "removeLabels": [Function], - "replaceAllLabels": [Function], - "replaceLabels": [Function], - "setLabels": [Function], - "unlock": [Function], - "update": [Function], - "updateComment": [Function], - "updateLabel": [Function], - "updateMilestone": [Function], - }, - "licenses": Object { - "get": [Function], - "getAllCommonlyUsed": [Function], - "getForRepo": [Function], - "listCommonlyUsed": [Function], - }, - "log": Object { - "debug": [Function], - "error": [Function], - "info": [Function], - "warn": [Function], - }, - "markdown": Object { - "render": [Function], - "renderRaw": [Function], - }, - "meta": Object { - "get": [Function], - }, - "migrations": Object { - "cancelImport": [Function], - "deleteArchiveForAuthenticatedUser": [Function], - "deleteArchiveForOrg": [Function], - "downloadArchiveForOrg": [Function], - "getArchiveForAuthenticatedUser": [Function], - "getCommitAuthors": [Function], - "getImportProgress": [Function], - "getImportStatus": [Function], - "getLargeFiles": [Function], - "getStatusForAuthenticatedUser": [Function], - "getStatusForOrg": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listReposForOrg": [Function], - "listReposForUser": [Function], - "mapCommitAuthor": [Function], - "setLfsPreference": [Function], - "startForAuthenticatedUser": [Function], - "startForOrg": [Function], - "startImport": [Function], - "unlockRepoForAuthenticatedUser": [Function], - "unlockRepoForOrg": [Function], - "updateImport": [Function], - }, - "orgs": Object { - "addOrUpdateMembership": [Function], - "blockUser": [Function], - "checkBlockedUser": [Function], - "checkMembership": [Function], - "checkMembershipForUser": [Function], - "checkPublicMembership": [Function], - "checkPublicMembershipForUser": [Function], - "concealMembership": [Function], - "convertMemberToOutsideCollaborator": [Function], - "createHook": [Function], - "createInvitation": [Function], - "createWebhook": [Function], - "deleteHook": [Function], - "deleteWebhook": [Function], - "get": [Function], - "getHook": [Function], - "getMembership": [Function], - "getMembershipForAuthenticatedUser": [Function], - "getMembershipForUser": [Function], - "getWebhook": [Function], - "list": [Function], - "listAppInstallations": [Function], - "listBlockedUsers": [Function], - "listForAuthenticatedUser": [Function], - "listForUser": [Function], - "listHooks": [Function], - "listInstallations": [Function], - "listInvitationTeams": [Function], - "listMembers": [Function], - "listMemberships": [Function], - "listMembershipsForAuthenticatedUser": [Function], - "listOutsideCollaborators": [Function], - "listPendingInvitations": [Function], - "listPublicMembers": [Function], - "listWebhooks": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "publicizeMembership": [Function], - "removeMember": [Function], - "removeMembership": [Function], - "removeMembershipForUser": [Function], - "removeOutsideCollaborator": [Function], - "removePublicMembershipForAuthenticatedUser": [Function], - "setMembershipForUser": [Function], - "setPublicMembershipForAuthenticatedUser": [Function], - "unblockUser": [Function], - "update": [Function], - "updateHook": [Function], - "updateMembership": [Function], - "updateMembershipForAuthenticatedUser": [Function], - "updateWebhook": [Function], - }, - "paginate": [Function], - "projects": Object { - "addCollaborator": [Function], - "createCard": [Function], - "createColumn": [Function], - "createForAuthenticatedUser": [Function], - "createForOrg": [Function], - "createForRepo": [Function], - "delete": [Function], - "deleteCard": [Function], - "deleteColumn": [Function], - "get": [Function], - "getCard": [Function], - "getColumn": [Function], - "getPermissionForUser": [Function], - "listCards": [Function], - "listCollaborators": [Function], - "listColumns": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listForUser": [Function], - "moveCard": [Function], - "moveColumn": [Function], - "removeCollaborator": [Function], - "reviewUserPermissionLevel": [Function], - "update": [Function], - "updateCard": [Function], - "updateColumn": [Function], - }, - "pulls": Object { - "checkIfMerged": [Function], - "create": [Function], - "createComment": [Function], - "createReplyForReviewComment": [Function], - "createReview": [Function], - "createReviewComment": [Function], - "createReviewCommentReply": [Function], - "createReviewRequest": [Function], - "deleteComment": [Function], - "deletePendingReview": [Function], - "deleteReviewComment": [Function], - "deleteReviewRequest": [Function], - "dismissReview": [Function], - "get": [Function], - "getComment": [Function], - "getCommentsForReview": [Function], - "getReview": [Function], - "getReviewComment": [Function], - "list": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listCommentsForReview": [Function], - "listCommits": [Function], - "listFiles": [Function], - "listRequestedReviewers": [Function], - "listReviewComments": [Function], - "listReviewCommentsForRepo": [Function], - "listReviewRequests": [Function], - "listReviews": [Function], - "merge": [Function], - "removeRequestedReviewers": [Function], - "requestReviewers": [Function], - "submitReview": [Function], - "update": [Function], - "updateBranch": [Function], - "updateComment": [Function], - "updateReview": [Function], - "updateReviewComment": [Function], - }, - "rateLimit": Object { - "get": [Function], - }, - "reactions": Object { - "createForCommitComment": [Function], - "createForIssue": [Function], - "createForIssueComment": [Function], - "createForPullRequestReviewComment": [Function], - "createForTeamDiscussionCommentInOrg": [Function], - "createForTeamDiscussionInOrg": [Function], - "delete": [Function], - "deleteForCommitComment": [Function], - "deleteForIssue": [Function], - "deleteForIssueComment": [Function], - "deleteForPullRequestComment": [Function], - "deleteForTeamDiscussion": [Function], - "deleteForTeamDiscussionComment": [Function], - "deleteLegacy": [Function], - "listForCommitComment": [Function], - "listForIssue": [Function], - "listForIssueComment": [Function], - "listForPullRequestReviewComment": [Function], - "listForTeamDiscussionCommentInOrg": [Function], - "listForTeamDiscussionInOrg": [Function], - }, - "repos": Object { - "acceptInvitation": [Function], - "addAppAccessRestrictions": [Function], - "addCollaborator": [Function], - "addDeployKey": [Function], - "addProtectedBranchAdminEnforcement": [Function], - "addProtectedBranchAppRestrictions": [Function], - "addProtectedBranchRequiredSignatures": [Function], - "addProtectedBranchRequiredStatusChecksContexts": [Function], - "addProtectedBranchTeamRestrictions": [Function], - "addProtectedBranchUserRestrictions": [Function], - "addStatusCheckContexts": [Function], - "addTeamAccessRestrictions": [Function], - "addUserAccessRestrictions": [Function], - "checkCollaborator": [Function], - "checkVulnerabilityAlerts": [Function], - "compareCommits": [Function], - "createCommitComment": [Function], - "createCommitSignatureProtection": [Function], - "createCommitStatus": [Function], - "createDeployKey": [Function], - "createDeployment": [Function], - "createDeploymentStatus": [Function], - "createDispatchEvent": [Function], - "createForAuthenticatedUser": [Function], - "createFork": [Function], - "createHook": [Function], - "createInOrg": [Function], - "createOrUpdateFile": [Function], - "createOrUpdateFileContents": [Function], - "createPagesSite": [Function], - "createRelease": [Function], - "createStatus": [Function], - "createUsingTemplate": [Function], - "createWebhook": [Function], - "declineInvitation": [Function], - "delete": [Function], - "deleteAccessRestrictions": [Function], - "deleteAdminBranchProtection": [Function], - "deleteBranchProtection": [Function], - "deleteCommitComment": [Function], - "deleteCommitSignatureProtection": [Function], - "deleteDeployKey": [Function], - "deleteDeployment": [Function], - "deleteDownload": [Function], - "deleteFile": [Function], - "deleteHook": [Function], - "deleteInvitation": [Function], - "deletePagesSite": [Function], - "deletePullRequestReviewProtection": [Function], - "deleteRelease": [Function], - "deleteReleaseAsset": [Function], - "deleteWebhook": [Function], - "disableAutomatedSecurityFixes": [Function], - "disablePagesSite": [Function], - "disableVulnerabilityAlerts": [Function], - "downloadArchive": [Function], - "enableAutomatedSecurityFixes": [Function], - "enablePagesSite": [Function], - "enableVulnerabilityAlerts": [Function], - "get": [Function], - "getAccessRestrictions": [Function], - "getAdminBranchProtection": [Function], - "getAllStatusCheckContexts": [Function], - "getAllTopics": [Function], - "getAppsWithAccessToProtectedBranch": [Function], - "getArchiveLink": [Function], - "getBranch": [Function], - "getBranchProtection": [Function], - "getClones": [Function], - "getCodeFrequencyStats": [Function], - "getCollaboratorPermissionLevel": [Function], - "getCombinedStatusForRef": [Function], - "getCommit": [Function], - "getCommitActivityStats": [Function], - "getCommitComment": [Function], - "getCommitSignatureProtection": [Function], - "getCommunityProfileMetrics": [Function], - "getContent": [Function], - "getContents": [Function], - "getContributorsStats": [Function], - "getDeployKey": [Function], - "getDeployment": [Function], - "getDeploymentStatus": [Function], - "getDownload": [Function], - "getHook": [Function], - "getLatestPagesBuild": [Function], - "getLatestRelease": [Function], - "getPages": [Function], - "getPagesBuild": [Function], - "getParticipationStats": [Function], - "getProtectedBranchAdminEnforcement": [Function], - "getProtectedBranchPullRequestReviewEnforcement": [Function], - "getProtectedBranchRequiredSignatures": [Function], - "getProtectedBranchRequiredStatusChecks": [Function], - "getProtectedBranchRestrictions": [Function], - "getPullRequestReviewProtection": [Function], - "getPunchCardStats": [Function], - "getReadme": [Function], - "getRelease": [Function], - "getReleaseAsset": [Function], - "getReleaseByTag": [Function], - "getStatusChecksProtection": [Function], - "getTeamsWithAccessToProtectedBranch": [Function], - "getTopPaths": [Function], - "getTopReferrers": [Function], - "getUsersWithAccessToProtectedBranch": [Function], - "getViews": [Function], - "getWebhook": [Function], - "list": [Function], - "listAssetsForRelease": [Function], - "listBranches": [Function], - "listBranchesForHeadCommit": [Function], - "listCollaborators": [Function], - "listCommentsForCommit": [Function], - "listCommitComments": [Function], - "listCommitCommentsForRepo": [Function], - "listCommitStatusesForRef": [Function], - "listCommits": [Function], - "listContributors": [Function], - "listDeployKeys": [Function], - "listDeploymentStatuses": [Function], - "listDeployments": [Function], - "listDownloads": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForUser": [Function], - "listForks": [Function], - "listHooks": [Function], - "listInvitations": [Function], - "listInvitationsForAuthenticatedUser": [Function], - "listLanguages": [Function], - "listPagesBuilds": [Function], - "listProtectedBranchRequiredStatusChecksContexts": [Function], - "listPublic": [Function], - "listPullRequestsAssociatedWithCommit": [Function], - "listReleaseAssets": [Function], - "listReleases": [Function], - "listStatusesForRef": [Function], - "listTags": [Function], - "listTeams": [Function], - "listTopics": [Function], - "listWebhooks": [Function], - "merge": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "removeAppAccessRestrictions": [Function], - "removeBranchProtection": [Function], - "removeCollaborator": [Function], - "removeDeployKey": [Function], - "removeProtectedBranchAdminEnforcement": [Function], - "removeProtectedBranchAppRestrictions": [Function], - "removeProtectedBranchPullRequestReviewEnforcement": [Function], - "removeProtectedBranchRequiredSignatures": [Function], - "removeProtectedBranchRequiredStatusChecks": [Function], - "removeProtectedBranchRequiredStatusChecksContexts": [Function], - "removeProtectedBranchRestrictions": [Function], - "removeProtectedBranchTeamRestrictions": [Function], - "removeProtectedBranchUserRestrictions": [Function], - "removeStatusCheckContexts": [Function], - "removeStatusCheckProtection": [Function], - "removeTeamAccessRestrictions": [Function], - "removeUserAccessRestrictions": [Function], - "replaceAllTopics": [Function], - "replaceProtectedBranchAppRestrictions": [Function], - "replaceProtectedBranchRequiredStatusChecksContexts": [Function], - "replaceProtectedBranchTeamRestrictions": [Function], - "replaceProtectedBranchUserRestrictions": [Function], - "replaceTopics": [Function], - "requestPageBuild": [Function], - "requestPagesBuild": [Function], - "retrieveCommunityProfileMetrics": [Function], - "setAdminBranchProtection": [Function], - "setAppAccessRestrictions": [Function], - "setStatusCheckContexts": [Function], - "setTeamAccessRestrictions": [Function], - "setUserAccessRestrictions": [Function], - "testPushHook": [Function], - "testPushWebhook": [Function], - "transfer": [Function], - "update": [Function], - "updateBranchProtection": [Function], - "updateCommitComment": [Function], - "updateHook": [Function], - "updateInformationAboutPagesSite": [Function], - "updateInvitation": [Function], - "updateProtectedBranchPullRequestReviewEnforcement": [Function], - "updateProtectedBranchRequiredStatusChecks": [Function], - "updatePullRequestReviewProtection": [Function], - "updateRelease": [Function], - "updateReleaseAsset": [Function], - "updateStatusCheckPotection": [Function], - "updateWebhook": [Function], - "uploadReleaseAsset": [Function], - }, - "request": [Function], - "search": Object { - "code": [Function], - "commits": [Function], - "issuesAndPullRequests": [Function], - "labels": [Function], - "repos": [Function], - "topics": [Function], - "users": [Function], - }, - "teams": Object { - "addOrUpdateMembershipForUserInOrg": [Function], - "addOrUpdateMembershipInOrg": [Function], - "addOrUpdateProjectInOrg": [Function], - "addOrUpdateProjectPermissionsInOrg": [Function], - "addOrUpdateRepoInOrg": [Function], - "addOrUpdateRepoPermissionsInOrg": [Function], - "checkManagesRepoInOrg": [Function], - "checkPermissionsForProjectInOrg": [Function], - "checkPermissionsForRepoInOrg": [Function], - "create": [Function], - "createDiscussionCommentInOrg": [Function], - "createDiscussionInOrg": [Function], - "deleteDiscussionCommentInOrg": [Function], - "deleteDiscussionInOrg": [Function], - "deleteInOrg": [Function], - "getByName": [Function], - "getDiscussionCommentInOrg": [Function], - "getDiscussionInOrg": [Function], - "getMembershipForUserInOrg": [Function], - "getMembershipInOrg": [Function], - "list": [Function], - "listChildInOrg": [Function], - "listDiscussionCommentsInOrg": [Function], - "listDiscussionsInOrg": [Function], - "listForAuthenticatedUser": [Function], - "listMembersInOrg": [Function], - "listPendingInvitationsInOrg": [Function], - "listProjectsInOrg": [Function], - "listReposInOrg": [Function], - "removeMembershipForUserInOrg": [Function], - "removeMembershipInOrg": [Function], - "removeProjectInOrg": [Function], - "removeRepoInOrg": [Function], - "reviewProjectInOrg": [Function], - "updateDiscussionCommentInOrg": [Function], - "updateDiscussionInOrg": [Function], - "updateInOrg": [Function], - }, - "users": Object { - "addEmailForAuthenticated": [Function], - "addEmails": [Function], - "block": [Function], - "checkBlocked": [Function], - "checkFollowing": [Function], - "checkFollowingForUser": [Function], - "checkPersonIsFollowedByAuthenticated": [Function], - "createGpgKey": [Function], - "createGpgKeyForAuthenticated": [Function], - "createPublicKey": [Function], - "createPublicSshKeyForAuthenticated": [Function], - "deleteEmailForAuthenticated": [Function], - "deleteEmails": [Function], - "deleteGpgKey": [Function], - "deleteGpgKeyForAuthenticated": [Function], - "deletePublicKey": [Function], - "deletePublicSshKeyForAuthenticated": [Function], - "follow": [Function], - "getAuthenticated": [Function], - "getByUsername": [Function], - "getContextForUser": [Function], - "getGpgKey": [Function], - "getGpgKeyForAuthenticated": [Function], - "getPublicKey": [Function], - "getPublicSshKeyForAuthenticated": [Function], - "list": [Function], - "listBlocked": [Function], - "listBlockedByAuthenticated": [Function], - "listEmails": [Function], - "listEmailsForAuthenticated": [Function], - "listFollowedByAuthenticated": [Function], - "listFollowersForAuthenticatedUser": [Function], - "listFollowersForUser": [Function], - "listFollowingForAuthenticatedUser": [Function], - "listFollowingForUser": [Function], - "listGpgKeys": [Function], - "listGpgKeysForAuthenticated": [Function], - "listGpgKeysForUser": [Function], - "listPublicEmails": [Function], - "listPublicEmailsForAuthenticated": [Function], - "listPublicKeys": [Function], - "listPublicKeysForUser": [Function], - "listPublicSshKeysForAuthenticated": [Function], - "setPrimaryEmailVisibilityForAuthenticated": [Function], - "togglePrimaryEmailVisibility": [Function], - "unblock": [Function], - "unfollow": [Function], - "updateAuthenticated": [Function], - }, - }, - }, - "gitHubContentProvider": GitHubContentProvider { - "params": Object { - "gitHubClient": GitHubClient { - "errorCallback": [Function], - "ocktokit": OctokitWithDefaults { - "actions": Object { - "addSelectedRepoToOrgSecret": [Function], - "cancelWorkflowRun": [Function], - "createOrUpdateOrgSecret": [Function], - "createOrUpdateRepoSecret": [Function], - "createOrUpdateSecretForRepo": [Function], - "createRegistrationToken": [Function], - "createRegistrationTokenForOrg": [Function], - "createRegistrationTokenForRepo": [Function], - "createRemoveToken": [Function], - "createRemoveTokenForOrg": [Function], - "createRemoveTokenForRepo": [Function], - "deleteArtifact": [Function], - "deleteOrgSecret": [Function], - "deleteRepoSecret": [Function], - "deleteSecretFromRepo": [Function], - "deleteSelfHostedRunnerFromOrg": [Function], - "deleteSelfHostedRunnerFromRepo": [Function], - "deleteWorkflowRunLogs": [Function], - "downloadArtifact": [Function], - "downloadJobLogsForWorkflowRun": [Function], - "downloadWorkflowJobLogs": [Function], - "downloadWorkflowRunLogs": [Function], - "getArtifact": [Function], - "getJobForWorkflowRun": [Function], - "getOrgPublicKey": [Function], - "getOrgSecret": [Function], - "getPublicKey": [Function], - "getRepoPublicKey": [Function], - "getRepoSecret": [Function], - "getSecret": [Function], - "getSelfHostedRunner": [Function], - "getSelfHostedRunnerForOrg": [Function], - "getSelfHostedRunnerForRepo": [Function], - "getWorkflow": [Function], - "getWorkflowJob": [Function], - "getWorkflowRun": [Function], - "getWorkflowRunUsage": [Function], - "getWorkflowUsage": [Function], - "listArtifactsForRepo": [Function], - "listDownloadsForSelfHostedRunnerApplication": [Function], - "listJobsForWorkflowRun": [Function], - "listOrgSecrets": [Function], - "listRepoSecrets": [Function], - "listRepoWorkflowRuns": [Function], - "listRepoWorkflows": [Function], - "listRunnerApplicationsForOrg": [Function], - "listRunnerApplicationsForRepo": [Function], - "listSecretsForRepo": [Function], - "listSelectedReposForOrgSecret": [Function], - "listSelfHostedRunnersForOrg": [Function], - "listSelfHostedRunnersForRepo": [Function], - "listWorkflowJobLogs": [Function], - "listWorkflowRunArtifacts": [Function], - "listWorkflowRunLogs": [Function], - "listWorkflowRuns": [Function], - "listWorkflowRunsForRepo": [Function], - "reRunWorkflow": [Function], - "removeSelectedRepoFromOrgSecret": [Function], - "removeSelfHostedRunner": [Function], - "setSelectedReposForOrgSecret": [Function], - }, - "activity": Object { - "checkRepoIsStarredByAuthenticatedUser": [Function], - "checkStarringRepo": [Function], - "deleteRepoSubscription": [Function], - "deleteThreadSubscription": [Function], - "getFeeds": [Function], - "getRepoSubscription": [Function], - "getThread": [Function], - "getThreadSubscription": [Function], - "getThreadSubscriptionForAuthenticatedUser": [Function], - "listEventsForAuthenticatedUser": [Function], - "listEventsForOrg": [Function], - "listEventsForUser": [Function], - "listFeeds": [Function], - "listNotifications": [Function], - "listNotificationsForAuthenticatedUser": [Function], - "listNotificationsForRepo": [Function], - "listOrgEventsForAuthenticatedUser": [Function], - "listPublicEvents": [Function], - "listPublicEventsForOrg": [Function], - "listPublicEventsForRepoNetwork": [Function], - "listPublicEventsForUser": [Function], - "listPublicOrgEvents": [Function], - "listReceivedEventsForUser": [Function], - "listReceivedPublicEventsForUser": [Function], - "listRepoEvents": [Function], - "listRepoNotificationsForAuthenticatedUser": [Function], - "listReposStarredByAuthenticatedUser": [Function], - "listReposStarredByUser": [Function], - "listReposWatchedByUser": [Function], - "listStargazersForRepo": [Function], - "listWatchedReposForAuthenticatedUser": [Function], - "listWatchersForRepo": [Function], - "markAsRead": [Function], - "markNotificationsAsRead": [Function], - "markNotificationsAsReadForRepo": [Function], - "markRepoNotificationsAsRead": [Function], - "markThreadAsRead": [Function], - "setRepoSubscription": [Function], - "setThreadSubscription": [Function], - "starRepo": [Function], - "starRepoForAuthenticatedUser": [Function], - "unstarRepo": [Function], - "unstarRepoForAuthenticatedUser": [Function], - }, - "apps": Object { - "addRepoToInstallation": [Function], - "checkAccountIsAssociatedWithAny": [Function], - "checkAccountIsAssociatedWithAnyStubbed": [Function], - "checkToken": [Function], - "createContentAttachment": [Function], - "createFromManifest": [Function], - "createInstallationAccessToken": [Function], - "createInstallationToken": [Function], - "deleteAuthorization": [Function], - "deleteInstallation": [Function], - "deleteToken": [Function], - "getAuthenticated": [Function], - "getBySlug": [Function], - "getInstallation": [Function], - "getOrgInstallation": [Function], - "getRepoInstallation": [Function], - "getSubscriptionPlanForAccount": [Function], - "getSubscriptionPlanForAccountStubbed": [Function], - "getUserInstallation": [Function], - "listAccountsForPlan": [Function], - "listAccountsForPlanStubbed": [Function], - "listAccountsUserOrOrgOnPlan": [Function], - "listAccountsUserOrOrgOnPlanStubbed": [Function], - "listInstallationReposForAuthenticatedUser": [Function], - "listInstallations": [Function], - "listInstallationsForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], - "listPlans": [Function], - "listPlansStubbed": [Function], - "listRepos": [Function], - "listReposAccessibleToInstallation": [Function], - "listSubscriptionsForAuthenticatedUser": [Function], - "listSubscriptionsForAuthenticatedUserStubbed": [Function], - "removeRepoFromInstallation": [Function], - "resetToken": [Function], - "revokeInstallationAccessToken": [Function], - "revokeInstallationToken": [Function], - "suspendInstallation": [Function], - "unsuspendInstallation": [Function], - }, - "auth": [Function], - "checks": Object { - "create": [Function], - "createSuite": [Function], - "get": [Function], - "getSuite": [Function], - "listAnnotations": [Function], - "listForRef": [Function], - "listForSuite": [Function], - "listSuitesForRef": [Function], - "rerequestSuite": [Function], - "setSuitesPreferences": [Function], - "update": [Function], - }, - "codeScanning": Object { - "getAlert": [Function], - "listAlertsForRepo": [Function], - }, - "codesOfConduct": Object { - "getAllCodesOfConduct": [Function], - "getConductCode": [Function], - "getForRepo": [Function], - "listConductCodes": [Function], - }, - "emojis": Object { - "get": [Function], - }, - "gists": Object { - "checkIsStarred": [Function], - "create": [Function], - "createComment": [Function], - "delete": [Function], - "deleteComment": [Function], - "fork": [Function], - "get": [Function], - "getComment": [Function], - "getRevision": [Function], - "list": [Function], - "listComments": [Function], - "listCommits": [Function], - "listForUser": [Function], - "listForks": [Function], - "listPublic": [Function], - "listPublicForUser": [Function], - "listStarred": [Function], - "star": [Function], - "unstar": [Function], - "update": [Function], - "updateComment": [Function], - }, - "git": Object { - "createBlob": [Function], - "createCommit": [Function], - "createRef": [Function], - "createTag": [Function], - "createTree": [Function], - "deleteRef": [Function], - "getBlob": [Function], - "getCommit": [Function], - "getRef": [Function], - "getTag": [Function], - "getTree": [Function], - "listMatchingRefs": [Function], - "updateRef": [Function], - }, - "gitignore": Object { - "getAllTemplates": [Function], - "getTemplate": [Function], - "listTemplates": [Function], - }, - "graphql": [Function], - "hook": [Function], - "interactions": Object { - "addOrUpdateRestrictionsForOrg": [Function], - "addOrUpdateRestrictionsForRepo": [Function], - "getRestrictionsForOrg": [Function], - "getRestrictionsForRepo": [Function], - "removeRestrictionsForOrg": [Function], - "removeRestrictionsForRepo": [Function], - "setRestrictionsForOrg": [Function], - "setRestrictionsForRepo": [Function], - }, - "issues": Object { - "addAssignees": [Function], - "addLabels": [Function], - "checkAssignee": [Function], - "checkUserCanBeAssigned": [Function], - "create": [Function], - "createComment": [Function], - "createLabel": [Function], - "createMilestone": [Function], - "deleteComment": [Function], - "deleteLabel": [Function], - "deleteMilestone": [Function], - "get": [Function], - "getComment": [Function], - "getEvent": [Function], - "getLabel": [Function], - "getMilestone": [Function], - "list": [Function], - "listAssignees": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listEvents": [Function], - "listEventsForRepo": [Function], - "listEventsForTimeline": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listLabelsForMilestone": [Function], - "listLabelsForRepo": [Function], - "listLabelsOnIssue": [Function], - "listMilestones": [Function], - "listMilestonesForRepo": [Function], - "lock": [Function], - "removeAllLabels": [Function], - "removeAssignees": [Function], - "removeLabel": [Function], - "removeLabels": [Function], - "replaceAllLabels": [Function], - "replaceLabels": [Function], - "setLabels": [Function], - "unlock": [Function], - "update": [Function], - "updateComment": [Function], - "updateLabel": [Function], - "updateMilestone": [Function], - }, - "licenses": Object { - "get": [Function], - "getAllCommonlyUsed": [Function], - "getForRepo": [Function], - "listCommonlyUsed": [Function], - }, - "log": Object { - "debug": [Function], - "error": [Function], - "info": [Function], - "warn": [Function], - }, - "markdown": Object { - "render": [Function], - "renderRaw": [Function], - }, - "meta": Object { - "get": [Function], - }, - "migrations": Object { - "cancelImport": [Function], - "deleteArchiveForAuthenticatedUser": [Function], - "deleteArchiveForOrg": [Function], - "downloadArchiveForOrg": [Function], - "getArchiveForAuthenticatedUser": [Function], - "getCommitAuthors": [Function], - "getImportProgress": [Function], - "getImportStatus": [Function], - "getLargeFiles": [Function], - "getStatusForAuthenticatedUser": [Function], - "getStatusForOrg": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listReposForOrg": [Function], - "listReposForUser": [Function], - "mapCommitAuthor": [Function], - "setLfsPreference": [Function], - "startForAuthenticatedUser": [Function], - "startForOrg": [Function], - "startImport": [Function], - "unlockRepoForAuthenticatedUser": [Function], - "unlockRepoForOrg": [Function], - "updateImport": [Function], - }, - "orgs": Object { - "addOrUpdateMembership": [Function], - "blockUser": [Function], - "checkBlockedUser": [Function], - "checkMembership": [Function], - "checkMembershipForUser": [Function], - "checkPublicMembership": [Function], - "checkPublicMembershipForUser": [Function], - "concealMembership": [Function], - "convertMemberToOutsideCollaborator": [Function], - "createHook": [Function], - "createInvitation": [Function], - "createWebhook": [Function], - "deleteHook": [Function], - "deleteWebhook": [Function], - "get": [Function], - "getHook": [Function], - "getMembership": [Function], - "getMembershipForAuthenticatedUser": [Function], - "getMembershipForUser": [Function], - "getWebhook": [Function], - "list": [Function], - "listAppInstallations": [Function], - "listBlockedUsers": [Function], - "listForAuthenticatedUser": [Function], - "listForUser": [Function], - "listHooks": [Function], - "listInstallations": [Function], - "listInvitationTeams": [Function], - "listMembers": [Function], - "listMemberships": [Function], - "listMembershipsForAuthenticatedUser": [Function], - "listOutsideCollaborators": [Function], - "listPendingInvitations": [Function], - "listPublicMembers": [Function], - "listWebhooks": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "publicizeMembership": [Function], - "removeMember": [Function], - "removeMembership": [Function], - "removeMembershipForUser": [Function], - "removeOutsideCollaborator": [Function], - "removePublicMembershipForAuthenticatedUser": [Function], - "setMembershipForUser": [Function], - "setPublicMembershipForAuthenticatedUser": [Function], - "unblockUser": [Function], - "update": [Function], - "updateHook": [Function], - "updateMembership": [Function], - "updateMembershipForAuthenticatedUser": [Function], - "updateWebhook": [Function], - }, - "paginate": [Function], - "projects": Object { - "addCollaborator": [Function], - "createCard": [Function], - "createColumn": [Function], - "createForAuthenticatedUser": [Function], - "createForOrg": [Function], - "createForRepo": [Function], - "delete": [Function], - "deleteCard": [Function], - "deleteColumn": [Function], - "get": [Function], - "getCard": [Function], - "getColumn": [Function], - "getPermissionForUser": [Function], - "listCards": [Function], - "listCollaborators": [Function], - "listColumns": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listForUser": [Function], - "moveCard": [Function], - "moveColumn": [Function], - "removeCollaborator": [Function], - "reviewUserPermissionLevel": [Function], - "update": [Function], - "updateCard": [Function], - "updateColumn": [Function], - }, - "pulls": Object { - "checkIfMerged": [Function], - "create": [Function], - "createComment": [Function], - "createReplyForReviewComment": [Function], - "createReview": [Function], - "createReviewComment": [Function], - "createReviewCommentReply": [Function], - "createReviewRequest": [Function], - "deleteComment": [Function], - "deletePendingReview": [Function], - "deleteReviewComment": [Function], - "deleteReviewRequest": [Function], - "dismissReview": [Function], - "get": [Function], - "getComment": [Function], - "getCommentsForReview": [Function], - "getReview": [Function], - "getReviewComment": [Function], - "list": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listCommentsForReview": [Function], - "listCommits": [Function], - "listFiles": [Function], - "listRequestedReviewers": [Function], - "listReviewComments": [Function], - "listReviewCommentsForRepo": [Function], - "listReviewRequests": [Function], - "listReviews": [Function], - "merge": [Function], - "removeRequestedReviewers": [Function], - "requestReviewers": [Function], - "submitReview": [Function], - "update": [Function], - "updateBranch": [Function], - "updateComment": [Function], - "updateReview": [Function], - "updateReviewComment": [Function], - }, - "rateLimit": Object { - "get": [Function], - }, - "reactions": Object { - "createForCommitComment": [Function], - "createForIssue": [Function], - "createForIssueComment": [Function], - "createForPullRequestReviewComment": [Function], - "createForTeamDiscussionCommentInOrg": [Function], - "createForTeamDiscussionInOrg": [Function], - "delete": [Function], - "deleteForCommitComment": [Function], - "deleteForIssue": [Function], - "deleteForIssueComment": [Function], - "deleteForPullRequestComment": [Function], - "deleteForTeamDiscussion": [Function], - "deleteForTeamDiscussionComment": [Function], - "deleteLegacy": [Function], - "listForCommitComment": [Function], - "listForIssue": [Function], - "listForIssueComment": [Function], - "listForPullRequestReviewComment": [Function], - "listForTeamDiscussionCommentInOrg": [Function], - "listForTeamDiscussionInOrg": [Function], - }, - "repos": Object { - "acceptInvitation": [Function], - "addAppAccessRestrictions": [Function], - "addCollaborator": [Function], - "addDeployKey": [Function], - "addProtectedBranchAdminEnforcement": [Function], - "addProtectedBranchAppRestrictions": [Function], - "addProtectedBranchRequiredSignatures": [Function], - "addProtectedBranchRequiredStatusChecksContexts": [Function], - "addProtectedBranchTeamRestrictions": [Function], - "addProtectedBranchUserRestrictions": [Function], - "addStatusCheckContexts": [Function], - "addTeamAccessRestrictions": [Function], - "addUserAccessRestrictions": [Function], - "checkCollaborator": [Function], - "checkVulnerabilityAlerts": [Function], - "compareCommits": [Function], - "createCommitComment": [Function], - "createCommitSignatureProtection": [Function], - "createCommitStatus": [Function], - "createDeployKey": [Function], - "createDeployment": [Function], - "createDeploymentStatus": [Function], - "createDispatchEvent": [Function], - "createForAuthenticatedUser": [Function], - "createFork": [Function], - "createHook": [Function], - "createInOrg": [Function], - "createOrUpdateFile": [Function], - "createOrUpdateFileContents": [Function], - "createPagesSite": [Function], - "createRelease": [Function], - "createStatus": [Function], - "createUsingTemplate": [Function], - "createWebhook": [Function], - "declineInvitation": [Function], - "delete": [Function], - "deleteAccessRestrictions": [Function], - "deleteAdminBranchProtection": [Function], - "deleteBranchProtection": [Function], - "deleteCommitComment": [Function], - "deleteCommitSignatureProtection": [Function], - "deleteDeployKey": [Function], - "deleteDeployment": [Function], - "deleteDownload": [Function], - "deleteFile": [Function], - "deleteHook": [Function], - "deleteInvitation": [Function], - "deletePagesSite": [Function], - "deletePullRequestReviewProtection": [Function], - "deleteRelease": [Function], - "deleteReleaseAsset": [Function], - "deleteWebhook": [Function], - "disableAutomatedSecurityFixes": [Function], - "disablePagesSite": [Function], - "disableVulnerabilityAlerts": [Function], - "downloadArchive": [Function], - "enableAutomatedSecurityFixes": [Function], - "enablePagesSite": [Function], - "enableVulnerabilityAlerts": [Function], - "get": [Function], - "getAccessRestrictions": [Function], - "getAdminBranchProtection": [Function], - "getAllStatusCheckContexts": [Function], - "getAllTopics": [Function], - "getAppsWithAccessToProtectedBranch": [Function], - "getArchiveLink": [Function], - "getBranch": [Function], - "getBranchProtection": [Function], - "getClones": [Function], - "getCodeFrequencyStats": [Function], - "getCollaboratorPermissionLevel": [Function], - "getCombinedStatusForRef": [Function], - "getCommit": [Function], - "getCommitActivityStats": [Function], - "getCommitComment": [Function], - "getCommitSignatureProtection": [Function], - "getCommunityProfileMetrics": [Function], - "getContent": [Function], - "getContents": [Function], - "getContributorsStats": [Function], - "getDeployKey": [Function], - "getDeployment": [Function], - "getDeploymentStatus": [Function], - "getDownload": [Function], - "getHook": [Function], - "getLatestPagesBuild": [Function], - "getLatestRelease": [Function], - "getPages": [Function], - "getPagesBuild": [Function], - "getParticipationStats": [Function], - "getProtectedBranchAdminEnforcement": [Function], - "getProtectedBranchPullRequestReviewEnforcement": [Function], - "getProtectedBranchRequiredSignatures": [Function], - "getProtectedBranchRequiredStatusChecks": [Function], - "getProtectedBranchRestrictions": [Function], - "getPullRequestReviewProtection": [Function], - "getPunchCardStats": [Function], - "getReadme": [Function], - "getRelease": [Function], - "getReleaseAsset": [Function], - "getReleaseByTag": [Function], - "getStatusChecksProtection": [Function], - "getTeamsWithAccessToProtectedBranch": [Function], - "getTopPaths": [Function], - "getTopReferrers": [Function], - "getUsersWithAccessToProtectedBranch": [Function], - "getViews": [Function], - "getWebhook": [Function], - "list": [Function], - "listAssetsForRelease": [Function], - "listBranches": [Function], - "listBranchesForHeadCommit": [Function], - "listCollaborators": [Function], - "listCommentsForCommit": [Function], - "listCommitComments": [Function], - "listCommitCommentsForRepo": [Function], - "listCommitStatusesForRef": [Function], - "listCommits": [Function], - "listContributors": [Function], - "listDeployKeys": [Function], - "listDeploymentStatuses": [Function], - "listDeployments": [Function], - "listDownloads": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForUser": [Function], - "listForks": [Function], - "listHooks": [Function], - "listInvitations": [Function], - "listInvitationsForAuthenticatedUser": [Function], - "listLanguages": [Function], - "listPagesBuilds": [Function], - "listProtectedBranchRequiredStatusChecksContexts": [Function], - "listPublic": [Function], - "listPullRequestsAssociatedWithCommit": [Function], - "listReleaseAssets": [Function], - "listReleases": [Function], - "listStatusesForRef": [Function], - "listTags": [Function], - "listTeams": [Function], - "listTopics": [Function], - "listWebhooks": [Function], - "merge": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "removeAppAccessRestrictions": [Function], - "removeBranchProtection": [Function], - "removeCollaborator": [Function], - "removeDeployKey": [Function], - "removeProtectedBranchAdminEnforcement": [Function], - "removeProtectedBranchAppRestrictions": [Function], - "removeProtectedBranchPullRequestReviewEnforcement": [Function], - "removeProtectedBranchRequiredSignatures": [Function], - "removeProtectedBranchRequiredStatusChecks": [Function], - "removeProtectedBranchRequiredStatusChecksContexts": [Function], - "removeProtectedBranchRestrictions": [Function], - "removeProtectedBranchTeamRestrictions": [Function], - "removeProtectedBranchUserRestrictions": [Function], - "removeStatusCheckContexts": [Function], - "removeStatusCheckProtection": [Function], - "removeTeamAccessRestrictions": [Function], - "removeUserAccessRestrictions": [Function], - "replaceAllTopics": [Function], - "replaceProtectedBranchAppRestrictions": [Function], - "replaceProtectedBranchRequiredStatusChecksContexts": [Function], - "replaceProtectedBranchTeamRestrictions": [Function], - "replaceProtectedBranchUserRestrictions": [Function], - "replaceTopics": [Function], - "requestPageBuild": [Function], - "requestPagesBuild": [Function], - "retrieveCommunityProfileMetrics": [Function], - "setAdminBranchProtection": [Function], - "setAppAccessRestrictions": [Function], - "setStatusCheckContexts": [Function], - "setTeamAccessRestrictions": [Function], - "setUserAccessRestrictions": [Function], - "testPushHook": [Function], - "testPushWebhook": [Function], - "transfer": [Function], - "update": [Function], - "updateBranchProtection": [Function], - "updateCommitComment": [Function], - "updateHook": [Function], - "updateInformationAboutPagesSite": [Function], - "updateInvitation": [Function], - "updateProtectedBranchPullRequestReviewEnforcement": [Function], - "updateProtectedBranchRequiredStatusChecks": [Function], - "updatePullRequestReviewProtection": [Function], - "updateRelease": [Function], - "updateReleaseAsset": [Function], - "updateStatusCheckPotection": [Function], - "updateWebhook": [Function], - "uploadReleaseAsset": [Function], - }, - "request": [Function], - "search": Object { - "code": [Function], - "commits": [Function], - "issuesAndPullRequests": [Function], - "labels": [Function], - "repos": [Function], - "topics": [Function], - "users": [Function], - }, - "teams": Object { - "addOrUpdateMembershipForUserInOrg": [Function], - "addOrUpdateMembershipInOrg": [Function], - "addOrUpdateProjectInOrg": [Function], - "addOrUpdateProjectPermissionsInOrg": [Function], - "addOrUpdateRepoInOrg": [Function], - "addOrUpdateRepoPermissionsInOrg": [Function], - "checkManagesRepoInOrg": [Function], - "checkPermissionsForProjectInOrg": [Function], - "checkPermissionsForRepoInOrg": [Function], - "create": [Function], - "createDiscussionCommentInOrg": [Function], - "createDiscussionInOrg": [Function], - "deleteDiscussionCommentInOrg": [Function], - "deleteDiscussionInOrg": [Function], - "deleteInOrg": [Function], - "getByName": [Function], - "getDiscussionCommentInOrg": [Function], - "getDiscussionInOrg": [Function], - "getMembershipForUserInOrg": [Function], - "getMembershipInOrg": [Function], - "list": [Function], - "listChildInOrg": [Function], - "listDiscussionCommentsInOrg": [Function], - "listDiscussionsInOrg": [Function], - "listForAuthenticatedUser": [Function], - "listMembersInOrg": [Function], - "listPendingInvitationsInOrg": [Function], - "listProjectsInOrg": [Function], - "listReposInOrg": [Function], - "removeMembershipForUserInOrg": [Function], - "removeMembershipInOrg": [Function], - "removeProjectInOrg": [Function], - "removeRepoInOrg": [Function], - "reviewProjectInOrg": [Function], - "updateDiscussionCommentInOrg": [Function], - "updateDiscussionInOrg": [Function], - "updateInOrg": [Function], - }, - "users": Object { - "addEmailForAuthenticated": [Function], - "addEmails": [Function], - "block": [Function], - "checkBlocked": [Function], - "checkFollowing": [Function], - "checkFollowingForUser": [Function], - "checkPersonIsFollowedByAuthenticated": [Function], - "createGpgKey": [Function], - "createGpgKeyForAuthenticated": [Function], - "createPublicKey": [Function], - "createPublicSshKeyForAuthenticated": [Function], - "deleteEmailForAuthenticated": [Function], - "deleteEmails": [Function], - "deleteGpgKey": [Function], - "deleteGpgKeyForAuthenticated": [Function], - "deletePublicKey": [Function], - "deletePublicSshKeyForAuthenticated": [Function], - "follow": [Function], - "getAuthenticated": [Function], - "getByUsername": [Function], - "getContextForUser": [Function], - "getGpgKey": [Function], - "getGpgKeyForAuthenticated": [Function], - "getPublicKey": [Function], - "getPublicSshKeyForAuthenticated": [Function], - "list": [Function], - "listBlocked": [Function], - "listBlockedByAuthenticated": [Function], - "listEmails": [Function], - "listEmailsForAuthenticated": [Function], - "listFollowedByAuthenticated": [Function], - "listFollowersForAuthenticatedUser": [Function], - "listFollowersForUser": [Function], - "listFollowingForAuthenticatedUser": [Function], - "listFollowingForUser": [Function], - "listGpgKeys": [Function], - "listGpgKeysForAuthenticated": [Function], - "listGpgKeysForUser": [Function], - "listPublicEmails": [Function], - "listPublicEmailsForAuthenticated": [Function], - "listPublicKeys": [Function], - "listPublicKeysForUser": [Function], - "listPublicSshKeysForAuthenticated": [Function], - "setPrimaryEmailVisibilityForAuthenticated": [Function], - "togglePrimaryEmailVisibility": [Function], - "unblock": [Function], - "unfollow": [Function], - "updateAuthenticated": [Function], - }, - }, - }, - "promptForCommitMsg": [Function], - }, - }, - "gitHubOAuthService": GitHubOAuthService { - "junoClient": JunoClient { - "cachedPinnedRepos": [Function], - }, - "token": [Function], - }, - "inMemoryContentProvider": InMemoryContentProvider { - "params": Object { - "memory://schema-analyzer-component-notebook.ipynb": Object { - "content": Object { - "content": Object { - "cells": Array [ - Object { - "cell_type": "code", - "execution_count": 0, - "metadata": Object {}, - "outputs": Array [], - "source": "", - }, - ], - "metadata": Object { - "kernelspec": Object { - "displayName": "Mongo", - "language": "mongocli", - "name": "mongo", - }, - "language_info": Object { - "file_extension": "ipynb", - "mimetype": "application/json", - "name": "mongo", - "version": "1.0", - }, - }, - "nbformat": 4, - "nbformat_minor": 4, - }, - "created": "", - "format": "json", - "last_modified": "", - "mimetype": "application/x-ipynb+json", - "name": "schema-analyzer-component-notebook.ipynb", - "path": "memory://schema-analyzer-component-notebook.ipynb", - "type": "notebook", - "writable": true, - }, - "readonly": true, - }, - }, - }, - "junoClient": JunoClient { - "cachedPinnedRepos": [Function], - }, - "onGitHubClientError": [Function], - "params": Object { - "container": [Circular], - "refreshCommandBarButtons": [Function], - "refreshNotebookList": [Function], - "resourceTree": ResourceTreeAdapter { - "container": [Circular], - "copyNotebook": [Function], - "parameters": [Function], - }, - }, - "promptForCommitMsg": [Function], - }, "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "phoenixClient": PhoenixClient { diff --git a/src/Explorer/Controls/TreeComponent/TreeComponent.tsx b/src/Explorer/Controls/TreeComponent/TreeComponent.tsx index c54d8fcf4..83b00b362 100644 --- a/src/Explorer/Controls/TreeComponent/TreeComponent.tsx +++ b/src/Explorer/Controls/TreeComponent/TreeComponent.tsx @@ -173,6 +173,7 @@ export class TreeNodeComponent extends React.Component) => this.onNodeClick(event, node)} onKeyPress={(event: React.KeyboardEvent) => this.onNodeKeyPress(event, node)} role="treeitem" + id={node.id} >
{ if (userContext.apiType === "Cassandra") { diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index 3dc7d158e..8ea630a72 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -339,6 +339,7 @@ function createNewSQLQueryButton(selectedNodeState: SelectedNodeState): CommandB if (userContext.apiType === "SQL" || userContext.apiType === "Gremlin") { const label = "New SQL Query"; return { + id: "newQueryBtn", iconSrc: AddSqlQueryIcon, iconAlt: label, onCommandClick: () => { @@ -353,6 +354,7 @@ function createNewSQLQueryButton(selectedNodeState: SelectedNodeState): CommandB } else if (userContext.apiType === "Mongo") { const label = "New Query"; return { + id: "newQueryBtn", iconSrc: AddSqlQueryIcon, iconAlt: label, onCommandClick: () => { @@ -439,6 +441,7 @@ function applyNotebooksTemporarilyDownStyle(buttonProps: CommandButtonComponentP function createNewNotebookButton(container: Explorer): CommandButtonComponentProps { const label = "New Notebook"; return { + id: "newNotebookBtn", iconSrc: NewNotebookIcon, iconAlt: label, onCommandClick: () => container.onNewNotebookClicked(), diff --git a/src/Explorer/Notebook/NotebookContainerClient.ts b/src/Explorer/Notebook/NotebookContainerClient.ts index 15e283915..53ddc44ff 100644 --- a/src/Explorer/Notebook/NotebookContainerClient.ts +++ b/src/Explorer/Notebook/NotebookContainerClient.ts @@ -5,7 +5,7 @@ import { useDialog } from "Explorer/Controls/Dialog"; import promiseRetry, { AbortError } from "p-retry"; import { PhoenixClient } from "Phoenix/PhoenixClient"; import * as Constants from "../../Common/Constants"; -import { ConnectionStatusType, HttpHeaders, HttpStatusCodes, Notebook } from "../../Common/Constants"; +import { ConnectionStatusType, HttpHeaders, HttpStatusCodes, Notebook, PoolIdType } from "../../Common/Constants"; import { getErrorMessage } from "../../Common/ErrorHandlingUtils"; import * as Logger from "../../Common/Logger"; import * as DataModels from "../../Contracts/DataModels"; @@ -154,6 +154,7 @@ export class NotebookContainerClient { if (useNotebook.getState().isPhoenixNotebooks) { const provisionData: IProvisionData = { cosmosEndpoint: userContext.databaseAccount.properties.documentEndpoint, + poolId: PoolIdType.DefaultPoolId, }; return await this.phoenixClient.resetContainer(provisionData); } diff --git a/src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzer.tsx b/src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzer.tsx index cf9810f38..b0bfdb674 100644 --- a/src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzer.tsx +++ b/src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzer.tsx @@ -5,6 +5,7 @@ import Immutable from "immutable"; import * as React from "react"; import { connect } from "react-redux"; import { Dispatch } from "redux"; +import * as Logger from "../../../Common/Logger"; import { Action } from "../../../Shared/Telemetry/TelemetryConstants"; import { traceFailure, traceStart, traceSuccess } from "../../../Shared/Telemetry/TelemetryProcessor"; import loadTransform from "../NotebookComponent/loadTransform"; @@ -100,6 +101,7 @@ export class SchemaAnalyzer extends React.Component = create((set, get) => ({ containerStatus: { status: undefined, durationLeftInMinutes: undefined, - notebookServerInfo: undefined, + phoenixServerInfo: undefined, }, isPhoenixNotebooks: undefined, isPhoenixFeatures: undefined, @@ -296,22 +296,30 @@ export const useNotebook: UseStore = create((set, get) => ({ useNotebook.getState().setContainerStatus({ status: undefined, durationLeftInMinutes: undefined, - notebookServerInfo: undefined, + phoenixServerInfo: undefined, }); }, setIsRefreshed: (isRefreshed: boolean) => set({ isRefreshed }), setContainerStatus: (containerStatus: ContainerInfo) => set({ containerStatus }), getPhoenixStatus: async () => { if (get().isPhoenixNotebooks === undefined || get().isPhoenixFeatures === undefined) { - let isPhoenix = false; - if (userContext.features.phoenixNotebooks || userContext.features.phoenixFeatures) { - const phoenixClient = new PhoenixClient(); - isPhoenix = isPublicInternetAccessAllowed() && (await phoenixClient.isDbAcountWhitelisted()); + let isPhoenixNotebooks = false; + let isPhoenixFeatures = false; + + const isPublicInternetAllowed = isPublicInternetAccessAllowed(); + const phoenixClient = new PhoenixClient(); + const dbAccountAllowedInfo = await phoenixClient.getDbAccountAllowedStatus(); + + if (dbAccountAllowedInfo.status === HttpStatusCodes.OK) { + if (dbAccountAllowedInfo?.type === PhoenixErrorType.PhoenixFlightFallback) { + isPhoenixNotebooks = isPublicInternetAllowed && userContext.features.phoenixNotebooks; + isPhoenixFeatures = isPublicInternetAllowed && userContext.features.phoenixFeatures; + } else { + isPhoenixNotebooks = isPhoenixFeatures = isPublicInternetAllowed; + } + } else { + isPhoenixNotebooks = isPhoenixFeatures = false; } - - const isPhoenixNotebooks = userContext.features.phoenixNotebooks && isPhoenix; - const isPhoenixFeatures = userContext.features.phoenixFeatures && isPhoenix; - set({ isPhoenixNotebooks: isPhoenixNotebooks }); set({ isPhoenixFeatures: isPhoenixFeatures }); } diff --git a/src/Explorer/Panes/AddCollectionPanel.tsx b/src/Explorer/Panes/AddCollectionPanel.tsx index 9f279df51..d2dfa80ba 100644 --- a/src/Explorer/Panes/AddCollectionPanel.tsx +++ b/src/Explorer/Panes/AddCollectionPanel.tsx @@ -8,6 +8,7 @@ import { IconButton, IDropdownOption, Link, + ProgressIndicator, Separator, Stack, TeachingBubble, @@ -21,6 +22,7 @@ import { configContext, Platform } from "ConfigContext"; import * as DataModels from "Contracts/DataModels"; import { SubscriptionType } from "Contracts/SubscriptionType"; import { useSidePanel } from "hooks/useSidePanel"; +import { useTeachingBubble } from "hooks/useTeachingBubble"; import React from "react"; import { CollectionCreation } from "Shared/Constants"; import { Action } from "Shared/Telemetry/TelemetryConstants"; @@ -42,7 +44,6 @@ export interface AddCollectionPanelProps { explorer: Explorer; databaseId?: string; isQuickstart?: boolean; - showTeachingBubble?: boolean; } const SharedDatabaseDefault: DataModels.IndexingPolicy = { @@ -112,7 +113,7 @@ export class AddCollectionPanel extends React.Component this.setState({ teachingBubbleStep: 0 })} footerContent="Step 1 of 4" > - Database is the parent of a container, create a new database / use an existing one + + + Database is the parent of a container. You can create a new database or use an existing one. In this + tutorial we are creating a new database named SampleDB. + + + Learn more about resources. + + )} @@ -186,8 +199,15 @@ export class AddCollectionPanel extends React.Component this.setState({ teachingBubbleStep: 0 })} footerContent="Step 2 of 4" > - Cosmos DB recommends sharing throughput across database. Autoscale will give you a flexible amount of - throughput based on the max RU/s set + + + Cosmos DB recommends sharing throughput across database. Autoscale will give you a flexible amount of + throughput based on the max RU/s set (Request Units). + + + Learn more about RU/s. + + )} @@ -213,7 +233,7 @@ export class AddCollectionPanel extends React.Component { - this.setState({ teachingBubbleStep: 0 }); + this.setState({ teachingBubbleStep: 5 }); this.submit(); }, }} @@ -764,7 +784,35 @@ export class AddCollectionPanel extends React.Component - {this.state.isExecuting && } + {this.state.isExecuting && ( +
+ + {this.state.teachingBubbleStep === 5 && ( + this.setState({ teachingBubbleStep: 0 })} + styles={{ footer: { width: "100%" } }} + > + A sample container is now being created and we are adding sample data for you. It should take about 1 + minute. +
+
+ Once the sample container is created, review your sample dataset and follow next steps +
+
+ +
+ )} +
+ )} ); } @@ -1078,6 +1126,23 @@ export class AddCollectionPanel extends React.Component database.id().startsWith("SampleDB")); + const existingSampleDBNames = existingSampleDBs?.map((database) => database.id()); + if (!existingSampleDBNames || existingSampleDBNames.length === 0) { + return "SampleDB"; + } + + let i = 1; + while (existingSampleDBNames.indexOf(`SampleDB${i}`) !== -1) { + i++; + } + + return `SampleDB${i}`; + } + private async submit(event?: React.FormEvent): Promise { event?.preventDefault(); @@ -1128,6 +1193,7 @@ export class AddCollectionPanel extends React.Component ( -
+
); diff --git a/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap b/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap index a0a695c5d..e77d8c74d 100644 --- a/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap +++ b/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap @@ -11,1611 +11,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = ` "_resetNotebookWorkspace": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], "isTabsContentExpanded": [Function], - "notebookManager": NotebookManager { - "gitHubClient": GitHubClient { - "errorCallback": [Function], - "ocktokit": OctokitWithDefaults { - "actions": Object { - "addSelectedRepoToOrgSecret": [Function], - "cancelWorkflowRun": [Function], - "createOrUpdateOrgSecret": [Function], - "createOrUpdateRepoSecret": [Function], - "createOrUpdateSecretForRepo": [Function], - "createRegistrationToken": [Function], - "createRegistrationTokenForOrg": [Function], - "createRegistrationTokenForRepo": [Function], - "createRemoveToken": [Function], - "createRemoveTokenForOrg": [Function], - "createRemoveTokenForRepo": [Function], - "deleteArtifact": [Function], - "deleteOrgSecret": [Function], - "deleteRepoSecret": [Function], - "deleteSecretFromRepo": [Function], - "deleteSelfHostedRunnerFromOrg": [Function], - "deleteSelfHostedRunnerFromRepo": [Function], - "deleteWorkflowRunLogs": [Function], - "downloadArtifact": [Function], - "downloadJobLogsForWorkflowRun": [Function], - "downloadWorkflowJobLogs": [Function], - "downloadWorkflowRunLogs": [Function], - "getArtifact": [Function], - "getJobForWorkflowRun": [Function], - "getOrgPublicKey": [Function], - "getOrgSecret": [Function], - "getPublicKey": [Function], - "getRepoPublicKey": [Function], - "getRepoSecret": [Function], - "getSecret": [Function], - "getSelfHostedRunner": [Function], - "getSelfHostedRunnerForOrg": [Function], - "getSelfHostedRunnerForRepo": [Function], - "getWorkflow": [Function], - "getWorkflowJob": [Function], - "getWorkflowRun": [Function], - "getWorkflowRunUsage": [Function], - "getWorkflowUsage": [Function], - "listArtifactsForRepo": [Function], - "listDownloadsForSelfHostedRunnerApplication": [Function], - "listJobsForWorkflowRun": [Function], - "listOrgSecrets": [Function], - "listRepoSecrets": [Function], - "listRepoWorkflowRuns": [Function], - "listRepoWorkflows": [Function], - "listRunnerApplicationsForOrg": [Function], - "listRunnerApplicationsForRepo": [Function], - "listSecretsForRepo": [Function], - "listSelectedReposForOrgSecret": [Function], - "listSelfHostedRunnersForOrg": [Function], - "listSelfHostedRunnersForRepo": [Function], - "listWorkflowJobLogs": [Function], - "listWorkflowRunArtifacts": [Function], - "listWorkflowRunLogs": [Function], - "listWorkflowRuns": [Function], - "listWorkflowRunsForRepo": [Function], - "reRunWorkflow": [Function], - "removeSelectedRepoFromOrgSecret": [Function], - "removeSelfHostedRunner": [Function], - "setSelectedReposForOrgSecret": [Function], - }, - "activity": Object { - "checkRepoIsStarredByAuthenticatedUser": [Function], - "checkStarringRepo": [Function], - "deleteRepoSubscription": [Function], - "deleteThreadSubscription": [Function], - "getFeeds": [Function], - "getRepoSubscription": [Function], - "getThread": [Function], - "getThreadSubscription": [Function], - "getThreadSubscriptionForAuthenticatedUser": [Function], - "listEventsForAuthenticatedUser": [Function], - "listEventsForOrg": [Function], - "listEventsForUser": [Function], - "listFeeds": [Function], - "listNotifications": [Function], - "listNotificationsForAuthenticatedUser": [Function], - "listNotificationsForRepo": [Function], - "listOrgEventsForAuthenticatedUser": [Function], - "listPublicEvents": [Function], - "listPublicEventsForOrg": [Function], - "listPublicEventsForRepoNetwork": [Function], - "listPublicEventsForUser": [Function], - "listPublicOrgEvents": [Function], - "listReceivedEventsForUser": [Function], - "listReceivedPublicEventsForUser": [Function], - "listRepoEvents": [Function], - "listRepoNotificationsForAuthenticatedUser": [Function], - "listReposStarredByAuthenticatedUser": [Function], - "listReposStarredByUser": [Function], - "listReposWatchedByUser": [Function], - "listStargazersForRepo": [Function], - "listWatchedReposForAuthenticatedUser": [Function], - "listWatchersForRepo": [Function], - "markAsRead": [Function], - "markNotificationsAsRead": [Function], - "markNotificationsAsReadForRepo": [Function], - "markRepoNotificationsAsRead": [Function], - "markThreadAsRead": [Function], - "setRepoSubscription": [Function], - "setThreadSubscription": [Function], - "starRepo": [Function], - "starRepoForAuthenticatedUser": [Function], - "unstarRepo": [Function], - "unstarRepoForAuthenticatedUser": [Function], - }, - "apps": Object { - "addRepoToInstallation": [Function], - "checkAccountIsAssociatedWithAny": [Function], - "checkAccountIsAssociatedWithAnyStubbed": [Function], - "checkToken": [Function], - "createContentAttachment": [Function], - "createFromManifest": [Function], - "createInstallationAccessToken": [Function], - "createInstallationToken": [Function], - "deleteAuthorization": [Function], - "deleteInstallation": [Function], - "deleteToken": [Function], - "getAuthenticated": [Function], - "getBySlug": [Function], - "getInstallation": [Function], - "getOrgInstallation": [Function], - "getRepoInstallation": [Function], - "getSubscriptionPlanForAccount": [Function], - "getSubscriptionPlanForAccountStubbed": [Function], - "getUserInstallation": [Function], - "listAccountsForPlan": [Function], - "listAccountsForPlanStubbed": [Function], - "listAccountsUserOrOrgOnPlan": [Function], - "listAccountsUserOrOrgOnPlanStubbed": [Function], - "listInstallationReposForAuthenticatedUser": [Function], - "listInstallations": [Function], - "listInstallationsForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], - "listPlans": [Function], - "listPlansStubbed": [Function], - "listRepos": [Function], - "listReposAccessibleToInstallation": [Function], - "listSubscriptionsForAuthenticatedUser": [Function], - "listSubscriptionsForAuthenticatedUserStubbed": [Function], - "removeRepoFromInstallation": [Function], - "resetToken": [Function], - "revokeInstallationAccessToken": [Function], - "revokeInstallationToken": [Function], - "suspendInstallation": [Function], - "unsuspendInstallation": [Function], - }, - "auth": [Function], - "checks": Object { - "create": [Function], - "createSuite": [Function], - "get": [Function], - "getSuite": [Function], - "listAnnotations": [Function], - "listForRef": [Function], - "listForSuite": [Function], - "listSuitesForRef": [Function], - "rerequestSuite": [Function], - "setSuitesPreferences": [Function], - "update": [Function], - }, - "codeScanning": Object { - "getAlert": [Function], - "listAlertsForRepo": [Function], - }, - "codesOfConduct": Object { - "getAllCodesOfConduct": [Function], - "getConductCode": [Function], - "getForRepo": [Function], - "listConductCodes": [Function], - }, - "emojis": Object { - "get": [Function], - }, - "gists": Object { - "checkIsStarred": [Function], - "create": [Function], - "createComment": [Function], - "delete": [Function], - "deleteComment": [Function], - "fork": [Function], - "get": [Function], - "getComment": [Function], - "getRevision": [Function], - "list": [Function], - "listComments": [Function], - "listCommits": [Function], - "listForUser": [Function], - "listForks": [Function], - "listPublic": [Function], - "listPublicForUser": [Function], - "listStarred": [Function], - "star": [Function], - "unstar": [Function], - "update": [Function], - "updateComment": [Function], - }, - "git": Object { - "createBlob": [Function], - "createCommit": [Function], - "createRef": [Function], - "createTag": [Function], - "createTree": [Function], - "deleteRef": [Function], - "getBlob": [Function], - "getCommit": [Function], - "getRef": [Function], - "getTag": [Function], - "getTree": [Function], - "listMatchingRefs": [Function], - "updateRef": [Function], - }, - "gitignore": Object { - "getAllTemplates": [Function], - "getTemplate": [Function], - "listTemplates": [Function], - }, - "graphql": [Function], - "hook": [Function], - "interactions": Object { - "addOrUpdateRestrictionsForOrg": [Function], - "addOrUpdateRestrictionsForRepo": [Function], - "getRestrictionsForOrg": [Function], - "getRestrictionsForRepo": [Function], - "removeRestrictionsForOrg": [Function], - "removeRestrictionsForRepo": [Function], - "setRestrictionsForOrg": [Function], - "setRestrictionsForRepo": [Function], - }, - "issues": Object { - "addAssignees": [Function], - "addLabels": [Function], - "checkAssignee": [Function], - "checkUserCanBeAssigned": [Function], - "create": [Function], - "createComment": [Function], - "createLabel": [Function], - "createMilestone": [Function], - "deleteComment": [Function], - "deleteLabel": [Function], - "deleteMilestone": [Function], - "get": [Function], - "getComment": [Function], - "getEvent": [Function], - "getLabel": [Function], - "getMilestone": [Function], - "list": [Function], - "listAssignees": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listEvents": [Function], - "listEventsForRepo": [Function], - "listEventsForTimeline": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listLabelsForMilestone": [Function], - "listLabelsForRepo": [Function], - "listLabelsOnIssue": [Function], - "listMilestones": [Function], - "listMilestonesForRepo": [Function], - "lock": [Function], - "removeAllLabels": [Function], - "removeAssignees": [Function], - "removeLabel": [Function], - "removeLabels": [Function], - "replaceAllLabels": [Function], - "replaceLabels": [Function], - "setLabels": [Function], - "unlock": [Function], - "update": [Function], - "updateComment": [Function], - "updateLabel": [Function], - "updateMilestone": [Function], - }, - "licenses": Object { - "get": [Function], - "getAllCommonlyUsed": [Function], - "getForRepo": [Function], - "listCommonlyUsed": [Function], - }, - "log": Object { - "debug": [Function], - "error": [Function], - "info": [Function], - "warn": [Function], - }, - "markdown": Object { - "render": [Function], - "renderRaw": [Function], - }, - "meta": Object { - "get": [Function], - }, - "migrations": Object { - "cancelImport": [Function], - "deleteArchiveForAuthenticatedUser": [Function], - "deleteArchiveForOrg": [Function], - "downloadArchiveForOrg": [Function], - "getArchiveForAuthenticatedUser": [Function], - "getCommitAuthors": [Function], - "getImportProgress": [Function], - "getImportStatus": [Function], - "getLargeFiles": [Function], - "getStatusForAuthenticatedUser": [Function], - "getStatusForOrg": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listReposForOrg": [Function], - "listReposForUser": [Function], - "mapCommitAuthor": [Function], - "setLfsPreference": [Function], - "startForAuthenticatedUser": [Function], - "startForOrg": [Function], - "startImport": [Function], - "unlockRepoForAuthenticatedUser": [Function], - "unlockRepoForOrg": [Function], - "updateImport": [Function], - }, - "orgs": Object { - "addOrUpdateMembership": [Function], - "blockUser": [Function], - "checkBlockedUser": [Function], - "checkMembership": [Function], - "checkMembershipForUser": [Function], - "checkPublicMembership": [Function], - "checkPublicMembershipForUser": [Function], - "concealMembership": [Function], - "convertMemberToOutsideCollaborator": [Function], - "createHook": [Function], - "createInvitation": [Function], - "createWebhook": [Function], - "deleteHook": [Function], - "deleteWebhook": [Function], - "get": [Function], - "getHook": [Function], - "getMembership": [Function], - "getMembershipForAuthenticatedUser": [Function], - "getMembershipForUser": [Function], - "getWebhook": [Function], - "list": [Function], - "listAppInstallations": [Function], - "listBlockedUsers": [Function], - "listForAuthenticatedUser": [Function], - "listForUser": [Function], - "listHooks": [Function], - "listInstallations": [Function], - "listInvitationTeams": [Function], - "listMembers": [Function], - "listMemberships": [Function], - "listMembershipsForAuthenticatedUser": [Function], - "listOutsideCollaborators": [Function], - "listPendingInvitations": [Function], - "listPublicMembers": [Function], - "listWebhooks": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "publicizeMembership": [Function], - "removeMember": [Function], - "removeMembership": [Function], - "removeMembershipForUser": [Function], - "removeOutsideCollaborator": [Function], - "removePublicMembershipForAuthenticatedUser": [Function], - "setMembershipForUser": [Function], - "setPublicMembershipForAuthenticatedUser": [Function], - "unblockUser": [Function], - "update": [Function], - "updateHook": [Function], - "updateMembership": [Function], - "updateMembershipForAuthenticatedUser": [Function], - "updateWebhook": [Function], - }, - "paginate": [Function], - "projects": Object { - "addCollaborator": [Function], - "createCard": [Function], - "createColumn": [Function], - "createForAuthenticatedUser": [Function], - "createForOrg": [Function], - "createForRepo": [Function], - "delete": [Function], - "deleteCard": [Function], - "deleteColumn": [Function], - "get": [Function], - "getCard": [Function], - "getColumn": [Function], - "getPermissionForUser": [Function], - "listCards": [Function], - "listCollaborators": [Function], - "listColumns": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listForUser": [Function], - "moveCard": [Function], - "moveColumn": [Function], - "removeCollaborator": [Function], - "reviewUserPermissionLevel": [Function], - "update": [Function], - "updateCard": [Function], - "updateColumn": [Function], - }, - "pulls": Object { - "checkIfMerged": [Function], - "create": [Function], - "createComment": [Function], - "createReplyForReviewComment": [Function], - "createReview": [Function], - "createReviewComment": [Function], - "createReviewCommentReply": [Function], - "createReviewRequest": [Function], - "deleteComment": [Function], - "deletePendingReview": [Function], - "deleteReviewComment": [Function], - "deleteReviewRequest": [Function], - "dismissReview": [Function], - "get": [Function], - "getComment": [Function], - "getCommentsForReview": [Function], - "getReview": [Function], - "getReviewComment": [Function], - "list": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listCommentsForReview": [Function], - "listCommits": [Function], - "listFiles": [Function], - "listRequestedReviewers": [Function], - "listReviewComments": [Function], - "listReviewCommentsForRepo": [Function], - "listReviewRequests": [Function], - "listReviews": [Function], - "merge": [Function], - "removeRequestedReviewers": [Function], - "requestReviewers": [Function], - "submitReview": [Function], - "update": [Function], - "updateBranch": [Function], - "updateComment": [Function], - "updateReview": [Function], - "updateReviewComment": [Function], - }, - "rateLimit": Object { - "get": [Function], - }, - "reactions": Object { - "createForCommitComment": [Function], - "createForIssue": [Function], - "createForIssueComment": [Function], - "createForPullRequestReviewComment": [Function], - "createForTeamDiscussionCommentInOrg": [Function], - "createForTeamDiscussionInOrg": [Function], - "delete": [Function], - "deleteForCommitComment": [Function], - "deleteForIssue": [Function], - "deleteForIssueComment": [Function], - "deleteForPullRequestComment": [Function], - "deleteForTeamDiscussion": [Function], - "deleteForTeamDiscussionComment": [Function], - "deleteLegacy": [Function], - "listForCommitComment": [Function], - "listForIssue": [Function], - "listForIssueComment": [Function], - "listForPullRequestReviewComment": [Function], - "listForTeamDiscussionCommentInOrg": [Function], - "listForTeamDiscussionInOrg": [Function], - }, - "repos": Object { - "acceptInvitation": [Function], - "addAppAccessRestrictions": [Function], - "addCollaborator": [Function], - "addDeployKey": [Function], - "addProtectedBranchAdminEnforcement": [Function], - "addProtectedBranchAppRestrictions": [Function], - "addProtectedBranchRequiredSignatures": [Function], - "addProtectedBranchRequiredStatusChecksContexts": [Function], - "addProtectedBranchTeamRestrictions": [Function], - "addProtectedBranchUserRestrictions": [Function], - "addStatusCheckContexts": [Function], - "addTeamAccessRestrictions": [Function], - "addUserAccessRestrictions": [Function], - "checkCollaborator": [Function], - "checkVulnerabilityAlerts": [Function], - "compareCommits": [Function], - "createCommitComment": [Function], - "createCommitSignatureProtection": [Function], - "createCommitStatus": [Function], - "createDeployKey": [Function], - "createDeployment": [Function], - "createDeploymentStatus": [Function], - "createDispatchEvent": [Function], - "createForAuthenticatedUser": [Function], - "createFork": [Function], - "createHook": [Function], - "createInOrg": [Function], - "createOrUpdateFile": [Function], - "createOrUpdateFileContents": [Function], - "createPagesSite": [Function], - "createRelease": [Function], - "createStatus": [Function], - "createUsingTemplate": [Function], - "createWebhook": [Function], - "declineInvitation": [Function], - "delete": [Function], - "deleteAccessRestrictions": [Function], - "deleteAdminBranchProtection": [Function], - "deleteBranchProtection": [Function], - "deleteCommitComment": [Function], - "deleteCommitSignatureProtection": [Function], - "deleteDeployKey": [Function], - "deleteDeployment": [Function], - "deleteDownload": [Function], - "deleteFile": [Function], - "deleteHook": [Function], - "deleteInvitation": [Function], - "deletePagesSite": [Function], - "deletePullRequestReviewProtection": [Function], - "deleteRelease": [Function], - "deleteReleaseAsset": [Function], - "deleteWebhook": [Function], - "disableAutomatedSecurityFixes": [Function], - "disablePagesSite": [Function], - "disableVulnerabilityAlerts": [Function], - "downloadArchive": [Function], - "enableAutomatedSecurityFixes": [Function], - "enablePagesSite": [Function], - "enableVulnerabilityAlerts": [Function], - "get": [Function], - "getAccessRestrictions": [Function], - "getAdminBranchProtection": [Function], - "getAllStatusCheckContexts": [Function], - "getAllTopics": [Function], - "getAppsWithAccessToProtectedBranch": [Function], - "getArchiveLink": [Function], - "getBranch": [Function], - "getBranchProtection": [Function], - "getClones": [Function], - "getCodeFrequencyStats": [Function], - "getCollaboratorPermissionLevel": [Function], - "getCombinedStatusForRef": [Function], - "getCommit": [Function], - "getCommitActivityStats": [Function], - "getCommitComment": [Function], - "getCommitSignatureProtection": [Function], - "getCommunityProfileMetrics": [Function], - "getContent": [Function], - "getContents": [Function], - "getContributorsStats": [Function], - "getDeployKey": [Function], - "getDeployment": [Function], - "getDeploymentStatus": [Function], - "getDownload": [Function], - "getHook": [Function], - "getLatestPagesBuild": [Function], - "getLatestRelease": [Function], - "getPages": [Function], - "getPagesBuild": [Function], - "getParticipationStats": [Function], - "getProtectedBranchAdminEnforcement": [Function], - "getProtectedBranchPullRequestReviewEnforcement": [Function], - "getProtectedBranchRequiredSignatures": [Function], - "getProtectedBranchRequiredStatusChecks": [Function], - "getProtectedBranchRestrictions": [Function], - "getPullRequestReviewProtection": [Function], - "getPunchCardStats": [Function], - "getReadme": [Function], - "getRelease": [Function], - "getReleaseAsset": [Function], - "getReleaseByTag": [Function], - "getStatusChecksProtection": [Function], - "getTeamsWithAccessToProtectedBranch": [Function], - "getTopPaths": [Function], - "getTopReferrers": [Function], - "getUsersWithAccessToProtectedBranch": [Function], - "getViews": [Function], - "getWebhook": [Function], - "list": [Function], - "listAssetsForRelease": [Function], - "listBranches": [Function], - "listBranchesForHeadCommit": [Function], - "listCollaborators": [Function], - "listCommentsForCommit": [Function], - "listCommitComments": [Function], - "listCommitCommentsForRepo": [Function], - "listCommitStatusesForRef": [Function], - "listCommits": [Function], - "listContributors": [Function], - "listDeployKeys": [Function], - "listDeploymentStatuses": [Function], - "listDeployments": [Function], - "listDownloads": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForUser": [Function], - "listForks": [Function], - "listHooks": [Function], - "listInvitations": [Function], - "listInvitationsForAuthenticatedUser": [Function], - "listLanguages": [Function], - "listPagesBuilds": [Function], - "listProtectedBranchRequiredStatusChecksContexts": [Function], - "listPublic": [Function], - "listPullRequestsAssociatedWithCommit": [Function], - "listReleaseAssets": [Function], - "listReleases": [Function], - "listStatusesForRef": [Function], - "listTags": [Function], - "listTeams": [Function], - "listTopics": [Function], - "listWebhooks": [Function], - "merge": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "removeAppAccessRestrictions": [Function], - "removeBranchProtection": [Function], - "removeCollaborator": [Function], - "removeDeployKey": [Function], - "removeProtectedBranchAdminEnforcement": [Function], - "removeProtectedBranchAppRestrictions": [Function], - "removeProtectedBranchPullRequestReviewEnforcement": [Function], - "removeProtectedBranchRequiredSignatures": [Function], - "removeProtectedBranchRequiredStatusChecks": [Function], - "removeProtectedBranchRequiredStatusChecksContexts": [Function], - "removeProtectedBranchRestrictions": [Function], - "removeProtectedBranchTeamRestrictions": [Function], - "removeProtectedBranchUserRestrictions": [Function], - "removeStatusCheckContexts": [Function], - "removeStatusCheckProtection": [Function], - "removeTeamAccessRestrictions": [Function], - "removeUserAccessRestrictions": [Function], - "replaceAllTopics": [Function], - "replaceProtectedBranchAppRestrictions": [Function], - "replaceProtectedBranchRequiredStatusChecksContexts": [Function], - "replaceProtectedBranchTeamRestrictions": [Function], - "replaceProtectedBranchUserRestrictions": [Function], - "replaceTopics": [Function], - "requestPageBuild": [Function], - "requestPagesBuild": [Function], - "retrieveCommunityProfileMetrics": [Function], - "setAdminBranchProtection": [Function], - "setAppAccessRestrictions": [Function], - "setStatusCheckContexts": [Function], - "setTeamAccessRestrictions": [Function], - "setUserAccessRestrictions": [Function], - "testPushHook": [Function], - "testPushWebhook": [Function], - "transfer": [Function], - "update": [Function], - "updateBranchProtection": [Function], - "updateCommitComment": [Function], - "updateHook": [Function], - "updateInformationAboutPagesSite": [Function], - "updateInvitation": [Function], - "updateProtectedBranchPullRequestReviewEnforcement": [Function], - "updateProtectedBranchRequiredStatusChecks": [Function], - "updatePullRequestReviewProtection": [Function], - "updateRelease": [Function], - "updateReleaseAsset": [Function], - "updateStatusCheckPotection": [Function], - "updateWebhook": [Function], - "uploadReleaseAsset": [Function], - }, - "request": [Function], - "search": Object { - "code": [Function], - "commits": [Function], - "issuesAndPullRequests": [Function], - "labels": [Function], - "repos": [Function], - "topics": [Function], - "users": [Function], - }, - "teams": Object { - "addOrUpdateMembershipForUserInOrg": [Function], - "addOrUpdateMembershipInOrg": [Function], - "addOrUpdateProjectInOrg": [Function], - "addOrUpdateProjectPermissionsInOrg": [Function], - "addOrUpdateRepoInOrg": [Function], - "addOrUpdateRepoPermissionsInOrg": [Function], - "checkManagesRepoInOrg": [Function], - "checkPermissionsForProjectInOrg": [Function], - "checkPermissionsForRepoInOrg": [Function], - "create": [Function], - "createDiscussionCommentInOrg": [Function], - "createDiscussionInOrg": [Function], - "deleteDiscussionCommentInOrg": [Function], - "deleteDiscussionInOrg": [Function], - "deleteInOrg": [Function], - "getByName": [Function], - "getDiscussionCommentInOrg": [Function], - "getDiscussionInOrg": [Function], - "getMembershipForUserInOrg": [Function], - "getMembershipInOrg": [Function], - "list": [Function], - "listChildInOrg": [Function], - "listDiscussionCommentsInOrg": [Function], - "listDiscussionsInOrg": [Function], - "listForAuthenticatedUser": [Function], - "listMembersInOrg": [Function], - "listPendingInvitationsInOrg": [Function], - "listProjectsInOrg": [Function], - "listReposInOrg": [Function], - "removeMembershipForUserInOrg": [Function], - "removeMembershipInOrg": [Function], - "removeProjectInOrg": [Function], - "removeRepoInOrg": [Function], - "reviewProjectInOrg": [Function], - "updateDiscussionCommentInOrg": [Function], - "updateDiscussionInOrg": [Function], - "updateInOrg": [Function], - }, - "users": Object { - "addEmailForAuthenticated": [Function], - "addEmails": [Function], - "block": [Function], - "checkBlocked": [Function], - "checkFollowing": [Function], - "checkFollowingForUser": [Function], - "checkPersonIsFollowedByAuthenticated": [Function], - "createGpgKey": [Function], - "createGpgKeyForAuthenticated": [Function], - "createPublicKey": [Function], - "createPublicSshKeyForAuthenticated": [Function], - "deleteEmailForAuthenticated": [Function], - "deleteEmails": [Function], - "deleteGpgKey": [Function], - "deleteGpgKeyForAuthenticated": [Function], - "deletePublicKey": [Function], - "deletePublicSshKeyForAuthenticated": [Function], - "follow": [Function], - "getAuthenticated": [Function], - "getByUsername": [Function], - "getContextForUser": [Function], - "getGpgKey": [Function], - "getGpgKeyForAuthenticated": [Function], - "getPublicKey": [Function], - "getPublicSshKeyForAuthenticated": [Function], - "list": [Function], - "listBlocked": [Function], - "listBlockedByAuthenticated": [Function], - "listEmails": [Function], - "listEmailsForAuthenticated": [Function], - "listFollowedByAuthenticated": [Function], - "listFollowersForAuthenticatedUser": [Function], - "listFollowersForUser": [Function], - "listFollowingForAuthenticatedUser": [Function], - "listFollowingForUser": [Function], - "listGpgKeys": [Function], - "listGpgKeysForAuthenticated": [Function], - "listGpgKeysForUser": [Function], - "listPublicEmails": [Function], - "listPublicEmailsForAuthenticated": [Function], - "listPublicKeys": [Function], - "listPublicKeysForUser": [Function], - "listPublicSshKeysForAuthenticated": [Function], - "setPrimaryEmailVisibilityForAuthenticated": [Function], - "togglePrimaryEmailVisibility": [Function], - "unblock": [Function], - "unfollow": [Function], - "updateAuthenticated": [Function], - }, - }, - }, - "gitHubContentProvider": GitHubContentProvider { - "params": Object { - "gitHubClient": GitHubClient { - "errorCallback": [Function], - "ocktokit": OctokitWithDefaults { - "actions": Object { - "addSelectedRepoToOrgSecret": [Function], - "cancelWorkflowRun": [Function], - "createOrUpdateOrgSecret": [Function], - "createOrUpdateRepoSecret": [Function], - "createOrUpdateSecretForRepo": [Function], - "createRegistrationToken": [Function], - "createRegistrationTokenForOrg": [Function], - "createRegistrationTokenForRepo": [Function], - "createRemoveToken": [Function], - "createRemoveTokenForOrg": [Function], - "createRemoveTokenForRepo": [Function], - "deleteArtifact": [Function], - "deleteOrgSecret": [Function], - "deleteRepoSecret": [Function], - "deleteSecretFromRepo": [Function], - "deleteSelfHostedRunnerFromOrg": [Function], - "deleteSelfHostedRunnerFromRepo": [Function], - "deleteWorkflowRunLogs": [Function], - "downloadArtifact": [Function], - "downloadJobLogsForWorkflowRun": [Function], - "downloadWorkflowJobLogs": [Function], - "downloadWorkflowRunLogs": [Function], - "getArtifact": [Function], - "getJobForWorkflowRun": [Function], - "getOrgPublicKey": [Function], - "getOrgSecret": [Function], - "getPublicKey": [Function], - "getRepoPublicKey": [Function], - "getRepoSecret": [Function], - "getSecret": [Function], - "getSelfHostedRunner": [Function], - "getSelfHostedRunnerForOrg": [Function], - "getSelfHostedRunnerForRepo": [Function], - "getWorkflow": [Function], - "getWorkflowJob": [Function], - "getWorkflowRun": [Function], - "getWorkflowRunUsage": [Function], - "getWorkflowUsage": [Function], - "listArtifactsForRepo": [Function], - "listDownloadsForSelfHostedRunnerApplication": [Function], - "listJobsForWorkflowRun": [Function], - "listOrgSecrets": [Function], - "listRepoSecrets": [Function], - "listRepoWorkflowRuns": [Function], - "listRepoWorkflows": [Function], - "listRunnerApplicationsForOrg": [Function], - "listRunnerApplicationsForRepo": [Function], - "listSecretsForRepo": [Function], - "listSelectedReposForOrgSecret": [Function], - "listSelfHostedRunnersForOrg": [Function], - "listSelfHostedRunnersForRepo": [Function], - "listWorkflowJobLogs": [Function], - "listWorkflowRunArtifacts": [Function], - "listWorkflowRunLogs": [Function], - "listWorkflowRuns": [Function], - "listWorkflowRunsForRepo": [Function], - "reRunWorkflow": [Function], - "removeSelectedRepoFromOrgSecret": [Function], - "removeSelfHostedRunner": [Function], - "setSelectedReposForOrgSecret": [Function], - }, - "activity": Object { - "checkRepoIsStarredByAuthenticatedUser": [Function], - "checkStarringRepo": [Function], - "deleteRepoSubscription": [Function], - "deleteThreadSubscription": [Function], - "getFeeds": [Function], - "getRepoSubscription": [Function], - "getThread": [Function], - "getThreadSubscription": [Function], - "getThreadSubscriptionForAuthenticatedUser": [Function], - "listEventsForAuthenticatedUser": [Function], - "listEventsForOrg": [Function], - "listEventsForUser": [Function], - "listFeeds": [Function], - "listNotifications": [Function], - "listNotificationsForAuthenticatedUser": [Function], - "listNotificationsForRepo": [Function], - "listOrgEventsForAuthenticatedUser": [Function], - "listPublicEvents": [Function], - "listPublicEventsForOrg": [Function], - "listPublicEventsForRepoNetwork": [Function], - "listPublicEventsForUser": [Function], - "listPublicOrgEvents": [Function], - "listReceivedEventsForUser": [Function], - "listReceivedPublicEventsForUser": [Function], - "listRepoEvents": [Function], - "listRepoNotificationsForAuthenticatedUser": [Function], - "listReposStarredByAuthenticatedUser": [Function], - "listReposStarredByUser": [Function], - "listReposWatchedByUser": [Function], - "listStargazersForRepo": [Function], - "listWatchedReposForAuthenticatedUser": [Function], - "listWatchersForRepo": [Function], - "markAsRead": [Function], - "markNotificationsAsRead": [Function], - "markNotificationsAsReadForRepo": [Function], - "markRepoNotificationsAsRead": [Function], - "markThreadAsRead": [Function], - "setRepoSubscription": [Function], - "setThreadSubscription": [Function], - "starRepo": [Function], - "starRepoForAuthenticatedUser": [Function], - "unstarRepo": [Function], - "unstarRepoForAuthenticatedUser": [Function], - }, - "apps": Object { - "addRepoToInstallation": [Function], - "checkAccountIsAssociatedWithAny": [Function], - "checkAccountIsAssociatedWithAnyStubbed": [Function], - "checkToken": [Function], - "createContentAttachment": [Function], - "createFromManifest": [Function], - "createInstallationAccessToken": [Function], - "createInstallationToken": [Function], - "deleteAuthorization": [Function], - "deleteInstallation": [Function], - "deleteToken": [Function], - "getAuthenticated": [Function], - "getBySlug": [Function], - "getInstallation": [Function], - "getOrgInstallation": [Function], - "getRepoInstallation": [Function], - "getSubscriptionPlanForAccount": [Function], - "getSubscriptionPlanForAccountStubbed": [Function], - "getUserInstallation": [Function], - "listAccountsForPlan": [Function], - "listAccountsForPlanStubbed": [Function], - "listAccountsUserOrOrgOnPlan": [Function], - "listAccountsUserOrOrgOnPlanStubbed": [Function], - "listInstallationReposForAuthenticatedUser": [Function], - "listInstallations": [Function], - "listInstallationsForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUser": [Function], - "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], - "listPlans": [Function], - "listPlansStubbed": [Function], - "listRepos": [Function], - "listReposAccessibleToInstallation": [Function], - "listSubscriptionsForAuthenticatedUser": [Function], - "listSubscriptionsForAuthenticatedUserStubbed": [Function], - "removeRepoFromInstallation": [Function], - "resetToken": [Function], - "revokeInstallationAccessToken": [Function], - "revokeInstallationToken": [Function], - "suspendInstallation": [Function], - "unsuspendInstallation": [Function], - }, - "auth": [Function], - "checks": Object { - "create": [Function], - "createSuite": [Function], - "get": [Function], - "getSuite": [Function], - "listAnnotations": [Function], - "listForRef": [Function], - "listForSuite": [Function], - "listSuitesForRef": [Function], - "rerequestSuite": [Function], - "setSuitesPreferences": [Function], - "update": [Function], - }, - "codeScanning": Object { - "getAlert": [Function], - "listAlertsForRepo": [Function], - }, - "codesOfConduct": Object { - "getAllCodesOfConduct": [Function], - "getConductCode": [Function], - "getForRepo": [Function], - "listConductCodes": [Function], - }, - "emojis": Object { - "get": [Function], - }, - "gists": Object { - "checkIsStarred": [Function], - "create": [Function], - "createComment": [Function], - "delete": [Function], - "deleteComment": [Function], - "fork": [Function], - "get": [Function], - "getComment": [Function], - "getRevision": [Function], - "list": [Function], - "listComments": [Function], - "listCommits": [Function], - "listForUser": [Function], - "listForks": [Function], - "listPublic": [Function], - "listPublicForUser": [Function], - "listStarred": [Function], - "star": [Function], - "unstar": [Function], - "update": [Function], - "updateComment": [Function], - }, - "git": Object { - "createBlob": [Function], - "createCommit": [Function], - "createRef": [Function], - "createTag": [Function], - "createTree": [Function], - "deleteRef": [Function], - "getBlob": [Function], - "getCommit": [Function], - "getRef": [Function], - "getTag": [Function], - "getTree": [Function], - "listMatchingRefs": [Function], - "updateRef": [Function], - }, - "gitignore": Object { - "getAllTemplates": [Function], - "getTemplate": [Function], - "listTemplates": [Function], - }, - "graphql": [Function], - "hook": [Function], - "interactions": Object { - "addOrUpdateRestrictionsForOrg": [Function], - "addOrUpdateRestrictionsForRepo": [Function], - "getRestrictionsForOrg": [Function], - "getRestrictionsForRepo": [Function], - "removeRestrictionsForOrg": [Function], - "removeRestrictionsForRepo": [Function], - "setRestrictionsForOrg": [Function], - "setRestrictionsForRepo": [Function], - }, - "issues": Object { - "addAssignees": [Function], - "addLabels": [Function], - "checkAssignee": [Function], - "checkUserCanBeAssigned": [Function], - "create": [Function], - "createComment": [Function], - "createLabel": [Function], - "createMilestone": [Function], - "deleteComment": [Function], - "deleteLabel": [Function], - "deleteMilestone": [Function], - "get": [Function], - "getComment": [Function], - "getEvent": [Function], - "getLabel": [Function], - "getMilestone": [Function], - "list": [Function], - "listAssignees": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listEvents": [Function], - "listEventsForRepo": [Function], - "listEventsForTimeline": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listLabelsForMilestone": [Function], - "listLabelsForRepo": [Function], - "listLabelsOnIssue": [Function], - "listMilestones": [Function], - "listMilestonesForRepo": [Function], - "lock": [Function], - "removeAllLabels": [Function], - "removeAssignees": [Function], - "removeLabel": [Function], - "removeLabels": [Function], - "replaceAllLabels": [Function], - "replaceLabels": [Function], - "setLabels": [Function], - "unlock": [Function], - "update": [Function], - "updateComment": [Function], - "updateLabel": [Function], - "updateMilestone": [Function], - }, - "licenses": Object { - "get": [Function], - "getAllCommonlyUsed": [Function], - "getForRepo": [Function], - "listCommonlyUsed": [Function], - }, - "log": Object { - "debug": [Function], - "error": [Function], - "info": [Function], - "warn": [Function], - }, - "markdown": Object { - "render": [Function], - "renderRaw": [Function], - }, - "meta": Object { - "get": [Function], - }, - "migrations": Object { - "cancelImport": [Function], - "deleteArchiveForAuthenticatedUser": [Function], - "deleteArchiveForOrg": [Function], - "downloadArchiveForOrg": [Function], - "getArchiveForAuthenticatedUser": [Function], - "getCommitAuthors": [Function], - "getImportProgress": [Function], - "getImportStatus": [Function], - "getLargeFiles": [Function], - "getStatusForAuthenticatedUser": [Function], - "getStatusForOrg": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listReposForOrg": [Function], - "listReposForUser": [Function], - "mapCommitAuthor": [Function], - "setLfsPreference": [Function], - "startForAuthenticatedUser": [Function], - "startForOrg": [Function], - "startImport": [Function], - "unlockRepoForAuthenticatedUser": [Function], - "unlockRepoForOrg": [Function], - "updateImport": [Function], - }, - "orgs": Object { - "addOrUpdateMembership": [Function], - "blockUser": [Function], - "checkBlockedUser": [Function], - "checkMembership": [Function], - "checkMembershipForUser": [Function], - "checkPublicMembership": [Function], - "checkPublicMembershipForUser": [Function], - "concealMembership": [Function], - "convertMemberToOutsideCollaborator": [Function], - "createHook": [Function], - "createInvitation": [Function], - "createWebhook": [Function], - "deleteHook": [Function], - "deleteWebhook": [Function], - "get": [Function], - "getHook": [Function], - "getMembership": [Function], - "getMembershipForAuthenticatedUser": [Function], - "getMembershipForUser": [Function], - "getWebhook": [Function], - "list": [Function], - "listAppInstallations": [Function], - "listBlockedUsers": [Function], - "listForAuthenticatedUser": [Function], - "listForUser": [Function], - "listHooks": [Function], - "listInstallations": [Function], - "listInvitationTeams": [Function], - "listMembers": [Function], - "listMemberships": [Function], - "listMembershipsForAuthenticatedUser": [Function], - "listOutsideCollaborators": [Function], - "listPendingInvitations": [Function], - "listPublicMembers": [Function], - "listWebhooks": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "publicizeMembership": [Function], - "removeMember": [Function], - "removeMembership": [Function], - "removeMembershipForUser": [Function], - "removeOutsideCollaborator": [Function], - "removePublicMembershipForAuthenticatedUser": [Function], - "setMembershipForUser": [Function], - "setPublicMembershipForAuthenticatedUser": [Function], - "unblockUser": [Function], - "update": [Function], - "updateHook": [Function], - "updateMembership": [Function], - "updateMembershipForAuthenticatedUser": [Function], - "updateWebhook": [Function], - }, - "paginate": [Function], - "projects": Object { - "addCollaborator": [Function], - "createCard": [Function], - "createColumn": [Function], - "createForAuthenticatedUser": [Function], - "createForOrg": [Function], - "createForRepo": [Function], - "delete": [Function], - "deleteCard": [Function], - "deleteColumn": [Function], - "get": [Function], - "getCard": [Function], - "getColumn": [Function], - "getPermissionForUser": [Function], - "listCards": [Function], - "listCollaborators": [Function], - "listColumns": [Function], - "listForOrg": [Function], - "listForRepo": [Function], - "listForUser": [Function], - "moveCard": [Function], - "moveColumn": [Function], - "removeCollaborator": [Function], - "reviewUserPermissionLevel": [Function], - "update": [Function], - "updateCard": [Function], - "updateColumn": [Function], - }, - "pulls": Object { - "checkIfMerged": [Function], - "create": [Function], - "createComment": [Function], - "createReplyForReviewComment": [Function], - "createReview": [Function], - "createReviewComment": [Function], - "createReviewCommentReply": [Function], - "createReviewRequest": [Function], - "deleteComment": [Function], - "deletePendingReview": [Function], - "deleteReviewComment": [Function], - "deleteReviewRequest": [Function], - "dismissReview": [Function], - "get": [Function], - "getComment": [Function], - "getCommentsForReview": [Function], - "getReview": [Function], - "getReviewComment": [Function], - "list": [Function], - "listComments": [Function], - "listCommentsForRepo": [Function], - "listCommentsForReview": [Function], - "listCommits": [Function], - "listFiles": [Function], - "listRequestedReviewers": [Function], - "listReviewComments": [Function], - "listReviewCommentsForRepo": [Function], - "listReviewRequests": [Function], - "listReviews": [Function], - "merge": [Function], - "removeRequestedReviewers": [Function], - "requestReviewers": [Function], - "submitReview": [Function], - "update": [Function], - "updateBranch": [Function], - "updateComment": [Function], - "updateReview": [Function], - "updateReviewComment": [Function], - }, - "rateLimit": Object { - "get": [Function], - }, - "reactions": Object { - "createForCommitComment": [Function], - "createForIssue": [Function], - "createForIssueComment": [Function], - "createForPullRequestReviewComment": [Function], - "createForTeamDiscussionCommentInOrg": [Function], - "createForTeamDiscussionInOrg": [Function], - "delete": [Function], - "deleteForCommitComment": [Function], - "deleteForIssue": [Function], - "deleteForIssueComment": [Function], - "deleteForPullRequestComment": [Function], - "deleteForTeamDiscussion": [Function], - "deleteForTeamDiscussionComment": [Function], - "deleteLegacy": [Function], - "listForCommitComment": [Function], - "listForIssue": [Function], - "listForIssueComment": [Function], - "listForPullRequestReviewComment": [Function], - "listForTeamDiscussionCommentInOrg": [Function], - "listForTeamDiscussionInOrg": [Function], - }, - "repos": Object { - "acceptInvitation": [Function], - "addAppAccessRestrictions": [Function], - "addCollaborator": [Function], - "addDeployKey": [Function], - "addProtectedBranchAdminEnforcement": [Function], - "addProtectedBranchAppRestrictions": [Function], - "addProtectedBranchRequiredSignatures": [Function], - "addProtectedBranchRequiredStatusChecksContexts": [Function], - "addProtectedBranchTeamRestrictions": [Function], - "addProtectedBranchUserRestrictions": [Function], - "addStatusCheckContexts": [Function], - "addTeamAccessRestrictions": [Function], - "addUserAccessRestrictions": [Function], - "checkCollaborator": [Function], - "checkVulnerabilityAlerts": [Function], - "compareCommits": [Function], - "createCommitComment": [Function], - "createCommitSignatureProtection": [Function], - "createCommitStatus": [Function], - "createDeployKey": [Function], - "createDeployment": [Function], - "createDeploymentStatus": [Function], - "createDispatchEvent": [Function], - "createForAuthenticatedUser": [Function], - "createFork": [Function], - "createHook": [Function], - "createInOrg": [Function], - "createOrUpdateFile": [Function], - "createOrUpdateFileContents": [Function], - "createPagesSite": [Function], - "createRelease": [Function], - "createStatus": [Function], - "createUsingTemplate": [Function], - "createWebhook": [Function], - "declineInvitation": [Function], - "delete": [Function], - "deleteAccessRestrictions": [Function], - "deleteAdminBranchProtection": [Function], - "deleteBranchProtection": [Function], - "deleteCommitComment": [Function], - "deleteCommitSignatureProtection": [Function], - "deleteDeployKey": [Function], - "deleteDeployment": [Function], - "deleteDownload": [Function], - "deleteFile": [Function], - "deleteHook": [Function], - "deleteInvitation": [Function], - "deletePagesSite": [Function], - "deletePullRequestReviewProtection": [Function], - "deleteRelease": [Function], - "deleteReleaseAsset": [Function], - "deleteWebhook": [Function], - "disableAutomatedSecurityFixes": [Function], - "disablePagesSite": [Function], - "disableVulnerabilityAlerts": [Function], - "downloadArchive": [Function], - "enableAutomatedSecurityFixes": [Function], - "enablePagesSite": [Function], - "enableVulnerabilityAlerts": [Function], - "get": [Function], - "getAccessRestrictions": [Function], - "getAdminBranchProtection": [Function], - "getAllStatusCheckContexts": [Function], - "getAllTopics": [Function], - "getAppsWithAccessToProtectedBranch": [Function], - "getArchiveLink": [Function], - "getBranch": [Function], - "getBranchProtection": [Function], - "getClones": [Function], - "getCodeFrequencyStats": [Function], - "getCollaboratorPermissionLevel": [Function], - "getCombinedStatusForRef": [Function], - "getCommit": [Function], - "getCommitActivityStats": [Function], - "getCommitComment": [Function], - "getCommitSignatureProtection": [Function], - "getCommunityProfileMetrics": [Function], - "getContent": [Function], - "getContents": [Function], - "getContributorsStats": [Function], - "getDeployKey": [Function], - "getDeployment": [Function], - "getDeploymentStatus": [Function], - "getDownload": [Function], - "getHook": [Function], - "getLatestPagesBuild": [Function], - "getLatestRelease": [Function], - "getPages": [Function], - "getPagesBuild": [Function], - "getParticipationStats": [Function], - "getProtectedBranchAdminEnforcement": [Function], - "getProtectedBranchPullRequestReviewEnforcement": [Function], - "getProtectedBranchRequiredSignatures": [Function], - "getProtectedBranchRequiredStatusChecks": [Function], - "getProtectedBranchRestrictions": [Function], - "getPullRequestReviewProtection": [Function], - "getPunchCardStats": [Function], - "getReadme": [Function], - "getRelease": [Function], - "getReleaseAsset": [Function], - "getReleaseByTag": [Function], - "getStatusChecksProtection": [Function], - "getTeamsWithAccessToProtectedBranch": [Function], - "getTopPaths": [Function], - "getTopReferrers": [Function], - "getUsersWithAccessToProtectedBranch": [Function], - "getViews": [Function], - "getWebhook": [Function], - "list": [Function], - "listAssetsForRelease": [Function], - "listBranches": [Function], - "listBranchesForHeadCommit": [Function], - "listCollaborators": [Function], - "listCommentsForCommit": [Function], - "listCommitComments": [Function], - "listCommitCommentsForRepo": [Function], - "listCommitStatusesForRef": [Function], - "listCommits": [Function], - "listContributors": [Function], - "listDeployKeys": [Function], - "listDeploymentStatuses": [Function], - "listDeployments": [Function], - "listDownloads": [Function], - "listForAuthenticatedUser": [Function], - "listForOrg": [Function], - "listForUser": [Function], - "listForks": [Function], - "listHooks": [Function], - "listInvitations": [Function], - "listInvitationsForAuthenticatedUser": [Function], - "listLanguages": [Function], - "listPagesBuilds": [Function], - "listProtectedBranchRequiredStatusChecksContexts": [Function], - "listPublic": [Function], - "listPullRequestsAssociatedWithCommit": [Function], - "listReleaseAssets": [Function], - "listReleases": [Function], - "listStatusesForRef": [Function], - "listTags": [Function], - "listTeams": [Function], - "listTopics": [Function], - "listWebhooks": [Function], - "merge": [Function], - "pingHook": [Function], - "pingWebhook": [Function], - "removeAppAccessRestrictions": [Function], - "removeBranchProtection": [Function], - "removeCollaborator": [Function], - "removeDeployKey": [Function], - "removeProtectedBranchAdminEnforcement": [Function], - "removeProtectedBranchAppRestrictions": [Function], - "removeProtectedBranchPullRequestReviewEnforcement": [Function], - "removeProtectedBranchRequiredSignatures": [Function], - "removeProtectedBranchRequiredStatusChecks": [Function], - "removeProtectedBranchRequiredStatusChecksContexts": [Function], - "removeProtectedBranchRestrictions": [Function], - "removeProtectedBranchTeamRestrictions": [Function], - "removeProtectedBranchUserRestrictions": [Function], - "removeStatusCheckContexts": [Function], - "removeStatusCheckProtection": [Function], - "removeTeamAccessRestrictions": [Function], - "removeUserAccessRestrictions": [Function], - "replaceAllTopics": [Function], - "replaceProtectedBranchAppRestrictions": [Function], - "replaceProtectedBranchRequiredStatusChecksContexts": [Function], - "replaceProtectedBranchTeamRestrictions": [Function], - "replaceProtectedBranchUserRestrictions": [Function], - "replaceTopics": [Function], - "requestPageBuild": [Function], - "requestPagesBuild": [Function], - "retrieveCommunityProfileMetrics": [Function], - "setAdminBranchProtection": [Function], - "setAppAccessRestrictions": [Function], - "setStatusCheckContexts": [Function], - "setTeamAccessRestrictions": [Function], - "setUserAccessRestrictions": [Function], - "testPushHook": [Function], - "testPushWebhook": [Function], - "transfer": [Function], - "update": [Function], - "updateBranchProtection": [Function], - "updateCommitComment": [Function], - "updateHook": [Function], - "updateInformationAboutPagesSite": [Function], - "updateInvitation": [Function], - "updateProtectedBranchPullRequestReviewEnforcement": [Function], - "updateProtectedBranchRequiredStatusChecks": [Function], - "updatePullRequestReviewProtection": [Function], - "updateRelease": [Function], - "updateReleaseAsset": [Function], - "updateStatusCheckPotection": [Function], - "updateWebhook": [Function], - "uploadReleaseAsset": [Function], - }, - "request": [Function], - "search": Object { - "code": [Function], - "commits": [Function], - "issuesAndPullRequests": [Function], - "labels": [Function], - "repos": [Function], - "topics": [Function], - "users": [Function], - }, - "teams": Object { - "addOrUpdateMembershipForUserInOrg": [Function], - "addOrUpdateMembershipInOrg": [Function], - "addOrUpdateProjectInOrg": [Function], - "addOrUpdateProjectPermissionsInOrg": [Function], - "addOrUpdateRepoInOrg": [Function], - "addOrUpdateRepoPermissionsInOrg": [Function], - "checkManagesRepoInOrg": [Function], - "checkPermissionsForProjectInOrg": [Function], - "checkPermissionsForRepoInOrg": [Function], - "create": [Function], - "createDiscussionCommentInOrg": [Function], - "createDiscussionInOrg": [Function], - "deleteDiscussionCommentInOrg": [Function], - "deleteDiscussionInOrg": [Function], - "deleteInOrg": [Function], - "getByName": [Function], - "getDiscussionCommentInOrg": [Function], - "getDiscussionInOrg": [Function], - "getMembershipForUserInOrg": [Function], - "getMembershipInOrg": [Function], - "list": [Function], - "listChildInOrg": [Function], - "listDiscussionCommentsInOrg": [Function], - "listDiscussionsInOrg": [Function], - "listForAuthenticatedUser": [Function], - "listMembersInOrg": [Function], - "listPendingInvitationsInOrg": [Function], - "listProjectsInOrg": [Function], - "listReposInOrg": [Function], - "removeMembershipForUserInOrg": [Function], - "removeMembershipInOrg": [Function], - "removeProjectInOrg": [Function], - "removeRepoInOrg": [Function], - "reviewProjectInOrg": [Function], - "updateDiscussionCommentInOrg": [Function], - "updateDiscussionInOrg": [Function], - "updateInOrg": [Function], - }, - "users": Object { - "addEmailForAuthenticated": [Function], - "addEmails": [Function], - "block": [Function], - "checkBlocked": [Function], - "checkFollowing": [Function], - "checkFollowingForUser": [Function], - "checkPersonIsFollowedByAuthenticated": [Function], - "createGpgKey": [Function], - "createGpgKeyForAuthenticated": [Function], - "createPublicKey": [Function], - "createPublicSshKeyForAuthenticated": [Function], - "deleteEmailForAuthenticated": [Function], - "deleteEmails": [Function], - "deleteGpgKey": [Function], - "deleteGpgKeyForAuthenticated": [Function], - "deletePublicKey": [Function], - "deletePublicSshKeyForAuthenticated": [Function], - "follow": [Function], - "getAuthenticated": [Function], - "getByUsername": [Function], - "getContextForUser": [Function], - "getGpgKey": [Function], - "getGpgKeyForAuthenticated": [Function], - "getPublicKey": [Function], - "getPublicSshKeyForAuthenticated": [Function], - "list": [Function], - "listBlocked": [Function], - "listBlockedByAuthenticated": [Function], - "listEmails": [Function], - "listEmailsForAuthenticated": [Function], - "listFollowedByAuthenticated": [Function], - "listFollowersForAuthenticatedUser": [Function], - "listFollowersForUser": [Function], - "listFollowingForAuthenticatedUser": [Function], - "listFollowingForUser": [Function], - "listGpgKeys": [Function], - "listGpgKeysForAuthenticated": [Function], - "listGpgKeysForUser": [Function], - "listPublicEmails": [Function], - "listPublicEmailsForAuthenticated": [Function], - "listPublicKeys": [Function], - "listPublicKeysForUser": [Function], - "listPublicSshKeysForAuthenticated": [Function], - "setPrimaryEmailVisibilityForAuthenticated": [Function], - "togglePrimaryEmailVisibility": [Function], - "unblock": [Function], - "unfollow": [Function], - "updateAuthenticated": [Function], - }, - }, - }, - "promptForCommitMsg": [Function], - }, - }, - "gitHubOAuthService": GitHubOAuthService { - "junoClient": JunoClient { - "cachedPinnedRepos": [Function], - }, - "token": [Function], - }, - "inMemoryContentProvider": InMemoryContentProvider { - "params": Object { - "memory://schema-analyzer-component-notebook.ipynb": Object { - "content": Object { - "content": Object { - "cells": Array [ - Object { - "cell_type": "code", - "execution_count": 0, - "metadata": Object {}, - "outputs": Array [], - "source": "", - }, - ], - "metadata": Object { - "kernelspec": Object { - "displayName": "Mongo", - "language": "mongocli", - "name": "mongo", - }, - "language_info": Object { - "file_extension": "ipynb", - "mimetype": "application/json", - "name": "mongo", - "version": "1.0", - }, - }, - "nbformat": 4, - "nbformat_minor": 4, - }, - "created": "", - "format": "json", - "last_modified": "", - "mimetype": "application/x-ipynb+json", - "name": "schema-analyzer-component-notebook.ipynb", - "path": "memory://schema-analyzer-component-notebook.ipynb", - "type": "notebook", - "writable": true, - }, - "readonly": true, - }, - }, - }, - "junoClient": JunoClient { - "cachedPinnedRepos": [Function], - }, - "onGitHubClientError": [Function], - "params": Object { - "container": [Circular], - "refreshCommandBarButtons": [Function], - "refreshNotebookList": [Function], - "resourceTree": ResourceTreeAdapter { - "container": [Circular], - "copyNotebook": [Function], - "parameters": [Function], - }, - }, - "promptForCommitMsg": [Function], - }, "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "phoenixClient": PhoenixClient { diff --git a/src/Explorer/SplashScreen/SplashScreen.less b/src/Explorer/SplashScreen/SplashScreen.less index 856a07d70..63f06b4c6 100644 --- a/src/Explorer/SplashScreen/SplashScreen.less +++ b/src/Explorer/SplashScreen/SplashScreen.less @@ -57,7 +57,6 @@ .legend { font-family: @SemiboldFont; - margin-bottom: @DefaultSpace; font-size: 18px; } @@ -114,14 +113,6 @@ margin-top: 4px; } - .twoLineContent { - margin-top: -5px; - - :nth-child(2) { - font-size: 9px; - } - } - .description { font-size: 10px; color: @BaseMediumHigh; diff --git a/src/Explorer/SplashScreen/SplashScreen.test.ts b/src/Explorer/SplashScreen/SplashScreen.test.ts index ae8071164..80d3eeeca 100644 --- a/src/Explorer/SplashScreen/SplashScreen.test.ts +++ b/src/Explorer/SplashScreen/SplashScreen.test.ts @@ -9,31 +9,6 @@ const createExplorer = () => { }; describe("SplashScreen", () => { - it("allows sample collection creation for supported api's", () => { - const explorer = createExplorer(); - const dataSampleUtil = new DataSamplesUtil(explorer); - const createStub = jest - .spyOn(dataSampleUtil, "createGeneratorAsync") - .mockImplementation(() => Promise.reject(undefined)); - - // Sample is supported - jest.spyOn(dataSampleUtil, "isSampleContainerCreationSupported").mockImplementation(() => true); - - const splashScreen = new SplashScreen({ explorer }); - jest.spyOn(splashScreen, "createDataSampleUtil").mockImplementation(() => dataSampleUtil); - const mainButtons = splashScreen.createMainItems(); - - // Press all buttons and make sure create gets called - mainButtons.forEach((button) => { - try { - button.onClick(); - } catch (e) { - // noop - } - }); - expect(createStub).toHaveBeenCalled(); - }); - it("does not allow sample collection creation for non-supported api's", () => { const explorerStub = createExplorer(); const dataSampleUtil = new DataSamplesUtil(explorerStub); diff --git a/src/Explorer/SplashScreen/SplashScreen.tsx b/src/Explorer/SplashScreen/SplashScreen.tsx index 0431d2af8..26ce9d3dc 100644 --- a/src/Explorer/SplashScreen/SplashScreen.tsx +++ b/src/Explorer/SplashScreen/SplashScreen.tsx @@ -2,37 +2,26 @@ * Accordion top class */ import { Coachmark, DirectionalHint, Image, Link, Stack, TeachingBubbleContent, Text } from "@fluentui/react"; +import { useCarousel } from "hooks/useCarousel"; +import { ReactTabKind, useTabs } from "hooks/useTabs"; import * as React from "react"; -import AddDatabaseIcon from "../../../images/AddDatabase.svg"; -import NewQueryIcon from "../../../images/AddSqlQuery_16x16.svg"; -import NewStoredProcedureIcon from "../../../images/AddStoredProcedure.svg"; -import OpenQueryIcon from "../../../images/BrowseQuery.svg"; +import { Action } from "Shared/Telemetry/TelemetryConstants"; +import { traceOpen } from "Shared/Telemetry/TelemetryProcessor"; import ConnectIcon from "../../../images/Connect_color.svg"; import ContainersIcon from "../../../images/Containers.svg"; -import CostIcon from "../../../images/Cost.svg"; -import GreenCheckIcon from "../../../images/Green_check.svg"; -import NewContainerIcon from "../../../images/Hero-new-container.svg"; -import NewNotebookIcon from "../../../images/Hero-new-notebook.svg"; -import SampleIcon from "../../../images/Hero-sample.svg"; import LinkIcon from "../../../images/Link_blue.svg"; import NotebookIcon from "../../../images/notebook/Notebook-resource.svg"; -import NotebooksIcon from "../../../images/Notebooks.svg"; +import NotebookColorIcon from "../../../images/Notebooks.svg"; import QuickStartIcon from "../../../images/Quickstart_Lightning.svg"; -import ScaleAndSettingsIcon from "../../../images/Scale_15x15.svg"; import CollectionIcon from "../../../images/tree-collection.svg"; -import { AuthType } from "../../AuthType"; import * as Constants from "../../Common/Constants"; -import * as ViewModels from "../../Contracts/ViewModels"; -import { useSidePanel } from "../../hooks/useSidePanel"; import { userContext } from "../../UserContext"; -import { getCollectionName, getDatabaseName } from "../../Utils/APITypeUtils"; +import { getCollectionName } from "../../Utils/APITypeUtils"; import { FeaturePanelLauncher } from "../Controls/FeaturePanel/FeaturePanelLauncher"; import { DataSamplesUtil } from "../DataSamples/DataSamplesUtil"; import Explorer from "../Explorer"; import * as MostRecentActivity from "../MostRecentActivity/MostRecentActivity"; import { useNotebook } from "../Notebook/useNotebook"; -import { AddDatabasePanel } from "../Panes/AddDatabasePanel/AddDatabasePanel"; -import { BrowseQueriesPane } from "../Panes/BrowseQueriesPane/BrowseQueriesPane"; import { useDatabases } from "../useDatabases"; import { useSelectedNode } from "../useSelectedNode"; @@ -42,6 +31,7 @@ export interface SplashScreenItem { id?: string; info?: string; description: string; + showLinkIcon?: boolean; onClick: () => void; } @@ -49,13 +39,7 @@ export interface SplashScreenProps { explorer: Explorer; } -export interface SplashScreenState { - showCoachmark: boolean; -} - -export class SplashScreen extends React.Component { - private static readonly seeMoreItemTitle: string = "See more Cosmos DB documentation"; - private static readonly seeMoreItemUrl: string = "https://aka.ms/cosmosdbdocument"; +export class SplashScreen extends React.Component { private static readonly dataModelingUrl = "https://docs.microsoft.com/azure/cosmos-db/modeling-data"; private static readonly throughputEstimatorUrl = "https://cosmos.azure.com/capacitycalculator"; private static readonly failoverUrl = "https://docs.microsoft.com/azure/cosmos-db/high-availability"; @@ -67,10 +51,6 @@ export class SplashScreen extends React.Component state.isNotebookEnabled ), }, - { dispose: useSelectedNode.subscribe(() => this.setState({})) } + { dispose: useSelectedNode.subscribe(() => this.setState({})) }, + { + dispose: useCarousel.subscribe( + () => this.setState({}), + (state) => state.showCoachMark + ), + } ); } @@ -124,18 +110,19 @@ export class SplashScreen extends React.Component
-
{item.title}
-
+ +
{item.title}
+ {item.showLinkIcon && } +
+ +
{item.description}
))}
- {this.state.showCoachmark && ( + {useCarousel.getState().showCoachMark && ( { - this.setState({ showCoachmark: false }); - this.container.onNewCollectionClicked({ isQuickstart: true, showTeachingBubble: true }); + useCarousel.getState().setShowCoachMark(false); + this.container.onNewCollectionClicked({ isQuickstart: true }); }, }} - secondaryButtonProps={{ text: "Cancel", onClick: () => this.setState({ showCoachmark: false }) }} - onDismiss={() => this.setState({ showCoachmark: false })} + secondaryButtonProps={{ + text: "Cancel", + onClick: () => useCarousel.getState().setShowCoachMark(false), + }} + onDismiss={() => useCarousel.getState().setShowCoachMark(false)} > You will be guided to create a sample container with sample data, then we will give you a tour of - data explorer You can also cancel launching this tour and explore yourself + data explorer. You can also cancel launching this tour and explore yourself )}
-
- {userContext.features.enableNewQuickstart ? "Why Cosmos DB" : "Common Tasks"} -
- {userContext.features.enableNewQuickstart ? this.getNotebookItems() : this.getCommonTasksItems()} +
Recents
+ {this.getRecentItems()}
-
- {userContext.features.enableNewQuickstart ? "Top 3 things you need to know" : "Recents"} -
- {userContext.features.enableNewQuickstart ? this.top3Items() : this.getRecentItems()} +
Top 3 things you need to know
+ {this.top3Items()}
-
- {userContext.features.enableNewQuickstart ? "Learning Resources" : "Tips"} -
- {userContext.features.enableNewQuickstart ? this.getLearningResourceItems() : this.getTipItems()} +
Learning Resources
+ {this.getLearningResourceItems()}
@@ -198,160 +182,60 @@ export class SplashScreen extends React.Component this.container.onNewCollectionClicked({ isQuickstart: true }), - }; - - const newContainerBtn = { - iconSrc: ContainersIcon, - title: `New ${getCollectionName()}`, - description: "Create a new container for storage and throughput", - onClick: () => this.container.onNewCollectionClicked(), - }; - - const connectBtn = { - iconSrc: ConnectIcon, - title: "Connect", - description: "Prefer using your own choice of tooling? Find the connection string you need to connect", - // TODO: replace onClick function - onClick: () => 2, - }; - - return [launchQuickstartBtn, newContainerBtn, connectBtn]; - } else { - const heroes: SplashScreenItem[] = []; - - if (dataSampleUtil.isSampleContainerCreationSupported()) { - heroes.push({ - iconSrc: SampleIcon, - title: "Start with Sample", - description: "Get started with a sample provided by Cosmos DB", - onClick: () => dataSampleUtil.createSampleContainerAsync(), - }); - } - - heroes.push({ - iconSrc: NewContainerIcon, - title: `New ${getCollectionName()}`, - description: "Create a new container for storage and throughput", - onClick: () => this.container.onNewCollectionClicked(), - }); - - if (useNotebook.getState().isPhoenixNotebooks) { - heroes.push({ - iconSrc: NewNotebookIcon, - title: "New Notebook", - description: "Create a notebook to start querying, visualizing, and modeling your data", - onClick: () => this.container.onNewNotebookClicked(), - }); - } - - return heroes; - } - } - - private createCommonTaskItems(): SplashScreenItem[] { - const items: SplashScreenItem[] = []; - - if (userContext.authType === AuthType.ResourceToken) { - return items; - } - - if (!useSelectedNode.getState().isDatabaseNodeOrNoneSelected()) { - if (userContext.apiType === "SQL" || userContext.apiType === "Gremlin") { - items.push({ - iconSrc: NewQueryIcon, - onClick: () => { - const selectedCollection: ViewModels.Collection = useSelectedNode.getState().findSelectedCollection(); - selectedCollection && selectedCollection.onNewQueryClick(selectedCollection, undefined); - }, - title: "New SQL Query", - description: undefined, - }); - } else if (userContext.apiType === "Mongo") { - items.push({ - iconSrc: NewQueryIcon, - onClick: () => { - const selectedCollection: ViewModels.Collection = useSelectedNode.getState().findSelectedCollection(); - selectedCollection && selectedCollection.onNewMongoQueryClick(selectedCollection, undefined); - }, - title: "New Query", - description: undefined, - }); - } - - if (userContext.apiType === "SQL") { - items.push({ - iconSrc: OpenQueryIcon, - title: "Open Query", - description: undefined, - onClick: () => - useSidePanel - .getState() - .openSidePanel("Open Saved Queries", ), - }); - } - - if (userContext.apiType !== "Cassandra") { - items.push({ - iconSrc: NewStoredProcedureIcon, - title: "New Stored Procedure", - description: undefined, - onClick: () => { - const selectedCollection: ViewModels.Collection = useSelectedNode.getState().findSelectedCollection(); - selectedCollection && selectedCollection.onNewStoredProcedureClick(selectedCollection, undefined); - }, - }); - } - - /* Scale & Settings */ - const isShared = useDatabases.getState().findSelectedDatabase()?.isDatabaseShared(); - - const label = isShared ? "Settings" : "Scale & Settings"; - items.push({ - iconSrc: ScaleAndSettingsIcon, - title: label, - description: undefined, + showLinkIcon: userContext.apiType === "Mongo", onClick: () => { - const selectedCollection: ViewModels.Collection = useSelectedNode.getState().findSelectedCollection(); - selectedCollection && selectedCollection.onSettingsClick(); + userContext.apiType === "Mongo" + ? window.open("http://aka.ms/mongodbquickstart", "_blank") + : this.container.onNewCollectionClicked({ isQuickstart: true }); + traceOpen(Action.LaunchQuickstart, { apiType: userContext.apiType }); }, - }); - } else { - items.push({ - iconSrc: AddDatabaseIcon, - title: "New " + getDatabaseName(), - description: undefined, - onClick: async () => { - const throughputCap = userContext.databaseAccount?.properties.capacity?.totalThroughputLimit; - if (throughputCap && throughputCap !== -1) { - await useDatabases.getState().loadAllOffers(); - } - useSidePanel - .getState() - .openSidePanel( - "New " + getDatabaseName(), - - ); - }, - }); + }; + heroes.push(launchQuickstartBtn); + } else if (useNotebook.getState().isPhoenixNotebooks) { + const newNotebookBtn = { + iconSrc: NotebookColorIcon, + title: "New notebook", + description: "Visualize your data stored in Azure Cosmos DB", + onClick: () => this.container.onNewNotebookClicked(), + }; + heroes.push(newNotebookBtn); } - return items; + const newContainerBtn = { + iconSrc: ContainersIcon, + title: `New ${getCollectionName()}`, + description: "Create a new container for storage and throughput", + onClick: () => { + this.container.onNewCollectionClicked(); + traceOpen(Action.NewContainerHomepage, { apiType: userContext.apiType }); + }, + }; + heroes.push(newContainerBtn); + + const connectBtn = { + iconSrc: ConnectIcon, + title: "Connect", + description: "Prefer using your own choice of tooling? Find the connection string you need to connect", + onClick: () => useTabs.getState().openAndActivateReactTab(ReactTabKind.Connect), + }; + heroes.push(connectBtn); + + return heroes; } private decorateOpenCollectionActivity({ databaseId, collectionId }: MostRecentActivity.OpenCollectionItem) { return { - iconSrc: NotebookIcon, + iconSrc: CollectionIcon, title: collectionId, - description: "Data", + description: getCollectionName(), onClick: () => { const collection = useDatabases.getState().findCollection(databaseId, collectionId); collection?.openTab(); @@ -362,7 +246,7 @@ export class SplashScreen extends React.Component { @@ -388,29 +272,6 @@ export class SplashScreen extends React.Component window.open(SplashScreen.dataModelingUrl), - }, - { - iconSrc: undefined, - title: "Cost & Throughput Calculation", - description: "Learn more about cost calculation", - onClick: () => window.open(SplashScreen.throughputEstimatorUrl), - }, - { - iconSrc: undefined, - title: "Configure automatic failover", - description: "Learn more about Cosmos DB high-availability", - onClick: () => window.open(SplashScreen.failoverUrl), - }, - ]; - } - private onSplashScreenItemKeyPress(event: React.KeyboardEvent, callback: () => void) { if (event.charCode === Constants.KeyCodes.Space || event.charCode === Constants.KeyCodes.Enter) { callback(); @@ -418,84 +279,123 @@ export class SplashScreen extends React.Component - - - Notebook - Easy to develop - - - - Notebook - Enterprise ready - - - - Notebook - Cost effective - - - ); - } - - private getCommonTasksItems(): JSX.Element { - const commonTaskItems = this.createCommonTaskItems(); - return ( -
    - {commonTaskItems.map((item) => ( -
  • this.onSplashScreenItemKeyPress(event, item.onClick)} - tabIndex={0} - role="button" - > - - - {item.title} - -
  • - ))} -
- ); - } - private top3Items(): JSX.Element { + let items: { link: string; title: string; description: string }[]; + switch (userContext.apiType) { + case "SQL": + items = [ + { + link: "https://aka.ms/msl-modeling-partitioning-2", + title: "Advanced Modeling Patterns", + description: "Learn advanced strategies to optimize your database.", + }, + { + link: "https://aka.ms/msl-modeling-partitioning-1", + title: "Partitioning Best Practices", + description: "Learn to apply data model and partitioning strategies.", + }, + { + link: "https://aka.ms/msl-resource-planning", + title: "Plan Your Resource Requirements", + description: "Get to know the different configuration choices.", + }, + ]; + break; + case "Mongo": + items = [ + { + link: "https://aka.ms/mongodbintro", + title: "What is the MongoDB API?", + description: "Understand the Cosmos DB API for MongoDB and its features.", + }, + { + link: "https://aka.ms/mongodbfeaturesupport", + title: "Features and Syntax", + description: "Discover the advantages and features", + }, + { + link: "https://aka.ms/mongodbpremigration", + title: "Migrate Your Data", + description: "Pre-migration steps for moving data", + }, + ]; + break; + case "Cassandra": + items = [ + { + link: "https://aka.ms/cassandrajava", + title: "Build a Java App", + description: "Create a Java app using an SDK.", + }, + { + link: "https://aka.ms/cassandrapartitioning", + title: "Partitioning Best Practices", + description: "Learn how partitioning works.", + }, + { + link: "https://aka.ms/cassandraRu", + title: "Request Units (RUs)", + description: "Understand RU charges.", + }, + ]; + break; + case "Gremlin": + items = [ + { + link: "https://aka.ms/Graphdatamodeling", + title: "Data Modeling", + description: "Graph data modeling recommendations", + }, + { + link: "https://aka.ms/graphpartitioning", + title: "Partitioning Best Practices", + description: "Learn how partitioning works", + }, + { + link: "https://aka.ms/graphapiquery", + title: "Query Data", + description: "Querying data with Gremlin", + }, + ]; + break; + case "Tables": + items = [ + { + link: "https://aka.ms/tableintro", + title: "What is the Table API?", + description: "Understand the Table API in Cosmos DB and its features", + }, + { + link: "https://aka.ms/tableimport", + title: "Migrate your data", + description: "Learn how to migrate your data", + }, + { + link: "https://aka.ms/tablefaq", + title: "Table API FAQs", + description: "Common questions about the Table API", + }, + ]; + break; + } return ( - - - - Advanced Modeling Patterns - - + {items.map((item, i) => ( + + + traceOpen(Action.Top3ItemsClicked, { item: i + 1, apiType: userContext.apiType })} + href={item.link} + target="_blank" + style={{ marginRight: 5 }} + > + {item.title} + + + + {item.description} - - Learn advanced strategies for managing relationships between data entities to optimize your database. - - - - - - Partitioning Best Practices - - - - - Learn to apply data model and partitioning strategies to support an efficient and scalable NoSQL database. - - - - - - Plan Your Resource Requirements - - - - - Familiarize yourself with the various configuration options for a new Azure Cosmos DB SQL API account. - - + ))} ); } @@ -508,13 +408,15 @@ export class SplashScreen extends React.Component {recentItems.map((item, index) => (
  • - - - - {item.title} - -
    {item.description}
    -
    + + + + + {item.title} + + + {item.description} +
  • ))} @@ -524,67 +426,125 @@ export class SplashScreen extends React.Component - - - - Get Started using th SQL API with the SDK - - + {items.map((item, i) => ( + + + + traceOpen(Action.LearningResourcesClicked, { item: i + 1, apiType: userContext.apiType }) + } + href={item.link} + target="_blank" + style={{ marginRight: 5 }} + > + {item.title} + + + + {item.description} - Learn about the Azure Cosmos DB SDK, then download and use in a .NET application. - - - - - Master Complex Queries - - - - Learn how to author complex queries using cross-products and correlated subqueries. - - - - - Migrate Your Data - - - - - Migrate data into and out of Azure Cosmos DB SQL API using Azure services and open-source solutions. - - + ))} ); } - - private getTipItems(): JSX.Element { - const tipsItems = this.createTipsItems(); - - return ( -
      - {tipsItems.map((item) => ( -
    • this.onSplashScreenItemKeyPress(event, item.onClick)} - tabIndex={0} - role="link" - > -
      - {item.title} -
      -
      {item.description}
      -
    • - ))} -
    • - - {SplashScreen.seeMoreItemTitle} - -
    • -
    - ); - } } diff --git a/src/Explorer/Tabs/ConnectTab.tsx b/src/Explorer/Tabs/ConnectTab.tsx new file mode 100644 index 000000000..63304151b --- /dev/null +++ b/src/Explorer/Tabs/ConnectTab.tsx @@ -0,0 +1,212 @@ +import { IconButton, ITextFieldStyles, Pivot, PivotItem, PrimaryButton, Stack, Text, TextField } from "@fluentui/react"; +import { handleError } from "Common/ErrorHandlingUtils"; +import { sendMessage } from "Common/MessageHandler"; +import { MessageTypes } from "Contracts/ExplorerContracts"; +import React, { useEffect, useState } from "react"; +import { userContext } from "UserContext"; +import { listKeys, listReadOnlyKeys } from "Utils/arm/generatedClients/cosmos/databaseAccounts"; +import { + DatabaseAccountListKeysResult, + DatabaseAccountListReadOnlyKeysResult, +} from "Utils/arm/generatedClients/cosmos/types"; + +export const ConnectTab: React.FC = (): JSX.Element => { + const [primaryMasterKey, setPrimaryMasterKey] = useState(""); + const [secondaryMasterKey, setSecondaryMasterKey] = useState(""); + const [primaryReadonlyMasterKey, setPrimaryReadonlyMasterKey] = useState(""); + const [secondaryReadonlyMasterKey, setSecondaryReadonlyMasterKey] = useState(""); + const uri: string = userContext.databaseAccount.properties?.documentEndpoint; + const primaryConnectionStr = `AccountEndpoint=${uri};AccountKey=${primaryMasterKey}`; + const secondaryConnectionStr = `AccountEndpoint=${uri};AccountKey=${secondaryMasterKey}`; + const primaryReadonlyConnectionStr = `AccountEndpoint=${uri};AccountKey=${primaryReadonlyMasterKey}`; + const secondaryReadonlyConnectionStr = `AccountEndpoint=${uri};AccountKey=${secondaryReadonlyMasterKey}`; + + useEffect(() => { + fetchKeys(); + }, []); + + const fetchKeys = async (): Promise => { + try { + if (userContext.hasWriteAccess) { + const listKeysResult: DatabaseAccountListKeysResult = await listKeys( + userContext.subscriptionId, + userContext.resourceGroup, + userContext.databaseAccount.name + ); + setPrimaryMasterKey(listKeysResult.primaryMasterKey); + setSecondaryMasterKey(listKeysResult.secondaryMasterKey); + setPrimaryReadonlyMasterKey(listKeysResult.primaryReadonlyMasterKey); + setSecondaryReadonlyMasterKey(listKeysResult.secondaryReadonlyMasterKey); + } else { + const listReadonlyKeysResult: DatabaseAccountListReadOnlyKeysResult = await listReadOnlyKeys( + userContext.subscriptionId, + userContext.resourceGroup, + userContext.databaseAccount.name + ); + setPrimaryReadonlyMasterKey(listReadonlyKeysResult.primaryReadonlyMasterKey); + setSecondaryReadonlyMasterKey(listReadonlyKeysResult.secondaryReadonlyMasterKey); + } + } catch (error) { + handleError(error, "listKeys", "listKeys request has failed: "); + throw error; + } + }; + + const onCopyBtnClicked = (selector: string): void => { + const textfield: HTMLInputElement = document.querySelector(selector); + textfield.select(); + document.execCommand("copy"); + }; + + const textfieldStyles: Partial = { + root: { width: "100%" }, + field: { backgroundColor: "rgb(230, 230, 230)" }, + fieldGroup: { borderColor: "rgb(138, 136, 134)" }, + }; + + return ( +
    + + {userContext.hasWriteAccess && ( + + + + + onCopyBtnClicked("#uriTextfield")} /> + + + + + onCopyBtnClicked("#primaryKeyTextfield")} /> + + + + + onCopyBtnClicked("#secondaryKeyTextfield")} + /> + + + + + onCopyBtnClicked("#primaryConStrTextfield")} + /> + + + + onCopyBtnClicked("#secondaryConStrTextfield")} + /> + + + + )} + + + + + onCopyBtnClicked("#uriReadOnlyTextfield")} /> + + + + onCopyBtnClicked("#primaryReadonlyKeyTextfield")} + /> + + + + onCopyBtnClicked("#secondaryReadonlyKeyTextfield")} + /> + + + + onCopyBtnClicked("#primaryReadonlyConStrTextfield")} + /> + + + + onCopyBtnClicked("#secondaryReadonlyConStrTextfield")} + /> + + + + + + + Download sample app + + Don’t have an app ready? No worries, download one of our sample app with a platform of your choice. Connection + string is already included in the app. + + + sendMessage({ + type: MessageTypes.OpenQuickstartBlade, + }) + } + text="Download sample app" + /> + +
    + ); +}; diff --git a/src/Explorer/Tabs/DocumentsTab.ts b/src/Explorer/Tabs/DocumentsTab.ts index 17538b624..fd51273d7 100644 --- a/src/Explorer/Tabs/DocumentsTab.ts +++ b/src/Explorer/Tabs/DocumentsTab.ts @@ -909,6 +909,7 @@ export default class DocumentsTab extends TabsBase { public static _createUploadButton(container: Explorer): CommandButtonComponentProps { const label = "Upload Item"; return { + id: "uploadItemBtn", iconSrc: UploadIcon, iconAlt: label, onCommandClick: () => { diff --git a/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx b/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx index a3146b99d..101cb1dec 100644 --- a/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx +++ b/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx @@ -600,56 +600,43 @@ export default class QueryTabComponent extends React.Component { if (queryMetrics) { aggregatedMetrics.documentLoadTime = - queryMetrics.documentLoadTime && this._normalize(queryMetrics.documentLoadTime.totalMilliseconds()) + - this._normalize(aggregatedMetrics.documentLoadTime); + this._normalize(aggregatedMetrics.documentLoadTime); aggregatedMetrics.documentWriteTime = - queryMetrics.documentWriteTime && this._normalize(queryMetrics.documentWriteTime.totalMilliseconds()) + - this._normalize(aggregatedMetrics.documentWriteTime); + this._normalize(aggregatedMetrics.documentWriteTime); aggregatedMetrics.indexHitDocumentCount = - queryMetrics.indexHitDocumentCount && this._normalize(queryMetrics.indexHitDocumentCount) + - this._normalize(aggregatedMetrics.indexHitDocumentCount); + this._normalize(aggregatedMetrics.indexHitDocumentCount); aggregatedMetrics.outputDocumentCount = - queryMetrics.outputDocumentCount && this._normalize(queryMetrics.outputDocumentCount) + this._normalize(aggregatedMetrics.outputDocumentCount); aggregatedMetrics.outputDocumentSize = - queryMetrics.outputDocumentSize && this._normalize(queryMetrics.outputDocumentSize) + this._normalize(aggregatedMetrics.outputDocumentSize); aggregatedMetrics.indexLookupTime = - queryMetrics.indexLookupTime && this._normalize(queryMetrics.indexLookupTime.totalMilliseconds()) + - this._normalize(aggregatedMetrics.indexLookupTime); + this._normalize(aggregatedMetrics.indexLookupTime); aggregatedMetrics.retrievedDocumentCount = - queryMetrics.retrievedDocumentCount && this._normalize(queryMetrics.retrievedDocumentCount) + - this._normalize(aggregatedMetrics.retrievedDocumentCount); + this._normalize(aggregatedMetrics.retrievedDocumentCount); aggregatedMetrics.retrievedDocumentSize = - queryMetrics.retrievedDocumentSize && this._normalize(queryMetrics.retrievedDocumentSize) + - this._normalize(aggregatedMetrics.retrievedDocumentSize); + this._normalize(aggregatedMetrics.retrievedDocumentSize); aggregatedMetrics.vmExecutionTime = - queryMetrics.vmExecutionTime && this._normalize(queryMetrics.vmExecutionTime.totalMilliseconds()) + - this._normalize(aggregatedMetrics.vmExecutionTime); + this._normalize(aggregatedMetrics.vmExecutionTime); aggregatedMetrics.totalQueryExecutionTime = - queryMetrics.totalQueryExecutionTime && this._normalize(queryMetrics.totalQueryExecutionTime.totalMilliseconds()) + - this._normalize(aggregatedMetrics.totalQueryExecutionTime); + this._normalize(aggregatedMetrics.totalQueryExecutionTime); aggregatedMetrics.runtimeExecutionTimes.queryEngineExecutionTime = - aggregatedMetrics.runtimeExecutionTimes && this._normalize(queryMetrics.runtimeExecutionTimes.queryEngineExecutionTime.totalMilliseconds()) + - this._normalize(aggregatedMetrics.runtimeExecutionTimes.queryEngineExecutionTime); + this._normalize(aggregatedMetrics.runtimeExecutionTimes.queryEngineExecutionTime); aggregatedMetrics.runtimeExecutionTimes.systemFunctionExecutionTime = - aggregatedMetrics.runtimeExecutionTimes && this._normalize(queryMetrics.runtimeExecutionTimes.systemFunctionExecutionTime.totalMilliseconds()) + - this._normalize(aggregatedMetrics.runtimeExecutionTimes.systemFunctionExecutionTime); + this._normalize(aggregatedMetrics.runtimeExecutionTimes.systemFunctionExecutionTime); aggregatedMetrics.runtimeExecutionTimes.userDefinedFunctionExecutionTime = - aggregatedMetrics.runtimeExecutionTimes && this._normalize(queryMetrics.runtimeExecutionTimes.userDefinedFunctionExecutionTime.totalMilliseconds()) + - this._normalize(aggregatedMetrics.runtimeExecutionTimes.userDefinedFunctionExecutionTime); + this._normalize(aggregatedMetrics.runtimeExecutionTimes.userDefinedFunctionExecutionTime); } }); diff --git a/src/Explorer/Tabs/Tabs.tsx b/src/Explorer/Tabs/Tabs.tsx index 7948e871a..1439b2fd2 100644 --- a/src/Explorer/Tabs/Tabs.tsx +++ b/src/Explorer/Tabs/Tabs.tsx @@ -1,26 +1,40 @@ +import { CollectionTabKind } from "Contracts/ViewModels"; +import Explorer from "Explorer/Explorer"; +import { SplashScreen } from "Explorer/SplashScreen/SplashScreen"; +import { ConnectTab } from "Explorer/Tabs/ConnectTab"; +import { useTeachingBubble } from "hooks/useTeachingBubble"; import ko from "knockout"; import React, { MutableRefObject, useEffect, useRef, useState } from "react"; import loadingIcon from "../../../images/circular_loader_black_16x16.gif"; import errorIcon from "../../../images/close-black.svg"; import { useObservable } from "../../hooks/useObservable"; -import { useTabs } from "../../hooks/useTabs"; +import { ReactTabKind, useTabs } from "../../hooks/useTabs"; import TabsBase from "./TabsBase"; type Tab = TabsBase | (TabsBase & { render: () => JSX.Element }); -export const Tabs = (): JSX.Element => { - const { openedTabs, activeTab } = useTabs(); +interface TabsProps { + explorer: Explorer; +} + +export const Tabs = ({ explorer }: TabsProps): JSX.Element => { + const { openedTabs, openedReactTabs, activeTab, activeReactTab } = useTabs(); + return (
    + {activeReactTab !== undefined && getReactTabContent(activeReactTab, explorer)} {openedTabs.map((tab) => ( ))} @@ -30,9 +44,10 @@ export const Tabs = (): JSX.Element => { ); }; -function TabNav({ tab, active }: { tab: Tab; active: boolean }) { +function TabNav({ tab, active, tabKind }: { tab?: Tab; active: boolean; tabKind?: ReactTabKind }) { const [hovering, setHovering] = useState(false); const focusTab = useRef() as MutableRefObject; + const tabId = tab ? tab.tabId : "connect"; useEffect(() => { if (active && focusTab.current) { @@ -43,30 +58,44 @@ function TabNav({ tab, active }: { tab: Tab; active: boolean }) {
  • setHovering(true)} onMouseLeave={() => setHovering(false)} - onClick={() => tab.onTabClick()} - onKeyPress={({ nativeEvent: e }) => tab.onKeyPressActivate(undefined, e)} + onClick={() => { + if (tab) { + tab.onTabClick(); + } else if (tabKind !== undefined) { + useTabs.getState().activateReactTab(tabKind); + } + }} + onKeyPress={({ nativeEvent: e }) => { + if (tab) { + tab.onKeyPressActivate(undefined, e); + } else if (tabKind !== undefined) { + onKeyPressReactTab(e, tabKind); + } + }} className={active ? "active tabList" : "tabList"} - title={useObservable(tab.tabPath)} + title={useObservable(tab?.tabPath || ko.observable(""))} aria-selected={active} aria-expanded={active} - aria-controls={tab.tabId} + aria-controls={tabId} tabIndex={0} role="tab" ref={focusTab} > - +
    - - {useObservable(tab.isExecutionError) && } - {useObservable(tab.isExecuting) && ( + + {useObservable(tab?.isExecutionError || ko.observable(false)) && } + {useObservable(tab?.isExecuting || ko.observable(false)) && ( Loading )} - {useObservable(tab.tabTitle)} - - - + {useObservable(tab?.tabTitle || ko.observable(ReactTabKind[tabKind]))} + {tabKind !== ReactTabKind.Home && ( + + + + )}
    @@ -74,14 +103,24 @@ function TabNav({ tab, active }: { tab: Tab; active: boolean }) { ); } -const CloseButton = ({ tab, active, hovering }: { tab: Tab; active: boolean; hovering: boolean }) => ( +const CloseButton = ({ + tab, + active, + hovering, + tabKind, +}: { + tab: Tab; + active: boolean; + hovering: boolean; + tabKind?: ReactTabKind; +}) => ( tab.onCloseTabButtonClick()} + onClick={() => (tab ? tab.onCloseTabButtonClick() : useTabs.getState().closeReactTab(tabKind))} tabIndex={active ? 0 : undefined} onKeyPress={({ nativeEvent: e }) => tab.onKeyPressClose(undefined, e)} > @@ -113,6 +152,10 @@ function TabPane({ tab, active }: { tab: Tab; active: boolean }) { }; useEffect((): (() => void) | void => { + if (tab.tabKind === CollectionTabKind.Documents && tab.collection?.isSampleCollection) { + useTeachingBubble.getState().setIsDocumentsTabOpened(true); + } + const { current: element } = ref; if (element) { ko.applyBindings(tab, element); @@ -123,9 +166,29 @@ function TabPane({ tab, active }: { tab: Tab; active: boolean }) { } }, [ref, tab]); - if ("render" in tab) { - return
    {tab.render()}
    ; + if (tab) { + if ("render" in tab) { + return
    {tab.render()}
    ; + } } return
    ; } + +const onKeyPressReactTab = (e: KeyboardEvent, tabKind: ReactTabKind): void => { + if (e.key === "Enter" || e.key === "Space") { + useTabs.getState().activateReactTab(tabKind); + e.stopPropagation(); + } +}; + +const getReactTabContent = (activeReactTab: ReactTabKind, explorer: Explorer): JSX.Element => { + switch (activeReactTab) { + case ReactTabKind.Connect: + return ; + case ReactTabKind.Home: + return ; + default: + throw Error(`Unsupported tab kind ${ReactTabKind[activeReactTab]}`); + } +}; diff --git a/src/Explorer/Tree/Collection.ts b/src/Explorer/Tree/Collection.ts index 9ef429df4..f2fff2a99 100644 --- a/src/Explorer/Tree/Collection.ts +++ b/src/Explorer/Tree/Collection.ts @@ -97,6 +97,7 @@ export default class Collection implements ViewModels.Collection { public storedProceduresFocused: ko.Observable; public userDefinedFunctionsFocused: ko.Observable; public triggersFocused: ko.Observable; + public isSampleCollection: boolean; private isOfferRead: boolean; constructor(container: Explorer, databaseId: string, data: DataModels.Collection) { @@ -133,7 +134,7 @@ export default class Collection implements ViewModels.Collection { if (partitionKeyProperty.indexOf("$v") > -1) { // From $v.shard.$v.key.$v > shard.key partitionKeyProperty = partitionKeyProperty.replace(/.\$v/g, "").replace(/\$v./g, ""); - this.partitionKeyPropertyHeaders[i] = partitionKeyProperty; + this.partitionKeyPropertyHeaders[i] = "/" + partitionKeyProperty; } } @@ -216,6 +217,7 @@ export default class Collection implements ViewModels.Collection { this.isStoredProceduresExpanded = ko.observable(false); this.isUserDefinedFunctionsExpanded = ko.observable(false); this.isTriggersExpanded = ko.observable(false); + this.isSampleCollection = false; this.isOfferRead = false; } diff --git a/src/Explorer/Tree/Database.tsx b/src/Explorer/Tree/Database.tsx index 156b5f275..a31b79b97 100644 --- a/src/Explorer/Tree/Database.tsx +++ b/src/Explorer/Tree/Database.tsx @@ -37,6 +37,7 @@ export default class Database implements ViewModels.Database { public isDatabaseShared: ko.Computed; public selectedSubnodeKind: ko.Observable; public junoClient: JunoClient; + public isSampleDB: boolean; private isOfferRead: boolean; constructor(container: Explorer, data: DataModels.Database) { @@ -54,6 +55,7 @@ export default class Database implements ViewModels.Database { return this.offer && !!this.offer(); }); this.junoClient = new JunoClient(); + this.isSampleDB = false; this.isOfferRead = false; } diff --git a/src/Explorer/Tree/ResourceTree.tsx b/src/Explorer/Tree/ResourceTree.tsx index 77f694598..87432ce8b 100644 --- a/src/Explorer/Tree/ResourceTree.tsx +++ b/src/Explorer/Tree/ResourceTree.tsx @@ -436,7 +436,7 @@ export const ResourceTree: React.FC = ({ container }: Resourc const databaseNode: TreeNode = { label: database.id(), iconSrc: CosmosDBIcon, - isExpanded: false, + isExpanded: database.isDatabaseExpanded(), className: "databaseHeader", children: [], isSelected: () => useSelectedNode.getState().isDataNodeSelected(database.id()), @@ -461,6 +461,7 @@ export const ResourceTree: React.FC = ({ container }: Resourc if (database.isDatabaseShared()) { databaseNode.children.push({ + id: database.isSampleDB ? "sampleScaleSettings" : "", label: "Scale", isSelected: () => useSelectedNode @@ -497,6 +498,7 @@ export const ResourceTree: React.FC = ({ container }: Resourc const children: TreeNode[] = []; children.push({ label: collection.getLabel(), + id: collection.isSampleCollection ? "sampleItems" : "", onClick: () => { collection.openTab(); // push to most recent @@ -530,6 +532,7 @@ export const ResourceTree: React.FC = ({ container }: Resourc if (userContext.apiType !== "Cassandra" || !isServerlessAccount()) { children.push({ + id: collection.isSampleCollection && !database.isDatabaseShared() ? "sampleScaleSettings" : "", label: database.isDatabaseShared() || isServerlessAccount() ? "Settings" : "Scale & Settings", onClick: collection.onSettingsClick.bind(collection), isSelected: () => @@ -572,7 +575,7 @@ export const ResourceTree: React.FC = ({ container }: Resourc return { label: collection.id(), iconSrc: CollectionIcon, - isExpanded: false, + isExpanded: collection.isCollectionExpanded(), children: children, className: "collectionHeader", contextMenu: ResourceTreeContextMenuButtonFactory.createCollectionContextMenuButton(container, collection), diff --git a/src/Explorer/Tutorials/QuickstartCarousel.tsx b/src/Explorer/Tutorials/QuickstartCarousel.tsx new file mode 100644 index 000000000..a2516fc5b --- /dev/null +++ b/src/Explorer/Tutorials/QuickstartCarousel.tsx @@ -0,0 +1,103 @@ +import { DefaultButton, IconButton, Image, Modal, PrimaryButton, Stack, Text } from "@fluentui/react"; +import { useCarousel } from "hooks/useCarousel"; +import React, { useState } from "react"; +import Youtube from "react-youtube"; +import { Action } from "Shared/Telemetry/TelemetryConstants"; +import { traceSuccess } from "Shared/Telemetry/TelemetryProcessor"; +import { userContext } from "UserContext"; +import Image1 from "../../../images/CarouselImage1.svg"; +import Image2 from "../../../images/CarouselImage2.svg"; + +interface QuickstartCarouselProps { + isOpen: boolean; +} + +export const QuickstartCarousel: React.FC = ({ + isOpen, +}: QuickstartCarouselProps): JSX.Element => { + const [page, setPage] = useState(1); + return ( + userContext.apiType === "SQL" && useCarousel.getState().setShowCoachMark(true)} + > + + + {getHeaderText(page)} + setPage(4)} /> + + {getContent(page)} + + {getDescriptionText(page)} + + + {page !== 1 && ( + setPage(page - 1)} /> + )} + { + if ( + userContext.apiType === "Cassandra" || + userContext.apiType === "Tables" || + userContext.apiType === "Gremlin" + ) { + setPage(page + 2); + } else { + if (page === 3 && userContext.apiType === "SQL") { + useCarousel.getState().setShowCoachMark(true); + } + setPage(page + 1); + } + + if (page === 3) { + traceSuccess(Action.CompleteCarousel); + } + }} + /> + + + + ); +}; + +const getHeaderText = (page: number): string => { + switch (page) { + case 1: + return "Welcome! What is Cosmos DB?"; + case 2: + return "Get Started with Sample Data"; + case 3: + return "Connect to your database"; + default: + return ""; + } +}; + +const getContent = (page: number): JSX.Element => { + switch (page) { + case 1: + return traceSuccess(Action.PlayCarouselVideo)} />; + case 2: + return ; + case 3: + return ; + default: + return <>; + } +}; + +const getDescriptionText = (page: number): string => { + switch (page) { + case 1: + return "Azure Cosmos DB is a fully managed NoSQL database service for modern app development. "; + case 2: + return "Launch the quickstart for a tutotrial to learn how to create a database, add sample data, connect to a sample app and more."; + case 3: + return "Already have an existing app? Connect your database to an app, or tooling of your choice from Data Explorer."; + default: + return ""; + } +}; diff --git a/src/Explorer/Tutorials/QuickstartTutorial.tsx b/src/Explorer/Tutorials/QuickstartTutorial.tsx new file mode 100644 index 000000000..516a3a518 --- /dev/null +++ b/src/Explorer/Tutorials/QuickstartTutorial.tsx @@ -0,0 +1,175 @@ +import { Link, Stack, TeachingBubble, Text } from "@fluentui/react"; +import { ReactTabKind, useTabs } from "hooks/useTabs"; +import { useTeachingBubble } from "hooks/useTeachingBubble"; +import React from "react"; +import { Action } from "Shared/Telemetry/TelemetryConstants"; +import { traceCancel, traceSuccess } from "Shared/Telemetry/TelemetryProcessor"; + +export const QuickstartTutorial: React.FC = (): JSX.Element => { + const { step, isSampleDBExpanded, isDocumentsTabOpened, sampleCollection, setStep } = useTeachingBubble(); + + const onDimissTeachingBubble = (): void => { + setStep(0); + traceCancel(Action.CancelUITour, { step }); + }; + + switch (step) { + case 1: + return isSampleDBExpanded ? ( + { + sampleCollection.openTab(); + setStep(2); + }, + }} + onDismiss={() => onDimissTeachingBubble()} + footerContent="Step 1 of 7" + > + Start viewing and working with your data by opening Items under Data + + ) : ( + <> + ); + case 2: + return isDocumentsTabOpened ? ( + setStep(3), + }} + secondaryButtonProps={{ + text: "Previous", + onClick: () => setStep(1), + }} + onDismiss={() => onDimissTeachingBubble()} + footerContent="Step 2 of 7" + > + View item here using the items window. Additionally you can also filter items to be reviewed with the filter + function + + ) : ( + <> + ); + case 3: + return ( + setStep(4), + }} + secondaryButtonProps={{ + text: "Previous", + onClick: () => setStep(2), + }} + onDismiss={() => onDimissTeachingBubble()} + footerContent="Step 3 of 7" + > + Add new item by copy / pasting JSON; or uploading a JSON + + ); + case 4: + return ( + setStep(5), + }} + secondaryButtonProps={{ + text: "Previous", + onClick: () => setStep(3), + }} + onDismiss={() => onDimissTeachingBubble()} + footerContent="Step 4 of 7" + > + Query your data using either the filter function or new query. + + ); + case 5: + return ( + setStep(6), + }} + secondaryButtonProps={{ + text: "Previous", + onClick: () => setStep(4), + }} + onDismiss={() => onDimissTeachingBubble()} + footerContent="Step 5 of 7" + > + Change throughput provisioned to your container according to your needs + + ); + case 6: + return ( + setStep(7), + }} + secondaryButtonProps={{ + text: "Previous", + onClick: () => setStep(5), + }} + onDismiss={() => onDimissTeachingBubble()} + footerContent="Step 6 of 7" + > + Visualize your data, store queries in an interactive document + + ); + case 7: + return ( + { + traceSuccess(Action.CompleteUITour); + useTabs.getState().openAndActivateReactTab(ReactTabKind.Connect); + }, + }} + secondaryButtonProps={{ + text: "Previous", + onClick: () => setStep(6), + }} + onDismiss={() => onDimissTeachingBubble()} + footerContent="Step 7 of 7" + > + + + You have finished the tour in data explorer. For next steps, you may want to launch connect and start + connecting with your current app. + + + Share your feedback + + + + ); + default: + return <>; + } +}; diff --git a/src/GalleryViewer/GalleryViewer.tsx b/src/GalleryViewer/GalleryViewer.tsx index e630ee7b2..2026415af 100644 --- a/src/GalleryViewer/GalleryViewer.tsx +++ b/src/GalleryViewer/GalleryViewer.tsx @@ -2,6 +2,7 @@ import { initializeIcons, Link, Text } from "@fluentui/react"; import "bootstrap/dist/css/bootstrap.css"; import * as React from "react"; import * as ReactDOM from "react-dom"; +import { userContext } from "UserContext"; import { initializeConfiguration } from "../ConfigContext"; import { GalleryHeaderComponent } from "../Explorer/Controls/Header/GalleryHeaderComponent"; import { @@ -25,7 +26,9 @@ const onInit = async () => { const props: GalleryAndNotebookViewerComponentProps = { junoClient: new JunoClient(), - selectedTab: galleryViewerProps.selectedTab || GalleryTab.PublicGallery, + selectedTab: + galleryViewerProps.selectedTab || + (userContext.features.publicGallery ? GalleryTab.PublicGallery : GalleryTab.OfficialSamples), sortBy: galleryViewerProps.sortBy || SortBy.MostRecent, searchText: galleryViewerProps.searchText, }; diff --git a/src/Localization/en/MaterializedViewsBuilder.json b/src/Localization/en/MaterializedViewsBuilder.json new file mode 100644 index 000000000..7c3aaa032 --- /dev/null +++ b/src/Localization/en/MaterializedViewsBuilder.json @@ -0,0 +1,48 @@ +{ + "MaterializedViewsBuilderDescription": "Provision a Materializedviews builder cluster for your Azure Cosmos DB account. Materializedviews builder is compute in your account that performs read operations on source collection for any updates and applies them on materialized views as per the materializedview definition.", + "MaterializedViewsBuilder": "Materializedviews Builder", + "Provisioned": "Provisioned", + "Deprovisioned": "Deprovisioned", + "LearnAboutMaterializedViews": "Learn more about materializedviews.", + "DeprovisioningDetailsText": "Learn more about materializedviews.", + "MaterializedviewsBuilderPricing": "Learn more about materializedviews pricing.", + "SKUs": "SKUs", + "SKUsPlaceHolder": "Select SKUs", + "NumberOfInstances": "Number of instances", + "CosmosD2s": "Cosmos.D2s (General Purpose Cosmos Compute with 2 vCPUs, 8 GB Memory)", + "CosmosD4s": "Cosmos.D4s (General Purpose Cosmos Compute with 4 vCPUs, 16 GB Memory)", + "CosmosD8s": "Cosmos.D8s (General Purpose Cosmos Compute with 8 vCPUs, 32 GB Memory)", + "CosmosD16s": "Cosmos.D16s (General Purpose Cosmos Compute with 16 vCPUs, 64 GB Memory)", + "CosmosD32s": "Cosmos.D32s (General Purpose Cosmos Compute with 32 vCPUs, 128 GB Memory)", + "CreateMessage": "MaterializedViewsBuilder resource is being created.", + "CreateInitializeTitle": "Provisioning resource", + "CreateInitializeMessage": "Materializedviews Builder resource will be provisioned.", + "CreateSuccessTitle": "Resource provisioned", + "CreateSuccesseMessage": "Materializedviews Builder resource provisioned.", + "CreateFailureTitle": "Failed to provision resource", + "CreateFailureMessage": "Materializedviews Builder resource provisioning failed.", + "UpdateMessage": "MaterializedViewsBuilder resource is being updated.", + "UpdateInitializeTitle": "Updating resource", + "UpdateInitializeMessage": "Materializedviews Builder resource will be updated.", + "UpdateSuccessTitle": "Resource updated", + "UpdateSuccesseMessage": "Materializedviews Builder resource updated.", + "UpdateFailureTitle": "Failed to update resource", + "UpdateFailureMessage": "Materializedviews Builder resource updation failed.", + "DeleteMessage": "MaterializedViewsBuilder resource is being deleted.", + "DeleteInitializeTitle": "Deleting resource", + "DeleteInitializeMessage": "Materializedviews Builder resource will be deleted.", + "DeleteSuccessTitle": "Resource deleted", + "DeleteSuccesseMessage": "Materializedviews Builder resource deleted.", + "DeleteFailureTitle": "Failed to delete resource", + "DeleteFailureMessage": "Materializedviews Builder resource deletion failed.", + "ApproximateCost": "Approximate Cost Per Hour", + "CostText": "Hourly cost of the Materializedviews Builder resource depends on the SKU selection, number of instances per region, and number of regions.", + "MetricsString": "Metrics", + "MetricsText": "Monitor the CPU and memory usage for the Materializedviews Builder instances in ", + "MetricsBlade": "the metrics blade.", + "MonitorUsage": "Monitor Usage", + "ResizingDecisionText": "To understand if the Materializedviews Builder is the right size, ", + "ResizingDecisionLink": "learn more about Materializedviews Builder sizing.", + "WarningBannerOnUpdate": "Adding or modifying Materializedviews Builder instances may affect your bill.", + "WarningBannerOnDelete": "After deprovisioning the Materializedviews Builder, your materializedviews will not be updated with new source changes anymore. Materializedviews builder is compute in your account that performs read operations on source collection for any updates and applies them on materialized views as per the materializedview definition." +} \ No newline at end of file diff --git a/src/Main.tsx b/src/Main.tsx index 47ed04d18..def075ce2 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -2,6 +2,9 @@ import { initializeIcons } from "@fluentui/react"; import "bootstrap/dist/css/bootstrap.css"; import { ChatButtonAction } from "Explorer/Controls/ChatButton/ChatButtonComponent"; +import { QuickstartCarousel } from "Explorer/Tutorials/QuickstartCarousel"; +import { QuickstartTutorial } from "Explorer/Tutorials/QuickstartTutorial"; +import { useCarousel } from "hooks/useCarousel"; import React, { useState } from "react"; import ReactDOM from "react-dom"; import "../externals/jquery-ui.min.css"; @@ -45,12 +48,10 @@ import "./Explorer/Menus/NotificationConsole/NotificationConsole.less"; import { NotificationConsole } from "./Explorer/Menus/NotificationConsole/NotificationConsoleComponent"; import "./Explorer/Panes/PanelComponent.less"; import { SidePanel } from "./Explorer/Panes/PanelContainerComponent"; -import { SplashScreen } from "./Explorer/SplashScreen/SplashScreen"; import "./Explorer/SplashScreen/SplashScreen.less"; import { Tabs } from "./Explorer/Tabs/Tabs"; import { useConfig } from "./hooks/useConfig"; import { useKnockoutExplorer } from "./hooks/useKnockoutExplorer"; -import { useTabs } from "./hooks/useTabs"; import "./Libs/jquery"; import "./Shared/appInsights"; @@ -58,7 +59,7 @@ initializeIcons(); const App: React.FunctionComponent = () => { const [isLeftPaneExpanded, setIsLeftPaneExpanded] = useState(true); - const openedTabs = useTabs((state) => state.openedTabs); + const isCarouselOpen = useCarousel((state) => state.shouldOpen); const config = useConfig(); const explorer = useKnockoutExplorer(config?.platform); @@ -101,9 +102,7 @@ const App: React.FunctionComponent = () => { {/* Collections Tree Collapsed - End */}
  • - {/* Collections Tree - End */} - {openedTabs.length === 0 && } - +
    {/* Collections Tree and Tabs - End */}
    @@ -121,6 +120,8 @@ const App: React.FunctionComponent = () => {
    + {} + {}
    ); }; diff --git a/src/Phoenix/PhoenixClient.ts b/src/Phoenix/PhoenixClient.ts index 7629ffac5..9ff373366 100644 --- a/src/Phoenix/PhoenixClient.ts +++ b/src/Phoenix/PhoenixClient.ts @@ -17,13 +17,14 @@ import { ContainerConnectionInfo, ContainerInfo, IContainerData, + IDbAccountAllow, IMaxAllocationTimeExceeded, IMaxDbAccountsPerUserExceeded, IMaxUsersPerDbAccountExceeded, IPhoenixConnectionInfoResult, + IPhoenixError, IProvisionData, IResponse, - IValidationError, PhoenixErrorType, } from "../Contracts/DataModels"; import { useNotebook } from "../Explorer/Notebook/useNotebook"; @@ -59,17 +60,19 @@ export class PhoenixClient { body: JSON.stringify(provisionData), }); const responseJson = await response?.json(); - if (response.status === HttpStatusCodes.Forbidden) { - throw new Error(this.ConvertToForbiddenErrorString(responseJson)); + if (response.ok) { + return { + status: response.status, + data: responseJson, + }; } - return { - status: response.status, - data: responseJson, - }; + const phoenixError = responseJson as IPhoenixError; + if (response.status === HttpStatusCodes.Forbidden) { + throw new Error(this.ConvertToForbiddenErrorString(phoenixError)); + } + throw new Error(phoenixError.message); } catch (error) { - if (response.status === HttpStatusCodes.Forbidden) { - error.status = HttpStatusCodes.Forbidden; - } + error.status = response?.status; throw error; } } @@ -101,7 +104,7 @@ export class PhoenixClient { const containerStatus = await response.json(); return { durationLeftInMinutes: containerStatus?.durationLeftInMinutes, - notebookServerInfo: containerStatus?.notebookServerInfo, + phoenixServerInfo: containerStatus?.phoenixServerInfo, status: ContainerStatusType.Active, }; } else if (response.status === HttpStatusCodes.NotFound) { @@ -145,7 +148,7 @@ export class PhoenixClient { useNotebook.getState().setIsRefreshed(!useNotebook.getState().isRefreshed); return { durationLeftInMinutes: undefined, - notebookServerInfo: undefined, + phoenixServerInfo: undefined, status: ContainerStatusType.Disconnected, }; } @@ -159,15 +162,17 @@ export class PhoenixClient { } } - public async isDbAcountWhitelisted(): Promise { + public async getDbAccountAllowedStatus(): Promise { const startKey = TelemetryProcessor.traceStart(Action.PhoenixDBAccountAllowed, { dataExplorerArea: Areas.Notebook, }); + let responseJson; try { const response = await window.fetch(`${this.getPhoenixControlPlanePathPrefix()}`, { method: "GET", headers: PhoenixClient.getHeaders(), }); + responseJson = await response?.json(); if (response.status !== HttpStatusCodes.OK) { throw new Error(`Received status code: ${response?.status}`); } @@ -178,7 +183,11 @@ export class PhoenixClient { }, startKey ); - return response.status === HttpStatusCodes.OK; + return { + status: response.status, + message: responseJson?.message, + type: responseJson?.type, + }; } catch (error) { TelemetryProcessor.traceFailure( Action.PhoenixDBAccountAllowed, @@ -190,7 +199,11 @@ export class PhoenixClient { startKey ); Logger.logError(getErrorMessage(error), "PhoenixClient/IsDbAcountWhitelisted"); - return false; + return { + status: HttpStatusCodes.Forbidden, + message: responseJson?.message, + type: responseJson?.type, + }; } } @@ -220,7 +233,7 @@ export class PhoenixClient { }; } - public ConvertToForbiddenErrorString(jsonData: IValidationError): string { + public ConvertToForbiddenErrorString(jsonData: IPhoenixError): string { const errInfo = jsonData; switch (errInfo?.type) { case PhoenixErrorType.MaxAllocationTimeExceeded: { diff --git a/src/Platform/Hosted/extractFeatures.ts b/src/Platform/Hosted/extractFeatures.ts index efa7e1e72..b3fabd57e 100644 --- a/src/Platform/Hosted/extractFeatures.ts +++ b/src/Platform/Hosted/extractFeatures.ts @@ -32,6 +32,7 @@ export type Features = { readonly enableNewQuickstart: boolean; readonly enableChatbot?: boolean; + // can be set via both flight and feature flag autoscaleDefault: boolean; partitionKeyDefault: boolean; diff --git a/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.rp.ts b/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.rp.ts new file mode 100644 index 000000000..d5fae8d0d --- /dev/null +++ b/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.rp.ts @@ -0,0 +1,228 @@ +import { configContext } from "../../ConfigContext"; +import { userContext } from "../../UserContext"; +import { armRequestWithoutPolling } from "../../Utils/arm/request"; +import { selfServeTraceFailure, selfServeTraceStart, selfServeTraceSuccess } from "../SelfServeTelemetryProcessor"; +import { RefreshResult } from "../SelfServeTypes"; +import MaterializedViewsBuilder from "./MaterializedViewsBuilder"; +import { + FetchPricesResponse, + PriceMapAndCurrencyCode, + RegionsResponse, + MaterializedViewsBuilderServiceResource, + UpdateMaterializedViewsBuilderRequestParameters, +} from "./MaterializedViewsBuilderTypes"; + +const apiVersion = "2021-07-01-preview"; + +export enum ResourceStatus { + Running = "Running", + Creating = "Creating", + Updating = "Updating", + Deleting = "Deleting", +} + +export interface MaterializedViewsBuilderResponse { + sku: string; + instances: number; + status: string; + endpoint: string; +} + +export const getPath = (subscriptionId: string, resourceGroup: string, name: string): string => { + return `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DocumentDB/databaseAccounts/${name}/services/materializedviewsBuilder`; +}; + +export const updateMaterializedViewsBuilderResource = async (sku: string, instances: number): Promise => { + const path = getPath(userContext.subscriptionId, userContext.resourceGroup, userContext.databaseAccount.name); + const body: UpdateMaterializedViewsBuilderRequestParameters = { + properties: { + instanceSize: sku, + instanceCount: instances, + serviceType: "materializedviewsBuilder", + }, + }; + const telemetryData = { ...body, httpMethod: "PUT", selfServeClassName: MaterializedViewsBuilder.name }; + const updateTimeStamp = selfServeTraceStart(telemetryData); + let armRequestResult; + try { + armRequestResult = await armRequestWithoutPolling({ + host: configContext.ARM_ENDPOINT, + path, + method: "PUT", + apiVersion, + body, + }); + selfServeTraceSuccess(telemetryData, updateTimeStamp); + } catch (e) { + const failureTelemetry = { ...body, e, selfServeClassName: MaterializedViewsBuilder.name }; + selfServeTraceFailure(failureTelemetry, updateTimeStamp); + throw e; + } + return armRequestResult?.operationStatusUrl; +}; + +export const deleteMaterializedViewsBuilderResource = async (): Promise => { + const path = getPath(userContext.subscriptionId, userContext.resourceGroup, userContext.databaseAccount.name); + const telemetryData = { httpMethod: "DELETE", selfServeClassName: MaterializedViewsBuilder.name }; + const deleteTimeStamp = selfServeTraceStart(telemetryData); + let armRequestResult; + try { + armRequestResult = await armRequestWithoutPolling({ + host: configContext.ARM_ENDPOINT, + path, + method: "DELETE", + apiVersion, + }); + selfServeTraceSuccess(telemetryData, deleteTimeStamp); + } catch (e) { + const failureTelemetry = { e, selfServeClassName: MaterializedViewsBuilder.name }; + selfServeTraceFailure(failureTelemetry, deleteTimeStamp); + throw e; + } + return armRequestResult?.operationStatusUrl; +}; + +export const getMaterializedViewsBuilderResource = async (): Promise => { + const path = getPath(userContext.subscriptionId, userContext.resourceGroup, userContext.databaseAccount.name); + const telemetryData = { httpMethod: "GET", selfServeClassName: MaterializedViewsBuilder.name }; + const getResourceTimeStamp = selfServeTraceStart(telemetryData); + let armRequestResult; + try { + armRequestResult = await armRequestWithoutPolling({ + host: configContext.ARM_ENDPOINT, + path, + method: "GET", + apiVersion, + }); + selfServeTraceSuccess(telemetryData, getResourceTimeStamp); + } catch (e) { + const failureTelemetry = { e, selfServeClassName: MaterializedViewsBuilder.name }; + selfServeTraceFailure(failureTelemetry, getResourceTimeStamp); + throw e; + } + return armRequestResult?.result; +}; + +export const getCurrentProvisioningState = async (): Promise => { + try { + const response = await getMaterializedViewsBuilderResource(); + return { + sku: response.properties.instanceSize, + instances: response.properties.instanceCount, + status: response.properties.status, + endpoint: response.properties.MaterializedViewsBuilderEndPoint, + }; + } catch (e) { + return { sku: undefined, instances: undefined, status: undefined, endpoint: undefined }; + } +}; + +export const refreshMaterializedViewsBuilderProvisioning = async (): Promise => { + try { + const response = await getMaterializedViewsBuilderResource(); + if (response.properties.status === ResourceStatus.Running.toString()) { + return { isUpdateInProgress: false, updateInProgressMessageTKey: undefined }; + } else if (response.properties.status === ResourceStatus.Creating.toString()) { + return { isUpdateInProgress: true, updateInProgressMessageTKey: "CreateMessage" }; + } else if (response.properties.status === ResourceStatus.Deleting.toString()) { + return { isUpdateInProgress: true, updateInProgressMessageTKey: "DeleteMessage" }; + } else { + return { isUpdateInProgress: true, updateInProgressMessageTKey: "UpdateMessage" }; + } + } catch { + //TODO differentiate between different failures + return { isUpdateInProgress: false, updateInProgressMessageTKey: undefined }; + } +}; + +const getGeneralPath = (subscriptionId: string, resourceGroup: string, name: string): string => { + return `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DocumentDB/databaseAccounts/${name}`; +}; + +export const getRegions = async (): Promise> => { + const telemetryData = { + feature: "Calculate approximate cost", + function: "getRegions", + description: "", + selfServeClassName: MaterializedViewsBuilder.name, + }; + const getRegionsTimestamp = selfServeTraceStart(telemetryData); + + try { + const regions = new Array(); + + const response = await armRequestWithoutPolling({ + host: configContext.ARM_ENDPOINT, + path: getGeneralPath(userContext.subscriptionId, userContext.resourceGroup, userContext.databaseAccount.name), + method: "GET", + apiVersion: "2021-07-01-preview", + }); + + if (response.result.location !== undefined) { + regions.push(response.result.location.split(" ").join("").toLowerCase()); + } else { + for (const location of response.result.locations) { + regions.push(location.locationName.split(" ").join("").toLowerCase()); + } + } + + selfServeTraceSuccess(telemetryData, getRegionsTimestamp); + return regions; + } catch (err) { + const failureTelemetry = { err, selfServeClassName: MaterializedViewsBuilder.name }; + selfServeTraceFailure(failureTelemetry, getRegionsTimestamp); + return new Array(); + } +}; + +const getFetchPricesPathForRegion = (subscriptionId: string): string => { + return `/subscriptions/${subscriptionId}/providers/Microsoft.CostManagement/fetchPrices`; +}; + +export const getPriceMapAndCurrencyCode = async (regions: Array): Promise => { + const telemetryData = { + feature: "Calculate approximate cost", + function: "getPriceMapAndCurrencyCode", + description: "fetch prices API call", + selfServeClassName: MaterializedViewsBuilder.name, + }; + const getPriceMapAndCurrencyCodeTimestamp = selfServeTraceStart(telemetryData); + + try { + const priceMap = new Map>(); + let currencyCode; + for (const region of regions) { + const regionPriceMap = new Map(); + + const response = await armRequestWithoutPolling({ + host: configContext.ARM_ENDPOINT, + path: getFetchPricesPathForRegion(userContext.subscriptionId), + method: "POST", + apiVersion: "2020-01-01-preview", + queryParams: { + filter: + "armRegionName eq '" + + region + + "' and serviceFamily eq 'Databases' and productName eq 'Azure Cosmos DB MaterializedViews Builder - General Purpose'", + }, + }); + + for (const item of response.result.Items) { + if (currencyCode === undefined) { + currencyCode = item.currencyCode; + } else if (item.currencyCode !== currencyCode) { + throw Error("Currency Code Mismatch: Currency code not same for all regions / skus."); + } + regionPriceMap.set(item.skuName, item.retailPrice); + } + priceMap.set(region, regionPriceMap); + } + + selfServeTraceSuccess(telemetryData, getPriceMapAndCurrencyCodeTimestamp); + return { priceMap: priceMap, currencyCode: currencyCode }; + } catch (err) { + const failureTelemetry = { err, selfServeClassName: MaterializedViewsBuilder.name }; + selfServeTraceFailure(failureTelemetry, getPriceMapAndCurrencyCodeTimestamp); + return { priceMap: undefined, currencyCode: undefined }; + } +}; diff --git a/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.tsx b/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.tsx new file mode 100644 index 000000000..40b0458e2 --- /dev/null +++ b/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.tsx @@ -0,0 +1,416 @@ +import { IsDisplayable, OnChange, PropertyInfo, RefreshOptions, Values } from "../Decorators"; +import { + selfServeTrace, + selfServeTraceFailure, + selfServeTraceStart, + selfServeTraceSuccess, +} from "../SelfServeTelemetryProcessor"; +import { + ChoiceItem, + Description, + DescriptionType, + Info, + InputType, + NumberUiType, + OnSaveResult, + RefreshResult, + SelfServeBaseClass, + SmartUiInput, +} from "../SelfServeTypes"; +import { BladeType, generateBladeLink } from "../SelfServeUtils"; +import { + deleteMaterializedViewsBuilderResource, + getCurrentProvisioningState, + getPriceMapAndCurrencyCode, + getRegions, + refreshMaterializedViewsBuilderProvisioning, + updateMaterializedViewsBuilderResource, +} from "./MaterializedViewsBuilder.rp"; + +const costPerHourDefaultValue: Description = { + textTKey: "CostText", + type: DescriptionType.Text, + link: { + href: "https://aka.ms/cosmos-db-materializedviewsbuilder-pricing", + textTKey: "MaterializedviewsBuilderPricing", + }, +}; + +const metricsStringValue: Description = { + textTKey: "MetricsText", + type: DescriptionType.Text, + link: { + href: generateBladeLink(BladeType.Metrics), + textTKey: "MetricsBlade", + }, +}; + +const CosmosD2s = "Cosmos.D2s"; +const CosmosD4s = "Cosmos.D4s"; +const CosmosD8s = "Cosmos.D8s"; +const CosmosD16s = "Cosmos.D16s"; + +const onSKUChange = (newValue: InputType, currentValues: Map): Map => { + currentValues.set("sku", { value: newValue }); + currentValues.set("costPerHour", { + value: calculateCost(newValue as string, currentValues.get("instances").value as number), + }); + + return currentValues; +}; + +const onNumberOfInstancesChange = ( + newValue: InputType, + currentValues: Map, + baselineValues: Map +): Map => { + currentValues.set("instances", { value: newValue }); + const MaterializedViewsBuilderOriginallyEnabled = baselineValues.get("enableMaterializedViewsBuilder") + ?.value as boolean; + const baselineInstances = baselineValues.get("instances")?.value as number; + if (!MaterializedViewsBuilderOriginallyEnabled || baselineInstances !== newValue) { + currentValues.set("warningBanner", { + value: { + textTKey: "WarningBannerOnUpdate", + link: { + href: "https://aka.ms/cosmos-db-materializedviewsbuilder-pricing", + textTKey: "MaterializedviewsBuilderPricing", + }, + } as Description, + hidden: false, + }); + } else { + currentValues.set("warningBanner", undefined); + } + + currentValues.set("costPerHour", { + value: calculateCost(currentValues.get("sku").value as string, newValue as number), + }); + + return currentValues; +}; + +const onEnableMaterializedViewsBuilderChange = ( + newValue: InputType, + currentValues: Map, + baselineValues: ReadonlyMap +): Map => { + currentValues.set("enableMaterializedViewsBuilder", { value: newValue }); + const MaterializedViewsBuilderOriginallyEnabled = baselineValues.get("enableMaterializedViewsBuilder") + ?.value as boolean; + if (MaterializedViewsBuilderOriginallyEnabled === newValue) { + currentValues.set("sku", baselineValues.get("sku")); + currentValues.set("instances", baselineValues.get("instances")); + currentValues.set("costPerHour", baselineValues.get("costPerHour")); + currentValues.set("warningBanner", baselineValues.get("warningBanner")); + currentValues.set("metricsString", baselineValues.get("metricsString")); + return currentValues; + } + + currentValues.set("warningBanner", undefined); + if (newValue === true) { + currentValues.set("warningBanner", { + value: { + textTKey: "WarningBannerOnUpdate", + link: { + href: "https://aka.ms/cosmos-db-materializedviewsbuilder-pricing", + textTKey: "MaterializedviewsBuilderPricing", + }, + } as Description, + hidden: false, + }); + + currentValues.set("costPerHour", { + value: calculateCost(baselineValues.get("sku").value as string, baselineValues.get("instances").value as number), + hidden: false, + }); + } else { + currentValues.set("warningBanner", { + value: { + textTKey: "WarningBannerOnDelete", + link: { + href: "https://aka.ms/cosmos-db-materializedviews", + textTKey: "DeprovisioningDetailsText", + }, + } as Description, + hidden: false, + }); + + currentValues.set("costPerHour", { value: costPerHourDefaultValue, hidden: true }); + } + const sku = currentValues.get("sku"); + const instances = currentValues.get("instances"); + const hideAttributes = newValue === undefined || !(newValue as boolean); + currentValues.set("sku", { + value: sku.value, + hidden: hideAttributes, + disabled: MaterializedViewsBuilderOriginallyEnabled, + }); + currentValues.set("instances", { + value: instances.value, + hidden: hideAttributes, + disabled: MaterializedViewsBuilderOriginallyEnabled, + }); + + currentValues.set("metricsString", { + value: metricsStringValue, + hidden: !newValue || !MaterializedViewsBuilderOriginallyEnabled, + }); + + return currentValues; +}; + +const skuDropDownItems: ChoiceItem[] = [ + { labelTKey: "CosmosD2s", key: CosmosD2s }, + { labelTKey: "CosmosD4s", key: CosmosD4s }, + { labelTKey: "CosmosD8s", key: CosmosD8s }, + { labelTKey: "CosmosD16s", key: CosmosD16s }, +]; + +const getSkus = async (): Promise => { + return skuDropDownItems; +}; + +const getInstancesMin = async (): Promise => { + return 1; +}; + +const getInstancesMax = async (): Promise => { + return 5; +}; + +const NumberOfInstancesDropdownInfo: Info = { + messageTKey: "ResizingDecisionText", + link: { + href: "https://aka.ms/cosmos-db-materializedviewsbuilder-size", + textTKey: "ResizingDecisionLink", + }, +}; + +const ApproximateCostDropDownInfo: Info = { + messageTKey: "CostText", + link: { + href: "https://aka.ms/cosmos-db-materializedviewsbuilder-pricing", + textTKey: "MaterializedviewsBuilderPricing", + }, +}; + +let priceMap: Map>; +let currencyCode: string; +let regions: Array; + +const calculateCost = (skuName: string, instanceCount: number): Description => { + const telemetryData = { + feature: "Calculate approximate cost", + function: "calculateCost", + description: "performs final calculation", + selfServeClassName: MaterializedViewsBuilder.name, + }; + const calculateCostTimestamp = selfServeTraceStart(telemetryData); + + try { + let costPerHour = 0; + for (const region of regions) { + const incrementalCost = priceMap.get(region).get(skuName.replace("Cosmos.", "")); + if (incrementalCost === undefined) { + throw new Error("Value not found in map."); + } + costPerHour += incrementalCost; + } + + if (costPerHour === 0) { + throw new Error("Cost per hour = 0"); + } + + costPerHour *= instanceCount; + costPerHour = Math.round(costPerHour * 100) / 100; + + selfServeTraceSuccess(telemetryData, calculateCostTimestamp); + return { + textTKey: `${costPerHour} ${currencyCode}`, + type: DescriptionType.Text, + }; + } catch (err) { + const failureTelemetry = { err, regions, priceMap, selfServeClassName: MaterializedViewsBuilder.name }; + selfServeTraceFailure(failureTelemetry, calculateCostTimestamp); + + return costPerHourDefaultValue; + } +}; + +@IsDisplayable() +@RefreshOptions({ retryIntervalInMs: 20000 }) +export default class MaterializedViewsBuilder extends SelfServeBaseClass { + public onRefresh = async (): Promise => { + return await refreshMaterializedViewsBuilderProvisioning(); + }; + + public onSave = async ( + currentValues: Map, + baselineValues: Map + ): Promise => { + selfServeTrace({ selfServeClassName: MaterializedViewsBuilder.name }); + + const MaterializedViewsBuilderCurrentlyEnabled = currentValues.get("enableMaterializedViewsBuilder") + ?.value as boolean; + const MaterializedViewsBuilderOriginallyEnabled = baselineValues.get("enableMaterializedViewsBuilder") + ?.value as boolean; + + currentValues.set("warningBanner", undefined); + + if (MaterializedViewsBuilderOriginallyEnabled) { + if (!MaterializedViewsBuilderCurrentlyEnabled) { + const operationStatusUrl = await deleteMaterializedViewsBuilderResource(); + return { + operationStatusUrl: operationStatusUrl, + portalNotification: { + initialize: { + titleTKey: "DeleteInitializeTitle", + messageTKey: "DeleteInitializeMessage", + }, + success: { + titleTKey: "DeleteSuccessTitle", + messageTKey: "DeleteSuccesseMessage", + }, + failure: { + titleTKey: "DeleteFailureTitle", + messageTKey: "DeleteFailureMessage", + }, + }, + }; + } else { + const sku = currentValues.get("sku")?.value as string; + const instances = currentValues.get("instances").value as number; + const operationStatusUrl = await updateMaterializedViewsBuilderResource(sku, instances); + return { + operationStatusUrl: operationStatusUrl, + portalNotification: { + initialize: { + titleTKey: "UpdateInitializeTitle", + messageTKey: "UpdateInitializeMessage", + }, + success: { + titleTKey: "UpdateSuccessTitle", + messageTKey: "UpdateSuccesseMessage", + }, + failure: { + titleTKey: "UpdateFailureTitle", + messageTKey: "UpdateFailureMessage", + }, + }, + }; + } + } else { + const sku = currentValues.get("sku")?.value as string; + const instances = currentValues.get("instances").value as number; + const operationStatusUrl = await updateMaterializedViewsBuilderResource(sku, instances); + return { + operationStatusUrl: operationStatusUrl, + portalNotification: { + initialize: { + titleTKey: "CreateInitializeTitle", + messageTKey: "CreateInitializeMessage", + }, + success: { + titleTKey: "CreateSuccessTitle", + messageTKey: "CreateSuccesseMessage", + }, + failure: { + titleTKey: "CreateFailureTitle", + messageTKey: "CreateFailureMessage", + }, + }, + }; + } + }; + + public initialize = async (): Promise> => { + // Based on the RP call enableMaterializedViewsBuilder will be true if it has not yet been enabled and false if it has. + const defaults = new Map(); + defaults.set("enableMaterializedViewsBuilder", { value: false }); + defaults.set("sku", { value: CosmosD2s, hidden: true }); + defaults.set("instances", { value: await getInstancesMin(), hidden: true }); + defaults.set("costPerHour", undefined); + defaults.set("metricsString", { + value: undefined, + hidden: true, + }); + + regions = await getRegions(); + const priceMapAndCurrencyCode = await getPriceMapAndCurrencyCode(regions); + priceMap = priceMapAndCurrencyCode.priceMap; + currencyCode = priceMapAndCurrencyCode.currencyCode; + + const response = await getCurrentProvisioningState(); + if (response.status && response.status !== "Deleting") { + defaults.set("enableMaterializedViewsBuilder", { value: true }); + defaults.set("sku", { value: response.sku, disabled: true }); + defaults.set("instances", { value: response.instances, disabled: false }); + defaults.set("costPerHour", { value: calculateCost(response.sku, response.instances) }); + + defaults.set("metricsString", { + value: metricsStringValue, + hidden: false, + }); + } + defaults.set("warningBanner", undefined); + return defaults; + }; + + @Values({ + isDynamicDescription: true, + }) + warningBanner: string; + + @Values({ + description: { + textTKey: "MaterializedViewsBuilderDescription", + type: DescriptionType.Text, + link: { + href: "https://aka.ms/cosmos-db-materializedviews", + textTKey: "LearnAboutMaterializedViews", + }, + }, + }) + description: string; + + @OnChange(onEnableMaterializedViewsBuilderChange) + @Values({ + labelTKey: "MaterializedViewsBuilder", + trueLabelTKey: "Provisioned", + falseLabelTKey: "Deprovisioned", + }) + enableMaterializedViewsBuilder: boolean; + + @OnChange(onSKUChange) + @Values({ + labelTKey: "SKUs", + choices: getSkus, + placeholderTKey: "SKUsPlaceHolder", + }) + sku: ChoiceItem; + + @OnChange(onNumberOfInstancesChange) + @PropertyInfo(NumberOfInstancesDropdownInfo) + @Values({ + labelTKey: "NumberOfInstances", + min: getInstancesMin, + max: getInstancesMax, + step: 1, + uiType: NumberUiType.Spinner, + }) + instances: number; + + @PropertyInfo(ApproximateCostDropDownInfo) + @Values({ + labelTKey: "ApproximateCost", + isDynamicDescription: true, + }) + costPerHour: string; + + @Values({ + labelTKey: "MonitorUsage", + description: metricsStringValue, + }) + metricsString: string; +} diff --git a/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilderTypes.ts b/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilderTypes.ts new file mode 100644 index 000000000..ac521fdfa --- /dev/null +++ b/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilderTypes.ts @@ -0,0 +1,57 @@ +export type MaterializedViewsBuilderServiceResource = { + id: string; + name: string; + type: string; + properties: MaterializedViewsBuilderServiceProps; + locations: MaterializedViewsBuilderServiceLocations; +}; +export type MaterializedViewsBuilderServiceProps = { + serviceType: string; + creationTime: string; + status: string; + instanceSize: string; + instanceCount: number; + MaterializedViewsBuilderEndPoint: string; +}; + +export type MaterializedViewsBuilderServiceLocations = { + location: string; + status: string; + MaterializedViewsBuilderEndpoint: string; +}; + +export type UpdateMaterializedViewsBuilderRequestParameters = { + properties: UpdateMaterializedViewsBuilderRequestProperties; +}; + +export type UpdateMaterializedViewsBuilderRequestProperties = { + instanceSize: string; + instanceCount: number; + serviceType: string; +}; + +export type FetchPricesResponse = { + Items: Array; + NextPageLink: string | undefined; + Count: number; +}; + +export type PriceMapAndCurrencyCode = { + priceMap: Map>; + currencyCode: string; +}; + +export type PriceItem = { + retailPrice: number; + skuName: string; + currencyCode: string; +}; + +export type RegionsResponse = { + locations: Array; + location: string; +}; + +export type RegionItem = { + locationName: string; +}; diff --git a/src/SelfServe/SelfServe.tsx b/src/SelfServe/SelfServe.tsx index 99e6e51c9..f663a3ef9 100644 --- a/src/SelfServe/SelfServe.tsx +++ b/src/SelfServe/SelfServe.tsx @@ -58,6 +58,14 @@ const getDescriptor = async (selfServeType: SelfServeType): Promise> => { +export const getRegions = async (): Promise> => { const telemetryData = { feature: "Calculate approximate cost", function: "getRegions", @@ -149,8 +150,6 @@ export const getRegions = async (): Promise> => { const getRegionsTimestamp = selfServeTraceStart(telemetryData); try { - const regions = new Array(); - const response = await armRequestWithoutPolling({ host: configContext.ARM_ENDPOINT, path: getGeneralPath(userContext.subscriptionId, userContext.resourceGroup, userContext.databaseAccount.name), @@ -158,20 +157,12 @@ export const getRegions = async (): Promise> => { apiVersion: "2021-04-01-preview", }); - if (response.result.location !== undefined) { - regions.push(response.result.location.split(" ").join("").toLowerCase()); - } else { - for (const location of response.result.locations) { - regions.push(location.locationName.split(" ").join("").toLowerCase()); - } - } - selfServeTraceSuccess(telemetryData, getRegionsTimestamp); - return regions; + return response.result.properties.locations; } catch (err) { const failureTelemetry = { err, selfServeClassName: SqlX.name }; selfServeTraceFailure(failureTelemetry, getRegionsTimestamp); - return new Array(); + return new Array(); } }; @@ -179,7 +170,7 @@ const getFetchPricesPathForRegion = (subscriptionId: string): string => { return `/subscriptions/${subscriptionId}/providers/Microsoft.CostManagement/fetchPrices`; }; -export const getPriceMapAndCurrencyCode = async (regions: Array): Promise => { +export const getPriceMapAndCurrencyCode = async (regions: Array): Promise => { const telemetryData = { feature: "Calculate approximate cost", function: "getPriceMapAndCurrencyCode", @@ -191,7 +182,7 @@ export const getPriceMapAndCurrencyCode = async (regions: Array): Promis try { const priceMap = new Map>(); let currencyCode; - for (const region of regions) { + for (const regionItem of regions) { const regionPriceMap = new Map(); const response = await armRequestWithoutPolling({ @@ -202,7 +193,7 @@ export const getPriceMapAndCurrencyCode = async (regions: Array): Promis queryParams: { filter: "armRegionName eq '" + - region + + regionItem.locationName.split(" ").join("").toLowerCase() + "' and serviceFamily eq 'Databases' and productName eq 'Azure Cosmos DB Dedicated Gateway - General Purpose'", }, }); @@ -215,7 +206,7 @@ export const getPriceMapAndCurrencyCode = async (regions: Array): Promis } regionPriceMap.set(item.skuName, item.retailPrice); } - priceMap.set(region, regionPriceMap); + priceMap.set(regionItem.locationName, regionPriceMap); } selfServeTraceSuccess(telemetryData, getPriceMapAndCurrencyCodeTimestamp); diff --git a/src/SelfServe/SqlX/SqlX.tsx b/src/SelfServe/SqlX/SqlX.tsx index 76623cd97..a760d8d97 100644 --- a/src/SelfServe/SqlX/SqlX.tsx +++ b/src/SelfServe/SqlX/SqlX.tsx @@ -1,3 +1,4 @@ +import { RegionItem } from "SelfServe/SqlX/SqlxTypes"; import { IsDisplayable, OnChange, PropertyInfo, RefreshOptions, Values } from "../Decorators"; import { selfServeTrace, @@ -208,7 +209,7 @@ const ApproximateCostDropDownInfo: Info = { let priceMap: Map>; let currencyCode: string; -let regions: Array; +let regions: Array; const calculateCost = (skuName: string, instanceCount: number): Description => { const telemetryData = { @@ -221,27 +222,47 @@ const calculateCost = (skuName: string, instanceCount: number): Description => { try { let costPerHour = 0; - for (const region of regions) { - const incrementalCost = priceMap.get(region).get(skuName.replace("Cosmos.", "")); + let costBreakdown = ""; + for (const regionItem of regions) { + const incrementalCost = priceMap.get(regionItem.locationName).get(skuName.replace("Cosmos.", "")); if (incrementalCost === undefined) { - throw new Error("Value not found in map."); + throw new Error(`${regionItem.locationName} not found in price map.`); + } else if (incrementalCost === 0) { + throw new Error(`${regionItem.locationName} cost per hour = 0`); } - costPerHour += incrementalCost; + + let regionalInstanceCount = instanceCount; + if (regionItem.isZoneRedundant) { + regionalInstanceCount = Math.ceil(instanceCount * 1.5); + } + + const regionalCostPerHour = incrementalCost * regionalInstanceCount; + costBreakdown += ` + ${regionItem.locationName} ${regionItem.isZoneRedundant ? "(AZ)" : ""} + ${regionalCostPerHour} ${currencyCode} (${regionalInstanceCount} instances * ${incrementalCost} ${currencyCode})\ + `; + + if (regionalCostPerHour === 0) { + throw new Error(`${regionItem.locationName} Cost per hour = 0`); + } + + costPerHour += regionalCostPerHour; } if (costPerHour === 0) { throw new Error("Cost per hour = 0"); } - costPerHour *= instanceCount; costPerHour = Math.round(costPerHour * 100) / 100; selfServeTraceSuccess(telemetryData, calculateCostTimestamp); return { - textTKey: `${costPerHour} ${currencyCode}`, + textTKey: `${costPerHour} ${currencyCode} + ${costBreakdown}`, type: DescriptionType.Text, }; } catch (err) { + alert(err); const failureTelemetry = { err, regions, priceMap, selfServeClassName: SqlX.name }; selfServeTraceFailure(failureTelemetry, calculateCostTimestamp); diff --git a/src/SelfServe/SqlX/SqlxTypes.ts b/src/SelfServe/SqlX/SqlxTypes.ts index 7ca2fe264..3360df734 100644 --- a/src/SelfServe/SqlX/SqlxTypes.ts +++ b/src/SelfServe/SqlX/SqlxTypes.ts @@ -48,10 +48,14 @@ export type PriceItem = { }; export type RegionsResponse = { + properties: RegionsProperties; +}; + +export type RegionsProperties = { locations: Array; - location: string; }; export type RegionItem = { locationName: string; + isZoneRedundant: boolean; }; diff --git a/src/Shared/StorageUtility.ts b/src/Shared/StorageUtility.ts index 9c16467d2..0d8477016 100644 --- a/src/Shared/StorageUtility.ts +++ b/src/Shared/StorageUtility.ts @@ -14,4 +14,5 @@ export enum StorageKey { MostRecentActivity, SetPartitionKeyUndefined, GalleryCalloutDismissed, + VisitedAccounts, } diff --git a/src/Shared/Telemetry/TelemetryConstants.ts b/src/Shared/Telemetry/TelemetryConstants.ts index 2f43adb03..c926aa791 100644 --- a/src/Shared/Telemetry/TelemetryConstants.ts +++ b/src/Shared/Telemetry/TelemetryConstants.ts @@ -121,6 +121,16 @@ export enum Action { ExpandAddCollectionPaneAdvancedSection, SchemaAnalyzerClickAnalyze, SelfServeComponent, + LaunchQuickstart, + NewContainerHomepage, + Top3ItemsClicked, + LearningResourcesClicked, + PlayCarouselVideo, + OpenCarousel, + CompleteCarousel, + LaunchUITour, + CancelUITour, + CompleteUITour, } export const ActionModifiers = { diff --git a/src/UserContext.ts b/src/UserContext.ts index 96bfc2ecf..873a1dad0 100644 --- a/src/UserContext.ts +++ b/src/UserContext.ts @@ -1,3 +1,6 @@ +import { useCarousel } from "hooks/useCarousel"; +import { Action } from "Shared/Telemetry/TelemetryConstants"; +import { traceOpen } from "Shared/Telemetry/TelemetryProcessor"; import { AuthType } from "./AuthType"; import { DatabaseAccount } from "./Contracts/DataModels"; import { SubscriptionType } from "./Contracts/SubscriptionType"; @@ -33,7 +36,6 @@ interface UserContext { readonly accessToken?: string; readonly authorizationToken?: string; readonly resourceToken?: string; - readonly useSDKOperations: boolean; readonly subscriptionType?: SubscriptionType; readonly quotaId?: string; // API Type is not yet provided by ARM. You need to manually inspect all the capabilities+kind so we abstract that logic in userContext @@ -55,8 +57,9 @@ interface UserContext { export type ApiType = "SQL" | "Mongo" | "Gremlin" | "Tables" | "Cassandra"; export type PortalEnv = "localhost" | "blackforest" | "fairfax" | "mooncake" | "prod" | "dev"; +const ONE_WEEK_IN_MS = 604800000; + const features = extractFeatures(); -const { enableSDKoperations: useSDKOperations } = features; const userContext: UserContext = { apiType: "SQL", @@ -64,15 +67,39 @@ const userContext: UserContext = { isTryCosmosDBSubscription: false, portalEnv: "prod", features, - useSDKOperations, addCollectionFlight: CollectionCreation.DefaultAddCollectionDefaultFlight, subscriptionType: CollectionCreation.DefaultSubscriptionType, collectionCreationDefaults: CollectionCreationDefaults, }; +function isAccountNewerThanThresholdInMs(createdAt: string, threshold: number) { + let createdAtMs: number = Date.parse(createdAt); + if (isNaN(createdAtMs)) { + createdAtMs = 0; + } + + const nowMs: number = Date.now(); + const millisecsSinceAccountCreation = nowMs - createdAtMs; + return threshold > millisecsSinceAccountCreation; +} + function updateUserContext(newContext: Partial): void { if (newContext.databaseAccount) { newContext.apiType = apiType(newContext.databaseAccount); + + const isNewAccount = isAccountNewerThanThresholdInMs( + newContext.databaseAccount?.systemData?.createdAt || "", + ONE_WEEK_IN_MS + ); + + if ( + !localStorage.getItem(newContext.databaseAccount.id) && + (userContext.isTryCosmosDBSubscription || isNewAccount) + ) { + useCarousel.getState().setShouldOpen(true); + localStorage.setItem(newContext.databaseAccount.id, "true"); + traceOpen(Action.OpenCarousel); + } } Object.assign(userContext, newContext); } diff --git a/src/hooks/useCarousel.ts b/src/hooks/useCarousel.ts new file mode 100644 index 000000000..533dab397 --- /dev/null +++ b/src/hooks/useCarousel.ts @@ -0,0 +1,15 @@ +import create, { UseStore } from "zustand"; + +interface CarouselState { + shouldOpen: boolean; + showCoachMark: boolean; + setShouldOpen: (shouldOpen: boolean) => void; + setShowCoachMark: (showCoachMark: boolean) => void; +} + +export const useCarousel: UseStore = create((set) => ({ + shouldOpen: false, + showCoachMark: false, + setShouldOpen: (shouldOpen: boolean) => set({ shouldOpen }), + setShowCoachMark: (showCoachMark: boolean) => set({ showCoachMark }), +})); diff --git a/src/hooks/useKnockoutExplorer.ts b/src/hooks/useKnockoutExplorer.ts index 7a0330ff3..09b1654ca 100644 --- a/src/hooks/useKnockoutExplorer.ts +++ b/src/hooks/useKnockoutExplorer.ts @@ -352,6 +352,7 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) { hasWriteAccess: inputs.hasWriteAccess ?? true, addCollectionFlight: inputs.addCollectionDefaultFlight || CollectionCreation.DefaultAddCollectionDefaultFlight, collectionCreationDefaults: inputs.defaultCollectionThroughput, + isTryCosmosDBSubscription: inputs.isTryCosmosDBSubscription, }); if (inputs.features) { Object.assign(userContext.features, extractFeatures(new URLSearchParams(inputs.features))); diff --git a/src/hooks/useTabs.ts b/src/hooks/useTabs.ts index c8c059ab0..d8528c8a3 100644 --- a/src/hooks/useTabs.ts +++ b/src/hooks/useTabs.ts @@ -6,30 +6,43 @@ import TabsBase from "../Explorer/Tabs/TabsBase"; interface TabsState { openedTabs: TabsBase[]; + openedReactTabs: ReactTabKind[]; activeTab: TabsBase; + activeReactTab: ReactTabKind; activateTab: (tab: TabsBase) => void; activateNewTab: (tab: TabsBase) => void; + activateReactTab: (tabkind: ReactTabKind) => void; updateTab: (tab: TabsBase) => void; getTabs: (tabKind: ViewModels.CollectionTabKind, comparator?: (tab: TabsBase) => boolean) => TabsBase[]; refreshActiveTab: (comparator: (tab: TabsBase) => boolean) => void; closeTabsByComparator: (comparator: (tab: TabsBase) => boolean) => void; closeTab: (tab: TabsBase) => void; closeAllNotebookTabs: (hardClose: boolean) => void; + openAndActivateReactTab: (tabKind: ReactTabKind) => void; + closeReactTab: (tabKind: ReactTabKind) => void; +} + +export enum ReactTabKind { + Connect, + Home, } export const useTabs: UseStore = create((set, get) => ({ openedTabs: [], + openedReactTabs: [ReactTabKind.Home], activeTab: undefined, + activeReactTab: ReactTabKind.Home, activateTab: (tab: TabsBase): void => { if (get().openedTabs.some((openedTab) => openedTab.tabId === tab.tabId)) { - set({ activeTab: tab }); + set({ activeTab: tab, activeReactTab: undefined }); tab.onActivate(); } }, activateNewTab: (tab: TabsBase): void => { - set((state) => ({ openedTabs: [...state.openedTabs, tab], activeTab: tab })); + set((state) => ({ openedTabs: [...state.openedTabs, tab], activeTab: tab, activeReactTab: undefined })); tab.onActivate(); }, + activateReactTab: (tabKind: ReactTabKind): void => set({ activeTab: undefined, activeReactTab: tabKind }), updateTab: (tab: TabsBase) => { if (get().activeTab?.tabId === tab.tabId) { set({ activeTab: tab }); @@ -66,7 +79,7 @@ export const useTabs: UseStore = create((set, get) => ({ return true; }); if (updatedTabs.length === 0) { - set({ activeTab: undefined }); + set({ activeTab: undefined, activeReactTab: ReactTabKind.Home }); } if (tab.tabId === activeTab.tabId && tabIndex !== -1) { @@ -104,8 +117,27 @@ export const useTabs: UseStore = create((set, get) => ({ }); if (get().openedTabs.length === 0) { - set({ activeTab: undefined }); + set({ activeTab: undefined, activeReactTab: ReactTabKind.Home }); } } }, + openAndActivateReactTab: (tabKind: ReactTabKind) => { + if (get().openedReactTabs.indexOf(tabKind) === -1) { + set((state) => ({ + openedReactTabs: [...state.openedReactTabs, tabKind], + })); + } + + set({ activeTab: undefined, activeReactTab: tabKind }); + }, + closeReactTab: (tabKind: ReactTabKind) => { + const { activeReactTab, openedTabs, openedReactTabs } = get(); + if (activeReactTab === tabKind) { + openedTabs?.length > 0 + ? set({ activeTab: openedTabs[0], activeReactTab: undefined }) + : set({ activeTab: undefined, activeReactTab: openedReactTabs[0] }); + } + + set({ openedReactTabs: openedReactTabs.filter((tab: ReactTabKind) => tabKind !== tab) }); + }, })); diff --git a/src/hooks/useTeachingBubble.ts b/src/hooks/useTeachingBubble.ts new file mode 100644 index 000000000..e615fc9fe --- /dev/null +++ b/src/hooks/useTeachingBubble.ts @@ -0,0 +1,24 @@ +import { Collection } from "Contracts/ViewModels"; +import create, { UseStore } from "zustand"; + +interface TeachingBubbleState { + step: number; + isSampleDBExpanded: boolean; + isDocumentsTabOpened: boolean; + sampleCollection: Collection; + setStep: (step: number) => void; + setIsSampleDBExpanded: (isReady: boolean) => void; + setIsDocumentsTabOpened: (isOpened: boolean) => void; + setSampleCollection: (sampleCollection: Collection) => void; +} + +export const useTeachingBubble: UseStore = create((set) => ({ + step: 1, + isSampleDBExpanded: false, + isDocumentsTabOpened: false, + sampleCollection: undefined, + setStep: (step: number) => set({ step }), + setIsSampleDBExpanded: (isSampleDBExpanded: boolean) => set({ isSampleDBExpanded }), + setIsDocumentsTabOpened: (isDocumentsTabOpened: boolean) => set({ isDocumentsTabOpened }), + setSampleCollection: (sampleCollection: Collection) => set({ sampleCollection }), +})); diff --git a/test/sql/container.spec.ts b/test/sql/container.spec.ts index 82fda76aa..066344740 100644 --- a/test/sql/container.spec.ts +++ b/test/sql/container.spec.ts @@ -11,6 +11,7 @@ test("SQL CRUD", async () => { await page.goto("https://localhost:1234/testExplorer.html?accountName=portal-sql-runner-west-us"); const explorer = await waitForExplorer(); + await explorer.click('[data-test="New Container"]'); await explorer.fill('[aria-label="New database id"]', databaseId); await explorer.fill('[aria-label="Container id"]', containerId);