parlant-client 1.2.0 → 3.0.0
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 +6 -3
- package/src/Client.js +8 -3
- package/src/api/resources/cannedResponses/client/Client.d.ts +104 -0
- package/src/api/resources/{utterances → cannedResponses}/client/Client.js +44 -42
- package/src/api/resources/cannedResponses/client/requests/CannedResponseCreationParams.d.ts +25 -0
- package/src/api/resources/{utterances/client/requests/UtteranceUpdateParams.d.ts → cannedResponses/client/requests/CannedResponseUpdateParams.d.ts} +5 -5
- package/src/api/resources/{utterances/client/requests/UtterancesListRequest.d.ts → cannedResponses/client/requests/CannedResponsesListRequest.d.ts} +2 -2
- package/src/api/resources/cannedResponses/client/requests/index.d.ts +3 -0
- package/src/api/resources/capabilities/client/Client.d.ts +116 -0
- package/src/api/resources/capabilities/client/Client.js +391 -0
- package/src/api/resources/capabilities/client/index.d.ts +1 -0
- package/src/api/resources/capabilities/client/index.js +17 -0
- package/src/api/resources/capabilities/client/requests/CapabilitiesListRequest.d.ts +13 -0
- package/src/api/resources/capabilities/client/requests/CapabilityCreationParams.d.ts +22 -0
- package/src/api/resources/capabilities/client/requests/CapabilityUpdateParams.d.ts +21 -0
- package/src/api/resources/capabilities/client/requests/index.d.ts +3 -0
- package/src/api/resources/capabilities/client/requests/index.js +2 -0
- package/src/api/resources/customers/client/Client.d.ts +2 -9
- package/src/api/resources/customers/client/Client.js +2 -9
- package/src/api/resources/customers/client/requests/CustomerCreationParams.d.ts +3 -3
- package/src/api/resources/customers/client/requests/CustomerUpdateParams.d.ts +2 -9
- package/src/api/resources/evaluations/client/Client.d.ts +1 -2
- package/src/api/resources/evaluations/client/Client.js +1 -2
- package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +1 -2
- package/src/api/resources/guidelines/client/Client.d.ts +1 -8
- package/src/api/resources/guidelines/client/Client.js +1 -8
- package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +1 -8
- 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 +14 -0
- package/src/api/resources/journeys/client/Client.js +58 -0
- package/src/api/resources/services/client/requests/ServiceUpdateParams.d.ts +2 -0
- package/src/api/resources/sessions/client/Client.d.ts +0 -17
- package/src/api/resources/sessions/client/Client.js +0 -65
- package/src/api/resources/sessions/client/requests/EventCreationParams.d.ts +3 -1
- package/src/api/resources/sessions/client/requests/SessionUpdateParams.d.ts +2 -0
- package/src/api/types/{UtteranceRequest.d.ts → AgentMessageGuideline.d.ts} +2 -2
- package/src/api/types/AgentMessageGuidelineRationaleDto.d.ts +12 -0
- package/src/api/types/{UtteranceReasonDto.js → AgentMessageGuidelineRationaleDto.js} +3 -2
- package/src/api/types/CannedResponse.d.ts +18 -0
- package/src/api/types/CannedResponseField.d.ts +10 -0
- package/src/api/types/CannedResponseTagUpdateParams.d.ts +15 -0
- package/src/api/types/Capability.d.ts +18 -0
- package/src/api/types/CapabilityTagUpdateParams.d.ts +12 -0
- package/src/api/types/CompositionModeDto.d.ts +7 -7
- package/src/api/types/CompositionModeDto.js +3 -3
- package/src/api/types/Customer.d.ts +3 -3
- package/src/api/types/{CustomerExtraUpdateParams.d.ts → CustomerMetadataUpdateParams.d.ts} +4 -4
- package/src/api/types/GuidelineInvoiceData.d.ts +1 -1
- package/src/api/types/GuidelineMetadataUpdateParams.d.ts +2 -2
- package/src/api/types/GuidelinePayload.d.ts +4 -2
- package/src/api/types/InvoiceData.d.ts +1 -1
- package/src/api/types/LegacyInvoiceData.d.ts +1 -1
- package/src/api/types/McpServiceParams.d.ts +13 -0
- package/src/api/types/Participant.d.ts +11 -0
- package/src/api/types/RelationshipKindDto.d.ts +3 -1
- package/src/api/types/RelationshipKindDto.js +2 -0
- package/src/api/types/Session.d.ts +2 -0
- package/src/api/types/SessionModeDto.d.ts +11 -0
- package/src/api/types/SessionModeDto.js +10 -0
- package/src/api/types/ToolServiceKindDto.d.ts +4 -1
- package/src/api/types/ToolServiceKindDto.js +1 -0
- package/src/api/types/index.d.ts +11 -19
- package/src/api/types/index.js +11 -19
- package/src/serialization/resources/cannedResponses/client/list.d.ts +11 -0
- package/src/serialization/resources/cannedResponses/client/list.js +42 -0
- package/src/serialization/resources/cannedResponses/client/requests/CannedResponseCreationParams.d.ts +16 -0
- package/src/serialization/resources/cannedResponses/client/requests/CannedResponseCreationParams.js +47 -0
- package/src/serialization/resources/cannedResponses/client/requests/CannedResponseUpdateParams.d.ts +16 -0
- package/src/serialization/resources/{utterances/client/requests/UtteranceUpdateParams.js → cannedResponses/client/requests/CannedResponseUpdateParams.js} +6 -6
- package/src/serialization/resources/cannedResponses/client/requests/index.d.ts +2 -0
- package/src/serialization/resources/cannedResponses/client/requests/index.js +7 -0
- package/src/serialization/resources/cannedResponses/index.d.ts +1 -0
- package/src/serialization/resources/cannedResponses/index.js +17 -0
- package/src/serialization/resources/capabilities/client/index.d.ts +2 -0
- package/src/serialization/resources/capabilities/client/index.js +41 -0
- package/src/serialization/resources/{utterances → capabilities}/client/list.d.ts +3 -3
- package/src/serialization/resources/{utterances → capabilities}/client/list.js +2 -2
- package/src/serialization/resources/capabilities/client/requests/CapabilityCreationParams.d.ts +15 -0
- package/src/serialization/resources/{utterances/client/requests/UtteranceCreationParams.js → capabilities/client/requests/CapabilityCreationParams.js} +5 -5
- package/src/serialization/resources/capabilities/client/requests/CapabilityUpdateParams.d.ts +16 -0
- package/src/serialization/resources/capabilities/client/requests/CapabilityUpdateParams.js +47 -0
- package/src/serialization/resources/capabilities/client/requests/index.d.ts +2 -0
- package/src/serialization/resources/capabilities/client/requests/index.js +7 -0
- package/src/serialization/resources/capabilities/index.d.ts +1 -0
- package/src/serialization/resources/capabilities/index.js +17 -0
- package/src/serialization/resources/customers/client/requests/CustomerCreationParams.d.ts +1 -1
- package/src/serialization/resources/customers/client/requests/CustomerCreationParams.js +1 -1
- package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.d.ts +2 -2
- package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.js +2 -2
- package/src/serialization/resources/index.d.ts +4 -2
- package/src/serialization/resources/index.js +5 -3
- package/src/serialization/resources/services/client/requests/ServiceUpdateParams.d.ts +2 -0
- package/src/serialization/resources/services/client/requests/ServiceUpdateParams.js +2 -0
- package/src/serialization/resources/sessions/client/requests/EventCreationParams.d.ts +5 -2
- package/src/serialization/resources/sessions/client/requests/EventCreationParams.js +5 -2
- package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.d.ts +2 -0
- package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.js +2 -0
- package/src/serialization/types/AgentMessageGuideline.d.ts +14 -0
- package/src/serialization/types/{GuidelineMatch.js → AgentMessageGuideline.js} +4 -6
- package/src/serialization/types/AgentMessageGuidelineRationaleDto.d.ts +10 -0
- package/src/serialization/types/AgentMessageGuidelineRationaleDto.js +41 -0
- package/src/serialization/types/{Utterance.d.ts → CannedResponse.d.ts} +5 -4
- package/src/serialization/types/{Utterance.js → CannedResponse.js} +5 -4
- package/src/serialization/types/{UtteranceField.d.ts → CannedResponseField.d.ts} +2 -2
- package/src/serialization/types/{UtteranceField.js → CannedResponseField.js} +2 -2
- package/src/serialization/types/CannedResponseTagUpdateParams.d.ts +13 -0
- package/src/serialization/types/{CustomerExtraUpdateParams.js → CannedResponseTagUpdateParams.js} +3 -3
- package/src/serialization/types/{PreparationIterationTerm.d.ts → Capability.d.ts} +5 -4
- package/src/serialization/types/{PreparationIterationTerm.js → Capability.js} +5 -4
- package/src/serialization/types/{UtteranceTagUpdateParams.d.ts → CapabilityTagUpdateParams.d.ts} +2 -2
- package/src/serialization/types/{UtteranceTagUpdateParams.js → CapabilityTagUpdateParams.js} +2 -2
- package/src/serialization/types/CompositionModeDto.d.ts +1 -1
- package/src/serialization/types/CompositionModeDto.js +1 -1
- package/src/serialization/types/Customer.d.ts +1 -1
- package/src/serialization/types/Customer.js +1 -1
- package/src/serialization/types/CustomerMetadataUpdateParams.d.ts +13 -0
- package/src/serialization/types/{ContextVariableAndValue.js → CustomerMetadataUpdateParams.js} +4 -7
- package/src/serialization/types/GuidelineInvoiceData.d.ts +1 -1
- package/src/serialization/types/GuidelineInvoiceData.js +1 -1
- package/src/serialization/types/GuidelineMetadataUpdateParams.d.ts +2 -2
- package/src/serialization/types/GuidelineMetadataUpdateParams.js +2 -2
- package/src/serialization/types/GuidelinePayload.d.ts +3 -2
- package/src/serialization/types/GuidelinePayload.js +3 -2
- package/src/serialization/types/{ToolResult.d.ts → McpServiceParams.d.ts} +3 -4
- package/src/serialization/types/{ToolResult.js → McpServiceParams.js} +3 -4
- package/src/serialization/types/Participant.d.ts +13 -0
- package/src/serialization/types/{UtteranceRequest.js → Participant.js} +4 -5
- package/src/serialization/types/RelationshipKindDto.d.ts +1 -1
- package/src/serialization/types/RelationshipKindDto.js +1 -1
- package/src/serialization/types/Session.d.ts +2 -0
- package/src/serialization/types/Session.js +2 -0
- package/src/serialization/types/SessionModeDto.d.ts +10 -0
- package/src/serialization/types/{UtteranceReasonDto.js → SessionModeDto.js} +2 -2
- package/src/serialization/types/ToolServiceKindDto.d.ts +1 -1
- package/src/serialization/types/ToolServiceKindDto.js +1 -1
- package/src/serialization/types/index.d.ts +11 -19
- package/src/serialization/types/index.js +11 -19
- package/src/api/resources/utterances/client/Client.d.ts +0 -102
- package/src/api/resources/utterances/client/requests/UtteranceCreationParams.d.ts +0 -23
- package/src/api/resources/utterances/client/requests/index.d.ts +0 -3
- package/src/api/types/ContextVariableAndValue.d.ts +0 -17
- package/src/api/types/EventInspectionResult.d.ts +0 -13
- package/src/api/types/EventTrace.d.ts +0 -15
- package/src/api/types/GenerationInfo.d.ts +0 -16
- package/src/api/types/GuidelineMatch.d.ts +0 -18
- package/src/api/types/GuidelineMatchingInspection.d.ts +0 -13
- package/src/api/types/MessageGenerationInspection.d.ts +0 -11
- package/src/api/types/PreparationIteration.d.ts +0 -18
- package/src/api/types/PreparationIterationGenerations.d.ts +0 -12
- package/src/api/types/PreparationIterationTerm.d.ts +0 -16
- package/src/api/types/ToolCall.d.ts +0 -14
- package/src/api/types/ToolResult.d.ts +0 -11
- package/src/api/types/ToolResult.js +0 -5
- package/src/api/types/UsageInfo.d.ts +0 -14
- package/src/api/types/UsageInfo.js +0 -5
- package/src/api/types/Utterance.d.ts +0 -16
- package/src/api/types/Utterance.js +0 -5
- package/src/api/types/UtteranceField.d.ts +0 -10
- package/src/api/types/UtteranceField.js +0 -5
- package/src/api/types/UtteranceReasonDto.d.ts +0 -11
- package/src/api/types/UtteranceRequest.js +0 -5
- package/src/api/types/UtteranceTagUpdateParams.d.ts +0 -15
- package/src/api/types/UtteranceTagUpdateParams.js +0 -5
- package/src/serialization/resources/utterances/client/requests/UtteranceCreationParams.d.ts +0 -15
- package/src/serialization/resources/utterances/client/requests/UtteranceUpdateParams.d.ts +0 -16
- package/src/serialization/resources/utterances/client/requests/index.d.ts +0 -2
- package/src/serialization/resources/utterances/client/requests/index.js +0 -7
- package/src/serialization/types/ContextVariableAndValue.d.ts +0 -16
- package/src/serialization/types/CustomerExtraUpdateParams.d.ts +0 -13
- package/src/serialization/types/EventInspectionResult.d.ts +0 -16
- package/src/serialization/types/EventInspectionResult.js +0 -47
- package/src/serialization/types/EventTrace.d.ts +0 -17
- package/src/serialization/types/EventTrace.js +0 -48
- package/src/serialization/types/GenerationInfo.d.ts +0 -16
- package/src/serialization/types/GenerationInfo.js +0 -47
- package/src/serialization/types/GuidelineMatch.d.ts +0 -16
- package/src/serialization/types/GuidelineMatchingInspection.d.ts +0 -14
- package/src/serialization/types/GuidelineMatchingInspection.js +0 -45
- package/src/serialization/types/MessageGenerationInspection.d.ts +0 -14
- package/src/serialization/types/MessageGenerationInspection.js +0 -45
- package/src/serialization/types/PreparationIteration.d.ts +0 -21
- package/src/serialization/types/PreparationIteration.js +0 -52
- package/src/serialization/types/PreparationIterationGenerations.d.ts +0 -15
- package/src/serialization/types/PreparationIterationGenerations.js +0 -46
- package/src/serialization/types/ToolCall.d.ts +0 -15
- package/src/serialization/types/ToolCall.js +0 -46
- package/src/serialization/types/UsageInfo.d.ts +0 -14
- package/src/serialization/types/UsageInfo.js +0 -47
- package/src/serialization/types/UtteranceReasonDto.d.ts +0 -10
- package/src/serialization/types/UtteranceRequest.d.ts +0 -14
- /package/src/api/resources/{utterances → cannedResponses}/client/index.d.ts +0 -0
- /package/src/api/resources/{utterances → cannedResponses}/client/index.js +0 -0
- /package/src/api/resources/{utterances/client/requests/UtteranceCreationParams.js → cannedResponses/client/requests/CannedResponseCreationParams.js} +0 -0
- /package/src/api/resources/{utterances/client/requests/UtteranceUpdateParams.js → cannedResponses/client/requests/CannedResponseUpdateParams.js} +0 -0
- /package/src/api/resources/{utterances/client/requests/UtterancesListRequest.js → cannedResponses/client/requests/CannedResponsesListRequest.js} +0 -0
- /package/src/api/resources/{utterances → cannedResponses}/client/requests/index.js +0 -0
- /package/src/api/resources/{utterances → cannedResponses}/index.d.ts +0 -0
- /package/src/api/resources/{utterances → cannedResponses}/index.js +0 -0
- /package/src/api/{types/ContextVariableAndValue.js → resources/capabilities/client/requests/CapabilitiesListRequest.js} +0 -0
- /package/src/api/{types/CustomerExtraUpdateParams.js → resources/capabilities/client/requests/CapabilityCreationParams.js} +0 -0
- /package/src/api/{types/EventInspectionResult.js → resources/capabilities/client/requests/CapabilityUpdateParams.js} +0 -0
- /package/src/{serialization/resources/utterances → api/resources/capabilities}/index.d.ts +0 -0
- /package/src/{serialization/resources/utterances → api/resources/capabilities}/index.js +0 -0
- /package/src/api/types/{EventTrace.js → AgentMessageGuideline.js} +0 -0
- /package/src/api/types/{GenerationInfo.js → CannedResponse.js} +0 -0
- /package/src/api/types/{GuidelineMatch.js → CannedResponseField.js} +0 -0
- /package/src/api/types/{GuidelineMatchingInspection.js → CannedResponseTagUpdateParams.js} +0 -0
- /package/src/api/types/{MessageGenerationInspection.js → Capability.js} +0 -0
- /package/src/api/types/{PreparationIteration.js → CapabilityTagUpdateParams.js} +0 -0
- /package/src/api/types/{PreparationIterationGenerations.js → CustomerMetadataUpdateParams.js} +0 -0
- /package/src/api/types/{PreparationIterationTerm.js → McpServiceParams.js} +0 -0
- /package/src/api/types/{ToolCall.js → Participant.js} +0 -0
- /package/src/serialization/resources/{utterances → cannedResponses}/client/index.d.ts +0 -0
- /package/src/serialization/resources/{utterances → cannedResponses}/client/index.js +0 -0
package/package.json
CHANGED
package/src/Client.d.ts
CHANGED
|
@@ -8,12 +8,13 @@ import { Services } from "./api/resources/services/client/Client";
|
|
|
8
8
|
import { Tags } from "./api/resources/tags/client/Client";
|
|
9
9
|
import { Glossary } from "./api/resources/glossary/client/Client";
|
|
10
10
|
import { Customers } from "./api/resources/customers/client/Client";
|
|
11
|
-
import {
|
|
11
|
+
import { CannedResponses } from "./api/resources/cannedResponses/client/Client";
|
|
12
12
|
import { ContextVariables } from "./api/resources/contextVariables/client/Client";
|
|
13
13
|
import { Guidelines } from "./api/resources/guidelines/client/Client";
|
|
14
14
|
import { Relationships } from "./api/resources/relationships/client/Client";
|
|
15
15
|
import { Journeys } from "./api/resources/journeys/client/Client";
|
|
16
16
|
import { Evaluations } from "./api/resources/evaluations/client/Client";
|
|
17
|
+
import { Capabilities } from "./api/resources/capabilities/client/Client";
|
|
17
18
|
export declare namespace ParlantClient {
|
|
18
19
|
interface Options {
|
|
19
20
|
environment: core.Supplier<string>;
|
|
@@ -39,12 +40,13 @@ export declare class ParlantClient {
|
|
|
39
40
|
protected _tags: Tags | undefined;
|
|
40
41
|
protected _glossary: Glossary | undefined;
|
|
41
42
|
protected _customers: Customers | undefined;
|
|
42
|
-
protected
|
|
43
|
+
protected _cannedResponses: CannedResponses | undefined;
|
|
43
44
|
protected _contextVariables: ContextVariables | undefined;
|
|
44
45
|
protected _guidelines: Guidelines | undefined;
|
|
45
46
|
protected _relationships: Relationships | undefined;
|
|
46
47
|
protected _journeys: Journeys | undefined;
|
|
47
48
|
protected _evaluations: Evaluations | undefined;
|
|
49
|
+
protected _capabilities: Capabilities | undefined;
|
|
48
50
|
constructor(_options: ParlantClient.Options);
|
|
49
51
|
get agents(): Agents;
|
|
50
52
|
get sessions(): Sessions;
|
|
@@ -52,10 +54,11 @@ export declare class ParlantClient {
|
|
|
52
54
|
get tags(): Tags;
|
|
53
55
|
get glossary(): Glossary;
|
|
54
56
|
get customers(): Customers;
|
|
55
|
-
get
|
|
57
|
+
get cannedResponses(): CannedResponses;
|
|
56
58
|
get contextVariables(): ContextVariables;
|
|
57
59
|
get guidelines(): Guidelines;
|
|
58
60
|
get relationships(): Relationships;
|
|
59
61
|
get journeys(): Journeys;
|
|
60
62
|
get evaluations(): Evaluations;
|
|
63
|
+
get capabilities(): Capabilities;
|
|
61
64
|
}
|
package/src/Client.js
CHANGED
|
@@ -10,12 +10,13 @@ const Client_3 = require("./api/resources/services/client/Client");
|
|
|
10
10
|
const Client_4 = require("./api/resources/tags/client/Client");
|
|
11
11
|
const Client_5 = require("./api/resources/glossary/client/Client");
|
|
12
12
|
const Client_6 = require("./api/resources/customers/client/Client");
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
13
|
+
const Client_7 = require("./api/resources/cannedResponses/client/Client");
|
|
14
14
|
const Client_8 = require("./api/resources/contextVariables/client/Client");
|
|
15
15
|
const Client_9 = require("./api/resources/guidelines/client/Client");
|
|
16
16
|
const Client_10 = require("./api/resources/relationships/client/Client");
|
|
17
17
|
const Client_11 = require("./api/resources/journeys/client/Client");
|
|
18
18
|
const Client_12 = require("./api/resources/evaluations/client/Client");
|
|
19
|
+
const Client_13 = require("./api/resources/capabilities/client/Client");
|
|
19
20
|
class ParlantClient {
|
|
20
21
|
constructor(_options) {
|
|
21
22
|
this._options = _options;
|
|
@@ -44,9 +45,9 @@ class ParlantClient {
|
|
|
44
45
|
var _a;
|
|
45
46
|
return ((_a = this._customers) !== null && _a !== void 0 ? _a : (this._customers = new Client_6.Customers(this._options)));
|
|
46
47
|
}
|
|
47
|
-
get
|
|
48
|
+
get cannedResponses() {
|
|
48
49
|
var _a;
|
|
49
|
-
return ((_a = this.
|
|
50
|
+
return ((_a = this._cannedResponses) !== null && _a !== void 0 ? _a : (this._cannedResponses = new Client_7.CannedResponses(this._options)));
|
|
50
51
|
}
|
|
51
52
|
get contextVariables() {
|
|
52
53
|
var _a;
|
|
@@ -68,5 +69,9 @@ class ParlantClient {
|
|
|
68
69
|
var _a;
|
|
69
70
|
return ((_a = this._evaluations) !== null && _a !== void 0 ? _a : (this._evaluations = new Client_12.Evaluations(this._options)));
|
|
70
71
|
}
|
|
72
|
+
get capabilities() {
|
|
73
|
+
var _a;
|
|
74
|
+
return ((_a = this._capabilities) !== null && _a !== void 0 ? _a : (this._capabilities = new Client_13.Capabilities(this._options)));
|
|
75
|
+
}
|
|
71
76
|
}
|
|
72
77
|
exports.ParlantClient = ParlantClient;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../core";
|
|
5
|
+
import * as Parlant from "../../../index";
|
|
6
|
+
export declare namespace CannedResponses {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
|
+
/** Specify a custom URL to connect the client to. */
|
|
10
|
+
baseUrl?: core.Supplier<string>;
|
|
11
|
+
}
|
|
12
|
+
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
|
+
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
16
|
+
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
18
|
+
abortSignal?: AbortSignal;
|
|
19
|
+
/** Additional headers to include in the request. */
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare class CannedResponses {
|
|
24
|
+
protected readonly _options: CannedResponses.Options;
|
|
25
|
+
constructor(_options: CannedResponses.Options);
|
|
26
|
+
/**
|
|
27
|
+
* Lists all canned responses, optionally filtered by tags.
|
|
28
|
+
*
|
|
29
|
+
* @param {Parlant.CannedResponsesListRequest} request
|
|
30
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.cannedResponses.list()
|
|
36
|
+
*/
|
|
37
|
+
list(request?: Parlant.CannedResponsesListRequest, requestOptions?: CannedResponses.RequestOptions): Promise<Parlant.CannedResponse[]>;
|
|
38
|
+
/**
|
|
39
|
+
* @param {Parlant.CannedResponseCreationParams} request
|
|
40
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.cannedResponses.create({
|
|
46
|
+
* value: "Your account balance is {balance}",
|
|
47
|
+
* fields: [{
|
|
48
|
+
* name: "balance",
|
|
49
|
+
* description: "Account's balance",
|
|
50
|
+
* examples: ["9000"]
|
|
51
|
+
* }]
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
create(request: Parlant.CannedResponseCreationParams, requestOptions?: CannedResponses.RequestOptions): Promise<Parlant.CannedResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves details of a specific canned response by ID.
|
|
57
|
+
*
|
|
58
|
+
* @param {string} cannedResponseId
|
|
59
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link Parlant.NotFoundError}
|
|
62
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.cannedResponses.retrieve("t9a8g703f4")
|
|
66
|
+
*/
|
|
67
|
+
retrieve(cannedResponseId: string, requestOptions?: CannedResponses.RequestOptions): Promise<Parlant.CannedResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* @param {string} cannedResponseId
|
|
70
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link Parlant.NotFoundError}
|
|
73
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.cannedResponses.delete("t9a8g703f4")
|
|
77
|
+
*/
|
|
78
|
+
delete(cannedResponseId: string, requestOptions?: CannedResponses.RequestOptions): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Updates an existing canned response's attributes.
|
|
81
|
+
*
|
|
82
|
+
* Only provided attributes will be updated; others remain unchanged.
|
|
83
|
+
* The canned response's ID and creation timestamp cannot be modified.
|
|
84
|
+
* Extra metadata and tags can be added or removed independently.
|
|
85
|
+
*
|
|
86
|
+
* @param {string} cannedResponseId
|
|
87
|
+
* @param {Parlant.CannedResponseUpdateParams} request
|
|
88
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link Parlant.NotFoundError}
|
|
91
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* await client.cannedResponses.update("t9a8g703f4", {
|
|
95
|
+
* value: "Your updated balance is {balance}",
|
|
96
|
+
* fields: [{
|
|
97
|
+
* name: "balance",
|
|
98
|
+
* description: "Updated account balance",
|
|
99
|
+
* examples: ["10000"]
|
|
100
|
+
* }]
|
|
101
|
+
* })
|
|
102
|
+
*/
|
|
103
|
+
update(cannedResponseId: string, request?: Parlant.CannedResponseUpdateParams, requestOptions?: CannedResponses.RequestOptions): Promise<Parlant.CannedResponse>;
|
|
104
|
+
}
|
|
@@ -48,24 +48,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
48
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
exports.
|
|
51
|
+
exports.CannedResponses = void 0;
|
|
52
52
|
const core = __importStar(require("../../../../core"));
|
|
53
53
|
const Parlant = __importStar(require("../../../index"));
|
|
54
54
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
55
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
56
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
|
-
class
|
|
57
|
+
class CannedResponses {
|
|
58
58
|
constructor(_options) {
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
62
|
+
* Lists all canned responses, optionally filtered by tags.
|
|
63
|
+
*
|
|
64
|
+
* @param {Parlant.CannedResponsesListRequest} request
|
|
65
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
66
|
*
|
|
65
67
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
66
68
|
*
|
|
67
69
|
* @example
|
|
68
|
-
* await client.
|
|
70
|
+
* await client.cannedResponses.list()
|
|
69
71
|
*/
|
|
70
72
|
list() {
|
|
71
73
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
@@ -81,7 +83,7 @@ class Utterances {
|
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
const _response = yield core.fetcher({
|
|
84
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "
|
|
86
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "canned_responses"),
|
|
85
87
|
method: "GET",
|
|
86
88
|
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
89
|
contentType: "application/json",
|
|
@@ -92,7 +94,7 @@ class Utterances {
|
|
|
92
94
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
93
95
|
});
|
|
94
96
|
if (_response.ok) {
|
|
95
|
-
return serializers.
|
|
97
|
+
return serializers.cannedResponses.list.Response.parseOrThrow(_response.body, {
|
|
96
98
|
unrecognizedObjectKeys: "passthrough",
|
|
97
99
|
allowUnrecognizedUnionMembers: true,
|
|
98
100
|
allowUnrecognizedEnumValues: true,
|
|
@@ -117,7 +119,7 @@ class Utterances {
|
|
|
117
119
|
body: _response.error.rawBody,
|
|
118
120
|
});
|
|
119
121
|
case "timeout":
|
|
120
|
-
throw new errors.ParlantTimeoutError("Timeout exceeded when calling GET /
|
|
122
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling GET /canned_responses.");
|
|
121
123
|
case "unknown":
|
|
122
124
|
throw new errors.ParlantError({
|
|
123
125
|
message: _response.error.errorMessage,
|
|
@@ -126,13 +128,13 @@ class Utterances {
|
|
|
126
128
|
});
|
|
127
129
|
}
|
|
128
130
|
/**
|
|
129
|
-
* @param {Parlant.
|
|
130
|
-
* @param {
|
|
131
|
+
* @param {Parlant.CannedResponseCreationParams} request
|
|
132
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
133
|
*
|
|
132
134
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
133
135
|
*
|
|
134
136
|
* @example
|
|
135
|
-
* await client.
|
|
137
|
+
* await client.cannedResponses.create({
|
|
136
138
|
* value: "Your account balance is {balance}",
|
|
137
139
|
* fields: [{
|
|
138
140
|
* name: "balance",
|
|
@@ -145,18 +147,18 @@ class Utterances {
|
|
|
145
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
146
148
|
var _a;
|
|
147
149
|
const _response = yield core.fetcher({
|
|
148
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "
|
|
150
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "canned_responses"),
|
|
149
151
|
method: "POST",
|
|
150
152
|
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
151
153
|
contentType: "application/json",
|
|
152
154
|
requestType: "json",
|
|
153
|
-
body: serializers.
|
|
155
|
+
body: serializers.CannedResponseCreationParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
154
156
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
155
157
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
156
158
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
157
159
|
});
|
|
158
160
|
if (_response.ok) {
|
|
159
|
-
return serializers.
|
|
161
|
+
return serializers.CannedResponse.parseOrThrow(_response.body, {
|
|
160
162
|
unrecognizedObjectKeys: "passthrough",
|
|
161
163
|
allowUnrecognizedUnionMembers: true,
|
|
162
164
|
allowUnrecognizedEnumValues: true,
|
|
@@ -181,7 +183,7 @@ class Utterances {
|
|
|
181
183
|
body: _response.error.rawBody,
|
|
182
184
|
});
|
|
183
185
|
case "timeout":
|
|
184
|
-
throw new errors.ParlantTimeoutError("Timeout exceeded when calling POST /
|
|
186
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling POST /canned_responses.");
|
|
185
187
|
case "unknown":
|
|
186
188
|
throw new errors.ParlantError({
|
|
187
189
|
message: _response.error.errorMessage,
|
|
@@ -190,22 +192,22 @@ class Utterances {
|
|
|
190
192
|
});
|
|
191
193
|
}
|
|
192
194
|
/**
|
|
193
|
-
* Retrieves details of a specific
|
|
195
|
+
* Retrieves details of a specific canned response by ID.
|
|
194
196
|
*
|
|
195
|
-
* @param {string}
|
|
196
|
-
* @param {
|
|
197
|
+
* @param {string} cannedResponseId
|
|
198
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
197
199
|
*
|
|
198
200
|
* @throws {@link Parlant.NotFoundError}
|
|
199
201
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
200
202
|
*
|
|
201
203
|
* @example
|
|
202
|
-
* await client.
|
|
204
|
+
* await client.cannedResponses.retrieve("t9a8g703f4")
|
|
203
205
|
*/
|
|
204
|
-
retrieve(
|
|
206
|
+
retrieve(cannedResponseId, requestOptions) {
|
|
205
207
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
208
|
var _a;
|
|
207
209
|
const _response = yield core.fetcher({
|
|
208
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `
|
|
210
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `canned_responses/${encodeURIComponent(cannedResponseId)}`),
|
|
209
211
|
method: "GET",
|
|
210
212
|
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
211
213
|
contentType: "application/json",
|
|
@@ -215,7 +217,7 @@ class Utterances {
|
|
|
215
217
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
216
218
|
});
|
|
217
219
|
if (_response.ok) {
|
|
218
|
-
return serializers.
|
|
220
|
+
return serializers.CannedResponse.parseOrThrow(_response.body, {
|
|
219
221
|
unrecognizedObjectKeys: "passthrough",
|
|
220
222
|
allowUnrecognizedUnionMembers: true,
|
|
221
223
|
allowUnrecognizedEnumValues: true,
|
|
@@ -242,7 +244,7 @@ class Utterances {
|
|
|
242
244
|
body: _response.error.rawBody,
|
|
243
245
|
});
|
|
244
246
|
case "timeout":
|
|
245
|
-
throw new errors.ParlantTimeoutError("Timeout exceeded when calling GET /
|
|
247
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling GET /canned_responses/{canned_response_id}.");
|
|
246
248
|
case "unknown":
|
|
247
249
|
throw new errors.ParlantError({
|
|
248
250
|
message: _response.error.errorMessage,
|
|
@@ -251,20 +253,20 @@ class Utterances {
|
|
|
251
253
|
});
|
|
252
254
|
}
|
|
253
255
|
/**
|
|
254
|
-
* @param {string}
|
|
255
|
-
* @param {
|
|
256
|
+
* @param {string} cannedResponseId
|
|
257
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
256
258
|
*
|
|
257
259
|
* @throws {@link Parlant.NotFoundError}
|
|
258
260
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
259
261
|
*
|
|
260
262
|
* @example
|
|
261
|
-
* await client.
|
|
263
|
+
* await client.cannedResponses.delete("t9a8g703f4")
|
|
262
264
|
*/
|
|
263
|
-
delete(
|
|
265
|
+
delete(cannedResponseId, requestOptions) {
|
|
264
266
|
return __awaiter(this, void 0, void 0, function* () {
|
|
265
267
|
var _a;
|
|
266
268
|
const _response = yield core.fetcher({
|
|
267
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `
|
|
269
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `canned_responses/${encodeURIComponent(cannedResponseId)}`),
|
|
268
270
|
method: "DELETE",
|
|
269
271
|
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
270
272
|
contentType: "application/json",
|
|
@@ -296,7 +298,7 @@ class Utterances {
|
|
|
296
298
|
body: _response.error.rawBody,
|
|
297
299
|
});
|
|
298
300
|
case "timeout":
|
|
299
|
-
throw new errors.ParlantTimeoutError("Timeout exceeded when calling DELETE /
|
|
301
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling DELETE /canned_responses/{canned_response_id}.");
|
|
300
302
|
case "unknown":
|
|
301
303
|
throw new errors.ParlantError({
|
|
302
304
|
message: _response.error.errorMessage,
|
|
@@ -305,21 +307,21 @@ class Utterances {
|
|
|
305
307
|
});
|
|
306
308
|
}
|
|
307
309
|
/**
|
|
308
|
-
* Updates an existing
|
|
310
|
+
* Updates an existing canned response's attributes.
|
|
309
311
|
*
|
|
310
312
|
* Only provided attributes will be updated; others remain unchanged.
|
|
311
|
-
* The
|
|
313
|
+
* The canned response's ID and creation timestamp cannot be modified.
|
|
312
314
|
* Extra metadata and tags can be added or removed independently.
|
|
313
315
|
*
|
|
314
|
-
* @param {string}
|
|
315
|
-
* @param {Parlant.
|
|
316
|
-
* @param {
|
|
316
|
+
* @param {string} cannedResponseId
|
|
317
|
+
* @param {Parlant.CannedResponseUpdateParams} request
|
|
318
|
+
* @param {CannedResponses.RequestOptions} requestOptions - Request-specific configuration.
|
|
317
319
|
*
|
|
318
320
|
* @throws {@link Parlant.NotFoundError}
|
|
319
321
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
320
322
|
*
|
|
321
323
|
* @example
|
|
322
|
-
* await client.
|
|
324
|
+
* await client.cannedResponses.update("t9a8g703f4", {
|
|
323
325
|
* value: "Your updated balance is {balance}",
|
|
324
326
|
* fields: [{
|
|
325
327
|
* name: "balance",
|
|
@@ -328,22 +330,22 @@ class Utterances {
|
|
|
328
330
|
* }]
|
|
329
331
|
* })
|
|
330
332
|
*/
|
|
331
|
-
update(
|
|
332
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
333
|
+
update(cannedResponseId_1) {
|
|
334
|
+
return __awaiter(this, arguments, void 0, function* (cannedResponseId, request = {}, requestOptions) {
|
|
333
335
|
var _a;
|
|
334
336
|
const _response = yield core.fetcher({
|
|
335
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `
|
|
337
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `canned_responses/${encodeURIComponent(cannedResponseId)}`),
|
|
336
338
|
method: "PATCH",
|
|
337
339
|
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
338
340
|
contentType: "application/json",
|
|
339
341
|
requestType: "json",
|
|
340
|
-
body: serializers.
|
|
342
|
+
body: serializers.CannedResponseUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
341
343
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
342
344
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
343
345
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
344
346
|
});
|
|
345
347
|
if (_response.ok) {
|
|
346
|
-
return serializers.
|
|
348
|
+
return serializers.CannedResponse.parseOrThrow(_response.body, {
|
|
347
349
|
unrecognizedObjectKeys: "passthrough",
|
|
348
350
|
allowUnrecognizedUnionMembers: true,
|
|
349
351
|
allowUnrecognizedEnumValues: true,
|
|
@@ -370,7 +372,7 @@ class Utterances {
|
|
|
370
372
|
body: _response.error.rawBody,
|
|
371
373
|
});
|
|
372
374
|
case "timeout":
|
|
373
|
-
throw new errors.ParlantTimeoutError("Timeout exceeded when calling PATCH /
|
|
375
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling PATCH /canned_responses/{canned_response_id}.");
|
|
374
376
|
case "unknown":
|
|
375
377
|
throw new errors.ParlantError({
|
|
376
378
|
message: _response.error.errorMessage,
|
|
@@ -379,4 +381,4 @@ class Utterances {
|
|
|
379
381
|
});
|
|
380
382
|
}
|
|
381
383
|
}
|
|
382
|
-
exports.
|
|
384
|
+
exports.CannedResponses = CannedResponses;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Parlant from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* value: "Your account balance is {balance}",
|
|
9
|
+
* fields: [{
|
|
10
|
+
* name: "balance",
|
|
11
|
+
* description: "Account's balance",
|
|
12
|
+
* examples: ["9000"]
|
|
13
|
+
* }]
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
export interface CannedResponseCreationParams {
|
|
17
|
+
/** The textual content of the canned response. */
|
|
18
|
+
value: string;
|
|
19
|
+
/** A sequence of canned response fields associated with the canned response. */
|
|
20
|
+
fields: Parlant.CannedResponseField[];
|
|
21
|
+
/** Collection of tag IDs associated with the canned response. */
|
|
22
|
+
tags?: string[];
|
|
23
|
+
/** A sequence of signals associated with the canned response, to help with filtering and matching. */
|
|
24
|
+
signals?: string[];
|
|
25
|
+
}
|
|
@@ -13,10 +13,10 @@ import * as Parlant from "../../../../index";
|
|
|
13
13
|
* }]
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
|
-
export interface
|
|
17
|
-
/** The textual content of the
|
|
16
|
+
export interface CannedResponseUpdateParams {
|
|
17
|
+
/** The textual content of the canned response. */
|
|
18
18
|
value?: string;
|
|
19
|
-
/** A sequence of
|
|
20
|
-
fields?: Parlant.
|
|
21
|
-
tags?: Parlant.
|
|
19
|
+
/** A sequence of canned response fields associated with the canned response. */
|
|
20
|
+
fields?: Parlant.CannedResponseField[];
|
|
21
|
+
tags?: Parlant.CannedResponseTagUpdateParams;
|
|
22
22
|
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../core";
|
|
5
|
+
import * as Parlant from "../../../index";
|
|
6
|
+
export declare namespace Capabilities {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
|
+
/** Specify a custom URL to connect the client to. */
|
|
10
|
+
baseUrl?: core.Supplier<string>;
|
|
11
|
+
}
|
|
12
|
+
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
|
+
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
16
|
+
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
18
|
+
abortSignal?: AbortSignal;
|
|
19
|
+
/** Additional headers to include in the request. */
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare class Capabilities {
|
|
24
|
+
protected readonly _options: Capabilities.Options;
|
|
25
|
+
constructor(_options: Capabilities.Options);
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves a list of all capabilities in the system.
|
|
28
|
+
*
|
|
29
|
+
* Returns an empty list if no capabilities exist.
|
|
30
|
+
* Capabilities are returned in no guaranteed order.
|
|
31
|
+
*
|
|
32
|
+
* @param {Parlant.CapabilitiesListRequest} request
|
|
33
|
+
* @param {Capabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
+
*
|
|
35
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.capabilities.list()
|
|
39
|
+
*/
|
|
40
|
+
list(request?: Parlant.CapabilitiesListRequest, requestOptions?: Capabilities.RequestOptions): Promise<Parlant.Capability[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a new capability in the system.
|
|
43
|
+
*
|
|
44
|
+
* The capability will be initialized with the provided title, description, signals, and optional tags.
|
|
45
|
+
* A unique identifier will be automatically generated.
|
|
46
|
+
*
|
|
47
|
+
* Default behaviors:
|
|
48
|
+
* - `signals` defaults to an empty list if not provided
|
|
49
|
+
*
|
|
50
|
+
* @param {Parlant.CapabilityCreationParams} request
|
|
51
|
+
* @param {Capabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.capabilities.create({
|
|
57
|
+
* title: "Provide Replacement Phone",
|
|
58
|
+
* description: "Provide a replacement phone when a customer needs repair for their phone.",
|
|
59
|
+
* signals: ["My phone is broken", "I need a replacement while my phone is being repaired"],
|
|
60
|
+
* tags: ["tag1", "tag2"]
|
|
61
|
+
* })
|
|
62
|
+
*/
|
|
63
|
+
create(request: Parlant.CapabilityCreationParams, requestOptions?: Capabilities.RequestOptions): Promise<Parlant.Capability>;
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves details of a specific capability by ID.
|
|
66
|
+
*
|
|
67
|
+
* Returns the complete capability object.
|
|
68
|
+
*
|
|
69
|
+
* @param {string} capabilityId - Unique identifier for the capability
|
|
70
|
+
* @param {Capabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link Parlant.NotFoundError}
|
|
73
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.capabilities.retrieve("cap_123abc")
|
|
77
|
+
*/
|
|
78
|
+
retrieve(capabilityId: string, requestOptions?: Capabilities.RequestOptions): Promise<Parlant.Capability>;
|
|
79
|
+
/**
|
|
80
|
+
* Deletes a capability from the system.
|
|
81
|
+
*
|
|
82
|
+
* Deleting a non-existent capability will return 404.
|
|
83
|
+
* No content will be returned from a successful deletion.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} capabilityId - Unique identifier for the capability
|
|
86
|
+
* @param {Capabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link Parlant.NotFoundError}
|
|
89
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* await client.capabilities.delete("cap_123abc")
|
|
93
|
+
*/
|
|
94
|
+
delete(capabilityId: string, requestOptions?: Capabilities.RequestOptions): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Updates an existing capability's attributes.
|
|
97
|
+
*
|
|
98
|
+
* Only the provided attributes will be updated; others will remain unchanged.
|
|
99
|
+
* The capability's ID and creation timestamp cannot be modified.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} capabilityId - Unique identifier for the capability
|
|
102
|
+
* @param {Parlant.CapabilityUpdateParams} request
|
|
103
|
+
* @param {Capabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link Parlant.NotFoundError}
|
|
106
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await client.capabilities.update("cap_123abc", {
|
|
110
|
+
* title: "Provide Replacement Phone",
|
|
111
|
+
* description: "Provide a replacement phone when a customer needs repair for their phone.",
|
|
112
|
+
* signals: ["My phone is broken", "I need a replacement while my phone is being repaired"]
|
|
113
|
+
* })
|
|
114
|
+
*/
|
|
115
|
+
update(capabilityId: string, request?: Parlant.CapabilityUpdateParams, requestOptions?: Capabilities.RequestOptions): Promise<Parlant.Capability>;
|
|
116
|
+
}
|