@vertesia/client 1.2.0 → 1.3.0-dev.20260620.091720Z
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/README.md +29 -0
- package/lib/{types/AccountApi.d.ts → AccountApi.d.ts} +5 -10
- package/lib/AccountApi.d.ts.map +1 -0
- package/lib/{esm/AccountApi.js → AccountApi.js} +5 -13
- package/lib/AccountApi.js.map +1 -0
- package/lib/{types/AccountsApi.d.ts → AccountsApi.d.ts} +3 -2
- package/lib/AccountsApi.d.ts.map +1 -0
- package/lib/{esm/AccountsApi.js → AccountsApi.js} +2 -2
- package/lib/AccountsApi.js.map +1 -0
- package/lib/{types/AnalyticsApi.d.ts → AnalyticsApi.d.ts} +3 -2
- package/lib/AnalyticsApi.d.ts.map +1 -0
- package/lib/{esm/AnalyticsApi.js → AnalyticsApi.js} +5 -5
- package/lib/AnalyticsApi.js.map +1 -0
- package/lib/{types/ApiKeysApi.d.ts → ApiKeysApi.d.ts} +3 -2
- package/lib/ApiKeysApi.d.ts.map +1 -0
- package/lib/ApiKeysApi.js.map +1 -0
- package/lib/{types/AppsApi.d.ts → AppsApi.d.ts} +40 -2
- package/lib/AppsApi.d.ts.map +1 -0
- package/lib/{esm/AppsApi.js → AppsApi.js} +87 -14
- package/lib/AppsApi.js.map +1 -0
- package/lib/{types/AuditTrailApi.d.ts → AuditTrailApi.d.ts} +2 -1
- package/lib/AuditTrailApi.d.ts.map +1 -0
- package/lib/{esm/AuditTrailApi.js → AuditTrailApi.js} +1 -1
- package/lib/AuditTrailApi.js.map +1 -0
- package/lib/{types/CommandsApi.d.ts → CommandsApi.d.ts} +3 -2
- package/lib/CommandsApi.d.ts.map +1 -0
- package/lib/{esm/CommandsApi.js → CommandsApi.js} +3 -3
- package/lib/CommandsApi.js.map +1 -0
- package/lib/{types/EnvironmentsApi.d.ts → EnvironmentsApi.d.ts} +5 -4
- package/lib/EnvironmentsApi.d.ts.map +1 -0
- package/lib/{esm/EnvironmentsApi.js → EnvironmentsApi.js} +13 -13
- package/lib/EnvironmentsApi.js.map +1 -0
- package/lib/{types/GroupsApi.d.ts → GroupsApi.d.ts} +3 -2
- package/lib/GroupsApi.d.ts.map +1 -0
- package/lib/{esm/GroupsApi.js → GroupsApi.js} +8 -8
- package/lib/GroupsApi.js.map +1 -0
- package/lib/IamApi.d.ts +58 -0
- package/lib/IamApi.d.ts.map +1 -0
- package/lib/IamApi.js +76 -0
- package/lib/IamApi.js.map +1 -0
- package/lib/{types/InteractionBase.d.ts → InteractionBase.d.ts} +6 -5
- package/lib/InteractionBase.d.ts.map +1 -0
- package/lib/{esm/InteractionBase.js → InteractionBase.js} +4 -4
- package/lib/InteractionBase.js.map +1 -0
- package/lib/{types/InteractionCatalogApi.d.ts → InteractionCatalogApi.d.ts} +3 -2
- package/lib/InteractionCatalogApi.d.ts.map +1 -0
- package/lib/{esm/InteractionCatalogApi.js → InteractionCatalogApi.js} +12 -12
- package/lib/InteractionCatalogApi.js.map +1 -0
- package/lib/{types/InteractionOutput.d.ts → InteractionOutput.d.ts} +13 -12
- package/lib/InteractionOutput.d.ts.map +1 -0
- package/lib/{esm/InteractionOutput.js → InteractionOutput.js} +22 -25
- package/lib/InteractionOutput.js.map +1 -0
- package/lib/{types/InteractionResult.example.d.ts → InteractionResult.example.d.ts} +1 -0
- package/lib/InteractionResult.example.d.ts.map +1 -0
- package/lib/{esm/InteractionResult.example.js → InteractionResult.example.js} +4 -4
- package/lib/InteractionResult.example.js.map +1 -0
- package/lib/{types/InteractionsApi.d.ts → InteractionsApi.d.ts} +17 -6
- package/lib/InteractionsApi.d.ts.map +1 -0
- package/lib/{esm/InteractionsApi.js → InteractionsApi.js} +45 -28
- package/lib/InteractionsApi.js.map +1 -0
- package/lib/{types/OAuthClientsApi.d.ts → OAuthClientsApi.d.ts} +4 -2
- package/lib/OAuthClientsApi.d.ts.map +1 -0
- package/lib/{esm/OAuthClientsApi.js → OAuthClientsApi.js} +3 -0
- package/lib/OAuthClientsApi.js.map +1 -0
- package/lib/{types/OAuthGrantsApi.d.ts → OAuthGrantsApi.d.ts} +2 -1
- package/lib/OAuthGrantsApi.d.ts.map +1 -0
- package/lib/OAuthGrantsApi.js.map +1 -0
- package/lib/{types/OAuthProvidersApi.d.ts → OAuthProvidersApi.d.ts} +3 -2
- package/lib/OAuthProvidersApi.d.ts.map +1 -0
- package/lib/OAuthProvidersApi.js.map +1 -0
- package/lib/OAuthServerApi.d.ts +19 -0
- package/lib/OAuthServerApi.d.ts.map +1 -0
- package/lib/OAuthServerApi.js +48 -0
- package/lib/OAuthServerApi.js.map +1 -0
- package/lib/{types/ProjectsApi.d.ts → ProjectsApi.d.ts} +8 -5
- package/lib/ProjectsApi.d.ts.map +1 -0
- package/lib/{esm/ProjectsApi.js → ProjectsApi.js} +21 -12
- package/lib/ProjectsApi.js.map +1 -0
- package/lib/{types/PromptsApi.d.ts → PromptsApi.d.ts} +17 -9
- package/lib/PromptsApi.d.ts.map +1 -0
- package/lib/{esm/PromptsApi.js → PromptsApi.js} +16 -18
- package/lib/PromptsApi.js.map +1 -0
- package/lib/RefsApi.d.ts +7 -0
- package/lib/RefsApi.d.ts.map +1 -0
- package/lib/{esm/RefsApi.js → RefsApi.js} +2 -2
- package/lib/RefsApi.js.map +1 -0
- package/lib/{types/RemoteMcpConnectionsApi.d.ts → RemoteMcpConnectionsApi.d.ts} +3 -2
- package/lib/RemoteMcpConnectionsApi.d.ts.map +1 -0
- package/lib/{esm/RemoteMcpConnectionsApi.js → RemoteMcpConnectionsApi.js} +3 -3
- package/lib/RemoteMcpConnectionsApi.js.map +1 -0
- package/lib/{types/RunsApi.d.ts → RunsApi.d.ts} +11 -7
- package/lib/RunsApi.d.ts.map +1 -0
- package/lib/{esm/RunsApi.js → RunsApi.js} +14 -12
- package/lib/RunsApi.js.map +1 -0
- package/lib/SecretsApi.d.ts +18 -0
- package/lib/SecretsApi.d.ts.map +1 -0
- package/lib/SecretsApi.js +30 -0
- package/lib/SecretsApi.js.map +1 -0
- package/lib/{types/SkillsApi.d.ts → SkillsApi.d.ts} +3 -2
- package/lib/SkillsApi.d.ts.map +1 -0
- package/lib/{esm/SkillsApi.js → SkillsApi.js} +3 -3
- package/lib/SkillsApi.js.map +1 -0
- package/lib/{types/StreamSource.d.ts → StreamSource.d.ts} +1 -0
- package/lib/StreamSource.d.ts.map +1 -0
- package/lib/StreamSource.js.map +1 -0
- package/lib/ToolsApi.d.ts +36 -0
- package/lib/ToolsApi.d.ts.map +1 -0
- package/lib/ToolsApi.js +46 -0
- package/lib/ToolsApi.js.map +1 -0
- package/lib/{types/TrainingApi.d.ts → TrainingApi.d.ts} +7 -6
- package/lib/TrainingApi.d.ts.map +1 -0
- package/lib/TrainingApi.js +51 -0
- package/lib/TrainingApi.js.map +1 -0
- package/lib/{types/UsersApi.d.ts → UsersApi.d.ts} +3 -2
- package/lib/UsersApi.d.ts.map +1 -0
- package/lib/{esm/UsersApi.js → UsersApi.js} +3 -3
- package/lib/UsersApi.js.map +1 -0
- package/lib/{types/client.d.ts → client.d.ts} +55 -27
- package/lib/client.d.ts.map +1 -0
- package/lib/{esm/client.js → client.js} +113 -61
- package/lib/client.js.map +1 -0
- package/lib/{types/execute.d.ts → execute.d.ts} +5 -4
- package/lib/execute.d.ts.map +1 -0
- package/lib/{esm/execute.js → execute.js} +29 -11
- package/lib/execute.js.map +1 -0
- package/lib/{types/index.d.ts → index.d.ts} +9 -8
- package/lib/index.d.ts.map +1 -0
- package/lib/{esm/index.js → index.js} +4 -2
- package/lib/index.js.map +1 -0
- package/lib/{types/nodejs → nodejs}/NodeStreamSource.d.ts +3 -2
- package/lib/nodejs/NodeStreamSource.d.ts.map +1 -0
- package/lib/{esm/nodejs → nodejs}/NodeStreamSource.js +3 -3
- package/lib/nodejs/NodeStreamSource.js.map +1 -0
- package/lib/nodejs/index.d.ts +2 -0
- package/lib/nodejs/index.d.ts.map +1 -0
- package/lib/nodejs/index.js +2 -0
- package/lib/nodejs/index.js.map +1 -0
- package/lib/{types/store → store}/AgentsApi.d.ts +60 -9
- package/lib/store/AgentsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/AgentsApi.js +174 -53
- package/lib/store/AgentsApi.js.map +1 -0
- package/lib/{types/store → store}/AnalyzeDocApi.d.ts +3 -2
- package/lib/store/AnalyzeDocApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/AnalyzeDocApi.js +10 -10
- package/lib/store/AnalyzeDocApi.js.map +1 -0
- package/lib/{types/store → store}/CollectionsApi.d.ts +6 -5
- package/lib/store/CollectionsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/CollectionsApi.js +22 -22
- package/lib/store/CollectionsApi.js.map +1 -0
- package/lib/{types/store → store}/CostApi.d.ts +3 -2
- package/lib/store/CostApi.d.ts.map +1 -0
- package/lib/store/CostApi.js.map +1 -0
- package/lib/{types/store → store}/DashboardApi.d.ts +3 -2
- package/lib/store/DashboardApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/DashboardApi.js +7 -4
- package/lib/store/DashboardApi.js.map +1 -0
- package/lib/{types/store → store}/DataApi.d.ts +4 -3
- package/lib/store/DataApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/DataApi.js +6 -6
- package/lib/store/DataApi.js.map +1 -0
- package/lib/{types/store → store}/EmailApi.d.ts +3 -2
- package/lib/store/EmailApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/EmailApi.js +5 -5
- package/lib/store/EmailApi.js.map +1 -0
- package/lib/store/EmbeddingsApi.d.ts +13 -0
- package/lib/store/EmbeddingsApi.d.ts.map +1 -0
- package/lib/store/EmbeddingsApi.js +25 -0
- package/lib/store/EmbeddingsApi.js.map +1 -0
- package/lib/{types/store → store}/FilesApi.d.ts +22 -7
- package/lib/store/FilesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/FilesApi.js +56 -51
- package/lib/store/FilesApi.js.map +1 -0
- package/lib/{types/store → store}/HiveMemoryApi.d.ts +3 -2
- package/lib/store/HiveMemoryApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/HiveMemoryApi.js +11 -11
- package/lib/{esm/store → store}/HiveMemoryApi.js.map +1 -1
- package/lib/{types/store → store}/IndexingApi.d.ts +16 -10
- package/lib/store/IndexingApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/IndexingApi.js +57 -45
- package/lib/store/IndexingApi.js.map +1 -0
- package/lib/{types/store → store}/ObjectsApi.d.ts +16 -11
- package/lib/store/ObjectsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/ObjectsApi.js +46 -63
- package/lib/store/ObjectsApi.js.map +1 -0
- package/lib/{types/store → store}/PendingAsksApi.d.ts +5 -2
- package/lib/store/PendingAsksApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/PendingAsksApi.js +4 -4
- package/lib/store/PendingAsksApi.js.map +1 -0
- package/lib/store/ProcessApi.d.ts +25 -0
- package/lib/store/ProcessApi.d.ts.map +1 -0
- package/lib/store/ProcessApi.js +42 -0
- package/lib/store/ProcessApi.js.map +1 -0
- package/lib/{types/store → store}/QueryApi.d.ts +2 -1
- package/lib/store/QueryApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/QueryApi.js +3 -3
- package/lib/store/QueryApi.js.map +1 -0
- package/lib/{types/store → store}/RenderingApi.d.ts +3 -2
- package/lib/store/RenderingApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/RenderingApi.js +8 -8
- package/lib/store/RenderingApi.js.map +1 -0
- package/lib/{types/store → store}/SchedulesApi.d.ts +3 -2
- package/lib/store/SchedulesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/SchedulesApi.js +4 -4
- package/lib/store/SchedulesApi.js.map +1 -0
- package/lib/store/TaskApi.d.ts +16 -0
- package/lib/store/TaskApi.d.ts.map +1 -0
- package/lib/store/TaskApi.js +42 -0
- package/lib/store/TaskApi.js.map +1 -0
- package/lib/{types/store → store}/ToolsApi.d.ts +3 -2
- package/lib/store/ToolsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/ToolsApi.js +2 -2
- package/lib/store/ToolsApi.js.map +1 -0
- package/lib/{types/store → store}/TypeCatalogApi.d.ts +4 -3
- package/lib/store/TypeCatalogApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/TypeCatalogApi.js +5 -5
- package/lib/store/TypeCatalogApi.js.map +1 -0
- package/lib/{types/store → store}/TypesApi.d.ts +5 -4
- package/lib/store/TypesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/TypesApi.js +12 -12
- package/lib/store/TypesApi.js.map +1 -0
- package/lib/{types/store → store}/WorkflowsApi.d.ts +11 -9
- package/lib/store/WorkflowsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/WorkflowsApi.js +62 -52
- package/lib/store/WorkflowsApi.js.map +1 -0
- package/lib/store/client.d.ts +62 -0
- package/lib/store/client.d.ts.map +1 -0
- package/lib/store/client.js +106 -0
- package/lib/store/client.js.map +1 -0
- package/lib/{types/store → store}/errors.d.ts +2 -1
- package/lib/store/errors.d.ts.map +1 -0
- package/lib/store/errors.js +7 -0
- package/lib/store/errors.js.map +1 -0
- package/lib/store/index.d.ts +21 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +21 -0
- package/lib/store/index.js.map +1 -0
- package/lib/store/signed-url.d.ts +39 -0
- package/lib/store/signed-url.d.ts.map +1 -0
- package/lib/store/signed-url.js +153 -0
- package/lib/store/signed-url.js.map +1 -0
- package/lib/store/stream-termination.d.ts +4 -0
- package/lib/store/stream-termination.d.ts.map +1 -0
- package/lib/store/stream-termination.js +31 -0
- package/lib/store/stream-termination.js.map +1 -0
- package/lib/{types/store → store}/version.d.ts +2 -0
- package/lib/store/version.d.ts.map +1 -0
- package/lib/{esm/store → store}/version.js +1 -0
- package/lib/store/version.js.map +1 -0
- package/lib/vertesia-client.js +1 -1
- package/lib/vertesia-client.js.map +1 -1
- package/package.json +26 -38
- package/src/AccountApi.ts +10 -22
- package/src/AccountsApi.ts +3 -9
- package/src/AnalyticsApi.ts +6 -8
- package/src/ApiKeysApi.ts +10 -2
- package/src/AppsApi.ts +131 -27
- package/src/AuditTrailApi.ts +4 -4
- package/src/CommandsApi.ts +7 -8
- package/src/EnvironmentsApi.ts +27 -23
- package/src/GroupsApi.ts +15 -10
- package/src/IamApi.ts +56 -22
- package/src/InteractionBase.ts +18 -9
- package/src/InteractionCatalogApi.ts +15 -20
- package/src/InteractionOutput.test.ts +40 -57
- package/src/InteractionOutput.ts +55 -47
- package/src/InteractionResult.example.ts +30 -18
- package/src/InteractionsApi.ts +113 -59
- package/src/OAuthClientsApi.ts +6 -1
- package/src/OAuthGrantsApi.ts +1 -1
- package/src/OAuthProvidersApi.ts +3 -4
- package/src/OAuthServerApi.ts +53 -6
- package/src/ProjectsApi.ts +70 -31
- package/src/PromptsApi.ts +44 -29
- package/src/RefsApi.ts +4 -10
- package/src/RemoteMcpConnectionsApi.ts +6 -7
- package/src/RunsApi.ts +25 -20
- package/src/SecretsApi.ts +56 -0
- package/src/SkillsApi.ts +5 -12
- package/src/StreamSource.ts +6 -1
- package/src/ToolsApi.ts +52 -0
- package/src/TrainingApi.ts +27 -25
- package/src/UsersApi.ts +6 -8
- package/src/client.test.ts +68 -2
- package/src/client.ts +160 -103
- package/src/execute.ts +60 -20
- package/src/index.ts +8 -8
- package/src/nodejs/NodeStreamSource.ts +4 -5
- package/src/nodejs/index.ts +1 -1
- package/src/store/AgentsApi.ts +308 -148
- package/src/store/AnalyzeDocApi.ts +39 -21
- package/src/store/CollectionsApi.ts +40 -38
- package/src/store/CostApi.ts +14 -19
- package/src/store/DashboardApi.ts +24 -27
- package/src/store/DataApi.ts +29 -32
- package/src/store/EmailApi.ts +6 -6
- package/src/store/EmbeddingsApi.ts +15 -15
- package/src/store/FilesApi.ts +80 -85
- package/src/store/HiveMemoryApi.ts +17 -28
- package/src/store/IndexingApi.ts +113 -76
- package/src/store/ObjectsApi.ts +100 -131
- package/src/store/PendingAsksApi.ts +7 -5
- package/src/store/ProcessApi.ts +61 -0
- package/src/store/QueryApi.ts +3 -4
- package/src/store/RenderingApi.ts +14 -17
- package/src/store/SchedulesApi.ts +6 -6
- package/src/store/TaskApi.ts +45 -0
- package/src/store/ToolsApi.ts +3 -3
- package/src/store/TypeCatalogApi.ts +56 -53
- package/src/store/TypesApi.ts +26 -18
- package/src/store/WorkflowsApi.ts +158 -152
- package/src/store/client.ts +58 -39
- package/src/store/errors.ts +3 -3
- package/src/store/index.ts +20 -18
- package/src/store/signed-url.test.ts +182 -0
- package/src/store/signed-url.ts +184 -0
- package/src/store/stream-gap.test.ts +230 -0
- package/src/store/stream-termination.test.ts +58 -0
- package/src/store/stream-termination.ts +40 -0
- package/src/store/version.ts +2 -1
- package/lib/cjs/AccountApi.js +0 -85
- package/lib/cjs/AccountApi.js.map +0 -1
- package/lib/cjs/AccountsApi.js +0 -16
- package/lib/cjs/AccountsApi.js.map +0 -1
- package/lib/cjs/AnalyticsApi.js +0 -43
- package/lib/cjs/AnalyticsApi.js.map +0 -1
- package/lib/cjs/ApiKeysApi.js +0 -61
- package/lib/cjs/ApiKeysApi.js.map +0 -1
- package/lib/cjs/AppsApi.js +0 -137
- package/lib/cjs/AppsApi.js.map +0 -1
- package/lib/cjs/AuditTrailApi.js +0 -39
- package/lib/cjs/AuditTrailApi.js.map +0 -1
- package/lib/cjs/CommandsApi.js +0 -19
- package/lib/cjs/CommandsApi.js.map +0 -1
- package/lib/cjs/EnvironmentsApi.js +0 -72
- package/lib/cjs/EnvironmentsApi.js.map +0 -1
- package/lib/cjs/GroupsApi.js +0 -86
- package/lib/cjs/GroupsApi.js.map +0 -1
- package/lib/cjs/IamApi.js +0 -53
- package/lib/cjs/IamApi.js.map +0 -1
- package/lib/cjs/InteractionBase.js +0 -44
- package/lib/cjs/InteractionBase.js.map +0 -1
- package/lib/cjs/InteractionCatalogApi.js +0 -64
- package/lib/cjs/InteractionCatalogApi.js.map +0 -1
- package/lib/cjs/InteractionOutput.js +0 -300
- package/lib/cjs/InteractionOutput.js.map +0 -1
- package/lib/cjs/InteractionResult.example.js +0 -57
- package/lib/cjs/InteractionResult.example.js.map +0 -1
- package/lib/cjs/InteractionsApi.js +0 -260
- package/lib/cjs/InteractionsApi.js.map +0 -1
- package/lib/cjs/OAuthClientsApi.js +0 -25
- package/lib/cjs/OAuthClientsApi.js.map +0 -1
- package/lib/cjs/OAuthGrantsApi.js +0 -30
- package/lib/cjs/OAuthGrantsApi.js.map +0 -1
- package/lib/cjs/OAuthProvidersApi.js +0 -43
- package/lib/cjs/OAuthProvidersApi.js.map +0 -1
- package/lib/cjs/OAuthServerApi.js +0 -22
- package/lib/cjs/OAuthServerApi.js.map +0 -1
- package/lib/cjs/ProjectsApi.js +0 -105
- package/lib/cjs/ProjectsApi.js.map +0 -1
- package/lib/cjs/PromptsApi.js +0 -135
- package/lib/cjs/PromptsApi.js.map +0 -1
- package/lib/cjs/RefsApi.js +0 -14
- package/lib/cjs/RefsApi.js.map +0 -1
- package/lib/cjs/RemoteMcpConnectionsApi.js +0 -38
- package/lib/cjs/RemoteMcpConnectionsApi.js.map +0 -1
- package/lib/cjs/RunsApi.js +0 -115
- package/lib/cjs/RunsApi.js.map +0 -1
- package/lib/cjs/SkillsApi.js +0 -39
- package/lib/cjs/SkillsApi.js.map +0 -1
- package/lib/cjs/StreamSource.js +0 -17
- package/lib/cjs/StreamSource.js.map +0 -1
- package/lib/cjs/TrainingApi.js +0 -54
- package/lib/cjs/TrainingApi.js.map +0 -1
- package/lib/cjs/UsersApi.js +0 -19
- package/lib/cjs/UsersApi.js.map +0 -1
- package/lib/cjs/client.js +0 -375
- package/lib/cjs/client.js.map +0 -1
- package/lib/cjs/execute.js +0 -160
- package/lib/cjs/execute.js.map +0 -1
- package/lib/cjs/index.js +0 -36
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/nodejs/NodeStreamSource.js +0 -45
- package/lib/cjs/nodejs/NodeStreamSource.js.map +0 -1
- package/lib/cjs/nodejs/index.js +0 -18
- package/lib/cjs/nodejs/index.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/store/AgentsApi.js +0 -663
- package/lib/cjs/store/AgentsApi.js.map +0 -1
- package/lib/cjs/store/AnalyzeDocApi.js +0 -56
- package/lib/cjs/store/AnalyzeDocApi.js.map +0 -1
- package/lib/cjs/store/CollectionsApi.js +0 -131
- package/lib/cjs/store/CollectionsApi.js.map +0 -1
- package/lib/cjs/store/CommandsApi.js +0 -17
- package/lib/cjs/store/CommandsApi.js.map +0 -1
- package/lib/cjs/store/CostApi.js +0 -62
- package/lib/cjs/store/CostApi.js.map +0 -1
- package/lib/cjs/store/DashboardApi.js +0 -182
- package/lib/cjs/store/DashboardApi.js.map +0 -1
- package/lib/cjs/store/DataApi.js +0 -436
- package/lib/cjs/store/DataApi.js.map +0 -1
- package/lib/cjs/store/EmailApi.js +0 -103
- package/lib/cjs/store/EmailApi.js.map +0 -1
- package/lib/cjs/store/EmbeddingsApi.js +0 -29
- package/lib/cjs/store/EmbeddingsApi.js.map +0 -1
- package/lib/cjs/store/FilesApi.js +0 -286
- package/lib/cjs/store/FilesApi.js.map +0 -1
- package/lib/cjs/store/HiveMemoryApi.js +0 -174
- package/lib/cjs/store/HiveMemoryApi.js.map +0 -1
- package/lib/cjs/store/IndexingApi.js +0 -308
- package/lib/cjs/store/IndexingApi.js.map +0 -1
- package/lib/cjs/store/ObjectsApi.js +0 -340
- package/lib/cjs/store/ObjectsApi.js.map +0 -1
- package/lib/cjs/store/PendingAsksApi.js +0 -43
- package/lib/cjs/store/PendingAsksApi.js.map +0 -1
- package/lib/cjs/store/QueryApi.js +0 -67
- package/lib/cjs/store/QueryApi.js.map +0 -1
- package/lib/cjs/store/RenderingApi.js +0 -84
- package/lib/cjs/store/RenderingApi.js.map +0 -1
- package/lib/cjs/store/SchedulesApi.js +0 -103
- package/lib/cjs/store/SchedulesApi.js.map +0 -1
- package/lib/cjs/store/ToolsApi.js +0 -21
- package/lib/cjs/store/ToolsApi.js.map +0 -1
- package/lib/cjs/store/TypeCatalogApi.js +0 -50
- package/lib/cjs/store/TypeCatalogApi.js.map +0 -1
- package/lib/cjs/store/TypesApi.js +0 -60
- package/lib/cjs/store/TypesApi.js.map +0 -1
- package/lib/cjs/store/WorkersApi.js +0 -16
- package/lib/cjs/store/WorkersApi.js.map +0 -1
- package/lib/cjs/store/WorkflowsApi.js +0 -621
- package/lib/cjs/store/WorkflowsApi.js.map +0 -1
- package/lib/cjs/store/client.js +0 -93
- package/lib/cjs/store/client.js.map +0 -1
- package/lib/cjs/store/errors.js +0 -11
- package/lib/cjs/store/errors.js.map +0 -1
- package/lib/cjs/store/index.js +0 -34
- package/lib/cjs/store/index.js.map +0 -1
- package/lib/cjs/store/version.js +0 -6
- package/lib/cjs/store/version.js.map +0 -1
- package/lib/esm/AccountApi.js.map +0 -1
- package/lib/esm/AccountsApi.js.map +0 -1
- package/lib/esm/AnalyticsApi.js.map +0 -1
- package/lib/esm/ApiKeysApi.js.map +0 -1
- package/lib/esm/AppsApi.js.map +0 -1
- package/lib/esm/AuditTrailApi.js.map +0 -1
- package/lib/esm/CommandsApi.js.map +0 -1
- package/lib/esm/EnvironmentsApi.js.map +0 -1
- package/lib/esm/GroupsApi.js.map +0 -1
- package/lib/esm/IamApi.js +0 -47
- package/lib/esm/IamApi.js.map +0 -1
- package/lib/esm/InteractionBase.js.map +0 -1
- package/lib/esm/InteractionCatalogApi.js.map +0 -1
- package/lib/esm/InteractionOutput.js.map +0 -1
- package/lib/esm/InteractionResult.example.js.map +0 -1
- package/lib/esm/InteractionsApi.js.map +0 -1
- package/lib/esm/OAuthClientsApi.js.map +0 -1
- package/lib/esm/OAuthGrantsApi.js.map +0 -1
- package/lib/esm/OAuthProvidersApi.js.map +0 -1
- package/lib/esm/OAuthServerApi.js +0 -19
- package/lib/esm/OAuthServerApi.js.map +0 -1
- package/lib/esm/ProjectsApi.js.map +0 -1
- package/lib/esm/PromptsApi.js.map +0 -1
- package/lib/esm/RefsApi.js.map +0 -1
- package/lib/esm/RemoteMcpConnectionsApi.js.map +0 -1
- package/lib/esm/RunsApi.js.map +0 -1
- package/lib/esm/SkillsApi.js.map +0 -1
- package/lib/esm/StreamSource.js.map +0 -1
- package/lib/esm/TrainingApi.js +0 -51
- package/lib/esm/TrainingApi.js.map +0 -1
- package/lib/esm/UsersApi.js.map +0 -1
- package/lib/esm/client.js.map +0 -1
- package/lib/esm/execute.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/nodejs/NodeStreamSource.js.map +0 -1
- package/lib/esm/nodejs/index.js +0 -2
- package/lib/esm/nodejs/index.js.map +0 -1
- package/lib/esm/store/AgentsApi.js.map +0 -1
- package/lib/esm/store/AnalyzeDocApi.js.map +0 -1
- package/lib/esm/store/CollectionsApi.js.map +0 -1
- package/lib/esm/store/CommandsApi.js +0 -13
- package/lib/esm/store/CommandsApi.js.map +0 -1
- package/lib/esm/store/CostApi.js.map +0 -1
- package/lib/esm/store/DashboardApi.js.map +0 -1
- package/lib/esm/store/DataApi.js.map +0 -1
- package/lib/esm/store/EmailApi.js.map +0 -1
- package/lib/esm/store/EmbeddingsApi.js +0 -25
- package/lib/esm/store/EmbeddingsApi.js.map +0 -1
- package/lib/esm/store/FilesApi.js.map +0 -1
- package/lib/esm/store/IndexingApi.js.map +0 -1
- package/lib/esm/store/ObjectsApi.js.map +0 -1
- package/lib/esm/store/PendingAsksApi.js.map +0 -1
- package/lib/esm/store/QueryApi.js.map +0 -1
- package/lib/esm/store/RenderingApi.js.map +0 -1
- package/lib/esm/store/SchedulesApi.js.map +0 -1
- package/lib/esm/store/ToolsApi.js.map +0 -1
- package/lib/esm/store/TypeCatalogApi.js.map +0 -1
- package/lib/esm/store/TypesApi.js.map +0 -1
- package/lib/esm/store/WorkersApi.js +0 -12
- package/lib/esm/store/WorkersApi.js.map +0 -1
- package/lib/esm/store/WorkflowsApi.js.map +0 -1
- package/lib/esm/store/client.js +0 -89
- package/lib/esm/store/client.js.map +0 -1
- package/lib/esm/store/errors.js +0 -7
- package/lib/esm/store/errors.js.map +0 -1
- package/lib/esm/store/index.js +0 -18
- package/lib/esm/store/index.js.map +0 -1
- package/lib/esm/store/version.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/AccountApi.d.ts.map +0 -1
- package/lib/types/AccountsApi.d.ts.map +0 -1
- package/lib/types/AnalyticsApi.d.ts.map +0 -1
- package/lib/types/ApiKeysApi.d.ts.map +0 -1
- package/lib/types/AppsApi.d.ts.map +0 -1
- package/lib/types/AuditTrailApi.d.ts.map +0 -1
- package/lib/types/CommandsApi.d.ts.map +0 -1
- package/lib/types/EnvironmentsApi.d.ts.map +0 -1
- package/lib/types/GroupsApi.d.ts.map +0 -1
- package/lib/types/IamApi.d.ts +0 -36
- package/lib/types/IamApi.d.ts.map +0 -1
- package/lib/types/InteractionBase.d.ts.map +0 -1
- package/lib/types/InteractionCatalogApi.d.ts.map +0 -1
- package/lib/types/InteractionOutput.d.ts.map +0 -1
- package/lib/types/InteractionResult.example.d.ts.map +0 -1
- package/lib/types/InteractionsApi.d.ts.map +0 -1
- package/lib/types/OAuthClientsApi.d.ts.map +0 -1
- package/lib/types/OAuthGrantsApi.d.ts.map +0 -1
- package/lib/types/OAuthProvidersApi.d.ts.map +0 -1
- package/lib/types/OAuthServerApi.d.ts +0 -10
- package/lib/types/OAuthServerApi.d.ts.map +0 -1
- package/lib/types/ProjectsApi.d.ts.map +0 -1
- package/lib/types/PromptsApi.d.ts.map +0 -1
- package/lib/types/RefsApi.d.ts +0 -6
- package/lib/types/RefsApi.d.ts.map +0 -1
- package/lib/types/RemoteMcpConnectionsApi.d.ts.map +0 -1
- package/lib/types/RunsApi.d.ts.map +0 -1
- package/lib/types/SkillsApi.d.ts.map +0 -1
- package/lib/types/StreamSource.d.ts.map +0 -1
- package/lib/types/TrainingApi.d.ts.map +0 -1
- package/lib/types/UsersApi.d.ts.map +0 -1
- package/lib/types/client.d.ts.map +0 -1
- package/lib/types/execute.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/nodejs/NodeStreamSource.d.ts.map +0 -1
- package/lib/types/nodejs/index.d.ts +0 -1
- package/lib/types/nodejs/index.d.ts.map +0 -1
- package/lib/types/store/AgentsApi.d.ts.map +0 -1
- package/lib/types/store/AnalyzeDocApi.d.ts.map +0 -1
- package/lib/types/store/CollectionsApi.d.ts.map +0 -1
- package/lib/types/store/CommandsApi.d.ts +0 -10
- package/lib/types/store/CommandsApi.d.ts.map +0 -1
- package/lib/types/store/CostApi.d.ts.map +0 -1
- package/lib/types/store/DashboardApi.d.ts.map +0 -1
- package/lib/types/store/DataApi.d.ts.map +0 -1
- package/lib/types/store/EmailApi.d.ts.map +0 -1
- package/lib/types/store/EmbeddingsApi.d.ts +0 -12
- package/lib/types/store/EmbeddingsApi.d.ts.map +0 -1
- package/lib/types/store/FilesApi.d.ts.map +0 -1
- package/lib/types/store/HiveMemoryApi.d.ts.map +0 -1
- package/lib/types/store/IndexingApi.d.ts.map +0 -1
- package/lib/types/store/ObjectsApi.d.ts.map +0 -1
- package/lib/types/store/PendingAsksApi.d.ts.map +0 -1
- package/lib/types/store/QueryApi.d.ts.map +0 -1
- package/lib/types/store/RenderingApi.d.ts.map +0 -1
- package/lib/types/store/SchedulesApi.d.ts.map +0 -1
- package/lib/types/store/ToolsApi.d.ts.map +0 -1
- package/lib/types/store/TypeCatalogApi.d.ts.map +0 -1
- package/lib/types/store/TypesApi.d.ts.map +0 -1
- package/lib/types/store/WorkersApi.d.ts +0 -6
- package/lib/types/store/WorkersApi.d.ts.map +0 -1
- package/lib/types/store/WorkflowsApi.d.ts.map +0 -1
- package/lib/types/store/client.d.ts +0 -57
- package/lib/types/store/client.d.ts.map +0 -1
- package/lib/types/store/errors.d.ts.map +0 -1
- package/lib/types/store/index.d.ts +0 -17
- package/lib/types/store/index.d.ts.map +0 -1
- package/lib/types/store/version.d.ts.map +0 -1
- package/src/store/CommandsApi.ts +0 -15
- package/src/store/WorkersApi.ts +0 -17
- /package/lib/{esm/ApiKeysApi.js → ApiKeysApi.js} +0 -0
- /package/lib/{esm/OAuthGrantsApi.js → OAuthGrantsApi.js} +0 -0
- /package/lib/{esm/OAuthProvidersApi.js → OAuthProvidersApi.js} +0 -0
- /package/lib/{esm/StreamSource.js → StreamSource.js} +0 -0
- /package/lib/{esm/store → store}/CostApi.js +0 -0
package/src/InteractionOutput.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CompletionResult } from '@llumiverse/common';
|
|
2
|
-
import { ExecutionRun, InteractionExecutionResult } from '@vertesia/common';
|
|
1
|
+
import type { CompletionResult, JSONObject } from '@llumiverse/common';
|
|
2
|
+
import type { ExecutionRun, InteractionExecutionResult } from '@vertesia/common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Symbol used to mark InteractionOutputArray instances.
|
|
@@ -7,13 +7,17 @@ import { ExecutionRun, InteractionExecutionResult } from '@vertesia/common';
|
|
|
7
7
|
*/
|
|
8
8
|
export const IS_INTERACTION_OUTPUT = Symbol('InteractionOutput');
|
|
9
9
|
|
|
10
|
-
export function enhanceInteractionExecutionResult<ResultT =
|
|
11
|
-
|
|
10
|
+
export function enhanceInteractionExecutionResult<ResultT = unknown, ParamsT = unknown>(
|
|
11
|
+
r: InteractionExecutionResult<ParamsT>,
|
|
12
|
+
): EnhancedInteractionExecutionResult<ResultT, ParamsT> {
|
|
13
|
+
r.result = InteractionOutput.from<ResultT>(r.result);
|
|
12
14
|
return r as EnhancedInteractionExecutionResult<ResultT, ParamsT>;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
export function enhanceExecutionRun<ResultT =
|
|
16
|
-
|
|
17
|
+
export function enhanceExecutionRun<ResultT = unknown, ParamsT = unknown>(
|
|
18
|
+
r: ExecutionRun<ParamsT>,
|
|
19
|
+
): EnhancedExecutionRun<ResultT, ParamsT> {
|
|
20
|
+
r.result = InteractionOutput.from<ResultT>(r.result);
|
|
17
21
|
return r as EnhancedExecutionRun<ResultT, ParamsT>;
|
|
18
22
|
}
|
|
19
23
|
|
|
@@ -44,12 +48,12 @@ export function enhanceExecutionRun<ResultT = any, ParamsT = any>(r: ExecutionRu
|
|
|
44
48
|
* interface OtherType { title: string; }
|
|
45
49
|
* ```
|
|
46
50
|
*/
|
|
47
|
-
export class InteractionOutput<T =
|
|
51
|
+
export class InteractionOutput<T = unknown> {
|
|
48
52
|
/**
|
|
49
53
|
* The raw completion results array.
|
|
50
54
|
* Access this when you need to work with the underlying CompletionResult[] directly.
|
|
51
55
|
*/
|
|
52
|
-
constructor(public readonly results: CompletionResult[]) {
|
|
56
|
+
constructor(public readonly results: CompletionResult[]) {}
|
|
53
57
|
|
|
54
58
|
/**
|
|
55
59
|
* Create an interaction output that acts as both an array and has convenience methods.
|
|
@@ -73,12 +77,14 @@ export class InteractionOutput<T = any> {
|
|
|
73
77
|
* const text = output.text(); // string
|
|
74
78
|
* ```
|
|
75
79
|
*/
|
|
76
|
-
static from<T =
|
|
80
|
+
static from<T = unknown>(
|
|
81
|
+
results: CompletionResult[] | InteractionOutputArray<T> | JSONObject | string | null | undefined,
|
|
82
|
+
): InteractionOutputArray<T> {
|
|
77
83
|
if (!results) {
|
|
78
84
|
return createInteractionOutput<T>([]);
|
|
79
85
|
}
|
|
80
|
-
// Check if already wrapped using the symbol marker
|
|
81
|
-
if ((results
|
|
86
|
+
// Check if already wrapped using the symbol marker
|
|
87
|
+
if (isInteractionOutputMarker(results)) {
|
|
82
88
|
return results as InteractionOutputArray<T>;
|
|
83
89
|
}
|
|
84
90
|
if (Array.isArray(results)) {
|
|
@@ -90,8 +96,8 @@ export class InteractionOutput<T = any> {
|
|
|
90
96
|
}
|
|
91
97
|
}
|
|
92
98
|
|
|
93
|
-
static isInteractionOutputArray(obj:
|
|
94
|
-
return obj
|
|
99
|
+
static isInteractionOutputArray(obj: unknown): boolean {
|
|
100
|
+
return isInteractionOutputMarker(obj);
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
get isEmpty() {
|
|
@@ -99,15 +105,15 @@ export class InteractionOutput<T = any> {
|
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
hasObject() {
|
|
102
|
-
return this.results.some(r => r.type === 'json');
|
|
108
|
+
return this.results.some((r) => r.type === 'json');
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
hasText() {
|
|
106
|
-
return this.results.some(r => r.type === 'text');
|
|
112
|
+
return this.results.some((r) => r.type === 'text');
|
|
107
113
|
}
|
|
108
114
|
|
|
109
115
|
hasImage() {
|
|
110
|
-
return this.results.some(r => r.type === 'image');
|
|
116
|
+
return this.results.some((r) => r.type === 'image');
|
|
111
117
|
}
|
|
112
118
|
|
|
113
119
|
/**
|
|
@@ -116,8 +122,8 @@ export class InteractionOutput<T = any> {
|
|
|
116
122
|
*/
|
|
117
123
|
text(delimiter = '\n'): string {
|
|
118
124
|
return this.results
|
|
119
|
-
.filter(r => r.type === 'text')
|
|
120
|
-
.map(r => r.value)
|
|
125
|
+
.filter((r) => r.type === 'text')
|
|
126
|
+
.map((r) => r.value)
|
|
121
127
|
.join(delimiter);
|
|
122
128
|
}
|
|
123
129
|
|
|
@@ -125,9 +131,7 @@ export class InteractionOutput<T = any> {
|
|
|
125
131
|
* Get an array of all text values from text results.
|
|
126
132
|
*/
|
|
127
133
|
texts(): string[] {
|
|
128
|
-
return this.results
|
|
129
|
-
.filter(r => r.type === 'text')
|
|
130
|
-
.map(r => r.value);
|
|
134
|
+
return this.results.filter((r) => r.type === 'text').map((r) => r.value);
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
/**
|
|
@@ -136,14 +140,14 @@ export class InteractionOutput<T = any> {
|
|
|
136
140
|
* @returns The first JSON result typed as T (the class generic type)
|
|
137
141
|
* @throws Error if no JSON result found and text cannot be parsed as JSON
|
|
138
142
|
*/
|
|
139
|
-
object():
|
|
140
|
-
const jsonResult = this.results.find(r => r.type === 'json');
|
|
143
|
+
object<U = T>(): U {
|
|
144
|
+
const jsonResult = this.results.find((r) => r.type === 'json');
|
|
141
145
|
if (jsonResult) {
|
|
142
|
-
return jsonResult.value as
|
|
146
|
+
return jsonResult.value as U;
|
|
143
147
|
}
|
|
144
148
|
|
|
145
149
|
// Fallback: try to parse the other text parts as JSON
|
|
146
|
-
return parseCompletionResultAsJson(this.results);
|
|
150
|
+
return parseCompletionResultAsJson<U>(this.results);
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
/**
|
|
@@ -151,9 +155,7 @@ export class InteractionOutput<T = any> {
|
|
|
151
155
|
* @returns An array of all JSON results typed as T[] (the class generic type)
|
|
152
156
|
*/
|
|
153
157
|
objects(): T[] {
|
|
154
|
-
return this.results
|
|
155
|
-
.filter(r => r.type === 'json')
|
|
156
|
-
.map(r => r.value as T);
|
|
158
|
+
return this.results.filter((r) => r.type === 'json').map((r) => r.value as T);
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
/**
|
|
@@ -181,7 +183,7 @@ export class InteractionOutput<T = any> {
|
|
|
181
183
|
* @throws Error if no image result exists
|
|
182
184
|
*/
|
|
183
185
|
image(): string {
|
|
184
|
-
const imageResult = this.results.find(r => r.type === 'image');
|
|
186
|
+
const imageResult = this.results.find((r) => r.type === 'image');
|
|
185
187
|
if (!imageResult) {
|
|
186
188
|
throw new Error('No image result found');
|
|
187
189
|
}
|
|
@@ -192,9 +194,7 @@ export class InteractionOutput<T = any> {
|
|
|
192
194
|
* Get an array of all image values (base64 data URLs or URLs).
|
|
193
195
|
*/
|
|
194
196
|
images(): string[] {
|
|
195
|
-
return this.results
|
|
196
|
-
.filter(r => r.type === 'image')
|
|
197
|
-
.map(r => r.value);
|
|
197
|
+
return this.results.filter((r) => r.type === 'image').map((r) => r.value);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/**
|
|
@@ -216,7 +216,7 @@ export class InteractionOutput<T = any> {
|
|
|
216
216
|
*/
|
|
217
217
|
stringify(separator = '\n', indent = 2): string {
|
|
218
218
|
return this.results
|
|
219
|
-
.map(r => {
|
|
219
|
+
.map((r) => {
|
|
220
220
|
switch (r.type) {
|
|
221
221
|
case 'json':
|
|
222
222
|
return JSON.stringify(r.value, null, indent);
|
|
@@ -240,7 +240,7 @@ export class InteractionOutput<T = any> {
|
|
|
240
240
|
* Attempts to return the first JSON object, falls back to concatenated text.
|
|
241
241
|
*/
|
|
242
242
|
toJSON(): CompletionResult[] {
|
|
243
|
-
return this.results
|
|
243
|
+
return this.results;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
@@ -248,13 +248,22 @@ export class InteractionOutput<T = any> {
|
|
|
248
248
|
* Type representing a CompletionResult array enhanced with InteractionOutput methods.
|
|
249
249
|
* This is the return type of InteractionOutput.from() - it acts as both an array and has convenience methods.
|
|
250
250
|
*/
|
|
251
|
-
export type InteractionOutputArray<T =
|
|
251
|
+
export type InteractionOutputArray<T = unknown> = CompletionResult[] & InteractionOutput<T>;
|
|
252
|
+
|
|
253
|
+
type InteractionOutputMarker = {
|
|
254
|
+
[IS_INTERACTION_OUTPUT]?: boolean;
|
|
255
|
+
};
|
|
252
256
|
|
|
253
|
-
|
|
257
|
+
function isInteractionOutputMarker(obj: unknown): obj is InteractionOutputMarker {
|
|
258
|
+
return !!obj && typeof obj === 'object' && (obj as InteractionOutputMarker)[IS_INTERACTION_OUTPUT] === true;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface EnhancedInteractionExecutionResult<ResultT = unknown, ParamsT = unknown>
|
|
262
|
+
extends InteractionExecutionResult<ParamsT> {
|
|
254
263
|
result: InteractionOutputArray<ResultT>;
|
|
255
264
|
}
|
|
256
265
|
|
|
257
|
-
export interface EnhancedExecutionRun<ResultT =
|
|
266
|
+
export interface EnhancedExecutionRun<ResultT = unknown, ParamsT = unknown> extends ExecutionRun<ParamsT> {
|
|
258
267
|
result: InteractionOutputArray<ResultT>;
|
|
259
268
|
}
|
|
260
269
|
|
|
@@ -282,7 +291,7 @@ export interface EnhancedExecutionRun<ResultT = any, ParamsT = any> extends Exec
|
|
|
282
291
|
* const img = output.image(); // string
|
|
283
292
|
* ```
|
|
284
293
|
*/
|
|
285
|
-
export function createInteractionOutput<T =
|
|
294
|
+
export function createInteractionOutput<T = unknown>(results: CompletionResult[]): InteractionOutputArray<T> {
|
|
286
295
|
const wrapper = new InteractionOutput<T>(results);
|
|
287
296
|
|
|
288
297
|
return new Proxy(results, {
|
|
@@ -294,7 +303,7 @@ export function createInteractionOutput<T = any>(results: CompletionResult[]): I
|
|
|
294
303
|
|
|
295
304
|
// Check if the wrapper has this property/method
|
|
296
305
|
if (prop in wrapper) {
|
|
297
|
-
const value = (wrapper as
|
|
306
|
+
const value = Reflect.get(wrapper, prop, wrapper) as unknown;
|
|
298
307
|
// If it's a function, bind it to the wrapper so 'this' works correctly
|
|
299
308
|
if (typeof value === 'function') {
|
|
300
309
|
return value.bind(wrapper);
|
|
@@ -304,25 +313,24 @@ export function createInteractionOutput<T = any>(results: CompletionResult[]): I
|
|
|
304
313
|
}
|
|
305
314
|
// Otherwise delegate to the array
|
|
306
315
|
return Reflect.get(target, prop, receiver);
|
|
307
|
-
}
|
|
316
|
+
},
|
|
308
317
|
}) as InteractionOutputArray<T>;
|
|
309
318
|
}
|
|
310
319
|
|
|
311
|
-
|
|
312
|
-
function parseCompletionResultAsJson(data: CompletionResult[]) {
|
|
320
|
+
function parseCompletionResultAsJson<T>(data: CompletionResult[]): T {
|
|
313
321
|
let lastError: Error | undefined;
|
|
314
322
|
for (const part of data) {
|
|
315
|
-
if (part.type ===
|
|
323
|
+
if (part.type === 'text') {
|
|
316
324
|
const text = part.value.trim();
|
|
317
325
|
try {
|
|
318
|
-
return JSON.parse(text);
|
|
319
|
-
} catch (error:
|
|
320
|
-
lastError = error;
|
|
326
|
+
return JSON.parse(text) as T;
|
|
327
|
+
} catch (error: unknown) {
|
|
328
|
+
lastError = error instanceof Error ? error : new Error(String(error));
|
|
321
329
|
}
|
|
322
330
|
}
|
|
323
331
|
}
|
|
324
332
|
if (!lastError) {
|
|
325
|
-
lastError = new Error(
|
|
333
|
+
lastError = new Error('No JSON result found and no text available to parse');
|
|
326
334
|
}
|
|
327
335
|
throw lastError;
|
|
328
336
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* an array and has convenience methods.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { CompletionResult } from '@llumiverse/common';
|
|
7
|
+
import type { CompletionResult } from '@llumiverse/common';
|
|
8
8
|
import { InteractionOutput } from './InteractionOutput.js';
|
|
9
9
|
|
|
10
10
|
// Sample data
|
|
@@ -13,27 +13,36 @@ const sampleResults: CompletionResult[] = [
|
|
|
13
13
|
{ type: 'text', value: 'World!' },
|
|
14
14
|
{ type: 'json', value: { name: 'Alice', age: 30 } },
|
|
15
15
|
{ type: 'json', value: { title: 'Engineer', level: 'Senior' } },
|
|
16
|
-
{ type: 'image', value: 'data:image/png;base64,iVBORw0K...' }
|
|
16
|
+
{ type: 'image', value: 'data:image/png;base64,iVBORw0K...' },
|
|
17
17
|
];
|
|
18
18
|
|
|
19
19
|
// Example 1: Using InteractionOutput.from() (Proxy approach - RECOMMENDED)
|
|
20
20
|
console.log('=== Example 1: Proxy Approach ===');
|
|
21
|
-
interface Person {
|
|
21
|
+
interface Person {
|
|
22
|
+
name: string;
|
|
23
|
+
age: number;
|
|
24
|
+
}
|
|
22
25
|
const output = InteractionOutput.from<Person>(sampleResults);
|
|
23
26
|
|
|
24
27
|
// Works as an array
|
|
25
|
-
console.log('Array length:', output.length);
|
|
26
|
-
console.log('First item:', output[0]);
|
|
27
|
-
console.log(
|
|
28
|
+
console.log('Array length:', output.length); // 5
|
|
29
|
+
console.log('First item:', output[0]); // { type: 'text', value: 'Hello, ' }
|
|
30
|
+
console.log(
|
|
31
|
+
'Types:',
|
|
32
|
+
output.map((r) => r.type),
|
|
33
|
+
); // ['text', 'text', 'json', 'json', 'image']
|
|
28
34
|
|
|
29
35
|
// Has convenience methods
|
|
30
|
-
console.log('All text:', output.text);
|
|
31
|
-
console.log('First object:', output.object());
|
|
32
|
-
console.log('All objects:', output.objects());
|
|
33
|
-
console.log('First image:', output.image);
|
|
36
|
+
console.log('All text:', output.text); // 'Hello, World!'
|
|
37
|
+
console.log('First object:', output.object()); // { name: 'Alice', age: 30 } (typed as Person)
|
|
38
|
+
console.log('All objects:', output.objects()); // [{ name: 'Alice', age: 30 }, { title: 'Engineer', level: 'Senior' }]
|
|
39
|
+
console.log('First image:', output.image); // 'data:image/png;base64,iVBORw0K...'
|
|
34
40
|
|
|
35
41
|
// Override type for specific objects
|
|
36
|
-
interface Job {
|
|
42
|
+
interface Job {
|
|
43
|
+
title: string;
|
|
44
|
+
level: string;
|
|
45
|
+
}
|
|
37
46
|
console.log('Second object:', output.objectAt<Job>(1)); // { title: 'Engineer', level: 'Senior' } (typed as Job)
|
|
38
47
|
|
|
39
48
|
// Example 2: Using InteractionOutput class directly
|
|
@@ -42,15 +51,18 @@ const wrapper = new InteractionOutput<Person>(sampleResults);
|
|
|
42
51
|
|
|
43
52
|
// Access through wrapper properties (no array access)
|
|
44
53
|
console.log('All text:', wrapper.text);
|
|
45
|
-
console.log('Raw results:', wrapper.results);
|
|
54
|
+
console.log('Raw results:', wrapper.results); // Original array
|
|
46
55
|
console.log('First object:', wrapper.object());
|
|
47
56
|
|
|
48
57
|
// Example 3: Type safety demonstration
|
|
49
58
|
console.log('\n=== Example 3: Type Safety ===');
|
|
50
59
|
|
|
51
|
-
interface Contract {
|
|
60
|
+
interface Contract {
|
|
61
|
+
title: string;
|
|
62
|
+
parties: string[];
|
|
63
|
+
}
|
|
52
64
|
const contractResults: CompletionResult[] = [
|
|
53
|
-
{ type: 'json', value: { title: 'Sales Agreement', parties: ['Alice', 'Bob'] } }
|
|
65
|
+
{ type: 'json', value: { title: 'Sales Agreement', parties: ['Alice', 'Bob'] } },
|
|
54
66
|
];
|
|
55
67
|
|
|
56
68
|
const contractOutput = InteractionOutput.from<Contract>(contractResults);
|
|
@@ -63,10 +75,10 @@ console.log('\n=== Example 4: Mixed Content ===');
|
|
|
63
75
|
const mixedResults: CompletionResult[] = [
|
|
64
76
|
{ type: 'text', value: 'Analysis complete. Results: ' },
|
|
65
77
|
{ type: 'json', value: { score: 0.95, confidence: 'high' } },
|
|
66
|
-
{ type: 'text', value: '\nThank you!' }
|
|
78
|
+
{ type: 'text', value: '\nThank you!' },
|
|
67
79
|
];
|
|
68
80
|
|
|
69
81
|
const mixed = InteractionOutput.from(mixedResults);
|
|
70
|
-
console.log('Full text:', mixed.text);
|
|
71
|
-
console.log('Analysis:', mixed.object());
|
|
72
|
-
console.log('Text parts:', mixed.texts);
|
|
82
|
+
console.log('Full text:', mixed.text); // 'Analysis complete. Results: \nThank you!'
|
|
83
|
+
console.log('Analysis:', mixed.object()); // { score: 0.95, confidence: 'high' }
|
|
84
|
+
console.log('Text parts:', mixed.texts); // ['Analysis complete. Results: ', '\nThank you!']
|
package/src/InteractionsApi.ts
CHANGED
|
@@ -1,23 +1,50 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase, ServerError } from
|
|
2
|
-
import {
|
|
3
|
-
AsyncExecutionPayload,
|
|
1
|
+
import { ApiTopic, type ClientBase, type IRequestParams, ServerError } from '@vertesia/api-fetch-client';
|
|
2
|
+
import type {
|
|
3
|
+
AsyncExecutionPayload,
|
|
4
|
+
AsyncExecutionResult,
|
|
5
|
+
ComputedFacetResponse,
|
|
6
|
+
ComputeInteractionFacetPayload,
|
|
7
|
+
DeleteByIdResult,
|
|
8
|
+
GeneratedInteractionDefinition,
|
|
9
|
+
GeneratedTestDataRecord,
|
|
10
|
+
GenerateInteractionPayload,
|
|
11
|
+
GenerateTestDataPayload,
|
|
12
|
+
ImprovePromptPayload,
|
|
4
13
|
ImprovePromptPayloadConfig,
|
|
5
|
-
Interaction,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
Interaction,
|
|
15
|
+
InteractionCreatePayload,
|
|
16
|
+
InteractionDeletePayload,
|
|
17
|
+
InteractionEndpoint,
|
|
18
|
+
InteractionEndpointQuery,
|
|
19
|
+
InteractionExecutionPayload,
|
|
20
|
+
InteractionForkPayload,
|
|
21
|
+
InteractionPublishPayload,
|
|
22
|
+
InteractionRef,
|
|
23
|
+
InteractionRefWithSchema,
|
|
24
|
+
InteractionSearchPayload,
|
|
25
|
+
InteractionSearchQuery,
|
|
26
|
+
InteractionsExportPayload,
|
|
27
|
+
InteractionTags,
|
|
28
|
+
InteractionUpdatePayload,
|
|
29
|
+
PromptImprovementResponse,
|
|
30
|
+
RateLimitRequestPayload,
|
|
31
|
+
RateLimitRequestResponse,
|
|
32
|
+
ResolvedInteractionExecutionInfo,
|
|
33
|
+
} from '@vertesia/common';
|
|
34
|
+
import type { VertesiaClient } from './client.js';
|
|
35
|
+
import { checkRateLimit, executeInteraction, executeInteractionAsync, executeInteractionByName } from './execute.js';
|
|
36
|
+
import { InteractionCatalogApi } from './InteractionCatalogApi.js';
|
|
37
|
+
import { type EnhancedInteractionExecutionResult, enhanceInteractionExecutionResult } from './InteractionOutput.js';
|
|
38
|
+
|
|
39
|
+
function hasIdPayload(payload: unknown): payload is { id: string } {
|
|
40
|
+
return !!payload && typeof payload === 'object' && 'id' in payload && typeof payload.id === 'string';
|
|
41
|
+
}
|
|
15
42
|
|
|
16
43
|
export default class InteractionsApi extends ApiTopic {
|
|
17
44
|
catalog: InteractionCatalogApi;
|
|
18
45
|
|
|
19
46
|
constructor(parent: ClientBase) {
|
|
20
|
-
super(parent,
|
|
47
|
+
super(parent, '/api/v1/interactions');
|
|
21
48
|
this.catalog = new InteractionCatalogApi(parent);
|
|
22
49
|
}
|
|
23
50
|
|
|
@@ -26,21 +53,22 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
26
53
|
* @returns InteractionRef[]
|
|
27
54
|
**/
|
|
28
55
|
list(payload: InteractionSearchPayload = {}): Promise<InteractionRef[]> {
|
|
29
|
-
const query = payload.query || {} as InteractionSearchQuery;
|
|
56
|
+
const query = payload.query || ({} as InteractionSearchQuery);
|
|
30
57
|
|
|
31
|
-
return this.get(
|
|
58
|
+
return this.get('/', {
|
|
32
59
|
query: {
|
|
33
|
-
...query
|
|
34
|
-
}
|
|
60
|
+
...query,
|
|
61
|
+
},
|
|
35
62
|
});
|
|
36
63
|
}
|
|
64
|
+
|
|
37
65
|
/**
|
|
38
66
|
* Find interactions given a mongo match query.
|
|
39
67
|
* You can also specify if prompts schemas are included in the result
|
|
40
68
|
*/
|
|
41
69
|
listEndpoints(payload: InteractionEndpointQuery): Promise<InteractionEndpoint[]> {
|
|
42
|
-
return this.post(
|
|
43
|
-
payload
|
|
70
|
+
return this.post('/endpoints', {
|
|
71
|
+
payload,
|
|
44
72
|
});
|
|
45
73
|
}
|
|
46
74
|
|
|
@@ -59,10 +87,10 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
59
87
|
* @returns InteractionTags[]
|
|
60
88
|
**/
|
|
61
89
|
listTags(query?: InteractionSearchQuery): Promise<InteractionTags[]> {
|
|
62
|
-
return this.get(
|
|
90
|
+
return this.get('/tags', {
|
|
63
91
|
query: {
|
|
64
|
-
...query
|
|
65
|
-
}
|
|
92
|
+
...query,
|
|
93
|
+
},
|
|
66
94
|
});
|
|
67
95
|
}
|
|
68
96
|
|
|
@@ -72,8 +100,8 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
72
100
|
* @returns ComputedFacetResponse
|
|
73
101
|
**/
|
|
74
102
|
computeFacets(query: ComputeInteractionFacetPayload): Promise<ComputedFacetResponse> {
|
|
75
|
-
return this.post(
|
|
76
|
-
payload: query
|
|
103
|
+
return this.post('/facets', {
|
|
104
|
+
payload: query,
|
|
77
105
|
});
|
|
78
106
|
}
|
|
79
107
|
|
|
@@ -81,7 +109,7 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
81
109
|
* List interaction names in the current project
|
|
82
110
|
* @returns
|
|
83
111
|
*/
|
|
84
|
-
listNames(): Promise<{ id: string
|
|
112
|
+
listNames(): Promise<{ id: string; name: string }[]> {
|
|
85
113
|
return this.get('/names');
|
|
86
114
|
}
|
|
87
115
|
|
|
@@ -103,7 +131,7 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
103
131
|
**/
|
|
104
132
|
create(payload: InteractionCreatePayload): Promise<Interaction> {
|
|
105
133
|
return this.post('/', {
|
|
106
|
-
payload
|
|
134
|
+
payload,
|
|
107
135
|
});
|
|
108
136
|
}
|
|
109
137
|
|
|
@@ -128,10 +156,25 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
128
156
|
**/
|
|
129
157
|
update(id: string, payload: InteractionUpdatePayload): Promise<Interaction> {
|
|
130
158
|
return this.put(`/${id}`, {
|
|
131
|
-
payload
|
|
159
|
+
payload,
|
|
132
160
|
});
|
|
133
161
|
}
|
|
134
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Delete an interaction. Pass `{ cascade: true }` to also delete every interaction in the
|
|
165
|
+
* target's family — see {@link InteractionDeletePayload}.
|
|
166
|
+
*
|
|
167
|
+
* The signature must stay assignment-compatible with the inherited
|
|
168
|
+
* `ApiTopic.delete(path, params)`, so the parameter is `IRequestParams & InteractionDeletePayload`.
|
|
169
|
+
* Callers can keep passing only the payload (`{ cascade: true }`); IRequestParams fields are all
|
|
170
|
+
* optional.
|
|
171
|
+
*/
|
|
172
|
+
delete(id: string, payload?: IRequestParams & InteractionDeletePayload): Promise<DeleteByIdResult> {
|
|
173
|
+
const { cascade, query, ...rest } = payload ?? {};
|
|
174
|
+
const mergedQuery = cascade ? { ...(query ?? {}), cascade: 'true' } : (query ?? undefined);
|
|
175
|
+
return super.delete(`/${id}`, { ...rest, query: mergedQuery }) as Promise<DeleteByIdResult>;
|
|
176
|
+
}
|
|
177
|
+
|
|
135
178
|
/**
|
|
136
179
|
* Execute an interaction and return a promise which will be resolved with the executed run when
|
|
137
180
|
* the run completes or fails.
|
|
@@ -148,15 +191,20 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
148
191
|
* @throws 500 if interaction execution fails
|
|
149
192
|
* @throws 500 if interaction execution times out
|
|
150
193
|
**/
|
|
151
|
-
async execute<ResultT =
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
194
|
+
async execute<ResultT = unknown, ParamsT = unknown>(
|
|
195
|
+
id: string,
|
|
196
|
+
payload: InteractionExecutionPayload = {},
|
|
197
|
+
onChunk?: (chunk: string) => void,
|
|
198
|
+
): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>> {
|
|
199
|
+
const r = await executeInteraction<ParamsT>(this.client as VertesiaClient, id, payload, onChunk).catch(
|
|
200
|
+
(err) => {
|
|
201
|
+
if (err instanceof ServerError && hasIdPayload(err.payload)) {
|
|
202
|
+
throw err.updateDetails({ run_id: err.payload.id });
|
|
203
|
+
} else {
|
|
204
|
+
throw err;
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
);
|
|
160
208
|
return enhanceInteractionExecutionResult<ResultT, ParamsT>(r);
|
|
161
209
|
}
|
|
162
210
|
|
|
@@ -175,10 +223,18 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
175
223
|
* @param onChunk
|
|
176
224
|
* @returns
|
|
177
225
|
*/
|
|
178
|
-
async executeByName<ResultT =
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
226
|
+
async executeByName<ResultT = unknown, ParamsT = unknown>(
|
|
227
|
+
nameWithTag: string,
|
|
228
|
+
payload: InteractionExecutionPayload = {},
|
|
229
|
+
onChunk?: (chunk: string) => void,
|
|
230
|
+
): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>> {
|
|
231
|
+
const r = await executeInteractionByName<ParamsT>(
|
|
232
|
+
this.client as VertesiaClient,
|
|
233
|
+
nameWithTag,
|
|
234
|
+
payload,
|
|
235
|
+
onChunk,
|
|
236
|
+
).catch((err) => {
|
|
237
|
+
if (err instanceof ServerError && hasIdPayload(err.payload)) {
|
|
182
238
|
throw err.updateDetails({ run_id: err.payload.id });
|
|
183
239
|
} else {
|
|
184
240
|
throw err;
|
|
@@ -198,13 +254,13 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
198
254
|
|
|
199
255
|
publish(id: string, payload: InteractionPublishPayload): Promise<Interaction> {
|
|
200
256
|
return this.post(`/${id}/publish`, {
|
|
201
|
-
payload
|
|
257
|
+
payload,
|
|
202
258
|
});
|
|
203
259
|
}
|
|
204
260
|
|
|
205
261
|
fork(id: string, payload: InteractionForkPayload): Promise<Interaction> {
|
|
206
262
|
return this.post(`/${id}/fork`, {
|
|
207
|
-
payload
|
|
263
|
+
payload,
|
|
208
264
|
});
|
|
209
265
|
}
|
|
210
266
|
|
|
@@ -212,20 +268,17 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
212
268
|
* Generate Composable definition of an interaction
|
|
213
269
|
**/
|
|
214
270
|
generateInteraction(id: string, payload: GenerateInteractionPayload): Promise<GeneratedInteractionDefinition[]> {
|
|
215
|
-
|
|
216
271
|
return this.post(`${id}/generate-interaction`, {
|
|
217
|
-
payload
|
|
272
|
+
payload,
|
|
218
273
|
});
|
|
219
|
-
|
|
220
274
|
}
|
|
221
275
|
|
|
222
276
|
/**
|
|
223
277
|
* Generate Test Data for an interaction
|
|
224
278
|
**/
|
|
225
279
|
generateTestData(id: string, payload: GenerateTestDataPayload): Promise<GeneratedTestDataRecord[]> {
|
|
226
|
-
|
|
227
280
|
return this.post(`${id}/generate-test-data`, {
|
|
228
|
-
payload
|
|
281
|
+
payload,
|
|
229
282
|
});
|
|
230
283
|
}
|
|
231
284
|
|
|
@@ -235,17 +288,16 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
235
288
|
*/
|
|
236
289
|
suggestImprovements(id: string, payload: ImprovePromptPayloadConfig): Promise<PromptImprovementResponse> {
|
|
237
290
|
return this.post(`${id}/suggest-prompt-improvements`, {
|
|
238
|
-
payload
|
|
291
|
+
payload,
|
|
239
292
|
});
|
|
240
293
|
}
|
|
241
294
|
|
|
242
295
|
suggestPromptImprovements(payload: ImprovePromptPayload): Promise<PromptImprovementResponse> {
|
|
243
296
|
return this.post(`/improve`, {
|
|
244
|
-
payload
|
|
297
|
+
payload,
|
|
245
298
|
});
|
|
246
299
|
}
|
|
247
300
|
|
|
248
|
-
|
|
249
301
|
/**
|
|
250
302
|
* List the versions of the interaction. Returns an empty array if no versions are found
|
|
251
303
|
* @param id
|
|
@@ -287,15 +339,17 @@ export default class InteractionsApi extends ApiTopic {
|
|
|
287
339
|
* @param options Optional environment and/or model to resolve with
|
|
288
340
|
* @returns ResolvedInteractionExecutionInfo with the resolved environment and model
|
|
289
341
|
*/
|
|
290
|
-
resolve(
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
342
|
+
resolve(
|
|
343
|
+
nameOrId: string,
|
|
344
|
+
options?: {
|
|
345
|
+
environment?: string;
|
|
346
|
+
model?: string;
|
|
347
|
+
hasImage?: boolean;
|
|
348
|
+
hasVideo?: boolean;
|
|
349
|
+
},
|
|
350
|
+
): Promise<ResolvedInteractionExecutionInfo> {
|
|
296
351
|
return this.get(`/resolve/${encodeURIComponent(nameOrId)}`, {
|
|
297
|
-
query: options
|
|
352
|
+
query: options,
|
|
298
353
|
});
|
|
299
354
|
}
|
|
300
|
-
|
|
301
355
|
}
|
package/src/OAuthClientsApi.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase } from '@vertesia/api-fetch-client';
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
2
|
import type {
|
|
3
3
|
CreateOAuthClientPayload,
|
|
4
4
|
OAuthClient,
|
|
5
5
|
OAuthClientCreateResponse,
|
|
6
|
+
OAuthClientScopeMetadata,
|
|
6
7
|
SuccessResponse,
|
|
7
8
|
UpdateOAuthClientPayload,
|
|
8
9
|
} from '@vertesia/common';
|
|
@@ -20,6 +21,10 @@ export default class OAuthClientsApi extends ApiTopic {
|
|
|
20
21
|
return this.get(`/${clientId}`);
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
scopeMetadata(): Promise<OAuthClientScopeMetadata> {
|
|
25
|
+
return this.get('/scope-metadata');
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
create(payload: CreateOAuthClientPayload): Promise<OAuthClientCreateResponse> {
|
|
24
29
|
return this.post('/', { payload });
|
|
25
30
|
}
|