@promptbook/utils 0.41.0 → 0.41.2
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/bin/promptbook-cli.js +3 -0
- package/esm/index.es.js +794 -794
- package/esm/typings/_packages/core.index.d.ts +20 -20
- package/esm/typings/_packages/execute-javascript.index.d.ts +3 -3
- package/esm/typings/_packages/openai.index.d.ts +3 -3
- package/esm/typings/_packages/remote-client.index.d.ts +4 -4
- package/esm/typings/_packages/remote-server.index.d.ts +3 -3
- package/esm/typings/_packages/types.index.d.ts +27 -27
- package/esm/typings/_packages/utils.index.d.ts +30 -30
- package/esm/typings/_packages/wizzard.index.d.ts +5 -5
- package/esm/typings/config.d.ts +4 -4
- package/esm/typings/conversion/promptbookStringToJson.d.ts +13 -13
- package/esm/typings/conversion/test/_importPromptbook.d.ts +12 -12
- package/esm/typings/conversion/test/promptbookStringToJson-syntaxErrors.test.d.ts +1 -1
- package/esm/typings/conversion/test/promptbookStringToJson.test.d.ts +1 -1
- package/esm/typings/conversion/test/validatePromptbookJson-logicErrors.test.d.ts +1 -1
- package/esm/typings/conversion/test/validatePromptbookJson.d.ts +26 -26
- package/esm/typings/conversion/test/validatePromptbookJson.test.d.ts +1 -1
- package/esm/typings/conversion/utils/extractVariables.d.ts +10 -10
- package/esm/typings/conversion/utils/extractVariables.test.d.ts +1 -1
- package/esm/typings/conversion/utils/parseCommand.d.ts +8 -8
- package/esm/typings/conversion/utils/parseCommand.test.d.ts +4 -4
- package/esm/typings/conversion/utils/parseNumber.d.ts +12 -12
- package/esm/typings/conversion/utils/parseNumber.test.d.ts +1 -1
- package/esm/typings/errors/ExpectError.d.ts +9 -9
- package/esm/typings/errors/NotFoundError.d.ts +7 -7
- package/esm/typings/errors/PromptbookExecutionError.d.ts +7 -7
- package/esm/typings/errors/PromptbookLogicError.d.ts +7 -7
- package/esm/typings/errors/PromptbookReferenceError.d.ts +7 -7
- package/esm/typings/errors/PromptbookSyntaxError.d.ts +7 -7
- package/esm/typings/errors/UnexpectedError.d.ts +7 -7
- package/esm/typings/execution/CommonExecutionToolsOptions.d.ts +9 -9
- package/esm/typings/execution/ExecutionTools.d.ts +25 -25
- package/esm/typings/execution/NaturalExecutionTools.d.ts +23 -23
- package/esm/typings/execution/PromptResult.d.ts +74 -74
- package/esm/typings/execution/PromptbookExecutor.d.ts +39 -39
- package/esm/typings/execution/ScriptExecutionTools.d.ts +37 -37
- package/esm/typings/execution/UserInterfaceTools.d.ts +45 -45
- package/esm/typings/execution/assertsExecutionSuccessful.d.ts +11 -11
- package/esm/typings/execution/createPromptbookExecutor.d.ts +41 -41
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.d.ts +22 -22
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/joker.test.d.ts +4 -4
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +4 -4
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +4 -4
- package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +28 -28
- package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +16 -16
- package/esm/typings/execution/plugins/natural-execution-tools/openai/computeOpenaiUsage.d.ts +3 -3
- package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.d.ts +35 -35
- package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +23 -23
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Promptbook_Server_Error.d.ts +11 -11
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Promptbook_Server_Progress.d.ts +12 -12
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Promptbook_Server_Request.d.ts +17 -17
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Promptbook_Server_Response.d.ts +12 -12
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +27 -27
- package/esm/typings/execution/plugins/natural-execution-tools/remote/startRemoteServer.d.ts +17 -17
- package/esm/typings/execution/plugins/script-execution-tools/custom-function-async.test.ts.test.d.ts +1 -1
- package/esm/typings/execution/plugins/script-execution-tools/custom-function-missing.test.d.ts +1 -1
- package/esm/typings/execution/plugins/script-execution-tools/custom-function-with-dependencies.test.d.ts +1 -1
- package/esm/typings/execution/plugins/script-execution-tools/custom-function.test.d.ts +1 -1
- package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +20 -20
- package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -4
- package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +20 -20
- package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions.d.ts +22 -22
- package/esm/typings/execution/plugins/script-execution-tools/javascript/utils/preserve.d.ts +11 -11
- package/esm/typings/execution/plugins/script-execution-tools/postprocessing.test.d.ts +1 -1
- package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +15 -15
- package/esm/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts +1 -1
- package/esm/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts +1 -1
- package/esm/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +15 -15
- package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +14 -14
- package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +12 -12
- package/esm/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +16 -16
- package/esm/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts +1 -1
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +4 -4
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +9 -9
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +5 -5
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -11
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +4 -4
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +1 -1
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +1 -1
- package/esm/typings/execution/translation/automatic-translate/translateMessages.d.ts +5 -5
- package/esm/typings/execution/utils/replaceParameters.d.ts +12 -12
- package/esm/typings/execution/utils/replaceParameters.test.d.ts +1 -1
- package/esm/typings/library/PromptbookLibrary.d.ts +25 -25
- package/esm/typings/library/SimplePromptbookLibrary.d.ts +35 -35
- package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +5 -5
- package/esm/typings/library/constructors/createPromptbookLibraryFromList.d.ts +5 -5
- package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +7 -7
- package/esm/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +16 -16
- package/esm/typings/library/constructors/createPromptbookSublibrary.d.ts +6 -6
- package/esm/typings/types/Command.d.ts +98 -98
- package/esm/typings/types/ExecutionTypes.d.ts +13 -13
- package/esm/typings/types/ModelRequirements.d.ts +41 -41
- package/esm/typings/types/Parameters.d.ts +14 -14
- package/esm/typings/types/Prompt.d.ts +41 -41
- package/esm/typings/types/PromptbookJson/PromptTemplateJson.d.ts +126 -126
- package/esm/typings/types/PromptbookJson/PromptTemplateParameterJson.d.ts +25 -25
- package/esm/typings/types/PromptbookJson/PromptbookJson.d.ts +51 -51
- package/esm/typings/types/PromptbookString.d.ts +12 -12
- package/esm/typings/types/ScriptLanguage.d.ts +9 -9
- package/esm/typings/types/TaskProgress.d.ts +42 -42
- package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +56 -56
- package/esm/typings/types/execution-report/ExecutionReportString.d.ts +16 -16
- package/esm/typings/types/execution-report/ExecutionReportStringOptions.d.ts +21 -21
- package/esm/typings/types/execution-report/config.d.ts +8 -8
- package/esm/typings/types/execution-report/countWorkingDuration.d.ts +7 -7
- package/esm/typings/types/execution-report/countWorkingDuration.test.d.ts +1 -1
- package/esm/typings/types/execution-report/executionReportJsonToString.d.ts +11 -11
- package/esm/typings/types/execution-report/executionReportJsonToString.test.d.ts +1 -1
- package/esm/typings/types/typeAliasEmoji.d.ts +9 -9
- package/esm/typings/types/typeAliases.d.ts +432 -432
- package/esm/typings/utils/FromtoItems.d.ts +19 -19
- package/esm/typings/utils/emojis.d.ts +22 -22
- package/esm/typings/utils/expectation-counters/countCharacters.d.ts +5 -5
- package/esm/typings/utils/expectation-counters/countCharacters.test.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countLines.d.ts +5 -5
- package/esm/typings/utils/expectation-counters/countLines.test.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countPages.d.ts +5 -5
- package/esm/typings/utils/expectation-counters/countPages.test.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countParagraphs.d.ts +5 -5
- package/esm/typings/utils/expectation-counters/countParagraphs.test.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countSentences.d.ts +5 -5
- package/esm/typings/utils/expectation-counters/countSentences.test.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countWords.d.ts +5 -5
- package/esm/typings/utils/expectation-counters/countWords.test.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/index.d.ts +5 -5
- package/esm/typings/utils/extractParameters.d.ts +10 -10
- package/esm/typings/utils/extractParameters.test.d.ts +1 -1
- package/esm/typings/utils/formatNumber.d.ts +6 -6
- package/esm/typings/utils/formatNumber.test.d.ts +1 -1
- package/esm/typings/utils/getCurrentIsoDate.d.ts +7 -7
- package/esm/typings/utils/isRunningInWhatever.d.ts +12 -12
- package/esm/typings/utils/isValidJsonString.d.ts +4 -4
- package/esm/typings/utils/isValidJsonString.test.d.ts +1 -1
- package/esm/typings/utils/just.d.ts +10 -10
- package/esm/typings/utils/markdown/addAutoGeneratedSection.d.ts +10 -10
- package/esm/typings/utils/markdown/addAutoGeneratedSection.test.d.ts +1 -1
- package/esm/typings/utils/markdown/createMarkdownChart.d.ts +41 -41
- package/esm/typings/utils/markdown/createMarkdownChart.test.d.ts +1 -1
- package/esm/typings/utils/markdown/createMarkdownTable.d.ts +7 -7
- package/esm/typings/utils/markdown/createMarkdownTable.test.d.ts +1 -1
- package/esm/typings/utils/markdown/escapeMarkdownBlock.d.ts +6 -6
- package/esm/typings/utils/markdown/escapeMarkdownBlock.test.d.ts +1 -1
- package/esm/typings/utils/markdown/extractAllBlocksFromMarkdown.d.ts +27 -27
- package/esm/typings/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +1 -1
- package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +13 -13
- package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -1
- package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +19 -19
- package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -1
- package/esm/typings/utils/markdown/prettifyMarkdown.d.ts +8 -8
- package/esm/typings/utils/markdown/prettifyMarkdown.test.d.ts +1 -1
- package/esm/typings/utils/markdown/removeContentComments.d.ts +8 -8
- package/esm/typings/utils/markdown/removeContentComments.test.d.ts +1 -1
- package/esm/typings/utils/markdown/removeMarkdownFormatting.d.ts +8 -8
- package/esm/typings/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -1
- package/esm/typings/utils/markdown-json/MarkdownStructure.d.ts +25 -25
- package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +7 -7
- package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.test.d.ts +1 -1
- package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +13 -13
- package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.test.d.ts +1 -1
- package/esm/typings/utils/postprocessing/extractBlock.d.ts +12 -12
- package/esm/typings/utils/removeEmojis.d.ts +7 -7
- package/esm/typings/utils/removeEmojis.test.d.ts +1 -1
- package/esm/typings/utils/removeQuotes.d.ts +13 -13
- package/esm/typings/utils/removeQuotes.test.d.ts +1 -1
- package/esm/typings/utils/trimCodeBlock.d.ts +8 -8
- package/esm/typings/utils/trimCodeBlock.test.d.ts +1 -1
- package/esm/typings/utils/trimEndOfCodeBlock.d.ts +7 -7
- package/esm/typings/utils/trimEndOfCodeBlock.test.d.ts +1 -1
- package/esm/typings/utils/unwrapResult.d.ts +36 -36
- package/esm/typings/utils/unwrapResult.test.d.ts +1 -1
- package/esm/typings/utils/validators/url/isValidUrl.d.ts +7 -7
- package/esm/typings/utils/validators/url/isValidUrl.test.d.ts +1 -1
- package/esm/typings/version.d.ts +5 -5
- package/esm/typings/wizzard/Wizzard.d.ts +4 -4
- package/esm/typings/wizzard/sample.d.ts +6 -6
- package/package.json +4 -1
- package/umd/index.umd.js +794 -794
- package/umd/typings/_packages/core.index.d.ts +20 -20
- package/umd/typings/_packages/execute-javascript.index.d.ts +3 -3
- package/umd/typings/_packages/openai.index.d.ts +3 -3
- package/umd/typings/_packages/remote-client.index.d.ts +4 -4
- package/umd/typings/_packages/remote-server.index.d.ts +3 -3
- package/umd/typings/_packages/types.index.d.ts +27 -27
- package/umd/typings/_packages/utils.index.d.ts +30 -30
- package/umd/typings/_packages/wizzard.index.d.ts +5 -5
- package/umd/typings/config.d.ts +4 -4
- package/umd/typings/conversion/promptbookStringToJson.d.ts +13 -13
- package/umd/typings/conversion/test/_importPromptbook.d.ts +12 -12
- package/umd/typings/conversion/test/promptbookStringToJson-syntaxErrors.test.d.ts +1 -1
- package/umd/typings/conversion/test/promptbookStringToJson.test.d.ts +1 -1
- package/umd/typings/conversion/test/validatePromptbookJson-logicErrors.test.d.ts +1 -1
- package/umd/typings/conversion/test/validatePromptbookJson.d.ts +26 -26
- package/umd/typings/conversion/test/validatePromptbookJson.test.d.ts +1 -1
- package/umd/typings/conversion/utils/extractVariables.d.ts +10 -10
- package/umd/typings/conversion/utils/extractVariables.test.d.ts +1 -1
- package/umd/typings/conversion/utils/parseCommand.d.ts +8 -8
- package/umd/typings/conversion/utils/parseCommand.test.d.ts +4 -4
- package/umd/typings/conversion/utils/parseNumber.d.ts +12 -12
- package/umd/typings/conversion/utils/parseNumber.test.d.ts +1 -1
- package/umd/typings/errors/ExpectError.d.ts +9 -9
- package/umd/typings/errors/NotFoundError.d.ts +7 -7
- package/umd/typings/errors/PromptbookExecutionError.d.ts +7 -7
- package/umd/typings/errors/PromptbookLogicError.d.ts +7 -7
- package/umd/typings/errors/PromptbookReferenceError.d.ts +7 -7
- package/umd/typings/errors/PromptbookSyntaxError.d.ts +7 -7
- package/umd/typings/errors/UnexpectedError.d.ts +7 -7
- package/umd/typings/execution/CommonExecutionToolsOptions.d.ts +9 -9
- package/umd/typings/execution/ExecutionTools.d.ts +25 -25
- package/umd/typings/execution/NaturalExecutionTools.d.ts +23 -23
- package/umd/typings/execution/PromptResult.d.ts +74 -74
- package/umd/typings/execution/PromptbookExecutor.d.ts +39 -39
- package/umd/typings/execution/ScriptExecutionTools.d.ts +37 -37
- package/umd/typings/execution/UserInterfaceTools.d.ts +45 -45
- package/umd/typings/execution/assertsExecutionSuccessful.d.ts +11 -11
- package/umd/typings/execution/createPromptbookExecutor.d.ts +41 -41
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.d.ts +22 -22
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/joker.test.d.ts +4 -4
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +4 -4
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +4 -4
- package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +28 -28
- package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +16 -16
- package/umd/typings/execution/plugins/natural-execution-tools/openai/computeOpenaiUsage.d.ts +3 -3
- package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.d.ts +35 -35
- package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +23 -23
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Promptbook_Server_Error.d.ts +11 -11
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Promptbook_Server_Progress.d.ts +12 -12
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Promptbook_Server_Request.d.ts +17 -17
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Promptbook_Server_Response.d.ts +12 -12
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +27 -27
- package/umd/typings/execution/plugins/natural-execution-tools/remote/startRemoteServer.d.ts +17 -17
- package/umd/typings/execution/plugins/script-execution-tools/custom-function-async.test.ts.test.d.ts +1 -1
- package/umd/typings/execution/plugins/script-execution-tools/custom-function-missing.test.d.ts +1 -1
- package/umd/typings/execution/plugins/script-execution-tools/custom-function-with-dependencies.test.d.ts +1 -1
- package/umd/typings/execution/plugins/script-execution-tools/custom-function.test.d.ts +1 -1
- package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +20 -20
- package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -4
- package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +20 -20
- package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions.d.ts +22 -22
- package/umd/typings/execution/plugins/script-execution-tools/javascript/utils/preserve.d.ts +11 -11
- package/umd/typings/execution/plugins/script-execution-tools/postprocessing.test.d.ts +1 -1
- package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +15 -15
- package/umd/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts +1 -1
- package/umd/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts +1 -1
- package/umd/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +15 -15
- package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +14 -14
- package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +12 -12
- package/umd/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +16 -16
- package/umd/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts +1 -1
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +4 -4
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +9 -9
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +5 -5
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -11
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +4 -4
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +1 -1
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +1 -1
- package/umd/typings/execution/translation/automatic-translate/translateMessages.d.ts +5 -5
- package/umd/typings/execution/utils/replaceParameters.d.ts +12 -12
- package/umd/typings/execution/utils/replaceParameters.test.d.ts +1 -1
- package/umd/typings/library/PromptbookLibrary.d.ts +25 -25
- package/umd/typings/library/SimplePromptbookLibrary.d.ts +35 -35
- package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +5 -5
- package/umd/typings/library/constructors/createPromptbookLibraryFromList.d.ts +5 -5
- package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +7 -7
- package/umd/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +16 -16
- package/umd/typings/library/constructors/createPromptbookSublibrary.d.ts +6 -6
- package/umd/typings/types/Command.d.ts +98 -98
- package/umd/typings/types/ExecutionTypes.d.ts +13 -13
- package/umd/typings/types/ModelRequirements.d.ts +41 -41
- package/umd/typings/types/Parameters.d.ts +14 -14
- package/umd/typings/types/Prompt.d.ts +41 -41
- package/umd/typings/types/PromptbookJson/PromptTemplateJson.d.ts +126 -126
- package/umd/typings/types/PromptbookJson/PromptTemplateParameterJson.d.ts +25 -25
- package/umd/typings/types/PromptbookJson/PromptbookJson.d.ts +51 -51
- package/umd/typings/types/PromptbookString.d.ts +12 -12
- package/umd/typings/types/ScriptLanguage.d.ts +9 -9
- package/umd/typings/types/TaskProgress.d.ts +42 -42
- package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +56 -56
- package/umd/typings/types/execution-report/ExecutionReportString.d.ts +16 -16
- package/umd/typings/types/execution-report/ExecutionReportStringOptions.d.ts +21 -21
- package/umd/typings/types/execution-report/config.d.ts +8 -8
- package/umd/typings/types/execution-report/countWorkingDuration.d.ts +7 -7
- package/umd/typings/types/execution-report/countWorkingDuration.test.d.ts +1 -1
- package/umd/typings/types/execution-report/executionReportJsonToString.d.ts +11 -11
- package/umd/typings/types/execution-report/executionReportJsonToString.test.d.ts +1 -1
- package/umd/typings/types/typeAliasEmoji.d.ts +9 -9
- package/umd/typings/types/typeAliases.d.ts +432 -432
- package/umd/typings/utils/FromtoItems.d.ts +19 -19
- package/umd/typings/utils/emojis.d.ts +22 -22
- package/umd/typings/utils/expectation-counters/countCharacters.d.ts +5 -5
- package/umd/typings/utils/expectation-counters/countCharacters.test.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countLines.d.ts +5 -5
- package/umd/typings/utils/expectation-counters/countLines.test.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countPages.d.ts +5 -5
- package/umd/typings/utils/expectation-counters/countPages.test.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countParagraphs.d.ts +5 -5
- package/umd/typings/utils/expectation-counters/countParagraphs.test.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countSentences.d.ts +5 -5
- package/umd/typings/utils/expectation-counters/countSentences.test.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countWords.d.ts +5 -5
- package/umd/typings/utils/expectation-counters/countWords.test.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/index.d.ts +5 -5
- package/umd/typings/utils/extractParameters.d.ts +10 -10
- package/umd/typings/utils/extractParameters.test.d.ts +1 -1
- package/umd/typings/utils/formatNumber.d.ts +6 -6
- package/umd/typings/utils/formatNumber.test.d.ts +1 -1
- package/umd/typings/utils/getCurrentIsoDate.d.ts +7 -7
- package/umd/typings/utils/isRunningInWhatever.d.ts +12 -12
- package/umd/typings/utils/isValidJsonString.d.ts +4 -4
- package/umd/typings/utils/isValidJsonString.test.d.ts +1 -1
- package/umd/typings/utils/just.d.ts +10 -10
- package/umd/typings/utils/markdown/addAutoGeneratedSection.d.ts +10 -10
- package/umd/typings/utils/markdown/addAutoGeneratedSection.test.d.ts +1 -1
- package/umd/typings/utils/markdown/createMarkdownChart.d.ts +41 -41
- package/umd/typings/utils/markdown/createMarkdownChart.test.d.ts +1 -1
- package/umd/typings/utils/markdown/createMarkdownTable.d.ts +7 -7
- package/umd/typings/utils/markdown/createMarkdownTable.test.d.ts +1 -1
- package/umd/typings/utils/markdown/escapeMarkdownBlock.d.ts +6 -6
- package/umd/typings/utils/markdown/escapeMarkdownBlock.test.d.ts +1 -1
- package/umd/typings/utils/markdown/extractAllBlocksFromMarkdown.d.ts +27 -27
- package/umd/typings/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +1 -1
- package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +13 -13
- package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -1
- package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +19 -19
- package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -1
- package/umd/typings/utils/markdown/prettifyMarkdown.d.ts +8 -8
- package/umd/typings/utils/markdown/prettifyMarkdown.test.d.ts +1 -1
- package/umd/typings/utils/markdown/removeContentComments.d.ts +8 -8
- package/umd/typings/utils/markdown/removeContentComments.test.d.ts +1 -1
- package/umd/typings/utils/markdown/removeMarkdownFormatting.d.ts +8 -8
- package/umd/typings/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -1
- package/umd/typings/utils/markdown-json/MarkdownStructure.d.ts +25 -25
- package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +7 -7
- package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.test.d.ts +1 -1
- package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +13 -13
- package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.test.d.ts +1 -1
- package/umd/typings/utils/postprocessing/extractBlock.d.ts +12 -12
- package/umd/typings/utils/removeEmojis.d.ts +7 -7
- package/umd/typings/utils/removeEmojis.test.d.ts +1 -1
- package/umd/typings/utils/removeQuotes.d.ts +13 -13
- package/umd/typings/utils/removeQuotes.test.d.ts +1 -1
- package/umd/typings/utils/trimCodeBlock.d.ts +8 -8
- package/umd/typings/utils/trimCodeBlock.test.d.ts +1 -1
- package/umd/typings/utils/trimEndOfCodeBlock.d.ts +7 -7
- package/umd/typings/utils/trimEndOfCodeBlock.test.d.ts +1 -1
- package/umd/typings/utils/unwrapResult.d.ts +36 -36
- package/umd/typings/utils/unwrapResult.test.d.ts +1 -1
- package/umd/typings/utils/validators/url/isValidUrl.d.ts +7 -7
- package/umd/typings/utils/validators/url/isValidUrl.test.d.ts +1 -1
- package/umd/typings/version.d.ts +5 -5
- package/umd/typings/wizzard/Wizzard.d.ts +4 -4
- package/umd/typings/wizzard/sample.d.ts +6 -6
package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
-
import { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
|
|
3
|
-
/**
|
|
4
|
-
* ScriptExecutionTools for Python
|
|
5
|
-
*
|
|
6
|
-
* Warning: This is not implemented yet
|
|
7
|
-
*/
|
|
8
|
-
export declare class PythonExecutionTools implements ScriptExecutionTools {
|
|
9
|
-
private readonly options;
|
|
10
|
-
constructor(options: CommonExecutionToolsOptions);
|
|
11
|
-
/**
|
|
12
|
-
* Executes a Python
|
|
13
|
-
*/
|
|
14
|
-
execute(options: ScriptExecutionToolsExecuteOptions): Promise<string>;
|
|
15
|
-
}
|
|
1
|
+
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
+
import { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
|
|
3
|
+
/**
|
|
4
|
+
* ScriptExecutionTools for Python
|
|
5
|
+
*
|
|
6
|
+
* Warning: This is not implemented yet
|
|
7
|
+
*/
|
|
8
|
+
export declare class PythonExecutionTools implements ScriptExecutionTools {
|
|
9
|
+
private readonly options;
|
|
10
|
+
constructor(options: CommonExecutionToolsOptions);
|
|
11
|
+
/**
|
|
12
|
+
* Executes a Python
|
|
13
|
+
*/
|
|
14
|
+
execute(options: ScriptExecutionToolsExecuteOptions): Promise<string>;
|
|
15
|
+
}
|
package/umd/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/umd/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
-
import { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
|
|
3
|
-
/**
|
|
4
|
-
* ScriptExecutionTools for TypeScript
|
|
5
|
-
*
|
|
6
|
-
* Warning: This is not implemented yet
|
|
7
|
-
*/
|
|
8
|
-
export declare class TypescriptExecutionTools implements ScriptExecutionTools {
|
|
9
|
-
private readonly options;
|
|
10
|
-
constructor(options: CommonExecutionToolsOptions);
|
|
11
|
-
/**
|
|
12
|
-
* Executes a TypeScript
|
|
13
|
-
*/
|
|
14
|
-
execute(options: ScriptExecutionToolsExecuteOptions): Promise<string>;
|
|
15
|
-
}
|
|
1
|
+
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
+
import { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
|
|
3
|
+
/**
|
|
4
|
+
* ScriptExecutionTools for TypeScript
|
|
5
|
+
*
|
|
6
|
+
* Warning: This is not implemented yet
|
|
7
|
+
*/
|
|
8
|
+
export declare class TypescriptExecutionTools implements ScriptExecutionTools {
|
|
9
|
+
private readonly options;
|
|
10
|
+
constructor(options: CommonExecutionToolsOptions);
|
|
11
|
+
/**
|
|
12
|
+
* Executes a TypeScript
|
|
13
|
+
*/
|
|
14
|
+
execute(options: ScriptExecutionToolsExecuteOptions): Promise<string>;
|
|
15
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
2
|
-
import { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOptions';
|
|
3
|
-
/**
|
|
4
|
-
* Delagates the user interaction to a async callback function
|
|
5
|
-
* You need to provide your own implementation of this callback function and its bind to UI.
|
|
6
|
-
*/
|
|
7
|
-
export declare class CallbackInterfaceTools implements UserInterfaceTools {
|
|
8
|
-
private readonly options;
|
|
9
|
-
constructor(options: CallbackInterfaceToolsOptions);
|
|
10
|
-
/**
|
|
11
|
-
* Trigger the custom callback function
|
|
12
|
-
*/
|
|
13
|
-
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
|
|
14
|
-
}
|
|
1
|
+
import { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
2
|
+
import { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOptions';
|
|
3
|
+
/**
|
|
4
|
+
* Delagates the user interaction to a async callback function
|
|
5
|
+
* You need to provide your own implementation of this callback function and its bind to UI.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CallbackInterfaceTools implements UserInterfaceTools {
|
|
8
|
+
private readonly options;
|
|
9
|
+
constructor(options: CallbackInterfaceToolsOptions);
|
|
10
|
+
/**
|
|
11
|
+
* Trigger the custom callback function
|
|
12
|
+
*/
|
|
13
|
+
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
|
|
14
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Promisable } from 'type-fest';
|
|
2
|
-
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
3
|
-
import { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
4
|
-
/**
|
|
5
|
-
* Options for CallbackInterfaceTools
|
|
6
|
-
*/
|
|
7
|
-
export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & {
|
|
8
|
-
/**
|
|
9
|
-
* The callback function to be called when promptDialog is called
|
|
10
|
-
*/
|
|
11
|
-
callback(prompt: UserInterfaceToolsPromptDialogOptions): Promisable<string>;
|
|
12
|
-
};
|
|
1
|
+
import { Promisable } from 'type-fest';
|
|
2
|
+
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
3
|
+
import { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
4
|
+
/**
|
|
5
|
+
* Options for CallbackInterfaceTools
|
|
6
|
+
*/
|
|
7
|
+
export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & {
|
|
8
|
+
/**
|
|
9
|
+
* The callback function to be called when promptDialog is called
|
|
10
|
+
*/
|
|
11
|
+
callback(prompt: UserInterfaceToolsPromptDialogOptions): Promisable<string>;
|
|
12
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
-
import { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
3
|
-
/**
|
|
4
|
-
* Wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt
|
|
5
|
-
*
|
|
6
|
-
* Warning: It is used for testing and mocking
|
|
7
|
-
* **NOT intended to use in the production** due to its synchronous nature.
|
|
8
|
-
*/
|
|
9
|
-
export declare class SimplePromptInterfaceTools implements UserInterfaceTools {
|
|
10
|
-
private readonly options;
|
|
11
|
-
constructor(options: CommonExecutionToolsOptions);
|
|
12
|
-
/**
|
|
13
|
-
* Trigger window.PROMPT DIALOG
|
|
14
|
-
*/
|
|
15
|
-
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
|
|
16
|
-
}
|
|
1
|
+
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
+
import { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
3
|
+
/**
|
|
4
|
+
* Wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt
|
|
5
|
+
*
|
|
6
|
+
* Warning: It is used for testing and mocking
|
|
7
|
+
* **NOT intended to use in the production** due to its synchronous nature.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SimplePromptInterfaceTools implements UserInterfaceTools {
|
|
10
|
+
private readonly options;
|
|
11
|
+
constructor(options: CommonExecutionToolsOptions);
|
|
12
|
+
/**
|
|
13
|
+
* Trigger window.PROMPT DIALOG
|
|
14
|
+
*/
|
|
15
|
+
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
|
|
16
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Promisable } from 'type-fest';
|
|
2
|
-
export type AutomaticTranslator = {
|
|
3
|
-
translate(message: string): Promisable<string>;
|
|
4
|
-
};
|
|
1
|
+
import { Promisable } from 'type-fest';
|
|
2
|
+
export type AutomaticTranslator = {
|
|
3
|
+
translate(message: string): Promisable<string>;
|
|
4
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
-
/**
|
|
3
|
-
* This will wrap an automatic translator and log each translation into the console
|
|
4
|
-
*/
|
|
5
|
-
export declare class DebugAutomaticTranslator implements AutomaticTranslator {
|
|
6
|
-
private readonly automaticTranslator;
|
|
7
|
-
constructor(automaticTranslator: AutomaticTranslator);
|
|
8
|
-
translate(message: string): Promise<string>;
|
|
9
|
-
}
|
|
1
|
+
import { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
+
/**
|
|
3
|
+
* This will wrap an automatic translator and log each translation into the console
|
|
4
|
+
*/
|
|
5
|
+
export declare class DebugAutomaticTranslator implements AutomaticTranslator {
|
|
6
|
+
private readonly automaticTranslator;
|
|
7
|
+
constructor(automaticTranslator: AutomaticTranslator);
|
|
8
|
+
translate(message: string): Promise<string>;
|
|
9
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
-
export declare class FakeAutomaticTranslator implements AutomaticTranslator {
|
|
3
|
-
constructor();
|
|
4
|
-
translate(message: string): string;
|
|
5
|
-
}
|
|
1
|
+
import { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
+
export declare class FakeAutomaticTranslator implements AutomaticTranslator {
|
|
3
|
+
constructor();
|
|
4
|
+
translate(message: string): string;
|
|
5
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
-
import { TranslatorOptions } from './TranslatorOptions';
|
|
3
|
-
interface LindatAutomaticTranslatorOptions extends TranslatorOptions {
|
|
4
|
-
apiUrl: URL;
|
|
5
|
-
}
|
|
6
|
-
export declare class LindatAutomaticTranslator implements AutomaticTranslator {
|
|
7
|
-
private readonly options;
|
|
8
|
-
constructor(options: LindatAutomaticTranslatorOptions);
|
|
9
|
-
translate(message: string): Promise<string>;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
1
|
+
import { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
+
import { TranslatorOptions } from './TranslatorOptions';
|
|
3
|
+
interface LindatAutomaticTranslatorOptions extends TranslatorOptions {
|
|
4
|
+
apiUrl: URL;
|
|
5
|
+
}
|
|
6
|
+
export declare class LindatAutomaticTranslator implements AutomaticTranslator {
|
|
7
|
+
private readonly options;
|
|
8
|
+
constructor(options: LindatAutomaticTranslatorOptions);
|
|
9
|
+
translate(message: string): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TranslatorOptions = {
|
|
2
|
-
from: string;
|
|
3
|
-
to: string;
|
|
4
|
-
};
|
|
1
|
+
export type TranslatorOptions = {
|
|
2
|
+
from: string;
|
|
3
|
+
to: string;
|
|
4
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function extractMultiplicatedOccurrence(message: string): string;
|
|
1
|
+
export declare function extractMultiplicatedOccurrence(message: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutomaticTranslator } from './automatic-translators/AutomaticTranslator';
|
|
2
|
-
import { TranslatorOptions } from './automatic-translators/TranslatorOptions';
|
|
3
|
-
export declare function translateMessages({ automaticTranslator, from, to, }: {
|
|
4
|
-
automaticTranslator: AutomaticTranslator;
|
|
5
|
-
} & TranslatorOptions): Promise<void>;
|
|
1
|
+
import { AutomaticTranslator } from './automatic-translators/AutomaticTranslator';
|
|
2
|
+
import { TranslatorOptions } from './automatic-translators/TranslatorOptions';
|
|
3
|
+
export declare function translateMessages({ automaticTranslator, from, to, }: {
|
|
4
|
+
automaticTranslator: AutomaticTranslator;
|
|
5
|
+
} & TranslatorOptions): Promise<void>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Parameters } from '../../types/Parameters';
|
|
2
|
-
import { string_template } from '../../types/typeAliases';
|
|
3
|
-
/**
|
|
4
|
-
* Replaces parameters in template with values from parameters object
|
|
5
|
-
*
|
|
6
|
-
* @param template the template with parameters in {curly} braces
|
|
7
|
-
* @param parameters the object with parameters
|
|
8
|
-
* @returns the template with replaced parameters
|
|
9
|
-
*
|
|
10
|
-
* @private within the createPromptbookExecutor
|
|
11
|
-
*/
|
|
12
|
-
export declare function replaceParameters(template: string_template, parameters: Parameters): string;
|
|
1
|
+
import { Parameters } from '../../types/Parameters';
|
|
2
|
+
import { string_template } from '../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* Replaces parameters in template with values from parameters object
|
|
5
|
+
*
|
|
6
|
+
* @param template the template with parameters in {curly} braces
|
|
7
|
+
* @param parameters the object with parameters
|
|
8
|
+
* @returns the template with replaced parameters
|
|
9
|
+
*
|
|
10
|
+
* @private within the createPromptbookExecutor
|
|
11
|
+
*/
|
|
12
|
+
export declare function replaceParameters(template: string_template, parameters: Parameters): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { Promisable } from 'type-fest';
|
|
2
|
-
import type { Prompt } from '../types/Prompt';
|
|
3
|
-
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
4
|
-
import type { string_promptbook_url } from '../types/typeAliases';
|
|
5
|
-
/**
|
|
6
|
-
* Library of promptbooks that groups together promptbooks for an application.
|
|
7
|
-
*
|
|
8
|
-
* @see https://github.com/webgptorg/promptbook#promptbook-library
|
|
9
|
-
*/
|
|
10
|
-
export type PromptbookLibrary = {
|
|
11
|
-
/**
|
|
12
|
-
* Gets all promptbooks in the library
|
|
13
|
-
*/
|
|
14
|
-
listPromptbooks(): Promisable<Array<string_promptbook_url>>;
|
|
15
|
-
/**
|
|
16
|
-
* Gets promptbook by its URL
|
|
17
|
-
*
|
|
18
|
-
* Note: This is not a direct fetching from the URL, but a lookup in the library
|
|
19
|
-
*/
|
|
20
|
-
getPromptbookByUrl(url: string_promptbook_url): Promisable<PromptbookJson>;
|
|
21
|
-
/**
|
|
22
|
-
* Checks whether given prompt was defined in any promptbook in the library
|
|
23
|
-
*/
|
|
24
|
-
isResponsibleForPrompt(prompt: Prompt): Promisable<boolean>;
|
|
25
|
-
};
|
|
1
|
+
import { Promisable } from 'type-fest';
|
|
2
|
+
import type { Prompt } from '../types/Prompt';
|
|
3
|
+
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
4
|
+
import type { string_promptbook_url } from '../types/typeAliases';
|
|
5
|
+
/**
|
|
6
|
+
* Library of promptbooks that groups together promptbooks for an application.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/webgptorg/promptbook#promptbook-library
|
|
9
|
+
*/
|
|
10
|
+
export type PromptbookLibrary = {
|
|
11
|
+
/**
|
|
12
|
+
* Gets all promptbooks in the library
|
|
13
|
+
*/
|
|
14
|
+
listPromptbooks(): Promisable<Array<string_promptbook_url>>;
|
|
15
|
+
/**
|
|
16
|
+
* Gets promptbook by its URL
|
|
17
|
+
*
|
|
18
|
+
* Note: This is not a direct fetching from the URL, but a lookup in the library
|
|
19
|
+
*/
|
|
20
|
+
getPromptbookByUrl(url: string_promptbook_url): Promisable<PromptbookJson>;
|
|
21
|
+
/**
|
|
22
|
+
* Checks whether given prompt was defined in any promptbook in the library
|
|
23
|
+
*/
|
|
24
|
+
isResponsibleForPrompt(prompt: Prompt): Promisable<boolean>;
|
|
25
|
+
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import type { Prompt } from '../types/Prompt';
|
|
2
|
-
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
3
|
-
import type { string_promptbook_url } from '../types/typeAliases';
|
|
4
|
-
import { PromptbookLibrary } from './PromptbookLibrary';
|
|
5
|
-
/**
|
|
6
|
-
* Library of promptbooks that groups together promptbooks for an application.
|
|
7
|
-
* This implementation is a very thin wrapper around the Array / Map of promptbooks.
|
|
8
|
-
*
|
|
9
|
-
* @see https://github.com/webgptorg/promptbook#promptbook-library
|
|
10
|
-
*/
|
|
11
|
-
export declare class SimplePromptbookLibrary implements PromptbookLibrary {
|
|
12
|
-
private library;
|
|
13
|
-
/**!!!
|
|
14
|
-
*
|
|
15
|
-
* @param promptbooks !!!
|
|
16
|
-
*
|
|
17
|
-
* Note: During the construction logic of all promptbooks are validated
|
|
18
|
-
* Note: It is not recommended to use this constructor directly, use `createPromptbookLibraryFromSources` *(or other variant)* instead
|
|
19
|
-
*/
|
|
20
|
-
constructor(...promptbooks: Array<PromptbookJson>);
|
|
21
|
-
/**
|
|
22
|
-
* Gets all promptbooks in the library
|
|
23
|
-
*/
|
|
24
|
-
listPromptbooks(): Array<string_promptbook_url>;
|
|
25
|
-
/**
|
|
26
|
-
* Gets promptbook by its URL
|
|
27
|
-
*
|
|
28
|
-
* Note: This is not a direct fetching from the URL, but a lookup in the library
|
|
29
|
-
*/
|
|
30
|
-
getPromptbookByUrl(url: string_promptbook_url): PromptbookJson;
|
|
31
|
-
/**
|
|
32
|
-
* Checks whether given prompt was defined in any promptbook in the library
|
|
33
|
-
*/
|
|
34
|
-
isResponsibleForPrompt(prompt: Prompt): boolean;
|
|
35
|
-
}
|
|
1
|
+
import type { Prompt } from '../types/Prompt';
|
|
2
|
+
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
3
|
+
import type { string_promptbook_url } from '../types/typeAliases';
|
|
4
|
+
import { PromptbookLibrary } from './PromptbookLibrary';
|
|
5
|
+
/**
|
|
6
|
+
* Library of promptbooks that groups together promptbooks for an application.
|
|
7
|
+
* This implementation is a very thin wrapper around the Array / Map of promptbooks.
|
|
8
|
+
*
|
|
9
|
+
* @see https://github.com/webgptorg/promptbook#promptbook-library
|
|
10
|
+
*/
|
|
11
|
+
export declare class SimplePromptbookLibrary implements PromptbookLibrary {
|
|
12
|
+
private library;
|
|
13
|
+
/**!!!
|
|
14
|
+
*
|
|
15
|
+
* @param promptbooks !!!
|
|
16
|
+
*
|
|
17
|
+
* Note: During the construction logic of all promptbooks are validated
|
|
18
|
+
* Note: It is not recommended to use this constructor directly, use `createPromptbookLibraryFromSources` *(or other variant)* instead
|
|
19
|
+
*/
|
|
20
|
+
constructor(...promptbooks: Array<PromptbookJson>);
|
|
21
|
+
/**
|
|
22
|
+
* Gets all promptbooks in the library
|
|
23
|
+
*/
|
|
24
|
+
listPromptbooks(): Array<string_promptbook_url>;
|
|
25
|
+
/**
|
|
26
|
+
* Gets promptbook by its URL
|
|
27
|
+
*
|
|
28
|
+
* Note: This is not a direct fetching from the URL, but a lookup in the library
|
|
29
|
+
*/
|
|
30
|
+
getPromptbookByUrl(url: string_promptbook_url): PromptbookJson;
|
|
31
|
+
/**
|
|
32
|
+
* Checks whether given prompt was defined in any promptbook in the library
|
|
33
|
+
*/
|
|
34
|
+
isResponsibleForPrompt(prompt: Prompt): boolean;
|
|
35
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
2
|
-
export declare function createPromptbookLibraryFromDirectory(): PromptbookLibrary;
|
|
3
|
-
/***
|
|
4
|
-
* TODO: !!! Annotate all + all to README and samples
|
|
5
|
-
*/
|
|
1
|
+
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
2
|
+
export declare function createPromptbookLibraryFromDirectory(): PromptbookLibrary;
|
|
3
|
+
/***
|
|
4
|
+
* TODO: !!! Annotate all + all to README and samples
|
|
5
|
+
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
2
|
-
export declare function createPromptbookLibraryFromList(): PromptbookLibrary;
|
|
3
|
-
/***
|
|
4
|
-
* TODO: !!! Annotate all + all to README and samples
|
|
5
|
-
*/
|
|
1
|
+
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
2
|
+
export declare function createPromptbookLibraryFromList(): PromptbookLibrary;
|
|
3
|
+
/***
|
|
4
|
+
* TODO: !!! Annotate all + all to README and samples
|
|
5
|
+
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
|
|
2
|
-
import { PromptbookString } from '../../types/PromptbookString';
|
|
3
|
-
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
4
|
-
export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
|
|
5
|
-
/***
|
|
6
|
-
* TODO: !!! Annotate all + all to README and samples
|
|
7
|
-
*/
|
|
1
|
+
import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
import { PromptbookString } from '../../types/PromptbookString';
|
|
3
|
+
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
4
|
+
export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
|
|
5
|
+
/***
|
|
6
|
+
* TODO: !!! Annotate all + all to README and samples
|
|
7
|
+
*/
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { PromptbookJson, PromptbookString } from '../../_packages/types.index';
|
|
2
|
-
import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
|
|
3
|
-
export declare function createPromptbookLibraryFromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
|
|
4
|
-
/**
|
|
5
|
-
* Constructs Promptbook from any sources
|
|
6
|
-
*
|
|
7
|
-
* Note: During the construction syntax and logic of all sources are validated
|
|
8
|
-
* Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended
|
|
9
|
-
*
|
|
10
|
-
* @param promptbookSources contents of .ptbk.md or .ptbk.json files
|
|
11
|
-
* @param settings settings for creating executor functions
|
|
12
|
-
* @returns PromptbookLibrary
|
|
13
|
-
*/
|
|
14
|
-
/***
|
|
15
|
-
* TODO: !!! Annotate all + all to README and samples
|
|
16
|
-
*/
|
|
1
|
+
import { PromptbookJson, PromptbookString } from '../../_packages/types.index';
|
|
2
|
+
import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
|
|
3
|
+
export declare function createPromptbookLibraryFromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
|
|
4
|
+
/**
|
|
5
|
+
* Constructs Promptbook from any sources
|
|
6
|
+
*
|
|
7
|
+
* Note: During the construction syntax and logic of all sources are validated
|
|
8
|
+
* Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended
|
|
9
|
+
*
|
|
10
|
+
* @param promptbookSources contents of .ptbk.md or .ptbk.json files
|
|
11
|
+
* @param settings settings for creating executor functions
|
|
12
|
+
* @returns PromptbookLibrary
|
|
13
|
+
*/
|
|
14
|
+
/***
|
|
15
|
+
* TODO: !!! Annotate all + all to README and samples
|
|
16
|
+
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { string_promptbook_url } from '../../types/typeAliases';
|
|
2
|
-
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
3
|
-
export declare function createPromptbookSublibrary(library: PromptbookLibrary, predicate: (url: string_promptbook_url) => boolean): PromptbookLibrary;
|
|
4
|
-
/***
|
|
5
|
-
* TODO: !!! Annotate all + all to README and samples
|
|
6
|
-
*/
|
|
1
|
+
import type { string_promptbook_url } from '../../types/typeAliases';
|
|
2
|
+
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
3
|
+
export declare function createPromptbookSublibrary(library: PromptbookLibrary, predicate: (url: string_promptbook_url) => boolean): PromptbookLibrary;
|
|
4
|
+
/***
|
|
5
|
+
* TODO: !!! Annotate all + all to README and samples
|
|
6
|
+
*/
|