@scalar/api-client 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +14 -14
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +38 -38
- package/dist/components/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/EmptyState.vue.js +2 -2
- package/dist/components/EmptyState.vue2.js +27 -16
- package/dist/components/TopNav/TopNav.vue.js +33 -33
- package/dist/layouts/App/create-api-client-app.d.ts +28 -28
- package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
- package/dist/libs/create-client.d.ts +28 -28
- package/dist/libs/hot-keys.d.ts +2 -2
- package/dist/libs/send-request/create-fetch-body.d.ts +2 -2
- package/dist/store/active-entities.d.ts +2 -2
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +8 -8
- package/dist/store/request-example.d.ts +12 -12
- package/dist/store/store.d.ts +28 -28
- package/dist/store/workspace.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +9 -8
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +14 -11
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +22 -22
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +18 -15
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +17 -17
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +17 -12
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +205 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +52 -52
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +205 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +90 -75
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +126 -103
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -2
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +56 -53
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts +26 -0
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/DesktopTab.vue.js +7 -0
- package/dist/v2/features/app/components/DesktopTab.vue2.js +134 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +9 -4
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +47 -13
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +2 -4
- package/dist/v2/features/app/components/SplashScreen.vue.js +2 -2
- package/dist/v2/features/app/components/SplashScreen.vue2.js +2 -2
- package/dist/v2/features/app/helpers/routes.js +1 -1
- package/dist/v2/features/collection/components/Settings.vue2.js +3 -3
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +61 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +48 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +39 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +52 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts +36 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.js +78 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +30 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +169 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +34 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +175 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +43 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +115 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +39 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +213 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +38 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +89 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts +41 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.js +7 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +172 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +33 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +40 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/index.d.ts +2 -0
- package/dist/v2/features/command-palette/components/index.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/index.js +4 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +23 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +31 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +13 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +12 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +26 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +70 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +23 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +18 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts +11 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js +11 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +202 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +109 -0
- package/dist/v2/features/command-palette/types.d.ts +82 -0
- package/dist/v2/features/command-palette/types.d.ts.map +1 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +24 -20
- package/dist/v2/helpers/drag-handle-factory.d.ts +1 -2
- package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
- package/dist/v2/helpers/drag-handle-factory.js +84 -99
- package/dist/v2/helpers/get-tab-details.d.ts +43 -0
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -0
- package/dist/v2/helpers/get-tab-details.js +34 -0
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/v2/helpers/is-url.d.ts +2 -0
- package/dist/v2/helpers/is-url.d.ts.map +1 -0
- package/dist/v2/helpers/is-url.js +5 -0
- package/dist/v2/helpers/remove-circular.d.ts +15 -0
- package/dist/v2/helpers/remove-circular.d.ts.map +1 -0
- package/dist/v2/helpers/remove-circular.js +18 -0
- package/dist/v2/helpers/storage.d.ts +4 -6
- package/dist/v2/helpers/storage.d.ts.map +1 -1
- package/dist/v2/helpers/storage.js +8 -12
- package/dist/v2/hooks/use-sidebar-state.d.ts +12 -19
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -1
- package/dist/v2/hooks/use-sidebar-state.js +36 -30
- package/dist/v2/hooks/use-sync-path.d.ts +11 -0
- package/dist/v2/hooks/use-sync-path.d.ts.map +1 -0
- package/dist/v2/hooks/use-sync-path.js +51 -0
- package/dist/v2/hooks/use-tabs.d.ts +31 -0
- package/dist/v2/hooks/use-tabs.d.ts.map +1 -0
- package/dist/v2/hooks/use-tabs.js +44 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts +5 -2
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +91 -36
- package/dist/v2/hooks/use-workspace-selector.d.ts +16 -6
- package/dist/v2/hooks/use-workspace-selector.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-selector.js +58 -64
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +78 -78
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +19 -19
- package/dist/views/Request/libs/oauth2.d.ts +2 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +66 -53
- package/package.json +134 -44
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { createWorkspaceStore as
|
|
2
|
-
import { generateUniqueValue as
|
|
3
|
-
import { createWorkspaceStorePersistence as
|
|
4
|
-
import { persistencePlugin as
|
|
5
|
-
import { ref as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import { slugify as
|
|
8
|
-
|
|
9
|
-
const A = 1e3, s = {
|
|
1
|
+
import { createWorkspaceStore as l } from "@scalar/workspace-store/client";
|
|
2
|
+
import { generateUniqueValue as W } from "@scalar/workspace-store/helpers/generate-unique-value";
|
|
3
|
+
import { createWorkspaceStorePersistence as v } from "@scalar/workspace-store/persistence";
|
|
4
|
+
import { persistencePlugin as D } from "@scalar/workspace-store/plugins/client";
|
|
5
|
+
import { ref as i } from "vue";
|
|
6
|
+
import { useRouter as g } from "vue-router";
|
|
7
|
+
import { slugify as y } from "../helpers/slugify.js";
|
|
8
|
+
const S = 1e3, R = {
|
|
10
9
|
name: "Default Workspace",
|
|
11
10
|
id: "default"
|
|
12
|
-
},
|
|
11
|
+
}, h = {
|
|
13
12
|
openapi: "3.1.0",
|
|
14
13
|
info: {
|
|
15
14
|
title: "Drafts",
|
|
@@ -22,66 +21,61 @@ const A = 1e3, s = {
|
|
|
22
21
|
},
|
|
23
22
|
"x-scalar-original-document-hash": "drafts",
|
|
24
23
|
"x-scalar-icon": "interface-edit-tool-pencil"
|
|
25
|
-
},
|
|
26
|
-
plugins: [await
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
}, A = async ({ workspaceId: r }) => l({
|
|
25
|
+
plugins: [await D({ workspaceId: r, debounceDelay: S })]
|
|
26
|
+
}), _ = () => {
|
|
27
|
+
const r = i(null), c = i([]), n = i(null), o = v(), w = g(), m = async (e) => {
|
|
28
|
+
const a = await (await o).workspace.getItem(e);
|
|
29
|
+
if (!a)
|
|
30
|
+
return {
|
|
31
|
+
success: !1
|
|
32
|
+
};
|
|
33
|
+
const s = await A({ workspaceId: e });
|
|
34
|
+
return s.loadWorkspace(a.workspace), r.value = { id: e, name: a.name }, n.value = s, {
|
|
35
|
+
success: !0,
|
|
36
|
+
workspace: s
|
|
37
|
+
};
|
|
38
|
+
}, k = async ({ id: e, name: t }) => {
|
|
39
|
+
const a = l();
|
|
40
|
+
await a.addDocument({
|
|
39
41
|
name: "drafts",
|
|
40
|
-
document:
|
|
42
|
+
document: h
|
|
41
43
|
}), await (await o).workspace.setItem(e, {
|
|
42
|
-
name:
|
|
43
|
-
workspace:
|
|
44
|
+
name: t,
|
|
45
|
+
workspace: a.exportWorkspace()
|
|
46
|
+
}), c.value.push({ id: e, name: t });
|
|
47
|
+
}, p = async (e) => {
|
|
48
|
+
await w.push({
|
|
49
|
+
name: "workspace.environment",
|
|
50
|
+
params: { workspaceSlug: e }
|
|
44
51
|
});
|
|
52
|
+
}, f = async ({ id: e, name: t }) => {
|
|
53
|
+
n.value = null;
|
|
54
|
+
const a = await o, s = await W({
|
|
55
|
+
defaultValue: e ?? t,
|
|
56
|
+
// Use the provided id if it exists, otherwise use the name
|
|
57
|
+
validation: async (d) => !await a.workspace.has(d),
|
|
58
|
+
maxRetries: 100,
|
|
59
|
+
transformation: y
|
|
60
|
+
});
|
|
61
|
+
if (!s)
|
|
62
|
+
return;
|
|
63
|
+
const u = { id: s, name: t };
|
|
64
|
+
return await k(u), await p(s), u;
|
|
45
65
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return;
|
|
54
|
-
if (await m(s), await i(s.id)) {
|
|
55
|
-
n.value.push(s);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
console.error("[ERROR]: something went wrong when trying to create the default workspace");
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
return p(s.id);
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{ immediate: !0 }
|
|
65
|
-
);
|
|
66
|
-
const p = (e) => {
|
|
67
|
-
k.push({ name: "workspace.environment", params: { workspaceSlug: e } });
|
|
68
|
-
};
|
|
69
|
-
return {
|
|
70
|
-
store: w,
|
|
71
|
-
activeWorkspace: l,
|
|
72
|
-
workspaces: n,
|
|
66
|
+
return (async () => {
|
|
67
|
+
const t = await (await o).workspace.getAll();
|
|
68
|
+
c.value = t;
|
|
69
|
+
})(), {
|
|
70
|
+
store: n,
|
|
71
|
+
activeWorkspace: r,
|
|
72
|
+
workspaces: c,
|
|
73
73
|
setWorkspaceId: p,
|
|
74
|
-
createWorkspace:
|
|
75
|
-
|
|
76
|
-
defaultValue: e,
|
|
77
|
-
validation: async (a) => !await r.workspace.has(a),
|
|
78
|
-
maxRetries: 100,
|
|
79
|
-
transformation: D
|
|
80
|
-
});
|
|
81
|
-
t && (await m({ id: t, name: e }), p(t));
|
|
82
|
-
}
|
|
74
|
+
createWorkspace: f,
|
|
75
|
+
loadWorkspace: m
|
|
83
76
|
};
|
|
84
77
|
};
|
|
85
78
|
export {
|
|
86
|
-
|
|
79
|
+
R as DEFAULT_WORKSPACE,
|
|
80
|
+
_ as useWorkspaceSelector
|
|
87
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQ1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAiBF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAA;CAChC,CAAC;AAugBF,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as T, createElementBlock as
|
|
2
|
-
import { useLoadingState as A, ScalarButton as
|
|
1
|
+
import { defineComponent as T, createElementBlock as y, openBlock as d, Fragment as U, createBlock as k, createCommentVNode as p, createVNode as r, unref as a, withCtx as o, mergeProps as m, createTextVNode as u, createElementVNode as $, renderSlot as P } from "vue";
|
|
2
|
+
import { useLoadingState as A, ScalarButton as z } from "@scalar/components";
|
|
3
3
|
import { pkceOptions as B } from "@scalar/oas-utils/entities/spec";
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
import { updateScheme as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { authorizeOauth2 as
|
|
11
|
-
const
|
|
4
|
+
import { useToasts as R } from "@scalar/use-toasts";
|
|
5
|
+
import { useWorkspace as F } from "../../../../store/store.js";
|
|
6
|
+
import { updateScheme as I } from "../helpers/update-scheme.js";
|
|
7
|
+
import N from "./OAuthScopesInput.vue.js";
|
|
8
|
+
import w from "./RequestAuthDataTableInput.vue.js";
|
|
9
|
+
import f from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
10
|
+
import { authorizeOauth2 as O } from "../../libs/oauth2.js";
|
|
11
|
+
const j = { class: "flex h-8 items-center justify-end border-t" }, L = { class: "flex h-8 w-full items-center justify-end border-t" }, q = /* @__PURE__ */ T({
|
|
12
12
|
__name: "OAuth2",
|
|
13
13
|
props: {
|
|
14
14
|
collection: {},
|
|
@@ -21,36 +21,36 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
|
|
|
21
21
|
workspace: {}
|
|
22
22
|
},
|
|
23
23
|
emits: ["authorized"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
24
|
+
setup(n, { emit: b }) {
|
|
25
|
+
const C = b, V = A(), { toast: v } = R(), S = F(), s = (l, e) => I(n.scheme.uid, l, e, S, n.persistAuth), g = async () => {
|
|
26
|
+
if (V.isActive || !n.collection?.uid)
|
|
27
27
|
return;
|
|
28
|
-
if (!
|
|
29
|
-
|
|
28
|
+
if (!n.server) {
|
|
29
|
+
v("No server selected", "error");
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
const [l, e] = await
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
e ? (
|
|
39
|
-
},
|
|
40
|
-
environment:
|
|
41
|
-
envVariables:
|
|
42
|
-
workspace:
|
|
32
|
+
V.start();
|
|
33
|
+
const [l, e] = await O(
|
|
34
|
+
n.flow,
|
|
35
|
+
n.server,
|
|
36
|
+
n.workspace?.proxyUrl
|
|
37
|
+
);
|
|
38
|
+
await V.clear(), e ? (s(`flows.${n.flow.type}.token`, e), C("authorized")) : (console.error(l), v(l?.message ?? "Failed to authorize", "error"));
|
|
39
|
+
}, i = {
|
|
40
|
+
environment: n.environment,
|
|
41
|
+
envVariables: n.envVariables,
|
|
42
|
+
workspace: n.workspace
|
|
43
43
|
};
|
|
44
|
-
return (l, e) => (d(),
|
|
45
|
-
l.flow.token ? (d(),
|
|
46
|
-
r(a(
|
|
44
|
+
return (l, e) => (d(), y(U, null, [
|
|
45
|
+
l.flow.token ? (d(), y(U, { key: 0 }, [
|
|
46
|
+
r(a(f), null, {
|
|
47
47
|
default: o(() => [
|
|
48
|
-
r(
|
|
48
|
+
r(w, m(i, {
|
|
49
49
|
class: "border-r-transparent",
|
|
50
50
|
modelValue: l.flow.token,
|
|
51
51
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
52
52
|
type: "password",
|
|
53
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) =>
|
|
53
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => s(`flows.${l.flow.type}.token`, t))
|
|
54
54
|
}), {
|
|
55
55
|
default: o(() => [...e[10] || (e[10] = [
|
|
56
56
|
u(" Access Token ", -1)
|
|
@@ -60,59 +60,59 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
|
|
|
60
60
|
]),
|
|
61
61
|
_: 1
|
|
62
62
|
}),
|
|
63
|
-
r(a(
|
|
63
|
+
r(a(f), { class: "min-w-full" }, {
|
|
64
64
|
default: o(() => [
|
|
65
|
-
$("div",
|
|
66
|
-
r(a(
|
|
65
|
+
$("div", j, [
|
|
66
|
+
r(a(z), {
|
|
67
67
|
class: "mr-1 p-0 px-2 py-0.5",
|
|
68
|
-
|
|
68
|
+
loader: a(V),
|
|
69
69
|
size: "sm",
|
|
70
70
|
variant: "outlined",
|
|
71
|
-
onClick: e[1] || (e[1] = (t) =>
|
|
71
|
+
onClick: e[1] || (e[1] = (t) => s(`flows.${l.flow.type}.token`, ""))
|
|
72
72
|
}, {
|
|
73
73
|
default: o(() => [...e[11] || (e[11] = [
|
|
74
74
|
u(" Clear ", -1)
|
|
75
75
|
])]),
|
|
76
76
|
_: 1
|
|
77
|
-
}, 8, ["
|
|
77
|
+
}, 8, ["loader"]),
|
|
78
78
|
P(l.$slots, "oauth-actions")
|
|
79
79
|
])
|
|
80
80
|
]),
|
|
81
81
|
_: 3
|
|
82
82
|
})
|
|
83
|
-
], 64)) : (d(),
|
|
84
|
-
r(a(
|
|
83
|
+
], 64)) : (d(), y(U, { key: 1 }, [
|
|
84
|
+
r(a(f), null, {
|
|
85
85
|
default: o(() => [
|
|
86
|
-
"authorizationUrl" in l.flow ? (d(), k(
|
|
86
|
+
"authorizationUrl" in l.flow ? (d(), k(w, m({ key: 0 }, i, {
|
|
87
87
|
containerClass: "border-r-0",
|
|
88
88
|
modelValue: l.flow.authorizationUrl,
|
|
89
89
|
placeholder: "https://galaxy.scalar.com/authorize",
|
|
90
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) =>
|
|
90
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => s(`flows.${l.flow.type}.authorizationUrl`, t))
|
|
91
91
|
}), {
|
|
92
92
|
default: o(() => [...e[12] || (e[12] = [
|
|
93
93
|
u(" Auth URL ", -1)
|
|
94
94
|
])]),
|
|
95
95
|
_: 1
|
|
96
|
-
}, 16, ["modelValue"])) :
|
|
97
|
-
"tokenUrl" in l.flow ? (d(), k(
|
|
96
|
+
}, 16, ["modelValue"])) : p("", !0),
|
|
97
|
+
"tokenUrl" in l.flow ? (d(), k(w, m({ key: 1 }, i, {
|
|
98
98
|
modelValue: l.flow.tokenUrl,
|
|
99
99
|
placeholder: "https://galaxy.scalar.com/token",
|
|
100
|
-
"onUpdate:modelValue": e[3] || (e[3] = (t) =>
|
|
100
|
+
"onUpdate:modelValue": e[3] || (e[3] = (t) => s(`flows.${l.flow.type}.tokenUrl`, t))
|
|
101
101
|
}), {
|
|
102
102
|
default: o(() => [...e[13] || (e[13] = [
|
|
103
103
|
u(" Token URL ", -1)
|
|
104
104
|
])]),
|
|
105
105
|
_: 1
|
|
106
|
-
}, 16, ["modelValue"])) :
|
|
106
|
+
}, 16, ["modelValue"])) : p("", !0)
|
|
107
107
|
]),
|
|
108
108
|
_: 1
|
|
109
109
|
}),
|
|
110
|
-
"x-scalar-redirect-uri" in l.flow ? (d(), k(a(
|
|
110
|
+
"x-scalar-redirect-uri" in l.flow ? (d(), k(a(f), { key: 0 }, {
|
|
111
111
|
default: o(() => [
|
|
112
|
-
r(
|
|
112
|
+
r(w, m(i, {
|
|
113
113
|
modelValue: l.flow["x-scalar-redirect-uri"],
|
|
114
114
|
placeholder: "https://galaxy.scalar.com/callback",
|
|
115
|
-
"onUpdate:modelValue": e[4] || (e[4] = (t) =>
|
|
115
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => s(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
|
|
116
116
|
}), {
|
|
117
117
|
default: o(() => [...e[14] || (e[14] = [
|
|
118
118
|
u(" Redirect URL ", -1)
|
|
@@ -121,15 +121,15 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
|
|
|
121
121
|
}, 16, ["modelValue"])
|
|
122
122
|
]),
|
|
123
123
|
_: 1
|
|
124
|
-
})) :
|
|
125
|
-
l.flow.type === "password" ? (d(),
|
|
126
|
-
r(a(
|
|
124
|
+
})) : p("", !0),
|
|
125
|
+
l.flow.type === "password" ? (d(), y(U, { key: 1 }, [
|
|
126
|
+
r(a(f), null, {
|
|
127
127
|
default: o(() => [
|
|
128
|
-
r(
|
|
128
|
+
r(w, m(i, {
|
|
129
129
|
class: "text-c-2",
|
|
130
130
|
modelValue: l.flow.username,
|
|
131
131
|
placeholder: "janedoe",
|
|
132
|
-
"onUpdate:modelValue": e[5] || (e[5] = (t) =>
|
|
132
|
+
"onUpdate:modelValue": e[5] || (e[5] = (t) => s(`flows.${l.flow.type}.username`, t))
|
|
133
133
|
}), {
|
|
134
134
|
default: o(() => [...e[15] || (e[15] = [
|
|
135
135
|
u(" Username ", -1)
|
|
@@ -139,13 +139,13 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
|
|
|
139
139
|
]),
|
|
140
140
|
_: 1
|
|
141
141
|
}),
|
|
142
|
-
r(a(
|
|
142
|
+
r(a(f), null, {
|
|
143
143
|
default: o(() => [
|
|
144
|
-
r(
|
|
144
|
+
r(w, m(i, {
|
|
145
145
|
modelValue: l.flow.password,
|
|
146
146
|
placeholder: "********",
|
|
147
147
|
type: "password",
|
|
148
|
-
"onUpdate:modelValue": e[6] || (e[6] = (t) =>
|
|
148
|
+
"onUpdate:modelValue": e[6] || (e[6] = (t) => s(`flows.${l.flow.type}.password`, t))
|
|
149
149
|
}), {
|
|
150
150
|
default: o(() => [...e[16] || (e[16] = [
|
|
151
151
|
u(" Password ", -1)
|
|
@@ -155,13 +155,13 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
|
|
|
155
155
|
]),
|
|
156
156
|
_: 1
|
|
157
157
|
})
|
|
158
|
-
], 64)) :
|
|
159
|
-
r(a(
|
|
158
|
+
], 64)) : p("", !0),
|
|
159
|
+
r(a(f), null, {
|
|
160
160
|
default: o(() => [
|
|
161
|
-
r(
|
|
161
|
+
r(w, m(i, {
|
|
162
162
|
modelValue: l.flow["x-scalar-client-id"],
|
|
163
163
|
placeholder: "12345",
|
|
164
|
-
"onUpdate:modelValue": e[7] || (e[7] = (t) =>
|
|
164
|
+
"onUpdate:modelValue": e[7] || (e[7] = (t) => s(`flows.${l.flow.type}.x-scalar-client-id`, t))
|
|
165
165
|
}), {
|
|
166
166
|
default: o(() => [...e[17] || (e[17] = [
|
|
167
167
|
u(" Client ID ", -1)
|
|
@@ -171,13 +171,13 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
|
|
|
171
171
|
]),
|
|
172
172
|
_: 1
|
|
173
173
|
}),
|
|
174
|
-
"clientSecret" in l.flow ? (d(), k(a(
|
|
174
|
+
"clientSecret" in l.flow ? (d(), k(a(f), { key: 2 }, {
|
|
175
175
|
default: o(() => [
|
|
176
|
-
r(
|
|
176
|
+
r(w, m(i, {
|
|
177
177
|
modelValue: l.flow.clientSecret,
|
|
178
178
|
placeholder: "XYZ123",
|
|
179
179
|
type: "password",
|
|
180
|
-
"onUpdate:modelValue": e[8] || (e[8] = (t) =>
|
|
180
|
+
"onUpdate:modelValue": e[8] || (e[8] = (t) => s(`flows.${l.flow.type}.clientSecret`, t))
|
|
181
181
|
}), {
|
|
182
182
|
default: o(() => [...e[18] || (e[18] = [
|
|
183
183
|
u(" Client Secret ", -1)
|
|
@@ -186,14 +186,14 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
|
|
|
186
186
|
}, 16, ["modelValue"])
|
|
187
187
|
]),
|
|
188
188
|
_: 1
|
|
189
|
-
})) :
|
|
190
|
-
"x-usePkce" in l.flow ? (d(), k(a(
|
|
189
|
+
})) : p("", !0),
|
|
190
|
+
"x-usePkce" in l.flow ? (d(), k(a(f), { key: 3 }, {
|
|
191
191
|
default: o(() => [
|
|
192
|
-
r(
|
|
192
|
+
r(w, m(i, {
|
|
193
193
|
enum: a(B),
|
|
194
194
|
modelValue: l.flow["x-usePkce"],
|
|
195
195
|
readOnly: "",
|
|
196
|
-
"onUpdate:modelValue": e[9] || (e[9] = (t) =>
|
|
196
|
+
"onUpdate:modelValue": e[9] || (e[9] = (t) => s(
|
|
197
197
|
`flows.${l.flow.type}.x-usePkce`,
|
|
198
198
|
t
|
|
199
199
|
))
|
|
@@ -205,35 +205,35 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
|
|
|
205
205
|
}, 16, ["enum", "modelValue"])
|
|
206
206
|
]),
|
|
207
207
|
_: 1
|
|
208
|
-
})) :
|
|
209
|
-
Object.keys(l.flow.scopes ?? {}).length ? (d(), k(a(
|
|
208
|
+
})) : p("", !0),
|
|
209
|
+
Object.keys(l.flow.scopes ?? {}).length ? (d(), k(a(f), { key: 4 }, {
|
|
210
210
|
default: o(() => [
|
|
211
|
-
r(
|
|
211
|
+
r(N, {
|
|
212
212
|
flow: l.flow,
|
|
213
|
-
updateScheme:
|
|
213
|
+
updateScheme: s
|
|
214
214
|
}, null, 8, ["flow"])
|
|
215
215
|
]),
|
|
216
216
|
_: 1
|
|
217
|
-
})) :
|
|
217
|
+
})) : p("", !0)
|
|
218
218
|
], 64)),
|
|
219
|
-
l.flow.token ?
|
|
219
|
+
l.flow.token ? p("", !0) : (d(), k(a(f), {
|
|
220
220
|
key: 2,
|
|
221
221
|
class: "min-w-full"
|
|
222
222
|
}, {
|
|
223
223
|
default: o(() => [
|
|
224
|
-
$("div",
|
|
225
|
-
r(a(
|
|
224
|
+
$("div", L, [
|
|
225
|
+
r(a(z), {
|
|
226
226
|
class: "mr-0.75 p-0 px-2 py-0.5",
|
|
227
|
-
|
|
227
|
+
loader: a(V),
|
|
228
228
|
size: "sm",
|
|
229
229
|
variant: "outlined",
|
|
230
|
-
onClick:
|
|
230
|
+
onClick: g
|
|
231
231
|
}, {
|
|
232
232
|
default: o(() => [...e[20] || (e[20] = [
|
|
233
233
|
u(" Authorize ", -1)
|
|
234
234
|
])]),
|
|
235
235
|
_: 1
|
|
236
|
-
}, 8, ["
|
|
236
|
+
}, 8, ["loader"])
|
|
237
237
|
])
|
|
238
238
|
]),
|
|
239
239
|
_: 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as y, ref as
|
|
2
|
-
import { useLoadingState as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as y, ref as c, watch as _, nextTick as w, onMounted as h, onBeforeUnmount as k, createBlock as B, openBlock as l, withCtx as v, createElementVNode as s, createElementBlock as i, createCommentVNode as d, toDisplayString as p, unref as u, createVNode as b } from "vue";
|
|
2
|
+
import { useLoadingState as C, ScalarLoading as S } from "@scalar/components";
|
|
3
|
+
import L from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
4
4
|
const T = { class: "flex w-full items-center justify-between" }, E = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mr-2 flex items-center gap-2"
|
|
@@ -16,53 +16,53 @@ const T = { class: "flex w-full items-center justify-between" }, E = {
|
|
|
16
16
|
reader: {}
|
|
17
17
|
},
|
|
18
18
|
setup(f) {
|
|
19
|
-
const e =
|
|
20
|
-
|
|
19
|
+
const e = C(), o = c(""), n = c(null), m = new TextDecoder(), a = c(null), x = () => {
|
|
20
|
+
a.value && (a.value.scrollTop = a.value.scrollHeight);
|
|
21
21
|
};
|
|
22
22
|
_(o, () => {
|
|
23
|
-
w(
|
|
23
|
+
w(x);
|
|
24
24
|
});
|
|
25
|
-
async function
|
|
25
|
+
async function g() {
|
|
26
26
|
try {
|
|
27
27
|
for (; e.isLoading; ) {
|
|
28
|
-
const { done:
|
|
29
|
-
if (
|
|
30
|
-
e.
|
|
28
|
+
const { done: r, value: t } = await f.reader.read();
|
|
29
|
+
if (r) {
|
|
30
|
+
e.clear();
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
33
|
t && (o.value += m.decode(t, { stream: !0 }));
|
|
34
34
|
}
|
|
35
|
-
} catch (
|
|
36
|
-
console.error("Error reading stream:",
|
|
35
|
+
} catch (r) {
|
|
36
|
+
console.error("Error reading stream:", r), e.clear(), n.value = r;
|
|
37
37
|
} finally {
|
|
38
38
|
o.value += m.decode();
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return h(() => {
|
|
42
|
-
e.
|
|
42
|
+
e.start(), g(), n.value = null;
|
|
43
43
|
}), k(() => {
|
|
44
|
-
f.reader.cancel(), e.
|
|
45
|
-
}), (
|
|
46
|
-
title:
|
|
47
|
-
|
|
48
|
-
t[1] || (t[1] =
|
|
49
|
-
u(e).
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
f.reader.cancel(), e.clear();
|
|
45
|
+
}), (r, t) => (l(), B(L, { class: "max-h-content overflow-y-hidden" }, {
|
|
46
|
+
title: v(() => [
|
|
47
|
+
s("div", T, [
|
|
48
|
+
t[1] || (t[1] = s("div", null, "Body", -1)),
|
|
49
|
+
u(e).isActive ? (l(), i("div", E, [
|
|
50
|
+
b(u(S), {
|
|
51
|
+
loader: u(e),
|
|
52
52
|
size: "xs"
|
|
53
|
-
}, null, 8, ["
|
|
54
|
-
t[0] || (t[0] =
|
|
55
|
-
])) :
|
|
53
|
+
}, null, 8, ["loader"]),
|
|
54
|
+
t[0] || (t[0] = s("span", { class: "text-c-2" }, " Listening… ", -1))
|
|
55
|
+
])) : d("", !0)
|
|
56
56
|
])
|
|
57
57
|
]),
|
|
58
|
-
default:
|
|
59
|
-
|
|
58
|
+
default: v(() => [
|
|
59
|
+
s("div", {
|
|
60
60
|
ref_key: "contentContainer",
|
|
61
|
-
ref:
|
|
61
|
+
ref: a,
|
|
62
62
|
class: "text-xxs font-code h-full overflow-auto leading-2 whitespace-pre-wrap"
|
|
63
63
|
}, [
|
|
64
|
-
|
|
65
|
-
o.value ? (
|
|
64
|
+
n.value ? (l(), i("div", N, p(n.value.message), 1)) : d("", !0),
|
|
65
|
+
o.value ? (l(), i("div", V, p(o.value), 1)) : d("", !0)
|
|
66
66
|
], 512)
|
|
67
67
|
]),
|
|
68
68
|
_: 1
|
|
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
33
33
|
}));
|
|
34
34
|
}, f = (o) => {
|
|
35
35
|
o?.createNew && g.name === "request" && d();
|
|
36
|
-
}, v = "2.
|
|
36
|
+
}, v = "2.14.0";
|
|
37
37
|
return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (o, e) => (i(), l("div", W, [
|
|
38
38
|
s("div", {
|
|
39
39
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseLoadingOverlay.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const p = /* @__PURE__ */
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-7ec8af01"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useLoadingState as
|
|
1
|
+
import { defineComponent as c, ref as u, createBlock as m, openBlock as s, Transition as d, withCtx as l, createElementBlock as f, createCommentVNode as p, unref as e, createVNode as i, createTextVNode as v } from "vue";
|
|
2
|
+
import { useLoadingState as x, ScalarLoading as _, ScalarButton as g } from "@scalar/components";
|
|
3
3
|
import { useWorkspace as k } from "../../../store/store.js";
|
|
4
|
-
const
|
|
4
|
+
const y = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6"
|
|
7
|
-
},
|
|
7
|
+
}, L = /* @__PURE__ */ c({
|
|
8
8
|
__name: "ResponseLoadingOverlay",
|
|
9
|
-
setup(
|
|
10
|
-
const { events:
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
}), (
|
|
14
|
-
default:
|
|
15
|
-
e(t).
|
|
16
|
-
i(e(
|
|
9
|
+
setup(C) {
|
|
10
|
+
const { events: r } = k(), t = x(), a = u();
|
|
11
|
+
return r.requestStatus.on(async (n) => {
|
|
12
|
+
n === "start" ? a.value = setTimeout(() => t.start(), 1e3) : (clearTimeout(a.value), a.value = void 0, await t.clear());
|
|
13
|
+
}), (n, o) => (s(), m(d, null, {
|
|
14
|
+
default: l(() => [
|
|
15
|
+
e(t).isActive ? (s(), f("div", y, [
|
|
16
|
+
i(e(_), {
|
|
17
17
|
class: "text-c-3",
|
|
18
|
-
|
|
18
|
+
loader: e(t),
|
|
19
19
|
size: "3xl"
|
|
20
|
-
}, null, 8, ["
|
|
21
|
-
i(e(
|
|
20
|
+
}, null, 8, ["loader"]),
|
|
21
|
+
i(e(g), {
|
|
22
22
|
variant: "ghost",
|
|
23
|
-
onClick: o[0] || (o[0] = (
|
|
23
|
+
onClick: o[0] || (o[0] = (B) => e(r).cancelRequest.emit())
|
|
24
24
|
}, {
|
|
25
|
-
default:
|
|
26
|
-
|
|
25
|
+
default: l(() => [...o[1] || (o[1] = [
|
|
26
|
+
v(" Cancel ", -1)
|
|
27
27
|
])]),
|
|
28
28
|
_: 1
|
|
29
29
|
})
|
|
@@ -34,5 +34,5 @@ const L = {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
L as default
|
|
38
38
|
};
|
|
@@ -27,10 +27,10 @@ proxyUrl?: string) => Promise<ErrorResponse<string>>;
|
|
|
27
27
|
* Makes the BE authorization call to grab the token server to server
|
|
28
28
|
* Used for clientCredentials and authorizationCode
|
|
29
29
|
*/
|
|
30
|
-
export declare const authorizeServers: (flow: NonImplicitFlow, scopes: string, { code, pkce, proxyUrl, }
|
|
30
|
+
export declare const authorizeServers: (flow: NonImplicitFlow, scopes: string, { code, pkce, proxyUrl, }: {
|
|
31
31
|
code?: string;
|
|
32
32
|
pkce?: PKCEState | null;
|
|
33
33
|
proxyUrl?: string | undefined;
|
|
34
|
-
}) => Promise<ErrorResponse<string>>;
|
|
34
|
+
} | undefined, activeServer: Server | undefined) => Promise<ErrorResponse<string>>;
|
|
35
35
|
export {};
|
|
36
36
|
//# sourceMappingURL=oauth2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/oauth2.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/oauth2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAIzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,eAAe,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAA;AAEhE,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,UAAU,MAAM,EAAE,UAAU,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAkB3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,UAAU;AAChB,wEAAwE;AACxE,cAAc,MAAM;AACpB,kCAAkC;AAClC,WAAW,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA4K/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,eAAe,EACrB,QAAQ,MAAM,EACd,2BAIG;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,YAAK,EACN,cAAc,MAAM,GAAG,SAAS,KAC/B,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA2F/B,CAAA"}
|