@scalar/agent-chat 0.2.3 → 0.2.6
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/LICENSE +21 -0
- package/dist/App.vue.d.ts +3 -2
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +32 -0
- package/dist/App.vue2.js +4 -0
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Chat.vue.js +23 -0
- package/dist/Chat.vue2.js +4 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/api.d.ts +50 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +68 -0
- package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
- package/dist/components/ApprovalSection.vue.js +7 -0
- package/dist/components/ApprovalSection.vue2.js +42 -0
- package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
- package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationProvided.vue.js +13 -0
- package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
- package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationRequired.vue.js +13 -0
- package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
- package/dist/components/AutosendPaused.vue.js +13 -0
- package/dist/components/ContextItem.vue.d.ts.map +1 -1
- package/dist/components/ContextItem.vue.js +7 -0
- package/dist/components/ContextItem.vue2.js +19 -0
- package/dist/components/ErrorMessage.vue.d.ts +2 -1
- package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
- package/dist/components/ErrorMessage.vue.js +7 -0
- package/dist/components/ErrorMessage.vue2.js +22 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
- package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
- package/dist/components/Logo.vue.d.ts.map +1 -1
- package/dist/components/Logo.vue.js +23 -0
- package/dist/components/PaymentSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.js +7 -0
- package/dist/components/PaymentSection.vue2.js +34 -0
- package/dist/components/RequestApproved.vue.d.ts.map +1 -1
- package/dist/components/RequestApproved.vue.js +13 -0
- package/dist/components/RequestFailed.vue.d.ts.map +1 -1
- package/dist/components/RequestFailed.vue.js +24 -0
- package/dist/components/RequestPreview.vue.d.ts +1 -1
- package/dist/components/RequestPreview.vue.d.ts.map +1 -1
- package/dist/components/RequestPreview.vue.js +7 -0
- package/dist/components/RequestPreview.vue2.js +123 -0
- package/dist/components/RequestRejected.vue.d.ts.map +1 -1
- package/dist/components/RequestRejected.vue.js +22 -0
- package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
- package/dist/components/RequestSuccess.vue.js +13 -0
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
- package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
- package/dist/components/ResponseBody/helpers/media-types.js +130 -0
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
- package/dist/components/SearchPopover.vue.d.ts +2 -2
- package/dist/components/SearchPopover.vue.d.ts.map +1 -1
- package/dist/components/SearchPopover.vue.js +7 -0
- package/dist/components/SearchPopover.vue2.js +67 -0
- package/dist/components/Selector.vue.d.ts +24 -0
- package/dist/components/Selector.vue.d.ts.map +1 -0
- package/dist/components/Selector.vue.js +67 -0
- package/dist/components/Selector.vue2.js +4 -0
- package/dist/components/SendingRequest.vue.d.ts.map +1 -1
- package/dist/components/SendingRequest.vue.js +24 -0
- package/dist/components/ServerSelector.vue.d.ts +22 -0
- package/dist/components/ServerSelector.vue.d.ts.map +1 -0
- package/dist/components/ServerSelector.vue.js +57 -0
- package/dist/components/ServerSelector.vue2.js +4 -0
- package/dist/components/Suggestion.vue.d.ts.map +1 -1
- package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
- package/dist/components/UploadSection.vue.d.ts.map +1 -0
- package/dist/components/UploadSection.vue.js +7 -0
- package/dist/components/UploadSection.vue2.js +62 -0
- package/dist/entities/prompt/constants.d.ts +2 -0
- package/dist/entities/prompt/constants.d.ts.map +1 -0
- package/dist/entities/prompt/constants.js +4 -0
- package/dist/entities/registry/document.d.ts +21 -0
- package/dist/entities/registry/document.d.ts.map +1 -0
- package/dist/entities/registry/document.js +12 -0
- package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
- package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
- package/dist/entities/tools/ask-for-authentication.js +8 -0
- package/dist/entities/tools/constants.d.ts +2 -0
- package/dist/entities/tools/constants.d.ts.map +1 -0
- package/dist/entities/tools/constants.js +4 -0
- package/dist/entities/tools/execute-request.d.ts +42 -0
- package/dist/entities/tools/execute-request.d.ts.map +1 -0
- package/dist/entities/tools/execute-request.js +11 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
- package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
- package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
- package/dist/helpers.d.ts +20 -12
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +122 -0
- package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
- package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
- package/dist/hooks/use-chat-approvals.js +21 -0
- package/dist/hooks/use-chat-error.d.ts +14 -0
- package/dist/hooks/use-chat-error.d.ts.map +1 -0
- package/dist/hooks/use-chat-error.js +23 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
- package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
- package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
- package/dist/hooks/use-chat-scroll.js +16 -0
- package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
- package/dist/hooks/use-search.d.ts.map +1 -0
- package/dist/hooks/use-search.js +25 -0
- package/dist/hooks/use-term-and-conditions.d.ts +6 -0
- package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
- package/dist/hooks/use-term-and-conditions.js +16 -0
- package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
- package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
- package/dist/hooks/use-upload-tmp-document.js +64 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/package.json +34 -23
- package/dist/registry/add-documents-to-store.d.ts +6 -6
- package/dist/registry/add-documents-to-store.d.ts.map +1 -1
- package/dist/registry/add-documents-to-store.js +40 -0
- package/dist/registry/create-document-name.d.ts +2 -0
- package/dist/registry/create-document-name.d.ts.map +1 -0
- package/dist/registry/create-document-name.js +6 -0
- package/dist/state/state.d.ts +20 -8
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +110 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/views/Chat/Chat.vue.js +7 -0
- package/dist/views/Chat/Chat.vue2.js +77 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +93 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
- package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/Text.vue.js +16 -0
- package/dist/views/Chat/Messages/Text.vue2.js +4 -0
- package/dist/views/Layout.vue.d.ts.map +1 -1
- package/dist/views/Layout.vue.js +7 -0
- package/dist/views/Layout.vue2.js +23 -0
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +7 -0
- package/dist/views/PromptForm.vue2.js +212 -0
- package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
- package/dist/views/Settings/Auth.vue.js +67 -0
- package/dist/views/Settings/Auth.vue2.js +4 -0
- package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +7 -0
- package/dist/views/Settings/DocSettings.vue2.js +48 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.js +8 -0
- package/dist/views/Settings/Settings.vue2.js +67 -0
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.js +7 -0
- package/dist/views/Start.vue2.js +41 -0
- package/package.json +52 -7
- package/dist/Tooltip-Cm82QgNj.js +0 -575
- package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
- package/dist/_basePickBy-hHD8tMGb.js +0 -151
- package/dist/_baseUniq-DTF1wuF6.js +0 -614
- package/dist/arc-Dw2RQerU.js +0 -83
- package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
- package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
- package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
- package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
- package/dist/channel-105myCGU.js +0 -5
- package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
- package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
- package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
- package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
- package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
- package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
- package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
- package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
- package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
- package/dist/clone-CIIO71O9.js +0 -8
- package/dist/components/Endpoint.vue.d.ts.map +0 -1
- package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
- package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
- package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
- package/dist/defaultLocale-BEa-49Qz.js +0 -171
- package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
- package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
- package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
- package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
- package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
- package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
- package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
- package/dist/graph-Dth4IhEK.js +0 -247
- package/dist/hooks/useChatApprovals.d.ts.map +0 -1
- package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
- package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
- package/dist/hooks/useChatScroll.d.ts.map +0 -1
- package/dist/hooks/useSearch.d.ts.map +0 -1
- package/dist/index-BOvT43H8.js +0 -111780
- package/dist/index2-B36B-gt0.js +0 -69
- package/dist/index3-CtIyYUnG.js +0 -70
- package/dist/index4-Dzz91Ao2.js +0 -537
- package/dist/index5-Bmz0gMSP.js +0 -590
- package/dist/index6-DMB3qTSV.js +0 -196
- package/dist/info-NVLQJR56-azt5obk5.js +0 -27
- package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
- package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
- package/dist/katex-SsTUIUTC.js +0 -11688
- package/dist/layout-7TCY8eA2.js +0 -1332
- package/dist/linear-DSm5i91N.js +0 -625
- package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
- package/dist/mermaid.core-QjuzH7xx.js +0 -14164
- package/dist/mhchem-XHl7cef5.js +0 -2306
- package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
- package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
- package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
- package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
- package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
- package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
- package/dist/safeRaf-I3a3-dyJ.js +0 -10
- package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
- package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
- package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
- package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
- package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
- package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import m from "whatwg-mimetype";
|
|
2
|
+
const a = (e) => {
|
|
3
|
+
try {
|
|
4
|
+
return decodeURIComponent(e);
|
|
5
|
+
} catch {
|
|
6
|
+
return e;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
function f(e) {
|
|
10
|
+
let t = "";
|
|
11
|
+
if (e) {
|
|
12
|
+
const n = e.match(/filename\*=UTF-8''([^;]+)/)?.[1] ?? e.match(/filename\s*=\s*"?([^";]+)"?/)?.[1];
|
|
13
|
+
n && (t = a(n.trim()));
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
}
|
|
17
|
+
const l = (e) => e instanceof Blob, p = (e) => e ? Object.keys(e).map((t) => ({
|
|
18
|
+
name: t,
|
|
19
|
+
value: e[t] ?? ""
|
|
20
|
+
})) : [];
|
|
21
|
+
function y({ data: e, headers: t }) {
|
|
22
|
+
const n = p(t), c = n.find((r) => r.name.toLowerCase() === "content-type"), o = c?.value ? new m(c.value) : void 0, i = f(
|
|
23
|
+
n.find((r) => r.name.toLowerCase() === "content-disposition")?.value ?? ""
|
|
24
|
+
), s = l(e) ? URL.createObjectURL(e) : typeof e == "string" ? URL.createObjectURL(new Blob([e], { type: o ? o.toString() : void 0 })) : e instanceof Object && Object.keys(e).length ? URL.createObjectURL(
|
|
25
|
+
new Blob([JSON.stringify(e)], {
|
|
26
|
+
type: o ? o.toString() : void 0
|
|
27
|
+
})
|
|
28
|
+
) : "";
|
|
29
|
+
return { mimeType: o, attachmentFilename: i, dataUrl: s };
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
y as processResponseBody
|
|
33
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var __VLS_6: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof
|
|
3
|
+
default?: (props: typeof __VLS_6) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchPopover.vue.d.ts","sourceRoot":"","sources":["../../src/components/SearchPopover.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchPopover.vue.d.ts","sourceRoot":"","sources":["../../src/components/SearchPopover.vue"],"names":[],"mappings":"AAuPA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAwB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as d, computed as i, createBlock as f, openBlock as s, unref as o, withCtx as c, renderSlot as h, createVNode as m, createElementBlock as r, Fragment as _, renderList as g, createCommentVNode as y, createElementVNode as v, toDisplayString as k } from "vue";
|
|
2
|
+
import { ScalarPopover as I, ScalarTextInput as S } from "@scalar/components";
|
|
3
|
+
import { ScalarIconMagnifyingGlass as V } from "@scalar/icons";
|
|
4
|
+
import { useSearch as x } from "../hooks/use-search.js";
|
|
5
|
+
import { useState as C } from "../state/state.js";
|
|
6
|
+
const N = ["onClick"], P = ["src"], b = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "searchResultsEmpty"
|
|
9
|
+
}, w = /* @__PURE__ */ d({
|
|
10
|
+
__name: "SearchPopover",
|
|
11
|
+
setup(A) {
|
|
12
|
+
const n = C(), l = x(), u = i(
|
|
13
|
+
() => l.results.value.filter(
|
|
14
|
+
(e) => !n.registryDocuments.value.some(
|
|
15
|
+
(a) => a.namespace === e.namespace && a.slug === e.slug
|
|
16
|
+
)
|
|
17
|
+
).map((e) => ({
|
|
18
|
+
...e,
|
|
19
|
+
label: e.title,
|
|
20
|
+
id: e.id
|
|
21
|
+
}))
|
|
22
|
+
);
|
|
23
|
+
return (e, a) => (s(), f(o(I), {
|
|
24
|
+
offset: 0,
|
|
25
|
+
placement: "top-start",
|
|
26
|
+
resize: "",
|
|
27
|
+
style: { width: "220px" }
|
|
28
|
+
}, {
|
|
29
|
+
popover: c(({ close: p }) => [
|
|
30
|
+
m(o(S), {
|
|
31
|
+
autofocus: "",
|
|
32
|
+
class: "searchInput",
|
|
33
|
+
modelValue: o(l).query.value,
|
|
34
|
+
placeholder: "Add an API",
|
|
35
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => o(l).query.value = t ?? "")
|
|
36
|
+
}, {
|
|
37
|
+
prefix: c(() => [
|
|
38
|
+
m(o(V), { class: "searchIcon" })
|
|
39
|
+
]),
|
|
40
|
+
_: 1
|
|
41
|
+
}, 8, ["modelValue"]),
|
|
42
|
+
u.value.length ? (s(!0), r(_, { key: 0 }, g(u.value, (t) => (s(), r("button", {
|
|
43
|
+
key: t.id,
|
|
44
|
+
class: "searchItem",
|
|
45
|
+
type: "button",
|
|
46
|
+
onClick: () => {
|
|
47
|
+
o(n).addDocument(t), p();
|
|
48
|
+
}
|
|
49
|
+
}, [
|
|
50
|
+
t.logoUrl ? (s(), r("img", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: "searchItemLogo",
|
|
53
|
+
src: t.logoUrl
|
|
54
|
+
}, null, 8, P)) : y("", !0),
|
|
55
|
+
v("span", null, k(t.title), 1)
|
|
56
|
+
], 8, N))), 128)) : (s(), r("span", b, " No APIs found "))
|
|
57
|
+
]),
|
|
58
|
+
default: c(() => [
|
|
59
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
60
|
+
]),
|
|
61
|
+
_: 3
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
w as default
|
|
67
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The selected server URL */
|
|
4
|
+
selectedServer: ServerObject | null;
|
|
5
|
+
/** Available servers */
|
|
6
|
+
servers: ServerObject[];
|
|
7
|
+
/** The id of the target to use for the popover (e.g. address bar) */
|
|
8
|
+
target: string;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
11
|
+
servers: ServerObject[];
|
|
12
|
+
serverUrlWithoutTrailingSlash: import("vue").ComputedRef<string>;
|
|
13
|
+
serverOptions: import("vue").ComputedRef<{
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[]>;
|
|
17
|
+
selectedServer: ServerObject | null;
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
19
|
+
"update:modelValue": (value: string) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=Selector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Selector.vue.d.ts","sourceRoot":"","sources":["../../src/components/Selector.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,KAAK,WAAW,GAAG;IACjB,8BAA8B;IAC9B,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;;;;;;;AA6LF,wBAQG"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as g, computed as s, createBlock as S, createElementBlock as w, openBlock as u, unref as n, withCtx as i, createVNode as d, createElementVNode as a, toDisplayString as c } from "vue";
|
|
2
|
+
import { ScalarListbox as b, ScalarButton as h } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as y } from "@scalar/icons";
|
|
4
|
+
const V = { class: "overflow-x-auto" }, k = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-lg px-3 py-1.5 text-base leading-[20px] whitespace-nowrap"
|
|
7
|
+
}, B = { class: "overflow-x-auto" }, E = /* @__PURE__ */ g({
|
|
8
|
+
__name: "Selector",
|
|
9
|
+
props: {
|
|
10
|
+
selectedServer: {},
|
|
11
|
+
servers: {},
|
|
12
|
+
target: {}
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(e, { expose: p, emit: m }) {
|
|
16
|
+
const v = m, o = s(
|
|
17
|
+
() => e.servers.map((r) => ({
|
|
18
|
+
id: r.url,
|
|
19
|
+
label: r.url
|
|
20
|
+
}))
|
|
21
|
+
), l = s(
|
|
22
|
+
() => e.selectedServer?.url?.replace(/\/$/, "") || ""
|
|
23
|
+
), f = s(
|
|
24
|
+
() => o.value.find((r) => r.id === e.selectedServer?.url)
|
|
25
|
+
);
|
|
26
|
+
return p({
|
|
27
|
+
servers: e.servers,
|
|
28
|
+
serverUrlWithoutTrailingSlash: l,
|
|
29
|
+
serverOptions: o,
|
|
30
|
+
selectedServer: e.selectedServer
|
|
31
|
+
}), (r, t) => o.value.length > 1 ? (u(), S(n(b), {
|
|
32
|
+
key: 0,
|
|
33
|
+
ref: "elem",
|
|
34
|
+
class: "group",
|
|
35
|
+
modelValue: f.value,
|
|
36
|
+
options: o.value,
|
|
37
|
+
placement: "bottom-start",
|
|
38
|
+
resize: "",
|
|
39
|
+
target: e.target,
|
|
40
|
+
"onUpdate:modelValue": t[0] || (t[0] = (x) => v("update:modelValue", x.id))
|
|
41
|
+
}, {
|
|
42
|
+
default: i(() => [
|
|
43
|
+
d(n(h), {
|
|
44
|
+
class: "bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-lg px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1",
|
|
45
|
+
variant: "ghost"
|
|
46
|
+
}, {
|
|
47
|
+
default: i(() => [
|
|
48
|
+
t[1] || (t[1] = a("span", { class: "sr-only" }, "Server:", -1)),
|
|
49
|
+
a("span", V, c(l.value || "Select a server"), 1),
|
|
50
|
+
d(n(y), {
|
|
51
|
+
class: "text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
|
|
52
|
+
weight: "bold"
|
|
53
|
+
})
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
})
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
}, 8, ["modelValue", "options", "target"])) : (u(), w("div", k, [
|
|
60
|
+
t[2] || (t[2] = a("span", { class: "sr-only" }, "Server:", -1)),
|
|
61
|
+
a("span", B, c(l.value), 1)
|
|
62
|
+
]));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
E as default
|
|
67
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendingRequest.vue.d.ts","sourceRoot":"","sources":["../../src/components/SendingRequest.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SendingRequest.vue.d.ts","sourceRoot":"","sources":["../../src/components/SendingRequest.vue"],"names":[],"mappings":";AA+HA,wBAKG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as o, openBlock as n, createElementVNode as e, createTextVNode as r } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import s from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const d = {}, c = { class: "sendingRequest" };
|
|
5
|
+
function i(a, t) {
|
|
6
|
+
return n(), o("div", c, [...t[0] || (t[0] = [
|
|
7
|
+
e("div", { class: "playIcon" }, [
|
|
8
|
+
e("svg", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
height: "32",
|
|
11
|
+
viewBox: "0 0 256 256",
|
|
12
|
+
width: "32",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14
|
+
}, [
|
|
15
|
+
e("path", { d: "M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z" })
|
|
16
|
+
])
|
|
17
|
+
], -1),
|
|
18
|
+
r(" Sending Request to Endpoint ", -1)
|
|
19
|
+
])]);
|
|
20
|
+
}
|
|
21
|
+
const f = /* @__PURE__ */ s(d, [["render", i], ["__scopeId", "data-v-65dc6dfb"]]);
|
|
22
|
+
export {
|
|
23
|
+
f as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
type SelectorProps = {
|
|
4
|
+
/** The event bus to use for emitting events */
|
|
5
|
+
eventBus: WorkspaceEventBus;
|
|
6
|
+
/** The selected server */
|
|
7
|
+
selectedServer: ServerObject | null;
|
|
8
|
+
/** Available servers */
|
|
9
|
+
servers: ServerObject[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* ServerSelector
|
|
13
|
+
*
|
|
14
|
+
* Core component for rendering a server selector block.
|
|
15
|
+
* Handles server selection and emits a 'server:update:selected' event when the selected server changes.
|
|
16
|
+
*
|
|
17
|
+
* @event server:update:selected - Emitted when the selected server changes
|
|
18
|
+
* @event server:update:variables - Emitted when a server variable changes
|
|
19
|
+
*/
|
|
20
|
+
declare const _default: import("vue").DefineComponent<SelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SelectorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
22
|
+
//# sourceMappingURL=ServerSelector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../src/components/ServerSelector.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAMhG,KAAK,aAAa,GAAG;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,2BAA2B;IAC3B,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;;;GAQG;;AACH,wBAsJC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as m, useId as b, createElementBlock as S, openBlock as d, Fragment as f, createElementVNode as n, createVNode as g, createBlock as c, createCommentVNode as o, normalizeClass as x, unref as l } from "vue";
|
|
2
|
+
import { ServerVariablesForm as k } from "@scalar/api-client/components/Server";
|
|
3
|
+
import { ScalarMarkdown as B } from "@scalar/components";
|
|
4
|
+
import V from "./Selector.vue.js";
|
|
5
|
+
const y = ["id"], C = {}, I = /* @__PURE__ */ m({
|
|
6
|
+
...C,
|
|
7
|
+
__name: "ServerSelector",
|
|
8
|
+
props: {
|
|
9
|
+
eventBus: {},
|
|
10
|
+
selectedServer: {},
|
|
11
|
+
servers: {}
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
const s = b(), v = (r) => {
|
|
15
|
+
e.eventBus.emit("server:update:selected", {
|
|
16
|
+
url: e.selectedServer?.url === r ? "" : r
|
|
17
|
+
});
|
|
18
|
+
}, i = (r, t) => {
|
|
19
|
+
const a = e.servers.findIndex((u) => u.url === e.selectedServer?.url);
|
|
20
|
+
a !== -1 && e.eventBus.emit("server:update:variables", {
|
|
21
|
+
index: a,
|
|
22
|
+
key: r,
|
|
23
|
+
value: t
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
return (r, t) => (d(), S(f, null, [
|
|
27
|
+
t[0] || (t[0] = n("label", { class: "bg-b-2 flex h-8 items-center rounded-t-lg border border-b-0 px-3 py-2.5 font-medium" }, " Server ", -1)),
|
|
28
|
+
n("div", {
|
|
29
|
+
id: l(s),
|
|
30
|
+
class: x(["border", {
|
|
31
|
+
"rounded-b-lg": !e.selectedServer?.description && !e.selectedServer?.variables
|
|
32
|
+
}])
|
|
33
|
+
}, [
|
|
34
|
+
e.servers.length ? (d(), c(V, {
|
|
35
|
+
key: 0,
|
|
36
|
+
selectedServer: e.selectedServer,
|
|
37
|
+
servers: e.servers,
|
|
38
|
+
target: l(s),
|
|
39
|
+
"onUpdate:modelValue": v
|
|
40
|
+
}, null, 8, ["selectedServer", "servers", "target"])) : o("", !0)
|
|
41
|
+
], 10, y),
|
|
42
|
+
g(l(k), {
|
|
43
|
+
layout: "reference",
|
|
44
|
+
variables: e.selectedServer?.variables,
|
|
45
|
+
"onUpdate:variable": i
|
|
46
|
+
}, null, 8, ["variables"]),
|
|
47
|
+
e.selectedServer?.description ? (d(), c(l(B), {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "text-c-3 rounded-b-lg border border-t-0 px-3 py-1.5",
|
|
50
|
+
value: e.selectedServer.description
|
|
51
|
+
}, null, 8, ["value"])) : o("", !0)
|
|
52
|
+
], 64));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
I as default
|
|
57
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggestion.vue.d.ts","sourceRoot":"","sources":["../../src/components/Suggestion.vue"],"names":[],"mappings":"AA4CA,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;;;;;;AAwDpC,
|
|
1
|
+
{"version":3,"file":"Suggestion.vue.d.ts","sourceRoot":"","sources":["../../src/components/Suggestion.vue"],"names":[],"mappings":"AA4CA,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;;;;;;AAwDpC,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/TestRequestButton.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAKnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAqEF,wBAMG"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type UploadTmpDocumentState } from '../hooks/use-upload-tmp-document.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
4
|
-
attrs: [string, string][];
|
|
5
|
-
};
|
|
3
|
+
uploadState: UploadTmpDocumentState;
|
|
6
4
|
};
|
|
7
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
6
|
export default _default;
|
|
9
|
-
//# sourceMappingURL=
|
|
7
|
+
//# sourceMappingURL=UploadSection.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/UploadSection.vue"],"names":[],"mappings":"AA0GA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAE7E,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,sBAAsB,CAAA;CACpC,CAAC;;AAiJF,wBAMG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent as c, createElementBlock as a, openBlock as n, normalizeClass as u, createCommentVNode as r, createVNode as l, createTextVNode as s, unref as o, toDisplayString as p } from "vue";
|
|
2
|
+
import { useLoadingState as g, ScalarLoading as i } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCheck as m, ScalarIconXCircle as S } from "@scalar/icons";
|
|
4
|
+
const f = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "uploadText flex items-center gap-1.5"
|
|
7
|
+
}, x = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "uploadText flex items-center gap-1.5"
|
|
10
|
+
}, y = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "uploadText flex items-center gap-1.5"
|
|
13
|
+
}, k = {
|
|
14
|
+
key: 3,
|
|
15
|
+
class: "uploadText flex items-center gap-1.5"
|
|
16
|
+
}, N = /* @__PURE__ */ c({
|
|
17
|
+
__name: "UploadSection",
|
|
18
|
+
props: {
|
|
19
|
+
uploadState: {}
|
|
20
|
+
},
|
|
21
|
+
setup(e) {
|
|
22
|
+
const d = g();
|
|
23
|
+
return (C, t) => (n(), a("div", {
|
|
24
|
+
class: u(["uploadSection", {
|
|
25
|
+
error: e.uploadState.type === "error",
|
|
26
|
+
done: e.uploadState.type === "done"
|
|
27
|
+
}])
|
|
28
|
+
}, [
|
|
29
|
+
e.uploadState.type === "uploading" ? (n(), a("strong", f, [
|
|
30
|
+
l(o(i), {
|
|
31
|
+
loader: {
|
|
32
|
+
...o(d),
|
|
33
|
+
isLoading: !0
|
|
34
|
+
},
|
|
35
|
+
size: "lg"
|
|
36
|
+
}, null, 8, ["loader"]),
|
|
37
|
+
t[0] || (t[0] = s(" Uploading document... ", -1))
|
|
38
|
+
])) : r("", !0),
|
|
39
|
+
e.uploadState.type === "processing" ? (n(), a("strong", x, [
|
|
40
|
+
l(o(i), {
|
|
41
|
+
loader: {
|
|
42
|
+
...o(d),
|
|
43
|
+
isLoading: !0
|
|
44
|
+
},
|
|
45
|
+
size: "lg"
|
|
46
|
+
}, null, 8, ["loader"]),
|
|
47
|
+
t[1] || (t[1] = s(" Processing document... ", -1))
|
|
48
|
+
])) : r("", !0),
|
|
49
|
+
e.uploadState.type === "done" ? (n(), a("strong", y, [
|
|
50
|
+
l(o(m), { class: "icon" }),
|
|
51
|
+
t[2] || (t[2] = s(" Document processed ", -1))
|
|
52
|
+
])) : r("", !0),
|
|
53
|
+
e.uploadState.type === "error" ? (n(), a("strong", k, [
|
|
54
|
+
l(o(S), { class: "icon" }),
|
|
55
|
+
s(" " + p(e.uploadState.error), 1)
|
|
56
|
+
])) : r("", !0)
|
|
57
|
+
], 2));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
N as default
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/entities/prompt/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,QAAS,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
import type { SecurityScheme } from '@scalar/types/entities';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
export declare const registryApiMetadata: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
namespace: z.ZodString;
|
|
8
|
+
currentVersion: z.ZodString;
|
|
9
|
+
logoUrl: z.ZodNullable<z.ZodURL>;
|
|
10
|
+
slug: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type ApiMetadata = z.infer<typeof registryApiMetadata>;
|
|
13
|
+
export type RegistryDocument = {
|
|
14
|
+
namespace: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
};
|
|
17
|
+
export type DocumentSettings = Record<string, {
|
|
18
|
+
securitySchemes: SecurityScheme[];
|
|
19
|
+
activeServer: OpenAPIV3_1.ServerObject | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/entities/registry/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,eAAO,MAAM,mBAAmB;;;;;;;iBAO9B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE7D,MAAM,MAAM,gBAAgB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CACnC,MAAM,EACN;IACE,eAAe,EAAE,cAAc,EAAE,CAAA;IACjC,YAAY,EAAE,WAAW,CAAC,YAAY,GAAG,SAAS,CAAA;CACnD,CACF,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ASK_FOR_AUTHENTICATION_TOOL_NAME: "ask-for-authentication";
|
|
3
|
+
export declare const askForAuthenticationInputSchema: z.ZodObject<{
|
|
4
|
+
uniqueIdentifier: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type AskForAuthenticationInput = z.input<typeof askForAuthenticationInputSchema>;
|
|
7
|
+
//# sourceMappingURL=ask-for-authentication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-for-authentication.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/ask-for-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,gCAAgC,EAAG,wBAAiC,CAAA;AAEjF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,QAAQ,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { AgentChatError } from '../../helpers.js';
|
|
4
|
+
export declare const EXECUTE_REQUEST_TOOL_NAME: "execute-request";
|
|
5
|
+
export declare const executeRequestToolInputSchema: z.ZodObject<{
|
|
6
|
+
method: z.ZodString;
|
|
7
|
+
path: z.ZodString;
|
|
8
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
9
|
+
body: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ExecuteRequestToolInput = z.input<typeof executeRequestToolInputSchema>;
|
|
12
|
+
export type ExecuteRequestToolOutput = CallToolResult & {
|
|
13
|
+
structuredContent: {
|
|
14
|
+
success: false;
|
|
15
|
+
error: AgentChatError<'FAILED_TO_PARSE_RESPONSE_BODY', {
|
|
16
|
+
originalError: unknown;
|
|
17
|
+
}>;
|
|
18
|
+
} | {
|
|
19
|
+
success: false;
|
|
20
|
+
error: AgentChatError<'REQUEST_NOT_OK', {
|
|
21
|
+
status: number;
|
|
22
|
+
url: string;
|
|
23
|
+
responseBody: string | undefined;
|
|
24
|
+
headers: Record<string, string>;
|
|
25
|
+
}>;
|
|
26
|
+
data?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
success: true;
|
|
29
|
+
data: {
|
|
30
|
+
status: number;
|
|
31
|
+
responseBody: string;
|
|
32
|
+
headers: Record<string, string>;
|
|
33
|
+
};
|
|
34
|
+
error?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
success: false;
|
|
37
|
+
error: AgentChatError<'FAILED_TO_FETCH', {
|
|
38
|
+
originalError: unknown;
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=execute-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE/C,eAAO,MAAM,yBAAyB,EAAG,iBAA0B,CAAA;AAEnE,eAAO,MAAM,6BAA6B;;;;;iBAKxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,MAAM,MAAM,wBAAwB,GAAG,cAAc,GAAG;IACtD,iBAAiB,EACb;QACE,OAAO,EAAE,KAAK,CAAA;QACd,KAAK,EAAE,cAAc,CACnB,+BAA+B,EAC/B;YACE,aAAa,EAAE,OAAO,CAAA;SACvB,CACF,CAAA;KACF,GACD;QACE,OAAO,EAAE,KAAK,CAAA;QACd,KAAK,EAAE,cAAc,CACnB,gBAAgB,EAChB;YACE,MAAM,EAAE,MAAM,CAAA;YACd,GAAG,EAAE,MAAM,CAAA;YACX,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;YAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAChC,CACF,CAAA;QACD,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB,GACD;QACE,OAAO,EAAE,IAAI,CAAA;QACb,IAAI,EAAE;YACJ,MAAM,EAAE,MAAM,CAAA;YACd,YAAY,EAAE,MAAM,CAAA;YACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAChC,CAAA;QACD,KAAK,CAAC,EAAE,SAAS,CAAA;KAClB,GACD;QACE,OAAO,EAAE,KAAK,CAAA;QACd,KAAK,EAAE,cAAc,CACnB,iBAAiB,EACjB;YACE,aAAa,EAAE,OAAO,CAAA;SACvB,CACF,CAAA;KACF,CAAA;CACN,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export declare const GET_MINI_OPENAPI_SPEC_TOOL_NAME: "get-mini-openapi-spec";
|
|
5
|
+
export declare const getMiniOpenAPIDocToolInputSchema: z.ZodObject<{
|
|
6
|
+
question: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type GetMiniOpenAPIDocToolInput = z.input<typeof getMiniOpenAPIDocToolInputSchema>;
|
|
9
|
+
export type GetMiniOpenAPIDocToolOutput = CallToolResult & {
|
|
10
|
+
structuredContent: Partial<OpenAPIV3_1.Document>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=get-mini-openapi-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-mini-openapi-spec.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/get-mini-openapi-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,+BAA+B,EAAG,uBAAgC,CAAA;AAE/E,eAAO,MAAM,gCAAgC;;iBAE3C,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF,MAAM,MAAM,2BAA2B,GAAG,cAAc,GAAG;IACzD,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;CACjD,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
|
+
export declare const GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME: "get-openapi-specs-summary";
|
|
4
|
+
export type GetOpenAPISpecsSummaryToolOutput = CallToolResult & {
|
|
5
|
+
structuredContent: {
|
|
6
|
+
info?: OpenAPIV3_1.InfoObject;
|
|
7
|
+
paths: string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=get-openapi-spec-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-openapi-spec-summary.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/get-openapi-spec-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,eAAO,MAAM,mCAAmC,EAAG,2BAAoC,CAAA;AAEvF,MAAM,MAAM,gCAAgC,GAAG,cAAc,GAAG;IAC9D,iBAAiB,EAAE;QACjB,IAAI,CAAC,EAAE,WAAW,CAAC,UAAU,CAAA;QAC7B,KAAK,EAAE,MAAM,EAAE,CAAA;KAChB,CAAA;CACF,CAAA"}
|