parlant-client 3.0.1 → 3.3.1
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/package.json +1 -1
- package/src/Client.d.ts +7 -0
- package/src/Client.js +97 -0
- package/src/api/index.d.ts +1 -1
- package/src/api/index.js +1 -1
- package/src/api/resources/agents/client/Client.d.ts +5 -2
- package/src/api/resources/agents/client/Client.js +5 -2
- package/src/api/resources/agents/client/requests/AgentCreationParams.d.ts +4 -0
- package/src/api/resources/agents/client/requests/AgentUpdateParams.d.ts +3 -1
- package/src/api/resources/cannedResponses/client/Client.d.ts +14 -2
- package/src/api/resources/cannedResponses/client/Client.js +14 -2
- package/src/api/resources/cannedResponses/client/requests/CannedResponseCreationParams.d.ts +10 -1
- package/src/api/resources/cannedResponses/client/requests/CannedResponseUpdateParams.d.ts +9 -1
- package/src/api/resources/customers/client/Client.d.ts +17 -4
- package/src/api/resources/customers/client/Client.js +41 -11
- package/src/api/resources/customers/client/requests/CustomerCreationParams.d.ts +2 -0
- package/src/api/resources/customers/client/requests/CustomersListRequest.d.ts +16 -0
- package/src/api/resources/customers/client/requests/index.d.ts +1 -0
- package/src/api/resources/customers/index.d.ts +1 -0
- package/src/api/resources/customers/index.js +1 -0
- package/src/api/resources/customers/types/CustomersListResponse.d.ts +5 -0
- package/src/api/resources/customers/types/index.d.ts +1 -0
- package/src/api/resources/customers/types/index.js +17 -0
- package/src/api/resources/glossary/client/requests/TermCreationParams.d.ts +1 -0
- package/src/api/resources/guidelines/client/Client.d.ts +14 -2
- package/src/api/resources/guidelines/client/Client.js +14 -2
- package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +14 -1
- package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +14 -1
- package/src/api/resources/index.d.ts +4 -2
- package/src/api/resources/index.js +5 -3
- package/src/api/resources/journeys/client/Client.d.ts +4 -2
- package/src/api/resources/journeys/client/Client.js +4 -2
- package/src/api/resources/journeys/client/requests/JourneyCreationParams.d.ts +10 -1
- package/src/api/resources/journeys/client/requests/JourneyUpdateParams.d.ts +3 -0
- package/src/api/resources/sessions/client/Client.d.ts +96 -9
- package/src/api/resources/sessions/client/Client.js +232 -13
- package/src/api/resources/sessions/client/requests/EventCreationParams.d.ts +3 -1
- package/src/api/resources/sessions/client/requests/EventUpdateParams.d.ts +20 -0
- package/src/api/resources/sessions/client/requests/SessionCreationParams.d.ts +10 -1
- package/src/api/resources/sessions/client/requests/SessionUpdateParams.d.ts +16 -1
- package/src/api/resources/sessions/client/requests/SessionsListEventsRequest.d.ts +3 -0
- package/src/api/resources/sessions/client/requests/SessionsListRequest.d.ts +8 -1
- package/src/api/resources/sessions/client/requests/SessionsReadEventRequest.d.ts +12 -0
- package/src/api/resources/sessions/client/requests/index.d.ts +2 -0
- package/src/api/resources/sessions/index.d.ts +1 -0
- package/src/api/resources/sessions/index.js +1 -0
- package/src/api/resources/sessions/types/SessionsListResponse.d.ts +5 -0
- package/src/api/resources/sessions/types/index.d.ts +1 -0
- package/src/api/resources/sessions/types/index.js +17 -0
- package/src/api/resources/tags/client/Client.d.ts +6 -3
- package/src/api/resources/tags/client/Client.js +22 -8
- package/src/api/resources/tags/client/requests/TagsListRequest.d.ts +13 -0
- package/src/api/resources/tags/client/requests/index.d.ts +1 -0
- package/src/api/types/Agent.d.ts +1 -0
- package/src/api/types/CannedResponse.d.ts +4 -0
- package/src/api/types/CannedResponseMetadataUpdateParams.d.ts +12 -0
- package/src/api/types/CriticalityDto.d.ts +12 -0
- package/src/api/types/CriticalityDto.js +11 -0
- package/src/api/types/Event.d.ts +4 -0
- package/src/api/types/Guideline.d.ts +10 -0
- package/src/api/types/GuidelineLabelsUpdateParams.d.ts +12 -0
- package/src/api/types/Journey.d.ts +5 -0
- package/src/api/types/JourneyLabelsUpdateParams.d.ts +12 -0
- package/src/api/types/MessageOutputModeDto.d.ts +15 -0
- package/src/api/types/MessageOutputModeDto.js +10 -0
- package/src/api/types/{Moderation.d.ts → ModerationDto.d.ts} +2 -2
- package/src/api/types/{Moderation.js → ModerationDto.js} +2 -2
- package/src/api/types/PaginatedCustomers.d.ts +13 -0
- package/src/api/types/Session.d.ts +4 -0
- package/src/api/types/SessionLabelsUpdateParams.d.ts +12 -0
- package/src/api/types/SessionListing.d.ts +13 -0
- package/src/api/types/SessionMetadataUpdateParams.d.ts +12 -0
- package/src/api/types/SortDirectionDto.d.ts +11 -0
- package/src/api/types/SortDirectionDto.js +10 -0
- package/src/api/types/ToolServiceKindDto.d.ts +2 -2
- package/src/api/types/ValidationError.d.ts +2 -0
- package/src/api/types/index.d.ts +11 -27
- package/src/api/types/index.js +11 -27
- package/src/serialization/client/healthCheckHealthzGet.d.ts +9 -0
- package/src/serialization/{resources/sessions/client/list.js → client/healthCheckHealthzGet.js} +2 -3
- package/src/serialization/client/index.d.ts +1 -0
- package/src/serialization/client/index.js +37 -0
- package/src/serialization/index.d.ts +2 -1
- package/src/serialization/index.js +2 -1
- package/src/serialization/resources/agents/client/requests/AgentCreationParams.d.ts +3 -0
- package/src/serialization/resources/agents/client/requests/AgentCreationParams.js +3 -0
- package/src/serialization/resources/agents/client/requests/AgentUpdateParams.d.ts +2 -0
- package/src/serialization/resources/agents/client/requests/AgentUpdateParams.js +2 -0
- package/src/serialization/resources/cannedResponses/client/requests/CannedResponseCreationParams.d.ts +2 -0
- package/src/serialization/resources/cannedResponses/client/requests/CannedResponseCreationParams.js +2 -0
- package/src/serialization/resources/cannedResponses/client/requests/CannedResponseUpdateParams.d.ts +2 -0
- package/src/serialization/resources/cannedResponses/client/requests/CannedResponseUpdateParams.js +2 -0
- package/src/serialization/resources/customers/client/index.d.ts +0 -1
- package/src/serialization/resources/customers/client/index.js +0 -24
- package/src/serialization/resources/customers/client/requests/CustomerCreationParams.d.ts +1 -0
- package/src/serialization/resources/customers/client/requests/CustomerCreationParams.js +1 -0
- package/src/serialization/resources/customers/index.d.ts +1 -0
- package/src/serialization/resources/customers/index.js +1 -0
- package/src/serialization/resources/customers/types/CustomersListResponse.d.ts +12 -0
- package/src/serialization/resources/customers/{client/list.js → types/CustomersListResponse.js} +3 -2
- package/src/serialization/resources/customers/types/index.d.ts +1 -0
- package/src/serialization/resources/customers/types/index.js +17 -0
- package/src/serialization/resources/glossary/client/requests/TermCreationParams.d.ts +1 -0
- package/src/serialization/resources/glossary/client/requests/TermCreationParams.js +1 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +9 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.js +9 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +8 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.js +8 -0
- package/src/serialization/resources/index.d.ts +4 -2
- package/src/serialization/resources/index.js +5 -3
- package/src/serialization/resources/journeys/client/requests/JourneyCreationParams.d.ts +5 -0
- package/src/serialization/resources/journeys/client/requests/JourneyCreationParams.js +5 -0
- package/src/serialization/resources/journeys/client/requests/JourneyUpdateParams.d.ts +5 -0
- package/src/serialization/resources/journeys/client/requests/JourneyUpdateParams.js +5 -0
- package/src/serialization/resources/sessions/client/index.d.ts +0 -1
- package/src/serialization/resources/sessions/client/index.js +1 -2
- package/src/serialization/resources/sessions/client/requests/EventCreationParams.d.ts +1 -0
- package/src/serialization/resources/sessions/client/requests/EventCreationParams.js +1 -0
- package/src/serialization/resources/sessions/client/requests/EventUpdateParams.d.ts +13 -0
- package/src/serialization/resources/sessions/client/requests/EventUpdateParams.js +44 -0
- package/src/serialization/resources/sessions/client/requests/SessionCreationParams.d.ts +2 -0
- package/src/serialization/resources/sessions/client/requests/SessionCreationParams.js +2 -0
- package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.d.ts +6 -0
- package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.js +6 -0
- package/src/serialization/resources/sessions/client/requests/index.d.ts +1 -0
- package/src/serialization/resources/sessions/client/requests/index.js +3 -1
- package/src/serialization/resources/sessions/index.d.ts +1 -0
- package/src/serialization/resources/sessions/index.js +1 -0
- package/src/serialization/resources/sessions/types/SessionsListResponse.d.ts +12 -0
- package/src/serialization/resources/sessions/types/SessionsListResponse.js +43 -0
- package/src/serialization/resources/sessions/types/index.d.ts +1 -0
- package/src/serialization/resources/sessions/types/index.js +17 -0
- package/src/serialization/types/Agent.d.ts +2 -0
- package/src/serialization/types/Agent.js +2 -0
- package/src/serialization/types/CannedResponse.d.ts +2 -0
- package/src/serialization/types/CannedResponse.js +2 -0
- package/src/serialization/types/CannedResponseMetadataUpdateParams.d.ts +13 -0
- package/src/serialization/types/CannedResponseMetadataUpdateParams.js +44 -0
- package/src/serialization/types/CriticalityDto.d.ts +10 -0
- package/src/serialization/types/{ConnectionPropositionKindDto.js → CriticalityDto.js} +2 -2
- package/src/serialization/types/Event.d.ts +2 -0
- package/src/serialization/types/Event.js +2 -0
- package/src/serialization/types/Guideline.d.ts +8 -0
- package/src/serialization/types/Guideline.js +8 -0
- package/src/serialization/types/GuidelineLabelsUpdateParams.d.ts +13 -0
- package/src/serialization/types/{LegacyGuideline.js → GuidelineLabelsUpdateParams.js} +4 -6
- package/src/serialization/types/Journey.d.ts +4 -0
- package/src/serialization/types/Journey.js +4 -0
- package/src/serialization/types/JourneyLabelsUpdateParams.d.ts +13 -0
- package/src/serialization/types/{LegacyGuidelineConnectionAddition.js → JourneyLabelsUpdateParams.js} +4 -4
- package/src/serialization/types/MessageOutputModeDto.d.ts +10 -0
- package/src/serialization/types/{CoherenceCheckKindDto.js → MessageOutputModeDto.js} +2 -5
- package/src/serialization/types/{Moderation.d.ts → ModerationDto.d.ts} +2 -2
- package/src/serialization/types/ModerationDto.js +41 -0
- package/src/serialization/types/PaginatedCustomers.d.ts +16 -0
- package/src/serialization/types/{ConnectionProposition.js → PaginatedCustomers.js} +7 -7
- package/src/serialization/types/Session.d.ts +2 -0
- package/src/serialization/types/Session.js +2 -0
- package/src/serialization/types/SessionLabelsUpdateParams.d.ts +13 -0
- package/src/serialization/types/{LegacyGuidelineCreationParams.js → SessionLabelsUpdateParams.js} +4 -4
- package/src/serialization/types/SessionListing.d.ts +16 -0
- package/src/serialization/types/{LegacyEvaluationCreationParams.js → SessionListing.js} +7 -5
- package/src/serialization/types/SessionMetadataUpdateParams.d.ts +13 -0
- package/src/serialization/types/{LegacyInvoiceData.js → SessionMetadataUpdateParams.js} +4 -4
- package/src/serialization/types/SortDirectionDto.d.ts +10 -0
- package/src/serialization/types/{Moderation.js → SortDirectionDto.js} +2 -2
- package/src/serialization/types/ValidationError.d.ts +2 -0
- package/src/serialization/types/ValidationError.js +2 -0
- package/src/serialization/types/index.d.ts +11 -27
- package/src/serialization/types/index.js +11 -27
- package/src/api/types/CoherenceCheck.d.ts +0 -16
- package/src/api/types/CoherenceCheckKindDto.d.ts +0 -11
- package/src/api/types/CoherenceCheckKindDto.js +0 -10
- package/src/api/types/ConnectionProposition.d.ts +0 -12
- package/src/api/types/ConnectionPropositionKindDto.d.ts +0 -11
- package/src/api/types/ConnectionPropositionKindDto.js +0 -10
- package/src/api/types/LegacyContextVariable.d.ts +0 -22
- package/src/api/types/LegacyContextVariableCreationParams.d.ts +0 -16
- package/src/api/types/LegacyContextVariableReadResult.d.ts +0 -12
- package/src/api/types/LegacyContextVariableUpdateParams.d.ts +0 -16
- package/src/api/types/LegacyEvaluation.d.ts +0 -19
- package/src/api/types/LegacyEvaluationCreationParams.d.ts +0 -12
- package/src/api/types/LegacyGuideline.d.ts +0 -16
- package/src/api/types/LegacyGuidelineConnection.d.ts +0 -15
- package/src/api/types/LegacyGuidelineConnectionAddition.d.ts +0 -12
- package/src/api/types/LegacyGuidelineConnectionUpdateParams.d.ts +0 -14
- package/src/api/types/LegacyGuidelineCreationParams.d.ts +0 -10
- package/src/api/types/LegacyGuidelineCreationResult.d.ts +0 -10
- package/src/api/types/LegacyGuidelineCreationResult.js +0 -5
- package/src/api/types/LegacyGuidelineInvoiceData.d.ts +0 -11
- package/src/api/types/LegacyGuidelineInvoiceData.js +0 -5
- package/src/api/types/LegacyGuidelinePayload.d.ts +0 -17
- package/src/api/types/LegacyGuidelinePayload.js +0 -5
- package/src/api/types/LegacyGuidelineUpdateParams.d.ts +0 -12
- package/src/api/types/LegacyGuidelineUpdateParams.js +0 -5
- package/src/api/types/LegacyGuidelineWithConnectionsAndToolAssociations.d.ts +0 -12
- package/src/api/types/LegacyGuidelineWithConnectionsAndToolAssociations.js +0 -5
- package/src/api/types/LegacyInvoice.d.ts +0 -19
- package/src/api/types/LegacyInvoice.js +0 -5
- package/src/api/types/LegacyInvoiceData.d.ts +0 -12
- package/src/api/types/LegacyInvoiceData.js +0 -5
- package/src/api/types/LegacyPayload.d.ts +0 -13
- package/src/api/types/LegacyPayload.js +0 -5
- package/src/api/types/LegacyTerm.d.ts +0 -18
- package/src/api/types/LegacyTerm.js +0 -5
- package/src/api/types/LegacyTermCreationParams.d.ts +0 -16
- package/src/api/types/LegacyTermCreationParams.js +0 -5
- package/src/api/types/LegacyTermUpdateParams.d.ts +0 -16
- package/src/api/types/LegacyTermUpdateParams.js +0 -5
- package/src/serialization/resources/customers/client/list.d.ts +0 -11
- package/src/serialization/resources/sessions/client/list.d.ts +0 -11
- package/src/serialization/types/CoherenceCheck.d.ts +0 -18
- package/src/serialization/types/CoherenceCheck.js +0 -49
- package/src/serialization/types/CoherenceCheckKindDto.d.ts +0 -10
- package/src/serialization/types/ConnectionProposition.d.ts +0 -16
- package/src/serialization/types/ConnectionPropositionKindDto.d.ts +0 -10
- package/src/serialization/types/LegacyContextVariable.d.ts +0 -17
- package/src/serialization/types/LegacyContextVariable.js +0 -48
- package/src/serialization/types/LegacyContextVariableCreationParams.d.ts +0 -16
- package/src/serialization/types/LegacyContextVariableCreationParams.js +0 -47
- package/src/serialization/types/LegacyContextVariableReadResult.d.ts +0 -15
- package/src/serialization/types/LegacyContextVariableReadResult.js +0 -46
- package/src/serialization/types/LegacyContextVariableUpdateParams.d.ts +0 -16
- package/src/serialization/types/LegacyContextVariableUpdateParams.js +0 -47
- package/src/serialization/types/LegacyEvaluation.d.ts +0 -19
- package/src/serialization/types/LegacyEvaluation.js +0 -50
- package/src/serialization/types/LegacyEvaluationCreationParams.d.ts +0 -14
- package/src/serialization/types/LegacyGuideline.d.ts +0 -15
- package/src/serialization/types/LegacyGuidelineConnection.d.ts +0 -16
- package/src/serialization/types/LegacyGuidelineConnection.js +0 -47
- package/src/serialization/types/LegacyGuidelineConnectionAddition.d.ts +0 -13
- package/src/serialization/types/LegacyGuidelineConnectionUpdateParams.d.ts +0 -14
- package/src/serialization/types/LegacyGuidelineConnectionUpdateParams.js +0 -45
- package/src/serialization/types/LegacyGuidelineCreationParams.d.ts +0 -13
- package/src/serialization/types/LegacyGuidelineCreationResult.d.ts +0 -13
- package/src/serialization/types/LegacyGuidelineCreationResult.js +0 -44
- package/src/serialization/types/LegacyGuidelineInvoiceData.d.ts +0 -15
- package/src/serialization/types/LegacyGuidelineInvoiceData.js +0 -46
- package/src/serialization/types/LegacyGuidelinePayload.d.ts +0 -18
- package/src/serialization/types/LegacyGuidelinePayload.js +0 -49
- package/src/serialization/types/LegacyGuidelineUpdateParams.d.ts +0 -16
- package/src/serialization/types/LegacyGuidelineUpdateParams.js +0 -47
- package/src/serialization/types/LegacyGuidelineWithConnectionsAndToolAssociations.d.ts +0 -17
- package/src/serialization/types/LegacyGuidelineWithConnectionsAndToolAssociations.js +0 -48
- package/src/serialization/types/LegacyInvoice.d.ts +0 -18
- package/src/serialization/types/LegacyInvoice.js +0 -49
- package/src/serialization/types/LegacyInvoiceData.d.ts +0 -13
- package/src/serialization/types/LegacyPayload.d.ts +0 -15
- package/src/serialization/types/LegacyPayload.js +0 -46
- package/src/serialization/types/LegacyTerm.d.ts +0 -15
- package/src/serialization/types/LegacyTerm.js +0 -46
- package/src/serialization/types/LegacyTermCreationParams.d.ts +0 -14
- package/src/serialization/types/LegacyTermCreationParams.js +0 -45
- package/src/serialization/types/LegacyTermUpdateParams.d.ts +0 -14
- package/src/serialization/types/LegacyTermUpdateParams.js +0 -45
- /package/src/api/{types/CoherenceCheck.js → resources/customers/client/requests/CustomersListRequest.js} +0 -0
- /package/src/api/{types/ConnectionProposition.js → resources/customers/types/CustomersListResponse.js} +0 -0
- /package/src/api/{types/LegacyContextVariable.js → resources/sessions/client/requests/EventUpdateParams.js} +0 -0
- /package/src/api/{types/LegacyContextVariableCreationParams.js → resources/sessions/client/requests/SessionsReadEventRequest.js} +0 -0
- /package/src/api/{types/LegacyContextVariableReadResult.js → resources/sessions/types/SessionsListResponse.js} +0 -0
- /package/src/api/{types/LegacyContextVariableUpdateParams.js → resources/tags/client/requests/TagsListRequest.js} +0 -0
- /package/src/api/types/{LegacyEvaluation.js → CannedResponseMetadataUpdateParams.js} +0 -0
- /package/src/api/types/{LegacyEvaluationCreationParams.js → GuidelineLabelsUpdateParams.js} +0 -0
- /package/src/api/types/{LegacyGuideline.js → JourneyLabelsUpdateParams.js} +0 -0
- /package/src/api/types/{LegacyGuidelineConnection.js → PaginatedCustomers.js} +0 -0
- /package/src/api/types/{LegacyGuidelineConnectionAddition.js → SessionLabelsUpdateParams.js} +0 -0
- /package/src/api/types/{LegacyGuidelineConnectionUpdateParams.js → SessionListing.js} +0 -0
- /package/src/api/types/{LegacyGuidelineCreationParams.js → SessionMetadataUpdateParams.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Parlant from "../../../../index";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
@@ -10,18 +11,30 @@
|
|
|
10
11
|
* "key1": "value1",
|
|
11
12
|
* "key2": "value2"
|
|
12
13
|
* },
|
|
13
|
-
* enabled: false
|
|
14
|
+
* enabled: false,
|
|
15
|
+
* compositionMode: "strict_canned",
|
|
16
|
+
* labels: ["vip", "priority"]
|
|
14
17
|
* }
|
|
15
18
|
*/
|
|
16
19
|
export interface GuidelineCreationParams {
|
|
20
|
+
/** Unique identifier for the guideline */
|
|
21
|
+
id?: string;
|
|
17
22
|
/** If this condition is satisfied, the action will be performed */
|
|
18
23
|
condition: string;
|
|
19
24
|
/** This action will be performed if the condition is satisfied */
|
|
20
25
|
action?: string;
|
|
26
|
+
/** Optional description providing additional context for the guideline */
|
|
27
|
+
description?: string;
|
|
28
|
+
criticality?: Parlant.CriticalityDto;
|
|
21
29
|
/** Metadata for the guideline */
|
|
22
30
|
metadata?: Record<string, unknown>;
|
|
23
31
|
/** Whether the guideline is enabled */
|
|
24
32
|
enabled?: boolean;
|
|
25
33
|
/** The tags associated with the guideline */
|
|
26
34
|
tags?: string[];
|
|
35
|
+
compositionMode?: Parlant.CompositionModeDto;
|
|
36
|
+
track?: boolean;
|
|
37
|
+
/** The labels associated with the guideline */
|
|
38
|
+
labels?: string[];
|
|
39
|
+
priority?: number;
|
|
27
40
|
}
|
|
@@ -17,7 +17,14 @@ import * as Parlant from "../../../../index";
|
|
|
17
17
|
* toolName: "old_tool"
|
|
18
18
|
* }]
|
|
19
19
|
* },
|
|
20
|
-
* enabled: true
|
|
20
|
+
* enabled: true,
|
|
21
|
+
* metadata: {
|
|
22
|
+
* set: {
|
|
23
|
+
* "key1": "value1",
|
|
24
|
+
* "key2": "value2"
|
|
25
|
+
* },
|
|
26
|
+
* unset: ["key3", "key4"]
|
|
27
|
+
* }
|
|
21
28
|
* }
|
|
22
29
|
*/
|
|
23
30
|
export interface GuidelineUpdateParams {
|
|
@@ -25,9 +32,15 @@ export interface GuidelineUpdateParams {
|
|
|
25
32
|
condition?: string;
|
|
26
33
|
/** This action will be performed if the condition is satisfied */
|
|
27
34
|
action?: string;
|
|
35
|
+
/** Optional description providing additional context for the guideline */
|
|
36
|
+
description?: string;
|
|
37
|
+
criticality?: Parlant.CriticalityDto;
|
|
28
38
|
toolAssociations?: Parlant.GuidelineToolAssociationUpdateParams;
|
|
29
39
|
/** Whether the guideline is enabled */
|
|
30
40
|
enabled?: boolean;
|
|
31
41
|
tags?: Parlant.GuidelineTagsUpdateParams;
|
|
32
42
|
metadata?: Parlant.GuidelineMetadataUpdateParams;
|
|
43
|
+
compositionMode?: Parlant.CompositionModeDto;
|
|
44
|
+
labels?: Parlant.GuidelineLabelsUpdateParams;
|
|
45
|
+
priority?: number;
|
|
33
46
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export * as agents from "./agents";
|
|
2
1
|
export * as sessions from "./sessions";
|
|
2
|
+
export * from "./sessions/types";
|
|
3
|
+
export * as customers from "./customers";
|
|
4
|
+
export * from "./customers/types";
|
|
5
|
+
export * as agents from "./agents";
|
|
3
6
|
export * as services from "./services";
|
|
4
7
|
export * as tags from "./tags";
|
|
5
8
|
export * as glossary from "./glossary";
|
|
6
|
-
export * as customers from "./customers";
|
|
7
9
|
export * as cannedResponses from "./cannedResponses";
|
|
8
10
|
export * as contextVariables from "./contextVariables";
|
|
9
11
|
export * as guidelines from "./guidelines";
|
|
@@ -36,13 +36,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.capabilities = exports.evaluations = exports.journeys = exports.relationships = exports.guidelines = exports.contextVariables = exports.cannedResponses = exports.
|
|
40
|
-
exports.agents = __importStar(require("./agents"));
|
|
39
|
+
exports.capabilities = exports.evaluations = exports.journeys = exports.relationships = exports.guidelines = exports.contextVariables = exports.cannedResponses = exports.glossary = exports.tags = exports.services = exports.agents = exports.customers = exports.sessions = void 0;
|
|
41
40
|
exports.sessions = __importStar(require("./sessions"));
|
|
41
|
+
__exportStar(require("./sessions/types"), exports);
|
|
42
|
+
exports.customers = __importStar(require("./customers"));
|
|
43
|
+
__exportStar(require("./customers/types"), exports);
|
|
44
|
+
exports.agents = __importStar(require("./agents"));
|
|
42
45
|
exports.services = __importStar(require("./services"));
|
|
43
46
|
exports.tags = __importStar(require("./tags"));
|
|
44
47
|
exports.glossary = __importStar(require("./glossary"));
|
|
45
|
-
exports.customers = __importStar(require("./customers"));
|
|
46
48
|
exports.cannedResponses = __importStar(require("./cannedResponses"));
|
|
47
49
|
exports.contextVariables = __importStar(require("./contextVariables"));
|
|
48
50
|
exports.guidelines = __importStar(require("./guidelines"));
|
|
@@ -39,7 +39,7 @@ export declare class Journeys {
|
|
|
39
39
|
* Creates a new journey in the system.
|
|
40
40
|
*
|
|
41
41
|
* The journey will be initialized with the provided title, description, and conditions.
|
|
42
|
-
* A unique identifier will be automatically generated.
|
|
42
|
+
* A unique identifier will be automatically generated unless a custom ID is provided.
|
|
43
43
|
*
|
|
44
44
|
* @param {Parlant.JourneyCreationParams} request
|
|
45
45
|
* @param {Journeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -51,7 +51,9 @@ export declare class Journeys {
|
|
|
51
51
|
* title: "Customer Onboarding",
|
|
52
52
|
* description: "1. Customer wants to lock their card\n2. Customer reports that their card doesn't work\n3. Customer suspects their card has been stolen",
|
|
53
53
|
* conditions: ["customer needs unlocking their card", "customer needs help with card"],
|
|
54
|
-
*
|
|
54
|
+
* id: "IUCGT-lvpS",
|
|
55
|
+
* tags: ["tag1", "tag2"],
|
|
56
|
+
* labels: ["vip", "priority"]
|
|
55
57
|
* })
|
|
56
58
|
*/
|
|
57
59
|
create(request: Parlant.JourneyCreationParams, requestOptions?: Journeys.RequestOptions): Promise<Parlant.Journey>;
|
|
@@ -126,7 +126,7 @@ class Journeys {
|
|
|
126
126
|
* Creates a new journey in the system.
|
|
127
127
|
*
|
|
128
128
|
* The journey will be initialized with the provided title, description, and conditions.
|
|
129
|
-
* A unique identifier will be automatically generated.
|
|
129
|
+
* A unique identifier will be automatically generated unless a custom ID is provided.
|
|
130
130
|
*
|
|
131
131
|
* @param {Parlant.JourneyCreationParams} request
|
|
132
132
|
* @param {Journeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -138,7 +138,9 @@ class Journeys {
|
|
|
138
138
|
* title: "Customer Onboarding",
|
|
139
139
|
* description: "1. Customer wants to lock their card\n2. Customer reports that their card doesn't work\n3. Customer suspects their card has been stolen",
|
|
140
140
|
* conditions: ["customer needs unlocking their card", "customer needs help with card"],
|
|
141
|
-
*
|
|
141
|
+
* id: "IUCGT-lvpS",
|
|
142
|
+
* tags: ["tag1", "tag2"],
|
|
143
|
+
* labels: ["vip", "priority"]
|
|
142
144
|
* })
|
|
143
145
|
*/
|
|
144
146
|
create(request, requestOptions) {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Parlant from "../../../../index";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
7
8
|
* title: "Customer Onboarding",
|
|
8
9
|
* description: "1. Customer wants to lock their card\n2. Customer reports that their card doesn't work\n3. Customer suspects their card has been stolen",
|
|
9
10
|
* conditions: ["customer needs unlocking their card", "customer needs help with card"],
|
|
10
|
-
*
|
|
11
|
+
* id: "IUCGT-lvpS",
|
|
12
|
+
* tags: ["tag1", "tag2"],
|
|
13
|
+
* labels: ["vip", "priority"]
|
|
11
14
|
* }
|
|
12
15
|
*/
|
|
13
16
|
export interface JourneyCreationParams {
|
|
@@ -15,6 +18,12 @@ export interface JourneyCreationParams {
|
|
|
15
18
|
title: string;
|
|
16
19
|
description: string;
|
|
17
20
|
conditions: string[];
|
|
21
|
+
/** Unique identifier for the journey */
|
|
22
|
+
id?: string;
|
|
18
23
|
/** List of tag IDs associated with the journey */
|
|
19
24
|
tags?: string[];
|
|
25
|
+
compositionMode?: Parlant.CompositionModeDto;
|
|
26
|
+
/** Labels associated with the journey */
|
|
27
|
+
labels?: string[];
|
|
28
|
+
priority?: number;
|
|
20
29
|
}
|
|
@@ -15,4 +15,7 @@ export interface JourneyUpdateParams {
|
|
|
15
15
|
description?: string;
|
|
16
16
|
conditions?: Parlant.JourneyConditionUpdateParams;
|
|
17
17
|
tags?: Parlant.JourneyTagUpdateParams;
|
|
18
|
+
compositionMode?: Parlant.CompositionModeDto;
|
|
19
|
+
labels?: Parlant.JourneyLabelsUpdateParams;
|
|
20
|
+
priority?: number;
|
|
18
21
|
}
|
|
@@ -24,10 +24,10 @@ export declare class Sessions {
|
|
|
24
24
|
protected readonly _options: Sessions.Options;
|
|
25
25
|
constructor(_options: Sessions.Options);
|
|
26
26
|
/**
|
|
27
|
-
* Lists all sessions matching the specified filters.
|
|
27
|
+
* Lists all sessions matching the specified filters with pagination support.
|
|
28
28
|
*
|
|
29
|
-
* Can filter by agent_id and/or customer_id.
|
|
30
|
-
*
|
|
29
|
+
* Can filter by agent_id and/or customer_id. Supports cursor-based pagination
|
|
30
|
+
* with configurable sort direction.
|
|
31
31
|
*
|
|
32
32
|
* @param {Parlant.SessionsListRequest} request
|
|
33
33
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -37,10 +37,12 @@ export declare class Sessions {
|
|
|
37
37
|
* @example
|
|
38
38
|
* await client.sessions.list({
|
|
39
39
|
* agentId: "ag_123xyz",
|
|
40
|
-
* customerId: "cust_123xy"
|
|
40
|
+
* customerId: "cust_123xy",
|
|
41
|
+
* limit: 10,
|
|
42
|
+
* cursor: "AAABjnBU9gBl/0BQt1axI0VniQI="
|
|
41
43
|
* })
|
|
42
44
|
*/
|
|
43
|
-
list(request?: Parlant.SessionsListRequest, requestOptions?: Sessions.RequestOptions): Promise<Parlant.
|
|
45
|
+
list(request?: Parlant.SessionsListRequest, requestOptions?: Sessions.RequestOptions): Promise<Parlant.SessionsListResponse>;
|
|
44
46
|
/**
|
|
45
47
|
* Creates a new session between an agent and customer.
|
|
46
48
|
*
|
|
@@ -56,7 +58,12 @@ export declare class Sessions {
|
|
|
56
58
|
* await client.sessions.create({
|
|
57
59
|
* agentId: "ag_123xyz",
|
|
58
60
|
* customerId: "cust_123xy",
|
|
59
|
-
* title: "Product inquiry session"
|
|
61
|
+
* title: "Product inquiry session",
|
|
62
|
+
* metadata: {
|
|
63
|
+
* "priority": "high",
|
|
64
|
+
* "project": "demo"
|
|
65
|
+
* },
|
|
66
|
+
* labels: ["vip", "priority"]
|
|
60
67
|
* })
|
|
61
68
|
*/
|
|
62
69
|
create(request: Parlant.SessionCreationParams, requestOptions?: Sessions.RequestOptions): Promise<Parlant.Session>;
|
|
@@ -123,7 +130,18 @@ export declare class Sessions {
|
|
|
123
130
|
* consumptionOffsets: {
|
|
124
131
|
* client: 42
|
|
125
132
|
* },
|
|
126
|
-
* title: "Updated session title"
|
|
133
|
+
* title: "Updated session title",
|
|
134
|
+
* metadata: {
|
|
135
|
+
* set: {
|
|
136
|
+
* "priority": "low",
|
|
137
|
+
* "simulation": true
|
|
138
|
+
* },
|
|
139
|
+
* unset: ["old_project"]
|
|
140
|
+
* },
|
|
141
|
+
* labels: {
|
|
142
|
+
* upsert: ["vip", "priority"],
|
|
143
|
+
* remove: ["old_label"]
|
|
144
|
+
* }
|
|
127
145
|
* })
|
|
128
146
|
*/
|
|
129
147
|
update(sessionId: string, request?: Parlant.SessionUpdateParams, requestOptions?: Sessions.RequestOptions): Promise<Parlant.Session>;
|
|
@@ -131,12 +149,13 @@ export declare class Sessions {
|
|
|
131
149
|
* Lists events from a session with optional filtering and waiting capabilities.
|
|
132
150
|
*
|
|
133
151
|
* This endpoint retrieves events from a specified session and can:
|
|
134
|
-
* 1. Filter events by their offset, source, type, and
|
|
152
|
+
* 1. Filter events by their offset, source, type, and trace ID
|
|
135
153
|
* 2. Wait for new events to arrive if requested
|
|
136
154
|
* 3. Return events in chronological order based on their offset
|
|
155
|
+
* 4. Stream events via Server-Sent Events (SSE) when sse=true
|
|
137
156
|
*
|
|
138
157
|
* Notes:
|
|
139
|
-
* Long Polling Behavior:
|
|
158
|
+
* Long Polling Behavior (when sse=false):
|
|
140
159
|
* - When wait_for_data = 0:
|
|
141
160
|
* Returns immediately with any existing events that match the criteria
|
|
142
161
|
* - When wait_for_data > 0:
|
|
@@ -144,6 +163,11 @@ export declare class Sessions {
|
|
|
144
163
|
* - If no new events arrive before timeout, raises 504 Gateway Timeout
|
|
145
164
|
* - If matching events already exist, returns immediately with those events
|
|
146
165
|
*
|
|
166
|
+
* SSE Mode (when sse=true):
|
|
167
|
+
* - Returns a text/event-stream response
|
|
168
|
+
* - Continuously sends events as they arrive
|
|
169
|
+
* - wait_for_data is used as the timeout between events before closing the stream
|
|
170
|
+
*
|
|
147
171
|
* @param {string} sessionId - Unique identifier for the session
|
|
148
172
|
* @param {Parlant.SessionsListEventsRequest} request
|
|
149
173
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -156,6 +180,7 @@ export declare class Sessions {
|
|
|
156
180
|
* await client.sessions.listEvents("sess_123yz", {
|
|
157
181
|
* minOffset: 0,
|
|
158
182
|
* correlationId: "corr_13xyz",
|
|
183
|
+
* traceId: "corr_13xyz",
|
|
159
184
|
* kinds: "message,tool"
|
|
160
185
|
* })
|
|
161
186
|
*/
|
|
@@ -198,4 +223,66 @@ export declare class Sessions {
|
|
|
198
223
|
* })
|
|
199
224
|
*/
|
|
200
225
|
deleteEvents(sessionId: string, request: Parlant.SessionsDeleteEventsRequest, requestOptions?: Sessions.RequestOptions): Promise<void>;
|
|
226
|
+
/**
|
|
227
|
+
* Reads a single event from a session.
|
|
228
|
+
*
|
|
229
|
+
* This endpoint retrieves a specific event by its ID and optionally waits
|
|
230
|
+
* for the event to complete (useful for streaming messages).
|
|
231
|
+
*
|
|
232
|
+
* Args:
|
|
233
|
+
* wait_for_completion: If true, wait for the event to complete (for streaming events,
|
|
234
|
+
* this means waiting until chunks contains None terminator)
|
|
235
|
+
* wait_for_data: Timeout in seconds for wait_for_completion
|
|
236
|
+
* sse: If true, stream event updates via Server-Sent Events until completion
|
|
237
|
+
*
|
|
238
|
+
* Notes:
|
|
239
|
+
* For streaming message events (events with 'chunks' property):
|
|
240
|
+
* - The event is considered complete when chunks contains a None terminator
|
|
241
|
+
* - Use wait_for_completion=true to wait for the full message
|
|
242
|
+
* - Use sse=true to stream updates as chunks are added
|
|
243
|
+
*
|
|
244
|
+
* SSE Mode (when sse=true):
|
|
245
|
+
* - Returns a text/event-stream response
|
|
246
|
+
* - Sends the event each time it's updated
|
|
247
|
+
* - Closes when the event is complete (chunks ends with None)
|
|
248
|
+
*
|
|
249
|
+
* @param {string} sessionId - Unique identifier for the session
|
|
250
|
+
* @param {string} eventId - Unique identifier for the event
|
|
251
|
+
* @param {Parlant.SessionsReadEventRequest} request
|
|
252
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
253
|
+
*
|
|
254
|
+
* @throws {@link Parlant.NotFoundError}
|
|
255
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* await client.sessions.readEvent("sess_123yz", "evt_123xyz")
|
|
259
|
+
*/
|
|
260
|
+
readEvent(sessionId: string, eventId: string, request?: Parlant.SessionsReadEventRequest, requestOptions?: Sessions.RequestOptions): Promise<Parlant.Event>;
|
|
261
|
+
/**
|
|
262
|
+
* Updates an event's properties.
|
|
263
|
+
*
|
|
264
|
+
* Currently only supports updating metadata. Other event properties cannot be modified.
|
|
265
|
+
* This API is designed to be extensible for future event property updates.
|
|
266
|
+
*
|
|
267
|
+
* @param {string} sessionId - Unique identifier for the session
|
|
268
|
+
* @param {string} eventId - Unique identifier for the event
|
|
269
|
+
* @param {Parlant.EventUpdateParams} request
|
|
270
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
271
|
+
*
|
|
272
|
+
* @throws {@link Parlant.NotFoundError}
|
|
273
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* await client.sessions.updateEvent("sess_123yz", "evt_123xyz", {
|
|
277
|
+
* metadata: {
|
|
278
|
+
* set: {
|
|
279
|
+
* "agent_id": "agent_123",
|
|
280
|
+
* "category": "support",
|
|
281
|
+
* "priority": "high"
|
|
282
|
+
* },
|
|
283
|
+
* unset: ["old_priority"]
|
|
284
|
+
* }
|
|
285
|
+
* })
|
|
286
|
+
*/
|
|
287
|
+
updateEvent(sessionId: string, eventId: string, request?: Parlant.EventUpdateParams, requestOptions?: Sessions.RequestOptions): Promise<Parlant.Event>;
|
|
201
288
|
}
|