From 3f273ea7f849dafece8f4f5f60558021ecd41705 Mon Sep 17 00:00:00 2001 From: John Kaster Date: Tue, 17 Aug 2021 20:33:28 -0700 Subject: [PATCH] feat: http response explorer for RunIt (#800) `ResponseExplorer` adds to the RunIt **Response** tab: - collapsible body section - collapsible header table - copy to clipboard for SDK calls view via new `CodeCopy` component - also fixes the spinner behavior for the default Response tab - Login and Configure options are only needed for OAuth - ConfigForm also shows OAuth client configuration information - When `Save` is clicked on the config form, API specifications are reloaded from the configured server - If values are filled out for **RunIt** before `Login` is clicked, when OAuth returns, **RunIt** is re-opened and the entered values are restored in the Request form - added yarn scripts - `yarn dev:apix` - `yarn dev:xapix` New PR because old one was blocked by CLA requirements Co-authored-by: Bryn Ryans Joseph Axisa --- examplesIndex.json | 1629 +++++++++++------ package.json | 2 + packages/api-explorer/public/versions.json | 2 +- packages/api-explorer/src/ApiExplorer.tsx | 10 +- .../src/StandaloneApiExplorer.tsx | 9 +- .../DocMethodSummary/DocMethodSummary.tsx | 6 +- .../DocReferences/DocReferences.tsx | 2 +- .../src/components/DocReferences/utils.tsx | 4 +- .../components/DocResponses/DocResponses.tsx | 2 +- .../src/components/DocSDKs/DocSDKs.tsx | 3 +- .../src/components/DocSchema/DocSchema.tsx | 2 +- .../components/DocSdkUsage/DocSdkUsage.tsx | 2 +- .../src/components/DocTitle/DocTitle.tsx | 4 +- .../src/components/common/common.tsx | 4 +- .../src/components/common/index.ts | 2 +- packages/api-explorer/src/components/index.ts | 3 +- .../api-explorer/src/reducers/spec/utils.ts | 11 +- .../api-explorer/src/routes/AppRouter.tsx | 14 +- .../src/scenes/MethodScene/MethodScene.tsx | 30 +- .../MethodScene/components/DocRequestBody.tsx | 4 +- packages/extension-api-explorer/README.md | 13 +- .../src/ExtensionApiExplorer.tsx | 15 +- packages/run-it/src/RunIt.spec.tsx | 20 +- packages/run-it/src/RunIt.tsx | 62 +- .../Collapser/CollapserCard.spec.tsx | 19 + .../components/Collapser/CollapserCard.tsx | 9 +- .../src/components/Collapser/index.ts | 0 .../components/ConfigForm/ConfigDialog.tsx | 13 +- .../components/ConfigForm/ConfigForm.spec.tsx | 45 +- .../src/components/ConfigForm/ConfigForm.tsx | 31 +- .../components/ConfigForm/configUtils.spec.ts | 3 +- .../src/components/ConfigForm/configUtils.ts | 58 +- .../src/components/DataGrid/DataGrid.tsx | 9 +- .../components/DocSdkCalls/CodeCopy.spec.tsx | 42 + .../src/components/DocSdkCalls/CodeCopy.tsx | 58 + .../components/DocSdkCalls/DocMultiCall.tsx | 4 +- .../components/DocSdkCalls/DocSingleCall.tsx | 4 +- .../components/LoginForm/LoginForm.spec.tsx | 16 +- .../src/components/LoginForm/LoginForm.tsx | 19 +- .../PerfTracker/PerfTracker.spec.tsx | 2 +- .../RequestForm/RequestForm.spec.tsx | 10 +- .../components/RequestForm/RequestForm.tsx | 13 +- .../ResponseExplorer.spec.tsx | 86 + .../ResponseExplorer/ResponseExplorer.tsx | 164 ++ .../src/components/ResponseExplorer/index.ts | 26 + .../ShowResponse/ShowResponse.spec.tsx | 29 +- .../components/ShowResponse/ShowResponse.tsx | 22 +- .../components/ShowResponse/responseUtils.tsx | 42 +- .../common/StandaloneConfigurator.ts | 72 + .../run-it/src/components/common/common.tsx | 38 + .../run-it/src/components/common/index.ts | 27 + packages/run-it/src/components/index.ts | 13 +- .../src/scenes/OAuthScene/OAuthScene.tsx | 2 +- packages/run-it/src/test-data/responses.ts | 10 +- packages/run-it/src/utils/index.ts | 9 +- .../run-it/src/utils/requestUtils.spec.ts | 2 +- packages/run-it/src/utils/requestUtils.ts | 12 +- packages/sdk-rtl/src/oauthSession.ts | 2 +- 58 files changed, 1929 insertions(+), 837 deletions(-) rename packages/{api-explorer => run-it}/src/components/Collapser/CollapserCard.spec.tsx (71%) rename packages/{api-explorer => run-it}/src/components/Collapser/CollapserCard.tsx (90%) rename packages/{api-explorer => run-it}/src/components/Collapser/index.ts (100%) create mode 100644 packages/run-it/src/components/DocSdkCalls/CodeCopy.spec.tsx create mode 100644 packages/run-it/src/components/DocSdkCalls/CodeCopy.tsx create mode 100644 packages/run-it/src/components/ResponseExplorer/ResponseExplorer.spec.tsx create mode 100644 packages/run-it/src/components/ResponseExplorer/ResponseExplorer.tsx create mode 100644 packages/run-it/src/components/ResponseExplorer/index.ts create mode 100644 packages/run-it/src/components/common/StandaloneConfigurator.ts create mode 100644 packages/run-it/src/components/common/common.tsx create mode 100644 packages/run-it/src/components/common/index.ts diff --git a/examplesIndex.json b/examplesIndex.json index 4cfae5a75..e0ef7ac80 100644 --- a/examplesIndex.json +++ b/examplesIndex.json @@ -1,5 +1,5 @@ { - "commitHash": "bc698ff606bdc614a6ed2a3ea4a38abddf301d18", + "commitHash": "8ba94e4c304a2d77df81f952d3413011b79acf35", "remoteOrigin": "https://github.com/looker-open-source/sdk-codegen", "summaries": { "packages/sdk-codegen/src/codeGenerators.ts": { @@ -142,6 +142,10 @@ "summary": "Pause/Resume or Copy Schedules", "sourceFile": "examples/python/manage_schedules.py" }, + "examples/python/simple_schedule_plan.py": { + "summary": "Create a Simple Schedule Plan", + "sourceFile": "examples/python/simple_schedule_plan.py" + }, "examples/python/logout_all_users.py": { "summary": "Disable all active user sessions", "sourceFile": "examples/python/logout_all_users.py" @@ -302,10 +306,6 @@ "summary": "`WhollySheet.ts`", "sourceFile": "packages/wholly-sheet/src/WhollySheet.ts" }, - "examples/python/hackathon_app/sheets.py": { - "summary": "sheets.py", - "sourceFile": "examples/python/hackathon_app/sheets.py" - }, "packages/wholly-sheet/src/SheetSDK.ts": { "summary": "`SheetSDK.ts`", "sourceFile": "packages/wholly-sheet/src/SheetSDK.ts" @@ -393,15 +393,25 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 18, - "line": 710 + "line": 728 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 35, - "line": 716 + "line": 734 } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 49, + "line": 104 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 296 + }, { "sourceFile": "kotlin/src/test/TestAsync.kt", "column": 53, @@ -553,55 +563,60 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 34, - "line": 322 + "line": 323 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 34, - "line": 332 + "line": 333 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 37, - "line": 355 + "line": 356 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 34, - "line": 370 + "line": 371 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 30, - "line": 375 + "line": 376 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 34, - "line": 380 + "line": 381 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 30, - "line": 386 + "line": 387 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 30, - "line": 391 + "line": 392 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 32, - "line": 882 + "line": 900 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 30, - "line": 1063 + "line": 1081 } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 30, + "line": 233 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 30, @@ -634,7 +649,7 @@ { "sourceFile": "csharp/sdk/4.0/methods.cs", "column": 17, - "line": 6137 + "line": 6161 } ], ".go": [ @@ -646,19 +661,29 @@ { "sourceFile": "go/sdk/v4/methods.go", "column": 14, - "line": 4666 + "line": 4682 } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/main/com/looker/sdk/4.0/methods.kt", + "column": 18, + "line": 6083 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/main/com/looker/sdk/4.0/streams.kt", + "column": 18, + "line": 6081 + }, { "sourceFile": "kotlin/src/main/com/looker/sdk/4.0/methods.kt", "column": 18, - "line": 6227 + "line": 6252 }, { "sourceFile": "kotlin/src/main/com/looker/sdk/4.0/streams.kt", "column": 18, - "line": 6226 + "line": 6251 } ], ".ts": [ @@ -685,22 +710,22 @@ { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 14, - "line": 8218 + "line": 8250 }, { "sourceFile": "packages/sdk/src/4.0/methods.ts", "column": 16, - "line": 7702 + "line": 7732 }, { "sourceFile": "packages/sdk/src/4.0/methodsInterface.ts", "column": 16, - "line": 5466 + "line": 5489 }, { "sourceFile": "packages/sdk/src/4.0/streams.ts", "column": 16, - "line": 8841 + "line": 8875 }, { "sourceFile": "packages/sdk-codegen/src/python.gen.spec.ts", @@ -717,19 +742,19 @@ { "sourceFile": "python/looker_sdk/sdk/api40/methods.py", "column": 17, - "line": 7814 + "line": 7843 } ], ".swift": [ { "sourceFile": "swift/looker/sdk/methods.swift", "column": 18, - "line": 7256 + "line": 7285 }, { "sourceFile": "swift/looker/sdk/streams.swift", "column": 18, - "line": 7254 + "line": 7283 } ] } @@ -746,7 +771,7 @@ { "sourceFile": "csharp/sdk/4.0/methods.cs", "column": 7, - "line": 8075 + "line": 8158 } ], ".go": [ @@ -758,19 +783,29 @@ { "sourceFile": "go/sdk/v4/methods.go", "column": 4, - "line": 6122 + "line": 6172 } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/main/com/looker/sdk/4.0/methods.kt", + "column": 8, + "line": 8026 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/main/com/looker/sdk/4.0/streams.kt", + "column": 8, + "line": 8024 + }, { "sourceFile": "kotlin/src/main/com/looker/sdk/4.0/methods.kt", "column": 8, - "line": 8196 + "line": 8280 }, { "sourceFile": "kotlin/src/main/com/looker/sdk/4.0/streams.kt", "column": 8, - "line": 8195 + "line": 8279 } ], ".ts": [ @@ -797,22 +832,22 @@ { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 4, - "line": 10528 + "line": 10615 }, { "sourceFile": "packages/sdk/src/4.0/methods.ts", "column": 6, - "line": 9894 + "line": 9977 }, { "sourceFile": "packages/sdk/src/4.0/methodsInterface.ts", "column": 6, - "line": 7092 + "line": 7152 }, { "sourceFile": "packages/sdk/src/4.0/streams.ts", "column": 6, - "line": 11349 + "line": 11440 } ], ".py": [ @@ -824,19 +859,19 @@ { "sourceFile": "python/looker_sdk/sdk/api40/methods.py", "column": 7, - "line": 10181 + "line": 10277 } ], ".swift": [ { "sourceFile": "swift/looker/sdk/methods.swift", "column": 8, - "line": 9518 + "line": 9615 }, { "sourceFile": "swift/looker/sdk/streams.swift", "column": 8, - "line": 9516 + "line": 9613 } ] } @@ -900,6 +935,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 349 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -941,6 +981,16 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 26, + "line": 107 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 298 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 26, @@ -961,6 +1011,120 @@ ] } }, + "search_groups": { + "operationId": "search_groups", + "calls": { + ".py": [ + { + "sourceFile": "examples/python/add_users_to_group_from_csv.py", + "column": 12, + "line": 15 + } + ], + ".ts": [ + { + "sourceFile": "packages/hackathon/src/models/Hacker.ts", + "column": 11, + "line": 235 + } + ] + } + }, + "search_users": { + "operationId": "search_users", + "calls": { + ".py": [ + { + "sourceFile": "examples/python/add_users_to_group_from_csv.py", + "column": 28, + "line": 30 + }, + { + "sourceFile": "examples/python/disable_users_by_email.py", + "column": 20, + "line": 34 + }, + { + "sourceFile": "examples/python/transfer_all_schedules.py", + "column": 12, + "line": 23 + }, + { + "sourceFile": "python/tests/integration/test_methods.py", + "column": 11, + "line": 171 + } + ], + ".ts": [ + { + "sourceFile": "examples/typescript/sudoAsUser.ts", + "column": 4, + "line": 57 + }, + { + "sourceFile": "packages/hackathon/src/models/Hacker.ts", + "column": 11, + "line": 241 + }, + { + "sourceFile": "packages/sdk-node/test/methods.spec.ts", + "column": 8, + "line": 142 + }, + { + "sourceFile": "packages/sdk-node/test/methods.spec.ts", + "column": 10, + "line": 147 + }, + { + "sourceFile": "packages/sdk-node/test/methods.spec.ts", + "column": 8, + "line": 187 + }, + { + "sourceFile": "packages/sdk-node/test/methods.spec.ts", + "column": 10, + "line": 191 + }, + { + "sourceFile": "packages/sdk-node/test/methods.spec.ts", + "column": 8, + "line": 529 + } + ], + ".kt": [ + { + "sourceFile": "kotlin/src/test/TestSmoke.kt", + "column": 40, + "line": 15 + } + ], + ".swift": [ + { + "sourceFile": "swift/looker/Tests/lookerTests/methodsTests.swift", + "column": 31, + "line": 44 + }, + { + "sourceFile": "swift/looker/Tests/lookerTests/smokeTests.swift", + "column": 32, + "line": 69 + } + ] + } + }, + "add_group_user": { + "operationId": "add_group_user", + "calls": { + ".py": [ + { + "sourceFile": "examples/python/add_users_to_group_from_csv.py", + "column": 24, + "line": 33 + } + ] + } + }, "all_spaces": { "operationId": "all_spaces", "calls": { @@ -1091,17 +1255,17 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 23, - "line": 154 + "line": 155 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 486 + "line": 487 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 497 + "line": 498 } ], ".swift": [ @@ -1118,84 +1282,6 @@ ] } }, - "search_users": { - "operationId": "search_users", - "calls": { - ".py": [ - { - "sourceFile": "examples/python/disable_users_by_email.py", - "column": 20, - "line": 34 - }, - { - "sourceFile": "examples/python/transfer_all_schedules.py", - "column": 12, - "line": 23 - }, - { - "sourceFile": "python/tests/integration/test_methods.py", - "column": 11, - "line": 171 - } - ], - ".ts": [ - { - "sourceFile": "examples/typescript/sudoAsUser.ts", - "column": 4, - "line": 57 - }, - { - "sourceFile": "packages/hackathon/src/models/Hacker.ts", - "column": 11, - "line": 241 - }, - { - "sourceFile": "packages/sdk-node/test/methods.spec.ts", - "column": 8, - "line": 141 - }, - { - "sourceFile": "packages/sdk-node/test/methods.spec.ts", - "column": 10, - "line": 146 - }, - { - "sourceFile": "packages/sdk-node/test/methods.spec.ts", - "column": 8, - "line": 186 - }, - { - "sourceFile": "packages/sdk-node/test/methods.spec.ts", - "column": 10, - "line": 190 - }, - { - "sourceFile": "packages/sdk-node/test/methods.spec.ts", - "column": 8, - "line": 528 - } - ], - ".kt": [ - { - "sourceFile": "kotlin/src/test/TestSmoke.kt", - "column": 40, - "line": 15 - } - ], - ".swift": [ - { - "sourceFile": "swift/looker/Tests/lookerTests/methodsTests.swift", - "column": 31, - "line": 44 - }, - { - "sourceFile": "swift/looker/Tests/lookerTests/smokeTests.swift", - "column": 32, - "line": 69 - } - ] - } - }, "search_dashboards": { "operationId": "search_dashboards", "calls": { @@ -1230,45 +1316,55 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 36, - "line": 210 + "line": 211 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 42, - "line": 269 + "line": 270 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 35, - "line": 656 + "line": 657 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 658 + "line": 659 + }, + { + "sourceFile": "packages/sdk-node/test/methods.spec.ts", + "column": 33, + "line": 677 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 18, - "line": 682 + "line": 700 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 689 + "line": 707 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 32, - "line": 872 + "line": 890 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 38, - "line": 897 + "line": 915 } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 46, + "line": 253 + }, { "sourceFile": "kotlin/src/test/KotlinExample.kt", "column": 50, @@ -1470,22 +1566,22 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 35, - "line": 261 + "line": 262 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 34, - "line": 405 + "line": 406 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 8, - "line": 417 + "line": 418 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 438 + "line": 439 } ], ".swift": [ @@ -1553,6 +1649,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 311 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -1615,6 +1716,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 470 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -1685,6 +1791,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 523 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -1720,12 +1831,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 351 + "line": 352 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 33, - "line": 562 + "line": 563 } ], ".swift": [ @@ -1789,6 +1900,16 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 40, + "line": 87 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 409 + }, { "sourceFile": "kotlin/src/test/TestAsync.kt", "column": 45, @@ -1809,7 +1930,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 35, - "line": 434 + "line": 435 } ], ".swift": [ @@ -1970,9 +2091,19 @@ "sourceFile": "examples/python/manage_schedules.py", "column": 4, "line": 118 + }, + { + "sourceFile": "examples/python/simple_schedule_plan.py", + "column": 15, + "line": 12 } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 12, + "line": 176 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 12, @@ -2024,6 +2155,16 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 34, + "line": 210 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 34, + "line": 244 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 34, @@ -2044,12 +2185,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 37, - "line": 734 + "line": 752 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 891 + "line": 909 } ], ".swift": [ @@ -2181,6 +2322,16 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 411 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 32, + "line": 532 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -2244,6 +2395,16 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 12, + "line": 260 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 40, + "line": 462 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 12, @@ -2259,12 +2420,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 36, - "line": 808 + "line": 826 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 35, - "line": 819 + "line": 837 } ] } @@ -2293,12 +2454,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 956 + "line": 974 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 964 + "line": 982 } ] } @@ -2314,6 +2475,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 279 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -2345,6 +2511,21 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 49, + "line": 160 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 49, + "line": 195 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 481 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 49, @@ -2384,6 +2565,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 442 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -2415,6 +2601,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 320 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -2463,6 +2654,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 525 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -2473,7 +2669,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 28, - "line": 175 + "line": 176 } ], ".py": [ @@ -2540,6 +2736,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 483 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -2581,6 +2782,11 @@ } ], ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 375 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -2713,6 +2919,11 @@ "operationId": "create_look", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 12, + "line": 92 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 12, @@ -2754,6 +2965,11 @@ "operationId": "create_dashboard", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 12, + "line": 110 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 12, @@ -2764,7 +2980,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 900 + "line": 918 } ], ".py": [ @@ -2780,6 +2996,16 @@ "operationId": "all_boards", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 41, + "line": 123 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 347 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 41, @@ -2797,6 +3023,11 @@ "operationId": "create_board", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 12, + "line": 129 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 12, @@ -2809,6 +3040,11 @@ "operationId": "create_board_section", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 12, + "line": 138 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 12, @@ -2821,6 +3057,11 @@ "operationId": "create_board_item", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 12, + "line": 146 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 12, @@ -2833,6 +3074,11 @@ "operationId": "delete_scheduled_plan", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 32, + "line": 199 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 32, @@ -2845,6 +3091,16 @@ "operationId": "run_query", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 37, + "line": 213 + }, + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 40, + "line": 246 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 37, @@ -2860,17 +3116,17 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 14, - "line": 740 + "line": 758 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 14, - "line": 750 + "line": 768 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 14, - "line": 753 + "line": 771 } ], ".py": [ @@ -2918,6 +3174,11 @@ "operationId": "all_color_collections", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 268 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -2933,7 +3194,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 34, - "line": 300 + "line": 301 } ], ".py": [ @@ -2956,6 +3217,11 @@ "operationId": "color_collection", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 270 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -2968,6 +3234,11 @@ "operationId": "all_connections", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 277 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3002,6 +3273,11 @@ "operationId": "all_datagroups", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 286 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3012,7 +3288,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 40, - "line": 617 + "line": 618 } ] } @@ -3021,6 +3297,11 @@ "operationId": "datagroup", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 23, + "line": 288 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 23, @@ -3033,6 +3314,11 @@ "operationId": "all_dialect_infos", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 46, + "line": 304 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 46, @@ -3045,6 +3331,11 @@ "operationId": "folder", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 313 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3074,6 +3365,11 @@ "operationId": "group", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 322 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3086,6 +3382,11 @@ "operationId": "all_board_items", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 330 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3098,6 +3399,11 @@ "operationId": "board_item", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 332 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3110,6 +3416,11 @@ "operationId": "search_boards", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 44, + "line": 338 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 44, @@ -3122,6 +3433,11 @@ "operationId": "all_board_sections", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 357 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3134,6 +3450,11 @@ "operationId": "board_section", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 359 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3146,6 +3467,11 @@ "operationId": "all_integration_hubs", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 366 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3158,6 +3484,11 @@ "operationId": "integration_hub", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 368 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3170,6 +3501,11 @@ "operationId": "integration", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 377 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3182,6 +3518,11 @@ "operationId": "all_legacy_features", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 384 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3194,6 +3535,11 @@ "operationId": "legacy_feature", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 23, + "line": 386 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 23, @@ -3206,6 +3552,11 @@ "operationId": "all_locales", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 41, + "line": 392 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 41, @@ -3218,6 +3569,11 @@ "operationId": "all_lookml_models", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 399 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3230,6 +3586,11 @@ "operationId": "lookml_model", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 401 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3242,6 +3603,11 @@ "operationId": "all_model_sets", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 418 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3254,6 +3620,11 @@ "operationId": "model_set", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 420 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3266,6 +3637,11 @@ "operationId": "all_permission_sets", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 427 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3278,6 +3654,11 @@ "operationId": "permission_set", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 429 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3290,6 +3671,11 @@ "operationId": "all_permissions", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 45, + "line": 435 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 45, @@ -3302,6 +3688,11 @@ "operationId": "project", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 444 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3314,6 +3705,11 @@ "operationId": "all_roles", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 451 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3333,6 +3729,11 @@ "operationId": "role", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 23, + "line": 453 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 23, @@ -3345,6 +3746,11 @@ "operationId": "all_themes", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 491 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3357,6 +3763,11 @@ "operationId": "theme", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 493 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3369,6 +3780,11 @@ "operationId": "all_timezones", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 43, + "line": 499 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 43, @@ -3381,6 +3797,11 @@ "operationId": "all_user_attributes", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 506 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 14, @@ -3393,6 +3814,11 @@ "operationId": "user_attribute", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 28, + "line": 508 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 28, @@ -3405,6 +3831,11 @@ "operationId": "all_user_login_lockouts", "calls": { ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 51, + "line": 514 + }, { "sourceFile": "kotlin/src/test/TestMethods.kt", "column": 51, @@ -3413,6 +3844,40 @@ ] } }, + "all_workspaces": { + "operationId": "all_workspaces", + "calls": { + ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 14, + "line": 542 + }, + { + "sourceFile": "kotlin/src/test/TestMethods.kt", + "column": 14, + "line": 565 + } + ] + } + }, + "workspace": { + "operationId": "workspace", + "calls": { + ".kt": [ + { + "sourceFile": "kotlin/build/spotless/spotlessKotlin/src/test/TestMethods.kt", + "column": 23, + "line": 544 + }, + { + "sourceFile": "kotlin/src/test/TestMethods.kt", + "column": 23, + "line": 567 + } + ] + } + }, "create_user_attribute": { "operationId": "create_user_attribute", "calls": { @@ -3427,7 +3892,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 234 + "line": 235 } ] } @@ -3446,31 +3911,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 21, - "line": 246 - } - ] - } - }, - "all_workspaces": { - "operationId": "all_workspaces", - "calls": { - ".kt": [ - { - "sourceFile": "kotlin/src/test/TestMethods.kt", - "column": 14, - "line": 565 - } - ] - } - }, - "workspace": { - "operationId": "workspace", - "calls": { - ".kt": [ - { - "sourceFile": "kotlin/src/test/TestMethods.kt", - "column": 23, - "line": 567 + "line": 247 } ] } @@ -3489,12 +3930,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 160 + "line": 161 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 473 + "line": 474 } ], ".py": [ @@ -3537,12 +3978,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 279 + "line": 280 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 284 + "line": 285 } ], ".py": [ @@ -3580,12 +4021,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 23, - "line": 199 + "line": 200 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 38, - "line": 509 + "line": 510 } ], ".py": [ @@ -3633,12 +4074,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 37, - "line": 298 + "line": 299 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 39, - "line": 310 + "line": 311 } ], ".py": [ @@ -3681,12 +4122,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 306 + "line": 307 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 23, - "line": 312 + "line": 313 } ], ".py": [ @@ -3722,7 +4163,7 @@ { "sourceFile": "packages/extension-api-explorer/src/ExtensionApiExplorer.tsx", "column": 33, - "line": 99 + "line": 104 } ] } @@ -3734,7 +4175,7 @@ { "sourceFile": "packages/extension-api-explorer/src/ExtensionApiExplorer.tsx", "column": 36, - "line": 114 + "line": 119 } ] } @@ -4005,18 +4446,6 @@ ] } }, - "search_groups": { - "operationId": "search_groups", - "calls": { - ".ts": [ - { - "sourceFile": "packages/hackathon/src/models/Hacker.ts", - "column": 11, - "line": 235 - } - ] - } - }, "role_users": { "operationId": "role_users", "calls": { @@ -4381,397 +4810,397 @@ { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 333 + "line": 337 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 373 + "line": 377 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 449 + "line": 453 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 496 + "line": 500 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 794 + "line": 798 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 914 + "line": 918 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1080 + "line": 1084 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1274 + "line": 1278 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1297 + "line": 1301 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1322 + "line": 1326 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1488 + "line": 1492 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1668 + "line": 1672 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1791 + "line": 1795 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1931 + "line": 1935 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2188 + "line": 2192 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2422 + "line": 2426 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2782 + "line": 2814 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3027 + "line": 3059 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3055 + "line": 3087 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3099 + "line": 3131 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3243 + "line": 3275 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3490 + "line": 3522 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3615 + "line": 3647 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3889 + "line": 3921 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4002 + "line": 4034 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4221 + "line": 4253 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4435 + "line": 4467 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4564 + "line": 4596 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4775 + "line": 4807 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4802 + "line": 4834 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4825 + "line": 4857 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5057 + "line": 5089 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5276 + "line": 5308 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5568 + "line": 5600 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5621 + "line": 5653 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5808 + "line": 5840 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5908 + "line": 5940 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6011 + "line": 6043 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6035 + "line": 6067 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6094 + "line": 6126 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6347 + "line": 6379 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6451 + "line": 6483 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6816 + "line": 6848 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6852 + "line": 6884 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6971 + "line": 7003 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7061 + "line": 7093 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7096 + "line": 7128 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7122 + "line": 7154 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7148 + "line": 7180 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7197 + "line": 7229 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7358 + "line": 7390 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7429 + "line": 7461 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7665 + "line": 7697 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7793 + "line": 7825 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8029 + "line": 8061 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8165 + "line": 8197 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8331 + "line": 8363 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8420 + "line": 8452 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8452 + "line": 8484 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8492 + "line": 8524 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8528 + "line": 8560 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8557 + "line": 8589 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8809 + "line": 8841 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8998 + "line": 9030 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9044 + "line": 9076 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9585 + "line": 9617 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9644 + "line": 9676 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9827 + "line": 9859 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9956 + "line": 9988 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10173 + "line": 10205 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10332 + "line": 10419 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10618 + "line": 10705 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10720 + "line": 10807 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11039 + "line": 11126 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11272 + "line": 11359 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11458 + "line": 11545 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11481 + "line": 11568 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11537 + "line": 11624 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11689 + "line": 11776 }, { "sourceFile": "packages/sdk-codegen/src/typescript.gen.spec.ts", @@ -5018,257 +5447,257 @@ { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 394 + "line": 398 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 853 + "line": 857 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 880 + "line": 884 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 951 + "line": 955 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1057 + "line": 1061 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1251 + "line": 1255 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1441 + "line": 1445 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1621 + "line": 1625 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1743 + "line": 1747 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1866 + "line": 1870 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2131 + "line": 2135 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2238 + "line": 2242 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2858 + "line": 2890 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2885 + "line": 2917 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3173 + "line": 3205 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3317 + "line": 3349 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3467 + "line": 3499 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3664 + "line": 3696 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4135 + "line": 4167 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4384 + "line": 4416 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4513 + "line": 4545 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4724 + "line": 4756 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5010 + "line": 5042 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5523 + "line": 5555 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5646 + "line": 5678 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5671 + "line": 5703 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5727 + "line": 5759 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5885 + "line": 5917 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6264 + "line": 6296 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6527 + "line": 6559 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7029 + "line": 7061 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7735 + "line": 7767 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8376 + "line": 8408 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8768 + "line": 8800 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8952 + "line": 8984 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9221 + "line": 9253 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9468 + "line": 9500 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10261 + "line": 10293 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10515 + "line": 10602 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10668 + "line": 10755 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10743 + "line": 10830 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10791 + "line": 10878 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10839 + "line": 10926 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10887 + "line": 10974 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10935 + "line": 11022 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10987 + "line": 11074 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11091 + "line": 11178 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11164 + "line": 11251 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11216 + "line": 11303 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11427 + "line": 11514 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11612 + "line": 11699 } ] } @@ -6160,962 +6589,967 @@ { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 532 + "line": 536 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 733 + "line": 737 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 761 + "line": 765 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 983 + "line": 987 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1033 + "line": 1037 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1101 + "line": 1105 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1177 + "line": 1181 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1227 + "line": 1231 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1343 + "line": 1347 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1384 + "line": 1388 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1407 + "line": 1411 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1468 + "line": 1472 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1532 + "line": 1536 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1571 + "line": 1575 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1639 + "line": 1643 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1693 + "line": 1697 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1766 + "line": 1770 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1816 + "line": 1820 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1900 + "line": 1904 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1959 + "line": 1963 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1987 + "line": 1991 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2012 + "line": 2016 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2073 + "line": 2077 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2158 + "line": 2162 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2263 + "line": 2267 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2307 + "line": 2311 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2376 + "line": 2380 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2443 + "line": 2447 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2489 + "line": 2493 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2533 + "line": 2537 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2557 + "line": 2561 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2604 + "line": 2608 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2620 + "line": 2624 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2641 + "line": 2673 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2659 + "line": 2691 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2683 + "line": 2715 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2707 + "line": 2739 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2759 + "line": 2791 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2808 + "line": 2840 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2975 + "line": 3007 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3000 + "line": 3032 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3076 + "line": 3108 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3123 + "line": 3155 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3197 + "line": 3229 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3220 + "line": 3252 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3267 + "line": 3299 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3341 + "line": 3373 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3364 + "line": 3396 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3407 + "line": 3439 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3444 + "line": 3476 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3515 + "line": 3547 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3540 + "line": 3572 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3590 + "line": 3622 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3695 + "line": 3727 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3726 + "line": 3758 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3770 + "line": 3802 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3820 + "line": 3852 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3853 + "line": 3885 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3940 + "line": 3972 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4070 + "line": 4102 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4161 + "line": 4193 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4187 + "line": 4219 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4298 + "line": 4330 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4332 + "line": 4364 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4410 + "line": 4442 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4461 + "line": 4493 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4539 + "line": 4571 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4590 + "line": 4622 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4646 + "line": 4678 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4672 + "line": 4704 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4750 + "line": 4782 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4850 + "line": 4882 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4868 + "line": 4900 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4920 + "line": 4952 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4959 + "line": 4991 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5036 + "line": 5068 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5081 + "line": 5113 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5110 + "line": 5142 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5136 + "line": 5168 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5162 + "line": 5194 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5190 + "line": 5222 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5216 + "line": 5248 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5243 + "line": 5275 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5322 + "line": 5354 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5379 + "line": 5411 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5437 + "line": 5469 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5473 + "line": 5505 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5543 + "line": 5575 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5591 + "line": 5623 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5754 + "line": 5786 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5781 + "line": 5813 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5833 + "line": 5865 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5931 + "line": 5963 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5957 + "line": 5989 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6068 + "line": 6100 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6143 + "line": 6175 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6189 + "line": 6221 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6303 + "line": 6335 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6405 + "line": 6437 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6428 + "line": 6460 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6477 + "line": 6509 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6556 + "line": 6588 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6586 + "line": 6618 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6610 + "line": 6642 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6637 + "line": 6669 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6665 + "line": 6697 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6689 + "line": 6721 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6722 + "line": 6754 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6751 + "line": 6783 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6784 + "line": 6816 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6878 + "line": 6910 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6904 + "line": 6936 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7000 + "line": 7032 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7173 + "line": 7205 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7225 + "line": 7257 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7300 + "line": 7332 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7326 + "line": 7358 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7395 + "line": 7427 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7457 + "line": 7489 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7485 + "line": 7517 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7515 + "line": 7547 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7550 + "line": 7582 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7583 + "line": 7615 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7613 + "line": 7645 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7639 + "line": 7671 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7761 + "line": 7793 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7836 + "line": 7868 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7868 + "line": 7900 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7914 + "line": 7946 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7955 + "line": 7987 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7997 + "line": 8029 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8076 + "line": 8108 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8262 + "line": 8294 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8290 + "line": 8322 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8352 + "line": 8384 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8400 + "line": 8432 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8594 + "line": 8626 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8637 + "line": 8669 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8685 + "line": 8717 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8720 + "line": 8752 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8791 + "line": 8823 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8830 + "line": 8862 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8869 + "line": 8901 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8904 + "line": 8936 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8975 + "line": 9007 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9021 + "line": 9053 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9090 + "line": 9122 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9146 + "line": 9178 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9178 + "line": 9210 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9241 + "line": 9273 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9289 + "line": 9321 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9348 + "line": 9380 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9375 + "line": 9407 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9501 + "line": 9533 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9677 + "line": 9709 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9714 + "line": 9746 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9752 + "line": 9784 + }, + { + "sourceFile": "packages/sdk/src/4.0/funcs.ts", + "column": 9, + "line": 9886 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9854 + "line": 9956 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9924 + "line": 10048 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10016 + "line": 10087 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10055 + "line": 10146 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10114 + "line": 10176 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10144 + "line": 10234 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10202 + "line": 10338 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10283 + "line": 10370 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10301 + "line": 10388 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10384 + "line": 10471 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10428 + "line": 10515 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10468 + "line": 10555 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10566 + "line": 10653 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10591 + "line": 10678 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10693 + "line": 10780 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10768 + "line": 10855 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10816 + "line": 10903 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10864 + "line": 10951 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10912 + "line": 10999 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10962 + "line": 11049 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11012 + "line": 11099 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11066 + "line": 11153 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11116 + "line": 11203 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11141 + "line": 11228 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11191 + "line": 11278 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11241 + "line": 11328 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11295 + "line": 11382 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11363 + "line": 11450 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11503 + "line": 11590 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11562 + "line": 11649 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11643 + "line": 11730 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11716 + "line": 11803 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11763 + "line": 11850 }, { "sourceFile": "packages/sdk-codegen/src/specConverter.ts", "column": 32, - "line": 641 + "line": 643 }, { "sourceFile": "packages/sdk-codegen/src/specConverter.ts", "column": 50, - "line": 684 + "line": 686 }, { "sourceFile": "packages/sdk-codegen/src/typescript.gen.spec.ts", @@ -7357,242 +7791,247 @@ { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 560 + "line": 564 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 824 + "line": 828 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1009 + "line": 1013 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1124 + "line": 1128 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1203 + "line": 1207 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1361 + "line": 1365 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1598 + "line": 1602 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1720 + "line": 1724 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1843 + "line": 1847 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2100 + "line": 2104 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2215 + "line": 2219 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2286 + "line": 2290 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2332 + "line": 2336 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2399 + "line": 2403 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2468 + "line": 2472 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2512 + "line": 2516 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2583 + "line": 2587 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2834 + "line": 2652 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3149 + "line": 2866 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3293 + "line": 3181 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3565 + "line": 3325 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4038 + "line": 3597 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4105 + "line": 4070 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4252 + "line": 4137 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4360 + "line": 4284 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4489 + "line": 4392 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4620 + "line": 4521 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4700 + "line": 4652 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4893 + "line": 4732 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 4985 + "line": 4925 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5500 + "line": 5017 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5702 + "line": 5532 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5862 + "line": 5734 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 5985 + "line": 5894 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6235 + "line": 6017 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6377 + "line": 6267 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6503 + "line": 6409 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7274 + "line": 6535 + }, + { + "sourceFile": "packages/sdk/src/4.0/funcs.ts", + "column": 9, + "line": 7306 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8745 + "line": 8777 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 8929 + "line": 8961 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9198 + "line": 9230 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9441 + "line": 9473 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9891 + "line": 9923 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10229 + "line": 10261 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10490 + "line": 10577 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10645 + "line": 10732 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11397 + "line": 11484 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11589 + "line": 11676 } ] } @@ -7689,87 +8128,87 @@ { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 600 + "line": 604 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 642 + "line": 646 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 673 + "line": 677 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 704 + "line": 708 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 1145 + "line": 1149 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2038 + "line": 2042 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2355 + "line": 2359 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2732 + "line": 2764 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2920 + "line": 2952 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 2952 + "line": 2984 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 3641 + "line": 3673 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 6938 + "line": 6970 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 7703 + "line": 7735 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9266 + "line": 9298 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 9317 + "line": 9349 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 10083 + "line": 10115 }, { "sourceFile": "packages/sdk/src/4.0/funcs.ts", "column": 9, - "line": 11325 + "line": 11412 } ] } @@ -7875,12 +8314,12 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 21, - "line": 174 + "line": 175 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 12, - "line": 506 + "line": 507 } ], ".py": [ @@ -7904,7 +8343,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 23, - "line": 213 + "line": 214 } ] } @@ -7916,22 +8355,22 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 539 + "line": 540 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 554 + "line": 555 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 584 + "line": 585 }, { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 10, - "line": 595 + "line": 596 } ], ".py": [ @@ -7970,7 +8409,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 14, - "line": 971 + "line": 989 } ], ".py": [ @@ -7989,7 +8428,7 @@ { "sourceFile": "packages/sdk-node/test/methods.spec.ts", "column": 14, - "line": 1000 + "line": 1018 } ], ".py": [ @@ -8048,4 +8487,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 272fbfb04..0a2355d57 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,8 @@ "build:cjs": "lerna exec --stream 'BABEL_ENV=build_cjs babel src --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --no-comments'", "build:es": "lerna exec --stream 'BABEL_ENV=build babel src --root-mode upward --out-dir lib/esm --source-maps --extensions .ts,.tsx --no-comments'", "build:ts": "lerna exec --stream --sort 'tsc -b tsconfig.build.json'", + "dev:apix": "yarn workspace @looker/api-explorer develop", + "dev:xapix": "yarn workspace @looker/extension-api-explorer develop", "clean": "rm -Rf packages/*/lib", "prepublishOnly": "jest packages/sdk-rtl packages/sdk-node/test", "fix": "yarn lint:es --fix", diff --git a/packages/api-explorer/public/versions.json b/packages/api-explorer/public/versions.json index 85ae75f97..5ffecc67c 100644 --- a/packages/api-explorer/public/versions.json +++ b/packages/api-explorer/public/versions.json @@ -21,5 +21,5 @@ } ], "api_server_url": "https://localhost:8080", - "headless": true + "headless": false } diff --git a/packages/api-explorer/src/ApiExplorer.tsx b/packages/api-explorer/src/ApiExplorer.tsx index 173b805c3..1beb2279b 100644 --- a/packages/api-explorer/src/ApiExplorer.tsx +++ b/packages/api-explorer/src/ApiExplorer.tsx @@ -28,9 +28,8 @@ import React, { FC, useReducer, useState, useEffect, useCallback } from 'react' import { useLocation } from 'react-router' import styled, { createGlobalStyle } from 'styled-components' import { Aside, ComponentsProvider, Layout, Page } from '@looker/components' -import { Looker40SDK, Looker31SDK } from '@looker/sdk' import { SpecList } from '@looker/sdk-codegen' -import { loadSpecApi } from '@looker/run-it' +import { loadSpecApi, RunItSetter } from '@looker/run-it' import { SearchContext, LodeContext, @@ -52,10 +51,10 @@ import { useActions } from './hooks' export interface ApiExplorerProps { specs: SpecList - sdk?: Looker31SDK | Looker40SDK + envAdaptor: IApixEnvAdaptor + setVersionsUrl: RunItSetter exampleLodeUrl?: string declarationsLodeUrl?: string - envAdaptor: IApixEnvAdaptor headless?: boolean } @@ -64,6 +63,7 @@ export const BodyOverride = createGlobalStyle` html { height: 100%; overflow: hi const ApiExplorer: FC = ({ specs, envAdaptor, + setVersionsUrl, exampleLodeUrl = 'https://raw.githubusercontent.com/looker-open-source/sdk-codegen/main/examplesIndex.json', declarationsLodeUrl = `${apixFilesHost}/declarationsIndex.json`, headless = false, @@ -173,6 +173,8 @@ const ApiExplorer: FC = ({ specKey={spec.key} specs={specs} toggleNavigation={toggleNavigation} + envAdaptor={envAdaptor} + setVersionsUrl={setVersionsUrl} /> )} diff --git a/packages/api-explorer/src/StandaloneApiExplorer.tsx b/packages/api-explorer/src/StandaloneApiExplorer.tsx index a069aaea7..21727b22b 100644 --- a/packages/api-explorer/src/StandaloneApiExplorer.tsx +++ b/packages/api-explorer/src/StandaloneApiExplorer.tsx @@ -54,11 +54,13 @@ export const StandaloneApiExplorer: FC = ({ }) => { const [specs, setSpecs] = useState() const [embedded, setEmbedded] = useState(headless) + const [currentVersionsUrl, setCurrentVersionsUrl] = + useState(versionsUrl) useEffect(() => { - if (versionsUrl) { + if (currentVersionsUrl) { // Load specifications from the versions url - loadSpecsFromVersions(versionsUrl).then((response) => { + loadSpecsFromVersions(currentVersionsUrl).then((response) => { setSpecs(response.specs) if ('headless' in response) { // headless will default to false if it's not explicitly set @@ -68,7 +70,7 @@ export const StandaloneApiExplorer: FC = ({ } else { setSpecs(undefined) } - }, [versionsUrl]) + }, [currentVersionsUrl]) const chosenSdk: IAPIMethods = initRunItSdk(defaultConfigurator) @@ -85,6 +87,7 @@ export const StandaloneApiExplorer: FC = ({ specs={specs} envAdaptor={standaloneEnvAdaptor} headless={embedded} + setVersionsUrl={setCurrentVersionsUrl} /> ) : ( diff --git a/packages/api-explorer/src/components/DocMethodSummary/DocMethodSummary.tsx b/packages/api-explorer/src/components/DocMethodSummary/DocMethodSummary.tsx index 4dcbe7619..0be8e36f5 100644 --- a/packages/api-explorer/src/components/DocMethodSummary/DocMethodSummary.tsx +++ b/packages/api-explorer/src/components/DocMethodSummary/DocMethodSummary.tsx @@ -27,7 +27,7 @@ import React, { FC } from 'react' import { Card, CardContent, Flex, Space, Text } from '@looker/components' import { IMethod } from '@looker/sdk-codegen' import { MethodBadge } from '@looker/run-it' -import { ApixHeading } from '../common' +import { RunItHeading } from '../common' import { DocActivityType, DocRateLimited } from '../../components' import { DocSummaryStatus } from './DocSummaryStatus' @@ -47,9 +47,9 @@ export const DocMethodSummary: FC = ({ method }) => ( {method.httpMethod.toUpperCase()} - + {method.summary} - + diff --git a/packages/api-explorer/src/components/DocReferences/DocReferences.tsx b/packages/api-explorer/src/components/DocReferences/DocReferences.tsx index 4d11f16d2..df10d6ecc 100644 --- a/packages/api-explorer/src/components/DocReferences/DocReferences.tsx +++ b/packages/api-explorer/src/components/DocReferences/DocReferences.tsx @@ -27,8 +27,8 @@ import React, { FC, useContext } from 'react' import { ApiModel, IMethod, IType } from '@looker/sdk-codegen' +import { CollapserCard } from '@looker/run-it' import { SearchContext } from '../../context' -import { CollapserCard } from '../Collapser' import { DocReferenceItems } from './utils' interface DocReferencesProps { diff --git a/packages/api-explorer/src/components/DocReferences/utils.tsx b/packages/api-explorer/src/components/DocReferences/utils.tsx index 73d109def..c444a9457 100644 --- a/packages/api-explorer/src/components/DocReferences/utils.tsx +++ b/packages/api-explorer/src/components/DocReferences/utils.tsx @@ -28,7 +28,7 @@ import { ApiModel, IMethod, IType, Method } from '@looker/sdk-codegen' import { Link } from 'react-router-dom' import { buildMethodPath, buildTypePath, highlightHTML } from '../../utils' -import { ApixHeading } from '../common' +import { RunItHeading } from '../common' /** * Returns the tag for a given method name @@ -78,7 +78,7 @@ export const DocReferenceItems = ( return ( <> - {heading} + {heading} {items.map((item, index) => ( {index ? ', ' : ''} diff --git a/packages/api-explorer/src/components/DocResponses/DocResponses.tsx b/packages/api-explorer/src/components/DocResponses/DocResponses.tsx index 810d32a70..4a88fa1b4 100644 --- a/packages/api-explorer/src/components/DocResponses/DocResponses.tsx +++ b/packages/api-explorer/src/components/DocResponses/DocResponses.tsx @@ -28,7 +28,7 @@ import React, { FC } from 'react' import { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components' import { IMethodResponse } from '@looker/sdk-codegen' -import { CollapserCard } from '../Collapser' +import { CollapserCard } from '@looker/run-it' import { DocResponseTypes } from './DocResponseTypes' import { buildResponseTree } from './utils' diff --git a/packages/api-explorer/src/components/DocSDKs/DocSDKs.tsx b/packages/api-explorer/src/components/DocSDKs/DocSDKs.tsx index e34f02210..95a8975a5 100644 --- a/packages/api-explorer/src/components/DocSDKs/DocSDKs.tsx +++ b/packages/api-explorer/src/components/DocSDKs/DocSDKs.tsx @@ -34,11 +34,10 @@ import { CodeGen, Method, } from '@looker/sdk-codegen' -import { getGenerators } from '@looker/run-it' +import { CollapserCard, getGenerators } from '@looker/run-it' import { DocCode } from '../DocCode' import { getSelectedSdkLanguage } from '../../state' -import { CollapserCard } from '../Collapser' import { noComment } from './utils' import { DocDeclarations } from './DocDeclarations' diff --git a/packages/api-explorer/src/components/DocSchema/DocSchema.tsx b/packages/api-explorer/src/components/DocSchema/DocSchema.tsx index 5b85723eb..7938002b7 100644 --- a/packages/api-explorer/src/components/DocSchema/DocSchema.tsx +++ b/packages/api-explorer/src/components/DocSchema/DocSchema.tsx @@ -27,7 +27,7 @@ import React, { FC } from 'react' import { CodeDisplay } from '@looker/code-editor' -import { CollapserCard } from '../Collapser' +import { CollapserCard } from '@looker/run-it' interface DocSchemaProps { object: any diff --git a/packages/api-explorer/src/components/DocSdkUsage/DocSdkUsage.tsx b/packages/api-explorer/src/components/DocSdkUsage/DocSdkUsage.tsx index 01b82d88b..d336af9d8 100644 --- a/packages/api-explorer/src/components/DocSdkUsage/DocSdkUsage.tsx +++ b/packages/api-explorer/src/components/DocSdkUsage/DocSdkUsage.tsx @@ -35,11 +35,11 @@ import { Pagination, } from '@looker/components' import { findExampleLanguages, IMethod } from '@looker/sdk-codegen' +import { CollapserCard } from '@looker/run-it' import { InsertDriveFile } from '@styled-icons/material-outlined/InsertDriveFile' import { useSelector } from 'react-redux' import { getSelectedSdkLanguage } from '../../state' -import { CollapserCard } from '../Collapser' import { LodeContext } from '../../context' import { exampleColumns, diff --git a/packages/api-explorer/src/components/DocTitle/DocTitle.tsx b/packages/api-explorer/src/components/DocTitle/DocTitle.tsx index 6e379ae2a..abcb5a7db 100644 --- a/packages/api-explorer/src/components/DocTitle/DocTitle.tsx +++ b/packages/api-explorer/src/components/DocTitle/DocTitle.tsx @@ -25,8 +25,8 @@ */ import React, { FC } from 'react' -import { ApixHeading } from '../common' +import { RunItHeading } from '../common' export const DocTitle: FC = (props) => ( - + ) diff --git a/packages/api-explorer/src/components/common/common.tsx b/packages/api-explorer/src/components/common/common.tsx index f1b85212e..b8e03b36c 100644 --- a/packages/api-explorer/src/components/common/common.tsx +++ b/packages/api-explorer/src/components/common/common.tsx @@ -33,9 +33,9 @@ import { HEADER_REM } from '../Header' * Common styled components to be used across the whole library */ -export const ApixHeading = styled(Heading)`` +export const RunItHeading = styled(Heading)`` -ApixHeading.defaultProps = { +RunItHeading.defaultProps = { mb: 'xsmall', pt: 'xsmall', } diff --git a/packages/api-explorer/src/components/common/index.ts b/packages/api-explorer/src/components/common/index.ts index f75162893..3e1636026 100644 --- a/packages/api-explorer/src/components/common/index.ts +++ b/packages/api-explorer/src/components/common/index.ts @@ -23,5 +23,5 @@ SOFTWARE. */ -export { ApixHeading, ApixSection } from './common' +export { RunItHeading, ApixSection } from './common' export { Loader } from './Loader' diff --git a/packages/api-explorer/src/components/index.ts b/packages/api-explorer/src/components/index.ts index 1f8eb364d..2ed96a7f0 100644 --- a/packages/api-explorer/src/components/index.ts +++ b/packages/api-explorer/src/components/index.ts @@ -23,7 +23,7 @@ SOFTWARE. */ -export { ApixHeading, ApixSection, Loader } from './common' +export { RunItHeading, ApixSection, Loader } from './common' export { DocActivityType } from './DocActivityType' export { DocCode } from './DocCode' export { DocMethodSummary } from './DocMethodSummary' @@ -40,7 +40,6 @@ export { DocTitle } from './DocTitle' export { Header } from './Header' export { SideNav } from './SideNav' export { ExploreType, ExploreProperty } from './ExploreType' -export { CollapserCard } from './Collapser' export { DocSchema } from './DocSchema' export { Link } from './Link' export { ErrorBoundary } from './ErrorBoundary' diff --git a/packages/api-explorer/src/reducers/spec/utils.ts b/packages/api-explorer/src/reducers/spec/utils.ts index 8ad2b8faa..9c2e74a57 100644 --- a/packages/api-explorer/src/reducers/spec/utils.ts +++ b/packages/api-explorer/src/reducers/spec/utils.ts @@ -26,6 +26,7 @@ import { SpecList } from '@looker/sdk-codegen' import { Location as HLocation } from 'history' +import { OAuthSession } from '@looker/sdk-rtl' import { diffPath, oAuthPath } from '../../utils' import { SpecState } from './reducer' @@ -76,7 +77,13 @@ export const getDefaultSpecKey = (specs: SpecList): string => { * @param specs to use to find the default spec key */ export const getSpecKey = (location: AbstractLocation, specs?: SpecList) => { - const pathName = location.pathname + let pathName = location.pathname + if (pathName === `/${oAuthPath}`) { + const returnUrl = sessionStorage.getItem(OAuthSession.returnUrlKey) + if (returnUrl) { + pathName = returnUrl + } + } const pathNodes = pathName.split('/') let specKey = '' if ( @@ -95,7 +102,7 @@ export const getSpecKey = (location: AbstractLocation, specs?: SpecList) => { /** * Creates a default state object with the spec matching the specKey defined * in the url or the default criteria in getDefaultSpecKey - * @param specs A collection of specs + * @param specList A collection of specs * @param location Standalone or extension location * @returns An object to be used as default state */ diff --git a/packages/api-explorer/src/routes/AppRouter.tsx b/packages/api-explorer/src/routes/AppRouter.tsx index e014d36d3..d1b5ec3a4 100644 --- a/packages/api-explorer/src/routes/AppRouter.tsx +++ b/packages/api-explorer/src/routes/AppRouter.tsx @@ -26,17 +26,19 @@ import React, { FC, useContext } from 'react' import { Redirect, Route, Switch } from 'react-router-dom' import { ApiModel, SpecList } from '@looker/sdk-codegen' -import { OAuthScene, RunItContext } from '@looker/run-it' +import { OAuthScene, RunItSetter, RunItContext } from '@looker/run-it' import { HomeScene, MethodScene, TagScene, TypeScene } from '../scenes' import { DiffScene } from '../scenes/DiffScene' -import { diffPath, oAuthPath } from '../utils' +import { diffPath, IApixEnvAdaptor, oAuthPath } from '../utils' interface AppRouterProps { api: ApiModel specKey: string specs: SpecList toggleNavigation: (target?: boolean) => void + envAdaptor: IApixEnvAdaptor + setVersionsUrl: RunItSetter } export const AppRouter: FC = ({ @@ -44,6 +46,8 @@ export const AppRouter: FC = ({ api, specs, toggleNavigation, + envAdaptor, + setVersionsUrl, }) => { const { sdk } = useContext(RunItContext) const maybeOauth = sdk && sdk.apiVersion === '4.0' @@ -65,7 +69,11 @@ export const AppRouter: FC = ({ - + diff --git a/packages/api-explorer/src/scenes/MethodScene/MethodScene.tsx b/packages/api-explorer/src/scenes/MethodScene/MethodScene.tsx index 0f74d034f..249eab15c 100644 --- a/packages/api-explorer/src/scenes/MethodScene/MethodScene.tsx +++ b/packages/api-explorer/src/scenes/MethodScene/MethodScene.tsx @@ -36,7 +36,7 @@ import { import { Beaker } from '@looker/icons' import { ThemeContext } from 'styled-components' import { useParams } from 'react-router-dom' -import { RunIt, RunItContext } from '@looker/run-it' +import { RunIt, RunItSetter, RunItContext, RunItFormKey } from '@looker/run-it' import { ApiModel, typeRefs } from '@looker/sdk-codegen' import { useSelector } from 'react-redux' @@ -55,33 +55,44 @@ import { DocSchema, } from '../../components' import { getSelectedSdkLanguage } from '../../state' +import { IApixEnvAdaptor } from '../../utils' import { DocOperation, DocRequestBody } from './components' import { createInputs } from './utils' -interface DocMethodProps { +interface MethodSceneProps { api: ApiModel + envAdaptor: IApixEnvAdaptor + setVersionsUrl: RunItSetter } -interface DocMethodParams { +interface MethodSceneParams { methodName: string specKey: string } -export const MethodScene: FC = ({ api }) => { +const showRunIt = (envAdaptor: IApixEnvAdaptor) => { + return !!envAdaptor.localStorageGetItem(RunItFormKey) +} + +export const MethodScene: FC = ({ + api, + envAdaptor, + setVersionsUrl, +}) => { const { sdk } = useContext(RunItContext) const sdkLanguage = useSelector(getSelectedSdkLanguage) - const { methodName, specKey } = useParams() - const { value, toggle } = useToggle() + const { methodName, specKey } = useParams() + const { value, toggle } = useToggle(showRunIt(envAdaptor)) const [method, setMethod] = useState(api.methods[methodName]) const seeTypes = typeRefs(api, method.customTypes) + const { colors } = useContext(ThemeContext) + + const RunItButton = value ? Button : ButtonOutline useEffect(() => { setMethod(api.methods[methodName]) }, [api, methodName]) - const { colors } = useContext(ThemeContext) - - const RunItButton = value ? Button : ButtonOutline const runItToggle = ( = ({ api }) => { api={api} inputs={createInputs(api, method)} method={method} + setVersionsUrl={setVersionsUrl} /> diff --git a/packages/api-explorer/src/scenes/MethodScene/components/DocRequestBody.tsx b/packages/api-explorer/src/scenes/MethodScene/components/DocRequestBody.tsx index f4d1cb135..4ba281f7c 100644 --- a/packages/api-explorer/src/scenes/MethodScene/components/DocRequestBody.tsx +++ b/packages/api-explorer/src/scenes/MethodScene/components/DocRequestBody.tsx @@ -25,8 +25,8 @@ */ import React, { FC } from 'react' import { IMethod } from '@looker/sdk-codegen' - -import { ExploreType, CollapserCard } from '../../../components' +import { CollapserCard } from '@looker/run-it' +import { ExploreType } from '../../../components' interface DocRequestBodyProps { method: IMethod diff --git a/packages/extension-api-explorer/README.md b/packages/extension-api-explorer/README.md index ea27613b7..ac2a088d1 100644 --- a/packages/extension-api-explorer/README.md +++ b/packages/extension-api-explorer/README.md @@ -3,11 +3,11 @@ The API Explorer extension can be manually installed and run with a Looker instance using the following steps: 1. create a new LookML project called `apix` -1. create a new model. In `apix.model`, put: +2. create a new model. In `apix.model`, put: ```lookml connection: "" ``` -1. in `manifest.lkml` put: +3. in `manifest.lkml` put: ```lookml project_name: "api-explorer" application: api-explorer { @@ -22,6 +22,7 @@ The API Explorer extension can be manually installed and run with a Looker insta raw_api_request: yes use_form_submit: yes use_embeds: yes + use_clipboard: yes core_api_methods: ["versions", "api_spec"] external_api_urls: ["https://raw.githubusercontent.com", "http://localhost:30000"] oauth2_urls: [] @@ -29,13 +30,13 @@ The API Explorer extension can be manually installed and run with a Looker insta } ``` the `http://localhost:30000` is for when you want to use the [API Explorer file server](/apix-files/README.md) -1. save all changes and deploy to production -1. in the root of `sdk-codegen`: +4. save all changes and deploy to production +5. in the root of `sdk-codegen`: ```sh yarn && yarn build ``` -1. in `packages/extension-api-explorer`: +6. in `packages/extension-api-explorer`: ```sh yarn develop ``` -1. on the Looker web page, click `Browse|API Explorer` to view the API Explorer +7. on the Looker web page, click `Browse|API Explorer` to view the API Explorer diff --git a/packages/extension-api-explorer/src/ExtensionApiExplorer.tsx b/packages/extension-api-explorer/src/ExtensionApiExplorer.tsx index a51391ba8..a83fe00cf 100644 --- a/packages/extension-api-explorer/src/ExtensionApiExplorer.tsx +++ b/packages/extension-api-explorer/src/ExtensionApiExplorer.tsx @@ -25,7 +25,12 @@ */ import React, { FC, useContext, useEffect, useState } from 'react' -import { IStorageValue, RunItProvider, RunItConfigurator } from '@looker/run-it' +import { + IStorageValue, + RunItProvider, + RunItConfigurator, + runItNoSet, +} from '@looker/run-it' import { useRouteMatch } from 'react-router-dom' import { ExtensionContext, @@ -128,7 +133,13 @@ export const ExtensionApiExplorer: FC = () => { <> {specs ? ( - + ) : ( )} diff --git a/packages/run-it/src/RunIt.spec.tsx b/packages/run-it/src/RunIt.spec.tsx index 9912a1ebc..02eaceb01 100644 --- a/packages/run-it/src/RunIt.spec.tsx +++ b/packages/run-it/src/RunIt.spec.tsx @@ -32,11 +32,8 @@ import { ApiModel, IMethod } from '@looker/sdk-codegen' import { RunIt, RunItInput } from './RunIt' import { api, testTextResponse } from './test-data' -import { initRunItSdk, RunItSettings } from './utils' -import { - defaultConfigurator, - StandaloneConfigurator, -} from './components/ConfigForm/configUtils' +import { initRunItSdk, runItNoSet, RunItSettings } from './utils' +import { defaultConfigurator, StandaloneConfigurator } from './components' import { RunItProvider } from './RunItProvider' const sdk = initRunItSdk(new StandaloneConfigurator()) @@ -90,7 +87,12 @@ describe('RunIt', () => { configurator={defaultConfigurator} basePath="/api/4.0" > - + ) } @@ -133,11 +135,13 @@ describe('RunIt', () => { }) test('the form submit handler invokes the request callback on submit', async () => { + renderRunIt() const defaultRequestCallback = jest .spyOn(sdk.authSession.transport, 'rawRequest') .mockResolvedValueOnce(testTextResponse) - renderRunIt() - userEvent.click(screen.getByRole('button', { name: run })) + const button = screen.getByRole('button', { name: run }) + expect(button).toBeInTheDocument() + userEvent.click(button) await waitFor(() => { expect(defaultRequestCallback).toHaveBeenCalled() expect( diff --git a/packages/run-it/src/RunIt.tsx b/packages/run-it/src/RunIt.tsx index 6c20927a3..b4a95d9a8 100644 --- a/packages/run-it/src/RunIt.tsx +++ b/packages/run-it/src/RunIt.tsx @@ -39,26 +39,33 @@ import { TabPanel, useTabs, } from '@looker/components' -import { IRawResponse } from '@looker/sdk-rtl' import { ApiModel, IMethod } from '@looker/sdk-codegen' -import { RequestForm, ShowResponse, Loading, DocSdkCalls } from './components' +import { + RequestForm, + ResponseExplorer, + Loading, + DocSdkCalls, + ResponseContent, + RunItConfigurator, + RunItFormKey, +} from './components' import { createRequestParams, runRequest, pathify, sdkNeedsConfig, + prepareInputs, RunItSettings, } from './utils' import { PerfTracker, PerfTimings } from './components/PerfTracker' -import { prepareInputs } from './utils/requestUtils' -import { RunItContext } from '.' +import { RunItSetter, runItNoSet, RunItContext } from '.' export type RunItHttpMethod = 'GET' | 'PUT' | 'POST' | 'PATCH' | 'DELETE' /** * Generic collection */ -export type RunItValues = { [key: string]: any } +export type RunItValues = Record type RunItInputType = | 'boolean' @@ -90,11 +97,15 @@ export interface RunItInput { description: string } -export type StorageLocation = 'session' | 'local' - -export interface IStorageValue { - location: StorageLocation - value: string +/** + * Load and clear any saved form values from the session + * @param configurator storage service + */ +const formValues = (configurator: RunItConfigurator) => { + const storage = configurator.getStorage(RunItFormKey) + const result = storage.value ? JSON.parse(storage.value) : {} + configurator.removeStorage(RunItFormKey) + return result } interface RunItProps { @@ -104,12 +115,12 @@ interface RunItProps { inputs: RunItInput[] /** Method to test */ method: IMethod + /** Set versions Url callback */ + setVersionsUrl: RunItSetter /** Sdk language to use for generating call syntax */ sdkLanguage?: string } -type ResponseContent = IRawResponse | undefined - /** * Given an array of inputs, a method, and an api model it renders a REST request form * which on submit performs a REST request and renders the response with the appropriate MIME type handler @@ -118,13 +129,14 @@ export const RunIt: FC = ({ api, inputs, method, + setVersionsUrl = runItNoSet, sdkLanguage = 'All', }) => { const httpMethod = method.httpMethod as RunItHttpMethod const endpoint = method.endpoint const { sdk, configurator, basePath } = useContext(RunItContext) - const [requestContent, setRequestContent] = useState({}) + const [requestContent, setRequestContent] = useState(formValues(configurator)) const [activePathParams, setActivePathParams] = useState({}) const [loading, setLoading] = useState(false) const [responseContent, setResponseContent] = @@ -175,21 +187,24 @@ export const RunIt: FC = ({ } catch (err) { // This should not happen but it could. runRequest uses // sdk.ok to login once. sdk.ok throws an error so fake - // out the response so that something can be rendered. + // out the response so something can be rendered. response = { ok: false, statusMessage: err.message ? err.message : 'Unknown error!', statusCode: -1, + contentType: 'application/json', body: JSON.stringify(err), + headers: {}, } as ResponseContent } setResponseContent(response) + setLoading(false) } } - useEffect(() => { - setLoading(!responseContent) - }, [responseContent]) + // useEffect(() => { + // setLoading(!responseContent) + // }, [responseContent]) // No SDK, no RunIt for you! if (!sdk) return <> @@ -216,6 +231,7 @@ export const RunIt: FC = ({ setHasConfig={setHasConfig} configurator={configurator} isExtension={isExtension} + setVersionsUrl={setVersionsUrl} /> @@ -223,13 +239,11 @@ export const RunIt: FC = ({ loading={loading} message={`${httpMethod} ${pathify(endpoint, activePathParams)}`} /> - {responseContent && ( - - )} + { {childText} ) + expect(screen.getByRole('separator')).toBeInTheDocument() + expect(screen.getByRole('heading', { level: 3 })).toBeInTheDocument() + expect(screen.getByText(childText)).toBeInTheDocument() const header = screen.getByText(heading) + await userEvent.click(header) + await waitFor(() => { + expect(screen.queryByText(childText)).not.toBeInTheDocument() + }) + }) + test('it renders heading, children but no divider', async () => { + const heading = 'Foo' + const childText = 'Bar' + renderWithTheme( + + {childText} + + ) + expect(screen.queryByRole('separator')).not.toBeInTheDocument() + expect(screen.getByRole('heading', { level: 4 })).toBeInTheDocument() expect(screen.getByText(childText)).toBeInTheDocument() + const header = screen.getByText(heading) await userEvent.click(header) await waitFor(() => { expect(screen.queryByText(childText)).not.toBeInTheDocument() diff --git a/packages/api-explorer/src/components/Collapser/CollapserCard.tsx b/packages/run-it/src/components/Collapser/CollapserCard.tsx similarity index 90% rename from packages/api-explorer/src/components/Collapser/CollapserCard.tsx rename to packages/run-it/src/components/Collapser/CollapserCard.tsx index 04c5a3af1..0e4835d6c 100644 --- a/packages/api-explorer/src/components/Collapser/CollapserCard.tsx +++ b/packages/run-it/src/components/Collapser/CollapserCard.tsx @@ -34,13 +34,14 @@ import { } from '@looker/components' import { ArrowRight } from '@styled-icons/material/ArrowRight' import { ArrowDropDown } from '@styled-icons/material/ArrowDropDown' -import { ApixHeading } from '../common' +import { RunItHeading } from '../common' interface CollapserCardProps { id?: string heading: string children: ReactElement defaultOpen?: boolean + divider?: boolean } /** @@ -51,12 +52,14 @@ export const CollapserCard: FC = ({ heading, children, defaultOpen = true, + divider = true, }) => { + const level = divider ? 'h3' : 'h4' const { value, toggle } = useToggle(defaultOpen) return ( <> - + {divider && } = ({ indicatorIcons={{ close: , open: }} > - {heading} + {heading} {children} diff --git a/packages/api-explorer/src/components/Collapser/index.ts b/packages/run-it/src/components/Collapser/index.ts similarity index 100% rename from packages/api-explorer/src/components/Collapser/index.ts rename to packages/run-it/src/components/Collapser/index.ts diff --git a/packages/run-it/src/components/ConfigForm/ConfigDialog.tsx b/packages/run-it/src/components/ConfigForm/ConfigDialog.tsx index 41be4640b..a77b37acd 100644 --- a/packages/run-it/src/components/ConfigForm/ConfigDialog.tsx +++ b/packages/run-it/src/components/ConfigForm/ConfigDialog.tsx @@ -27,24 +27,31 @@ import React, { Dispatch, FC } from 'react' import { Dialog, Button, Tooltip } from '@looker/components' import { Settings } from '@styled-icons/material-outlined' +import { RunItSetter } from '../..' import { ConfigForm, RunItConfigurator } from '.' interface ConfigDialogProps { + configurator: RunItConfigurator + setVersionsUrl: RunItSetter /** * A set state callback fn used to set a hasConfig flag indicating whether OAuth config details are present * */ setHasConfig?: Dispatch - configurator: RunItConfigurator } export const ConfigDialog: FC = ({ - setHasConfig, configurator, + setVersionsUrl, + setHasConfig, }) => ( + } > diff --git a/packages/run-it/src/components/ConfigForm/ConfigForm.spec.tsx b/packages/run-it/src/components/ConfigForm/ConfigForm.spec.tsx index b6bad1967..2229d76f9 100644 --- a/packages/run-it/src/components/ConfigForm/ConfigForm.spec.tsx +++ b/packages/run-it/src/components/ConfigForm/ConfigForm.spec.tsx @@ -28,12 +28,9 @@ import React from 'react' import { fireEvent, screen, waitFor } from '@testing-library/react' import { renderWithTheme } from '@looker/components-test-utils' import userEvent from '@testing-library/user-event' -import { - ConfigForm, - defaultConfigurator, - loadSpecsFromVersions, - RunItConfigKey, -} from '.' +import { defaultConfigurator } from '..' +import { runItNoSet } from '../..' +import { ConfigForm, loadSpecsFromVersions, RunItConfigKey } from '.' // jest.mock('./configUtils', () => ({ // loadSpecsFromVersions: jest.fn(), @@ -49,7 +46,12 @@ describe('ConfigForm', () => { }) test('it creates an empty config form without stored config', async () => { - renderWithTheme() + renderWithTheme( + + ) const title = screen.getByRole('heading') as HTMLHeadingElement expect(title).toHaveTextContent('RunIt Configuration') @@ -78,7 +80,12 @@ describe('ConfigForm', () => { }) test('it disables and enable verify for bad and good urls', async () => { - renderWithTheme() + renderWithTheme( + + ) const apiUrl = screen.getByRole('textbox', { name: apiLabel, }) as HTMLInputElement @@ -107,9 +114,13 @@ describe('ConfigForm', () => { }) }) - test('it can have a custom tile', () => { + test('it can have a custom title', () => { renderWithTheme( - + ) const title = screen.getByRole('heading') as HTMLHeadingElement expect(title).toHaveTextContent('New title') @@ -124,7 +135,12 @@ describe('ConfigForm', () => { web_server_url: 'http://local', }) ) - renderWithTheme() + renderWithTheme( + + ) const apiUrl = screen.getByRole('textbox', { name: apiLabel, }) as HTMLInputElement @@ -176,7 +192,12 @@ describe('ConfigForm', () => { 'local' ) - renderWithTheme() + renderWithTheme( + + ) const title = screen.getByRole('heading') as HTMLHeadingElement expect(title).toHaveTextContent('RunIt Configuration') diff --git a/packages/run-it/src/components/ConfigForm/ConfigForm.tsx b/packages/run-it/src/components/ConfigForm/ConfigForm.tsx index 3d7b6948e..3ef605158 100644 --- a/packages/run-it/src/components/ConfigForm/ConfigForm.tsx +++ b/packages/run-it/src/components/ConfigForm/ConfigForm.tsx @@ -52,6 +52,7 @@ import { CodeDisplay } from '@looker/code-editor' import { CheckProgress } from '@looker/icons' import { Delete } from '@styled-icons/material/Delete' import { Done } from '@styled-icons/material/Done' +import { RunItSetter } from '../..' import { RunItConfigKey, validateUrl, @@ -74,17 +75,6 @@ const FetchMessage: FC = ({ message, intent }) => { ) } -interface ConfigFormProps { - /** Title for the config form */ - title?: string - dialogue?: boolean - /** A set state callback which if present allows for editing, setting or clearing OAuth configuration parameters */ - setHasConfig?: Dispatch - /** A callback for closing the parent dialog for when the form is rendered within dialog */ - handleClose?: () => void - configurator: RunItConfigurator -} - const defaultFieldValues = { baseUrl: '', webUrl: '', @@ -95,10 +85,20 @@ const defaultFieldValues = { fetchIntent: 'positive', } +interface ConfigFormProps { + configurator: RunItConfigurator + setVersionsUrl: RunItSetter + /** Title for the config form */ + title?: string + /** A set state callback which if present allows for editing, setting or clearing OAuth configuration parameters */ + setHasConfig?: Dispatch +} + export const ConfigForm: FC = ({ + configurator, + setVersionsUrl, title, setHasConfig, - configurator, }) => { const fetchIntent = 'fetchIntent' const fetchResult = 'fetchResult' @@ -141,9 +141,8 @@ export const ConfigForm: FC = ({ e.preventDefault() try { updateFields(fetchResult, '') - const { webUrl, baseUrl } = await loadSpecsFromVersions( - `${fields.baseUrl}/versions` - ) + const versionsUrl = `${fields.baseUrl}/versions` + const { webUrl, baseUrl } = await loadSpecsFromVersions(versionsUrl) if (!baseUrl || !webUrl) { throw new Error('Invalid server configuration') } @@ -151,7 +150,6 @@ export const ConfigForm: FC = ({ updateFields('webUrl', webUrl) updateFields(fetchIntent, 'positive') updateFields(fetchResult, 'Configuration is valid') - await configurator.removeStorage(RunItConfigKey) if (save) { configurator.setStorage( RunItConfigKey, @@ -163,6 +161,7 @@ export const ConfigForm: FC = ({ 'local' ) if (setHasConfig) setHasConfig(true) + setVersionsUrl(versionsUrl) closeModal() } } catch (err) { diff --git a/packages/run-it/src/components/ConfigForm/configUtils.spec.ts b/packages/run-it/src/components/ConfigForm/configUtils.spec.ts index 49b58e8a3..c4bdffbae 100644 --- a/packages/run-it/src/components/ConfigForm/configUtils.spec.ts +++ b/packages/run-it/src/components/ConfigForm/configUtils.spec.ts @@ -24,7 +24,8 @@ */ -import { defaultConfigurator, RunItConfigKey, validateUrl } from './configUtils' +import { defaultConfigurator } from '..' +import { RunItConfigKey, validateUrl } from './configUtils' describe('configUtils', () => { describe('storage', () => { diff --git a/packages/run-it/src/components/ConfigForm/configUtils.ts b/packages/run-it/src/components/ConfigForm/configUtils.ts index b8e97e28a..634108054 100644 --- a/packages/run-it/src/components/ConfigForm/configUtils.ts +++ b/packages/run-it/src/components/ConfigForm/configUtils.ts @@ -33,11 +33,16 @@ import { upgradeSpecObject, } from '@looker/sdk-codegen' import { BrowserTransport, DefaultSettings } from '@looker/sdk-rtl' -import { IStorageValue } from '../../index' -export const RunItConfigKey = 'RunItConfig' +export type StorageLocation = 'session' | 'local' -export const RunItValuesKey = 'RunItValues' +export interface IStorageValue { + location: StorageLocation + value: string +} + +export const RunItConfigKey = 'RunItConfig' +export const RunItFormKey = 'RunItForm' export interface RunItConfigurator { getStorage: (key: string, defaultValue?: string) => IStorageValue @@ -45,53 +50,6 @@ export interface RunItConfigurator { removeStorage(key: string): void } -// TODO move into its own file and probably completely refactor. This is just an example -export class StandaloneConfigurator implements RunItConfigurator { - getStorage(key: string, defaultValue = ''): IStorageValue { - let value = sessionStorage.getItem(key) - if (value) { - return { - location: 'session', - value, - } - } - value = localStorage.getItem(key) - if (value) { - return { - location: 'local', - value, - } - } - return { - location: 'session', - value: defaultValue, - } - } - - setStorage( - key: string, - value: string, - location: 'local' | 'session' = 'session' - ): string { - switch (location.toLocaleLowerCase()) { - case 'local': - localStorage.setItem(key, value) - break - case 'session': - sessionStorage.setItem(key, value) - break - } - return value - } - - removeStorage(key: string) { - localStorage.removeItem(key) - sessionStorage.removeItem(key) - } -} - -export const defaultConfigurator = new StandaloneConfigurator() - /** * Validates URL and standardizes it * @param url to validate diff --git a/packages/run-it/src/components/DataGrid/DataGrid.tsx b/packages/run-it/src/components/DataGrid/DataGrid.tsx index dc938b06b..686441e41 100644 --- a/packages/run-it/src/components/DataGrid/DataGrid.tsx +++ b/packages/run-it/src/components/DataGrid/DataGrid.tsx @@ -24,7 +24,7 @@ */ -import React, { FC, ReactElement, useState } from 'react' +import React, { FC, ReactElement, useEffect, useState } from 'react' import { DataTable, Pagination, @@ -57,7 +57,12 @@ export const DataGrid: FC = ({ data, raw, pageSize = 15 }) => { page * pageSize + 1 ) const pageItems = gridRows(pageItemData) - + useEffect(() => { + if (data.length === 2) { + // Show raw tab by default for 1 data row + tabs.onSelectTab(1) + } + }, [data]) return ( <> diff --git a/packages/run-it/src/components/DocSdkCalls/CodeCopy.spec.tsx b/packages/run-it/src/components/DocSdkCalls/CodeCopy.spec.tsx new file mode 100644 index 000000000..44880fd11 --- /dev/null +++ b/packages/run-it/src/components/DocSdkCalls/CodeCopy.spec.tsx @@ -0,0 +1,42 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ + +import React from 'react' +import { screen } from '@testing-library/react' +import { renderWithTheme } from '@looker/components-test-utils' +import { CodeCopy } from './CodeCopy' + +describe('CodeCopy', () => { + test('displays code and clipboard UI', async () => { + const code = 'Some text. Supposed to be good for you.' + const caption = 'Copy this!' + renderWithTheme() + const copy = screen.getByRole('button', { name: caption }) + expect(copy).toBeInTheDocument() + const pre = screen.getByText(code) + expect(pre).toHaveTextContent(code) + }) +}) diff --git a/packages/run-it/src/components/DocSdkCalls/CodeCopy.tsx b/packages/run-it/src/components/DocSdkCalls/CodeCopy.tsx new file mode 100644 index 000000000..0fb211357 --- /dev/null +++ b/packages/run-it/src/components/DocSdkCalls/CodeCopy.tsx @@ -0,0 +1,58 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ +import React, { FC } from 'react' +import { CodeDisplay, CodeDisplayProps } from '@looker/code-editor' +import { Space, CopyToClipboard } from '@looker/components' + +interface CodeCopyProps extends CodeDisplayProps { + caption?: string +} +/** + * Shows code with clipboard copying support + */ +export const CodeCopy: FC = ({ + language = 'json', + code, + caption = 'Copy', + pattern = '', + transparent = false, + inline = false, + lineNumbers = true, +}) => { + return ( + + + {caption} + + ) +} diff --git a/packages/run-it/src/components/DocSdkCalls/DocMultiCall.tsx b/packages/run-it/src/components/DocSdkCalls/DocMultiCall.tsx index 3cc11a2ab..e62e2dad2 100644 --- a/packages/run-it/src/components/DocSdkCalls/DocMultiCall.tsx +++ b/packages/run-it/src/components/DocSdkCalls/DocMultiCall.tsx @@ -26,9 +26,9 @@ import React, { FC } from 'react' import { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components' -import { CodeDisplay } from '@looker/code-editor' import { getGenerators } from './callUtils' import { DocSdkCallsProps } from './DocSdkCalls' +import { CodeCopy } from './CodeCopy' /** * Generates the SDK call syntax for all supported languages @@ -52,7 +52,7 @@ export const DocMultiCall: FC> = ({ const code = gen.makeTheCall(method, inputs) return ( - + ) })} diff --git a/packages/run-it/src/components/DocSdkCalls/DocSingleCall.tsx b/packages/run-it/src/components/DocSdkCalls/DocSingleCall.tsx index 4d55e7562..b2dfb9c47 100644 --- a/packages/run-it/src/components/DocSdkCalls/DocSingleCall.tsx +++ b/packages/run-it/src/components/DocSdkCalls/DocSingleCall.tsx @@ -25,8 +25,8 @@ */ import React, { FC } from 'react' import { getCodeGenerator } from '@looker/sdk-codegen' -import { CodeDisplay } from '@looker/code-editor' +import { CodeCopy } from './CodeCopy' import { DocSdkCallsProps } from './DocSdkCalls' /** @@ -41,5 +41,5 @@ export const DocSingleCall: FC = ({ const generator = getCodeGenerator(sdkLanguage, api) const code = generator!.makeTheCall(method, inputs) - return + return } diff --git a/packages/run-it/src/components/LoginForm/LoginForm.spec.tsx b/packages/run-it/src/components/LoginForm/LoginForm.spec.tsx index 0a1051d24..8f0a0b481 100644 --- a/packages/run-it/src/components/LoginForm/LoginForm.spec.tsx +++ b/packages/run-it/src/components/LoginForm/LoginForm.spec.tsx @@ -29,13 +29,20 @@ import { screen, waitFor } from '@testing-library/react' import { renderWithTheme } from '@looker/components-test-utils' import userEvent from '@testing-library/user-event' import { defaultConfigurator } from '..' +import { runItNoSet } from '../..' import { LoginForm } from './LoginForm' describe('LoginForm', () => { // https://testing-library.com/docs/guide-which-query test('it creates a login form without config button by default', async () => { - renderWithTheme() + renderWithTheme( + + ) const login = screen.getByRole('button', { name: 'Login', }) @@ -55,7 +62,12 @@ describe('LoginForm', () => { test('it includes a Config button if config setting is passed', async () => { renderWithTheme( - true} /> + true} + setVersionsUrl={runItNoSet} + /> ) const button = screen.getByRole('button', { name: 'Configure', diff --git a/packages/run-it/src/components/LoginForm/LoginForm.tsx b/packages/run-it/src/components/LoginForm/LoginForm.tsx index 4ebcb2dec..876dddd58 100644 --- a/packages/run-it/src/components/LoginForm/LoginForm.tsx +++ b/packages/run-it/src/components/LoginForm/LoginForm.tsx @@ -28,23 +28,35 @@ import React, { BaseSyntheticEvent, Dispatch, FC } from 'react' import { Button, Tooltip, Space } from '@looker/components' import { IAPIMethods } from '@looker/sdk-rtl' import { runItSDK } from '../../utils' -import { ConfigDialog, RunItConfigurator } from '../ConfigForm' +import { ConfigDialog, RunItFormKey, RunItConfigurator } from '../ConfigForm' +import { RunItValues, RunItSetter } from '../..' interface LoginFormProps { + configurator: RunItConfigurator + requestContent: RunItValues + setVersionsUrl: RunItSetter /** A set state callback which if present allows for editing, setting or clearing OAuth configuration parameters */ setHasConfig?: Dispatch /** SDK to use for login. Defaults to the `runItSDK` */ sdk?: IAPIMethods - configurator: RunItConfigurator } export const LoginForm: FC = ({ + configurator, + requestContent, + setVersionsUrl, sdk = runItSDK, setHasConfig, - configurator, }) => { const handleSubmit = async (e: BaseSyntheticEvent) => { e.preventDefault() + if (requestContent) { + configurator.setStorage( + RunItFormKey, + JSON.stringify(requestContent), + 'local' + ) + } // This will set storage variables and return to OAuthScene when successful await sdk?.authSession.login() } @@ -59,6 +71,7 @@ export const LoginForm: FC = ({ )} diff --git a/packages/run-it/src/components/PerfTracker/PerfTracker.spec.tsx b/packages/run-it/src/components/PerfTracker/PerfTracker.spec.tsx index ea0023f4e..01dcc9fb4 100644 --- a/packages/run-it/src/components/PerfTracker/PerfTracker.spec.tsx +++ b/packages/run-it/src/components/PerfTracker/PerfTracker.spec.tsx @@ -27,7 +27,7 @@ import { screen } from '@testing-library/react' import { renderWithTheme } from '@looker/components-test-utils' import React from 'react' -import { defaultConfigurator } from '../ConfigForm' +import { defaultConfigurator } from '..' import { PerfTracker } from './PerfTracker' import { LoadTimes, PerfTimings } from './perfUtils' diff --git a/packages/run-it/src/components/RequestForm/RequestForm.spec.tsx b/packages/run-it/src/components/RequestForm/RequestForm.spec.tsx index 3380e5e67..d8377f001 100644 --- a/packages/run-it/src/components/RequestForm/RequestForm.spec.tsx +++ b/packages/run-it/src/components/RequestForm/RequestForm.spec.tsx @@ -30,7 +30,8 @@ import { screen, waitFor } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { IAPIMethods } from '@looker/sdk-rtl' -import { defaultConfigurator } from '../ConfigForm' +import { defaultConfigurator } from '..' +import { runItNoSet } from '../..' import { RequestForm } from './RequestForm' describe('RequestForm', () => { @@ -50,6 +51,7 @@ describe('RequestForm', () => { renderWithTheme( { renderWithTheme( { renderWithTheme( { renderWithTheme( { renderWithTheme( { renderWithTheme( { renderWithTheme( + setRequestContent: Dispatch /** Is authentication required? */ needsAuth: boolean /** Does RunIt have the configuration values it needs? */ hasConfig: boolean + /** Hook to refresh specifications */ + setVersionsUrl: RunItSetter /** A set state callback which if present allows for editing, setting or clearing OAuth configuration parameters */ setHasConfig?: Dispatch /** Configuration plug-in for stand-alone or extension */ @@ -78,6 +79,7 @@ export const RequestForm: FC = ({ setRequestContent, needsAuth, hasConfig, + setVersionsUrl, setHasConfig, configurator, isExtension = false, @@ -138,8 +140,10 @@ export const RequestForm: FC = ({ needsAuth ? ( ) : ( @@ -150,6 +154,7 @@ export const RequestForm: FC = ({ ) )} diff --git a/packages/run-it/src/components/ResponseExplorer/ResponseExplorer.spec.tsx b/packages/run-it/src/components/ResponseExplorer/ResponseExplorer.spec.tsx new file mode 100644 index 000000000..a23740331 --- /dev/null +++ b/packages/run-it/src/components/ResponseExplorer/ResponseExplorer.spec.tsx @@ -0,0 +1,86 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ +import React from 'react' +import { renderWithTheme } from '@looker/components-test-utils' +import { screen, waitFor } from '@testing-library/react' +import { IRawResponse } from '@looker/sdk-rtl' +import userEvent from '@testing-library/user-event' +import { ResponseExplorer, ResponseHeaders } from '.' + +const response: IRawResponse = { + url: '/sample/url', + ok: true, + statusCode: 200, + statusMessage: 'OK', + body: Buffer.from('plain text'), + contentType: 'text/plain', + headers: { + 'content-type': 'text/plain', + link: 'nah, not really', + 'x-total-count': '0', + }, +} + +describe('ResponseExplorer', () => { + test('renders response headers', async () => { + renderWithTheme() + const heading = 'Headers (3)' + const header = screen.getByText(heading) + expect(header).toBeInTheDocument() + await userEvent.click(header) + await waitFor(() => { + // TODO figure out a more specific selector? + const table = screen.getByRole('table') + expect(table).toHaveTextContent('content-type') + expect(table).toHaveTextContent('text/plain') + expect(table).toHaveTextContent('link') + expect(table).toHaveTextContent('nah, not really') + expect(table).toHaveTextContent('x-total-count') + expect(table).toHaveTextContent('0') + }) + }) + + test('renders response body', async () => { + renderWithTheme( + + ) + expect(screen.getByText(response.body.toString())).toBeInTheDocument() + const header = screen.getByRole('heading', { name: 'Body (10 bytes)' }) + await userEvent.click(header) + await waitFor(() => { + expect( + screen.queryByText(response.body.toString()) + ).not.toBeInTheDocument() + }) + }) + + test('renders a message when no response is received', async () => { + renderWithTheme( + + ) + expect(screen.getByText('No response was received')).toBeInTheDocument() + }) +}) diff --git a/packages/run-it/src/components/ResponseExplorer/ResponseExplorer.tsx b/packages/run-it/src/components/ResponseExplorer/ResponseExplorer.tsx new file mode 100644 index 000000000..a1222a0cb --- /dev/null +++ b/packages/run-it/src/components/ResponseExplorer/ResponseExplorer.tsx @@ -0,0 +1,164 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ + +import React, { FC } from 'react' +import { + Table, + TableBody, + TableRow, + TableDataCell, + Span, + TableHead, + TableHeaderCell, +} from '@looker/components' +import styled from 'styled-components' +import { IRawResponse } from '@looker/sdk-rtl' +import { ShowResponse } from '../ShowResponse' +import { CollapserCard } from '../Collapser' +import { RunItHeading } from '../common' + +type HeaderTable = string[][] +export type ResponseContent = IRawResponse | undefined + +const getHeaders = (response: ResponseContent): HeaderTable => { + if (!response?.headers) return [] + const result: HeaderTable = [] + Object.entries(response.headers).forEach(([key, val]) => + result.push([key, val]) + ) + return result +} + +const getBodySize = (response: ResponseContent): string => { + const size = + !response || !response.body + ? 0 + : response?.body instanceof Blob + ? response?.body.size + : response?.body.toString().length + + return `${size} bytes` +} + +const NoWrap = styled(Span)` + display: inline-block; + direction: rtl; + white-space: nowrap; + overflow: hidden; +` + +interface ShowHeadersProps { + response: ResponseContent +} + +/** + * Display response headers in a table + * @param response to display + * @constructor + */ +export const ResponseHeaders: FC = ({ response }) => { + const rows = getHeaders(response) + if (rows.length === 0) return <> + return ( + + <> + + + + Name + Value + + + + {rows.map(([key, value]) => ( + + + + {key} + + + + {value} + + + ))} + +
+ +
+ ) +} + +interface ResponseExplorerProps { + response: ResponseContent + verb: string + path: string +} + +/** + * Explore the raw response from an HTTP request + * @param response IRawResponse values + * @param verb HTTP method + * @param path Path of request + * @constructor + */ +export const ResponseExplorer: FC = ({ + response, + verb, + path, +}) => { + // TODO make a badge for the verb. + // Once we are satisfied with the badge in the api-explorer package it should be moved here + + return ( + <> + {!response && No response was received} + {response && ( + <> + + {`${verb || ''} ${path || ''} (${response.statusCode}: ${ + response.statusMessage + })`} + + + + + + + )} + + ) +} diff --git a/packages/run-it/src/components/ResponseExplorer/index.ts b/packages/run-it/src/components/ResponseExplorer/index.ts new file mode 100644 index 000000000..8fde8796a --- /dev/null +++ b/packages/run-it/src/components/ResponseExplorer/index.ts @@ -0,0 +1,26 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ +export * from './ResponseExplorer' diff --git a/packages/run-it/src/components/ShowResponse/ShowResponse.spec.tsx b/packages/run-it/src/components/ShowResponse/ShowResponse.spec.tsx index 4293f4fc8..bee93f995 100644 --- a/packages/run-it/src/components/ShowResponse/ShowResponse.spec.tsx +++ b/packages/run-it/src/components/ShowResponse/ShowResponse.spec.tsx @@ -27,6 +27,7 @@ import React from 'react' import { render, screen } from '@testing-library/react' import { renderWithTheme } from '@looker/components-test-utils' +import { IRawResponse } from '@looker/sdk-rtl' import { testErrorResponse, @@ -40,17 +41,24 @@ import { import { ShowResponse } from './ShowResponse' describe('ShowResponse', () => { + test('undefined response', () => { + renderWithTheme() + expect( + screen.getByText( + 'The response body could not be parsed. Displaying raw data.' + ) + ).toBeInTheDocument() + }) + test('it renders json responses', () => { renderWithTheme() - expect(screen.getByText('200: application/json')).toBeInTheDocument() - expect(screen.getByText('key1')).toBeInTheDocument() + const tab = screen.getByRole('tabpanel') + expect(tab).toHaveTextContent('"key1"') + expect(tab).toHaveTextContent('"value1"') }) test('it renders text responses', () => { renderWithTheme() - expect( - screen.getByText('200: text/plain;charset=utf-8') - ).toBeInTheDocument() expect( screen.getByText(testTextResponse.body.toString()) ).toBeInTheDocument() @@ -58,25 +66,23 @@ describe('ShowResponse', () => { test('it renders html responses', () => { renderWithTheme() - expect(screen.getByText('200: text/html;charset=utf-8')).toBeInTheDocument() expect(screen.getByText('Orders Created Date')).toBeInTheDocument() }) test('it renders png responses', () => { render() - expect(screen.getByText('200: image/png')).toBeInTheDocument() - expect(screen.getByRole('img')).toBeInTheDocument() + const img = screen.getByRole('img') + expect(img).toBeInTheDocument() }) test('it renders jpg responses', () => { render() - expect(screen.getByText('200: image/jpeg')).toBeInTheDocument() - expect(screen.getByRole('img')).toBeInTheDocument() + const img = screen.getByRole('img') + expect(img).toBeInTheDocument() }) test('it renders svg responses', () => { render() - expect(screen.getByText('200: image/svg+xml')).toBeInTheDocument() expect(screen.getByRole('img')).toBeInTheDocument() }) @@ -101,7 +107,6 @@ describe('ShowResponse', () => { test('it renders bogus json responses', () => { renderWithTheme() - expect(screen.getByText('200: application/json')).toBeInTheDocument() expect( screen.getByText( 'The response body could not be parsed. Displaying raw data.' diff --git a/packages/run-it/src/components/ShowResponse/ShowResponse.tsx b/packages/run-it/src/components/ShowResponse/ShowResponse.tsx index 8e694e7a8..0b60bfd79 100644 --- a/packages/run-it/src/components/ShowResponse/ShowResponse.tsx +++ b/packages/run-it/src/components/ShowResponse/ShowResponse.tsx @@ -25,7 +25,6 @@ */ import React, { FC } from 'react' -import { Heading } from '@looker/components' import { IRawResponse } from '@looker/sdk-rtl' import { pickResponseHandler, fallbackResponseHandler } from './responseUtils' @@ -33,20 +32,12 @@ import { pickResponseHandler, fallbackResponseHandler } from './responseUtils' interface ShowResponseProps { /** A basic HTTP response for "raw" HTTP requests */ response: IRawResponse - /** HTTP Method */ - verb?: string - /** HTTP request path */ - path?: string } /** * Given an HTTP response it picks a response handler based on the content type and renders the body */ -export const ShowResponse: FC = ({ - response, - verb, - path, -}) => { +export const ShowResponse: FC = ({ response }) => { // Bullet proof the rendered response. If for some reason we get a bad response or bad data in the // response, render something let renderedResponse @@ -56,14 +47,5 @@ export const ShowResponse: FC = ({ renderedResponse = fallbackResponseHandler().component(response) } - // TODO make a badge for the verb. - // Once we are satisfied with the badge in the api-explorer package it should be moved here - return ( - <> - {`${verb || ''} ${path || ''} ${response.statusCode}: ${ - response.contentType - }`} - {renderedResponse} - - ) + return <>{renderedResponse} } diff --git a/packages/run-it/src/components/ShowResponse/responseUtils.tsx b/packages/run-it/src/components/ShowResponse/responseUtils.tsx index 40d3bf9fb..5c16885d5 100644 --- a/packages/run-it/src/components/ShowResponse/responseUtils.tsx +++ b/packages/run-it/src/components/ShowResponse/responseUtils.tsx @@ -25,9 +25,17 @@ */ import React, { ReactElement } from 'react' import { IRawResponse, ResponseMode, responseMode } from '@looker/sdk-rtl' -import { Paragraph, CodeBlock, MessageBar } from '@looker/components' -import { CodeDisplay } from '@looker/code-editor' - +import { + Paragraph, + CodeBlock, + MessageBar, + TabList, + Tab, + TabPanels, + TabPanel, + useTabs, +} from '@looker/components' +import { CodeDisplay, Markdown } from '@looker/code-editor' import { DataGrid, parseCsv, json2Csv } from '../DataGrid' /** @@ -94,6 +102,26 @@ const ShowCSV = (response: IRawResponse) => { return } +const ShowMD = (response: IRawResponse) => { + const tabs = useTabs() + const raw = {response.body.toString()} + const data = response.body.toString() + return ( + <> + + Markdown + Raw + + + + + + {raw} + + + ) +} + /** A handler for image type responses */ const ShowImage = (response: IRawResponse) => { let content: string @@ -102,7 +130,6 @@ const ShowImage = (response: IRawResponse) => { } else { content = `data:${response.contentType};base64,${btoa(response.body)}` } - return ( ( @@ -181,6 +208,11 @@ export const responseHandlers: Responder[] = [ isRecognized: (contentType) => /text\/csv/g.test(contentType), component: (response) => ShowCSV(response), }, + { + label: 'md', + isRecognized: (contentType) => /text\/markdown/g.test(contentType), + component: (response) => ShowMD(response), + }, // SVG would normally be considered a "string" because of the xml tag, so it must be checked before text { label: 'img', diff --git a/packages/run-it/src/components/common/StandaloneConfigurator.ts b/packages/run-it/src/components/common/StandaloneConfigurator.ts new file mode 100644 index 000000000..65b921774 --- /dev/null +++ b/packages/run-it/src/components/common/StandaloneConfigurator.ts @@ -0,0 +1,72 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ +import { IStorageValue, RunItConfigurator, StorageLocation } from '..' + +export class StandaloneConfigurator implements RunItConfigurator { + getStorage(key: string, defaultValue = ''): IStorageValue { + let value = sessionStorage.getItem(key) + if (value) { + return { + location: 'session', + value, + } + } + value = localStorage.getItem(key) + if (value) { + return { + location: 'local', + value, + } + } + return { + location: 'session', + value: defaultValue, + } + } + + setStorage( + key: string, + value: string, + location: StorageLocation = 'session' + ): string { + switch (location.toLocaleLowerCase()) { + case 'local': + localStorage.setItem(key, value) + break + case 'session': + sessionStorage.setItem(key, value) + break + } + return value + } + + removeStorage(key: string) { + localStorage.removeItem(key) + sessionStorage.removeItem(key) + } +} + +export const defaultConfigurator = new StandaloneConfigurator() diff --git a/packages/run-it/src/components/common/common.tsx b/packages/run-it/src/components/common/common.tsx new file mode 100644 index 000000000..dfdb6f915 --- /dev/null +++ b/packages/run-it/src/components/common/common.tsx @@ -0,0 +1,38 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ +import styled from 'styled-components' +import { Heading } from '@looker/components' + +/** + * Common styled components to be used across the whole library + */ + +export const RunItHeading = styled(Heading)`` + +RunItHeading.defaultProps = { + mb: 'xsmall', + pt: 'xsmall', +} diff --git a/packages/run-it/src/components/common/index.ts b/packages/run-it/src/components/common/index.ts new file mode 100644 index 000000000..09abe7a69 --- /dev/null +++ b/packages/run-it/src/components/common/index.ts @@ -0,0 +1,27 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ +export { RunItHeading } from './common' +export * from './StandaloneConfigurator' diff --git a/packages/run-it/src/components/index.ts b/packages/run-it/src/components/index.ts index 36e7c568c..99497be3b 100644 --- a/packages/run-it/src/components/index.ts +++ b/packages/run-it/src/components/index.ts @@ -24,11 +24,14 @@ */ -export * from './RequestForm' -export * from './ShowResponse' -export * from './MethodBadge' +export * from './common' +export * from './Collapser' export * from './ConfigForm' -export * from './LoginForm' -export * from './Loading' export * from './DocSdkCalls' export * from './DataGrid' +export * from './LoginForm' +export * from './MethodBadge' +export * from './Loading' +export * from './RequestForm' +export * from './ResponseExplorer' +export * from './ShowResponse' diff --git a/packages/run-it/src/scenes/OAuthScene/OAuthScene.tsx b/packages/run-it/src/scenes/OAuthScene/OAuthScene.tsx index ef3c17023..242af68d1 100644 --- a/packages/run-it/src/scenes/OAuthScene/OAuthScene.tsx +++ b/packages/run-it/src/scenes/OAuthScene/OAuthScene.tsx @@ -77,7 +77,7 @@ export const OAuthScene: FC = () => { } }, [auth, history]) - // No LookerSDK40 no OAuth for you + // No sdk no OAuth for you if (!sdk) return <> return ( diff --git a/packages/run-it/src/test-data/responses.ts b/packages/run-it/src/test-data/responses.ts index 52aafd536..a428e21ef 100644 --- a/packages/run-it/src/test-data/responses.ts +++ b/packages/run-it/src/test-data/responses.ts @@ -28,7 +28,7 @@ import { IRawResponse } from '@looker/sdk-rtl' export const testJsonResponse: IRawResponse = { url: 'https://some/json/data', - headers: {}, + headers: { 'content-type': 'application/json' }, contentType: 'application/json', ok: true, statusCode: 200, @@ -38,7 +38,7 @@ export const testJsonResponse: IRawResponse = { export const testTextResponse: IRawResponse = { url: 'https://some/text/data', - headers: {}, + headers: { 'content-type': 'text/plain;charset=utf-8' }, contentType: 'text/plain;charset=utf-8', ok: true, statusCode: 200, @@ -48,7 +48,7 @@ export const testTextResponse: IRawResponse = { export const testHtmlResponse: IRawResponse = { url: `https://some/html`, - headers: {}, + headers: { 'content-type': 'text/html;charset=utf-8' }, contentType: 'text/html;charset=utf-8', ok: true, statusCode: 200, @@ -63,7 +63,7 @@ export const testHtmlResponse: IRawResponse = { export const testSqlResponse: IRawResponse = { url: `https://some/sql`, - headers: {}, + headers: { 'content-type': 'application/sql' }, contentType: 'application/sql', ok: true, statusCode: 200, @@ -77,7 +77,7 @@ LIMIT 500`), export const testImageResponse = (contentType = 'image/png'): IRawResponse => ({ url: `http://${contentType}`, - headers: {}, + headers: { 'content-type': contentType }, contentType, ok: true, statusCode: 200, diff --git a/packages/run-it/src/utils/index.ts b/packages/run-it/src/utils/index.ts index 4dca41502..cf4eb846a 100644 --- a/packages/run-it/src/utils/index.ts +++ b/packages/run-it/src/utils/index.ts @@ -23,10 +23,5 @@ SOFTWARE. */ -export { - runItSDK, - sdkNeedsConfig, - RunItSettings, - initRunItSdk, -} from './RunItSDK' -export { createRequestParams, runRequest, pathify } from './requestUtils' +export * from './RunItSDK' +export * from './requestUtils' diff --git a/packages/run-it/src/utils/requestUtils.spec.ts b/packages/run-it/src/utils/requestUtils.spec.ts index e3771352f..b651f732f 100644 --- a/packages/run-it/src/utils/requestUtils.spec.ts +++ b/packages/run-it/src/utils/requestUtils.spec.ts @@ -25,7 +25,7 @@ */ import { RunItInput } from '../RunIt' import { testJsonResponse } from '../test-data' -import { StandaloneConfigurator } from '../components/ConfigForm/configUtils' +import { StandaloneConfigurator } from '../components' import { createRequestParams, pathify, runRequest } from './requestUtils' import { initRunItSdk } from './RunItSDK' diff --git a/packages/run-it/src/utils/requestUtils.ts b/packages/run-it/src/utils/requestUtils.ts index ff0d4d8e5..b3322233a 100644 --- a/packages/run-it/src/utils/requestUtils.ts +++ b/packages/run-it/src/utils/requestUtils.ts @@ -30,6 +30,15 @@ import cloneDeep from 'lodash/cloneDeep' import { RunItHttpMethod, RunItInput, RunItValues } from '../RunIt' import { runItSDK } from './RunItSDK' +/** Hook to set a URL somewhere else in APIX */ +export type RunItSetter = (value: any) => any + +/** + * A "no-op" function + * @param value passed through + */ +export const runItNoSet: RunItSetter = (value: any) => value + /** * Replaces {foo} with vars[foo] in provided path * @param path with templatized param names @@ -128,11 +137,12 @@ export const runRequest = async ( await sdk.ok(runItSDK.authSession.login()) } const url = `${basePath}${pathify(endpoint, pathParams)}` - return await sdk.authSession.transport.rawRequest( + const raw = await sdk.authSession.transport.rawRequest( httpMethod, url, queryParams, body, (props) => runItSDK.authSession.authenticate(props) ) + return raw } diff --git a/packages/sdk-rtl/src/oauthSession.ts b/packages/sdk-rtl/src/oauthSession.ts index bb1b8c4d9..393c0fa41 100644 --- a/packages/sdk-rtl/src/oauthSession.ts +++ b/packages/sdk-rtl/src/oauthSession.ts @@ -49,7 +49,7 @@ export class OAuthSession extends AuthSession { activeToken = new AuthToken() crypto: ICryptoHash private static readonly codeVerifierKey = 'looker_oauth_code_verifier' - private static readonly returnUrlKey = 'looker_oauth_return_url' + public static readonly returnUrlKey = 'looker_oauth_return_url' constructor(services: IPlatformServices) { super(services.settings, services.transport)