| 60 | |
| 61 | /** Exposes non-websocket endpoints used by the frontend. */ |
| 62 | export interface StreamlitEndpoints { |
| 63 | /** |
| 64 | * Set the static config url for static connection media assets. |
| 65 | * |
| 66 | * @param url The URL to set. |
| 67 | */ |
| 68 | setStaticConfigUrl(url: string): void |
| 69 | |
| 70 | /** |
| 71 | * Send postMessage to host with client errors |
| 72 | * @param component component causing the error |
| 73 | * @param error error status code or message |
| 74 | * @param message additional error info |
| 75 | * @param source component src (url) |
| 76 | * @param customComponentName If custom component, the component's name causing the error. |
| 77 | */ |
| 78 | sendClientErrorToHost( |
| 79 | component: string, |
| 80 | error: string | number, |
| 81 | message: string, |
| 82 | source: string, |
| 83 | customComponentName?: string |
| 84 | ): void |
| 85 | |
| 86 | /** |
| 87 | * Checks if the component src has successful response. |
| 88 | * If not, sends CLIENT_ERROR message with error info. |
| 89 | * @param sourceUrl The source to check. |
| 90 | * @param componentName The component for which the source is being checked. |
| 91 | * @param customComponentName If custom component, the component's name for which the source is being checked. |
| 92 | */ |
| 93 | checkSourceUrlResponse( |
| 94 | sourceUrl: string, |
| 95 | componentName: string, |
| 96 | customComponentName?: string |
| 97 | ): Promise<void> |
| 98 | |
| 99 | /** |
| 100 | * Return a URL to fetch data for the given custom component. |
| 101 | * @param componentName The registered name of the component. |
| 102 | * @param path The path of the component resource to fetch, e.g. "index.html". |
| 103 | */ |
| 104 | buildComponentURL(componentName: string, path: string): string |
| 105 | |
| 106 | /** |
| 107 | * Return a URL to fetch data for the given bidirectional component. |
| 108 | * @param componentName The registered name of the component. |
| 109 | * @param path The path of the component resource to fetch, e.g. "script.js". |
| 110 | */ |
| 111 | buildBidiComponentURL(componentName: string, path: string): string |
| 112 | |
| 113 | /** |
| 114 | * Construct a URL for a media file. |
| 115 | * @param url a relative or absolute URL. If `url` is absolute, it will be |
| 116 | * returned unchanged. Otherwise, the return value will be a URL for fetching |
| 117 | * the media file from the connected Streamlit instance. |
| 118 | */ |
| 119 | buildMediaURL(url: string): string |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…