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.
Files changed (216) hide show
  1. package/package.json +1 -1
  2. package/src/Client.d.ts +6 -3
  3. package/src/Client.js +8 -3
  4. package/src/api/resources/cannedResponses/client/Client.d.ts +104 -0
  5. package/src/api/resources/{utterances → cannedResponses}/client/Client.js +44 -42
  6. package/src/api/resources/cannedResponses/client/requests/CannedResponseCreationParams.d.ts +25 -0
  7. package/src/api/resources/{utterances/client/requests/UtteranceUpdateParams.d.ts → cannedResponses/client/requests/CannedResponseUpdateParams.d.ts} +5 -5
  8. package/src/api/resources/{utterances/client/requests/UtterancesListRequest.d.ts → cannedResponses/client/requests/CannedResponsesListRequest.d.ts} +2 -2
  9. package/src/api/resources/cannedResponses/client/requests/index.d.ts +3 -0
  10. package/src/api/resources/capabilities/client/Client.d.ts +116 -0
  11. package/src/api/resources/capabilities/client/Client.js +391 -0
  12. package/src/api/resources/capabilities/client/index.d.ts +1 -0
  13. package/src/api/resources/capabilities/client/index.js +17 -0
  14. package/src/api/resources/capabilities/client/requests/CapabilitiesListRequest.d.ts +13 -0
  15. package/src/api/resources/capabilities/client/requests/CapabilityCreationParams.d.ts +22 -0
  16. package/src/api/resources/capabilities/client/requests/CapabilityUpdateParams.d.ts +21 -0
  17. package/src/api/resources/capabilities/client/requests/index.d.ts +3 -0
  18. package/src/api/resources/capabilities/client/requests/index.js +2 -0
  19. package/src/api/resources/customers/client/Client.d.ts +2 -9
  20. package/src/api/resources/customers/client/Client.js +2 -9
  21. package/src/api/resources/customers/client/requests/CustomerCreationParams.d.ts +3 -3
  22. package/src/api/resources/customers/client/requests/CustomerUpdateParams.d.ts +2 -9
  23. package/src/api/resources/evaluations/client/Client.d.ts +1 -2
  24. package/src/api/resources/evaluations/client/Client.js +1 -2
  25. package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +1 -2
  26. package/src/api/resources/guidelines/client/Client.d.ts +1 -8
  27. package/src/api/resources/guidelines/client/Client.js +1 -8
  28. package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +1 -8
  29. package/src/api/resources/index.d.ts +4 -2
  30. package/src/api/resources/index.js +5 -3
  31. package/src/api/resources/journeys/client/Client.d.ts +14 -0
  32. package/src/api/resources/journeys/client/Client.js +58 -0
  33. package/src/api/resources/services/client/requests/ServiceUpdateParams.d.ts +2 -0
  34. package/src/api/resources/sessions/client/Client.d.ts +0 -17
  35. package/src/api/resources/sessions/client/Client.js +0 -65
  36. package/src/api/resources/sessions/client/requests/EventCreationParams.d.ts +3 -1
  37. package/src/api/resources/sessions/client/requests/SessionUpdateParams.d.ts +2 -0
  38. package/src/api/types/{UtteranceRequest.d.ts → AgentMessageGuideline.d.ts} +2 -2
  39. package/src/api/types/AgentMessageGuidelineRationaleDto.d.ts +12 -0
  40. package/src/api/types/{UtteranceReasonDto.js → AgentMessageGuidelineRationaleDto.js} +3 -2
  41. package/src/api/types/CannedResponse.d.ts +18 -0
  42. package/src/api/types/CannedResponseField.d.ts +10 -0
  43. package/src/api/types/CannedResponseTagUpdateParams.d.ts +15 -0
  44. package/src/api/types/Capability.d.ts +18 -0
  45. package/src/api/types/CapabilityTagUpdateParams.d.ts +12 -0
  46. package/src/api/types/CompositionModeDto.d.ts +7 -7
  47. package/src/api/types/CompositionModeDto.js +3 -3
  48. package/src/api/types/Customer.d.ts +3 -3
  49. package/src/api/types/{CustomerExtraUpdateParams.d.ts → CustomerMetadataUpdateParams.d.ts} +4 -4
  50. package/src/api/types/GuidelineInvoiceData.d.ts +1 -1
  51. package/src/api/types/GuidelineMetadataUpdateParams.d.ts +2 -2
  52. package/src/api/types/GuidelinePayload.d.ts +4 -2
  53. package/src/api/types/InvoiceData.d.ts +1 -1
  54. package/src/api/types/LegacyInvoiceData.d.ts +1 -1
  55. package/src/api/types/McpServiceParams.d.ts +13 -0
  56. package/src/api/types/Participant.d.ts +11 -0
  57. package/src/api/types/RelationshipKindDto.d.ts +3 -1
  58. package/src/api/types/RelationshipKindDto.js +2 -0
  59. package/src/api/types/Session.d.ts +2 -0
  60. package/src/api/types/SessionModeDto.d.ts +11 -0
  61. package/src/api/types/SessionModeDto.js +10 -0
  62. package/src/api/types/ToolServiceKindDto.d.ts +4 -1
  63. package/src/api/types/ToolServiceKindDto.js +1 -0
  64. package/src/api/types/index.d.ts +11 -19
  65. package/src/api/types/index.js +11 -19
  66. package/src/serialization/resources/cannedResponses/client/list.d.ts +11 -0
  67. package/src/serialization/resources/cannedResponses/client/list.js +42 -0
  68. package/src/serialization/resources/cannedResponses/client/requests/CannedResponseCreationParams.d.ts +16 -0
  69. package/src/serialization/resources/cannedResponses/client/requests/CannedResponseCreationParams.js +47 -0
  70. package/src/serialization/resources/cannedResponses/client/requests/CannedResponseUpdateParams.d.ts +16 -0
  71. package/src/serialization/resources/{utterances/client/requests/UtteranceUpdateParams.js → cannedResponses/client/requests/CannedResponseUpdateParams.js} +6 -6
  72. package/src/serialization/resources/cannedResponses/client/requests/index.d.ts +2 -0
  73. package/src/serialization/resources/cannedResponses/client/requests/index.js +7 -0
  74. package/src/serialization/resources/cannedResponses/index.d.ts +1 -0
  75. package/src/serialization/resources/cannedResponses/index.js +17 -0
  76. package/src/serialization/resources/capabilities/client/index.d.ts +2 -0
  77. package/src/serialization/resources/capabilities/client/index.js +41 -0
  78. package/src/serialization/resources/{utterances → capabilities}/client/list.d.ts +3 -3
  79. package/src/serialization/resources/{utterances → capabilities}/client/list.js +2 -2
  80. package/src/serialization/resources/capabilities/client/requests/CapabilityCreationParams.d.ts +15 -0
  81. package/src/serialization/resources/{utterances/client/requests/UtteranceCreationParams.js → capabilities/client/requests/CapabilityCreationParams.js} +5 -5
  82. package/src/serialization/resources/capabilities/client/requests/CapabilityUpdateParams.d.ts +16 -0
  83. package/src/serialization/resources/capabilities/client/requests/CapabilityUpdateParams.js +47 -0
  84. package/src/serialization/resources/capabilities/client/requests/index.d.ts +2 -0
  85. package/src/serialization/resources/capabilities/client/requests/index.js +7 -0
  86. package/src/serialization/resources/capabilities/index.d.ts +1 -0
  87. package/src/serialization/resources/capabilities/index.js +17 -0
  88. package/src/serialization/resources/customers/client/requests/CustomerCreationParams.d.ts +1 -1
  89. package/src/serialization/resources/customers/client/requests/CustomerCreationParams.js +1 -1
  90. package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.d.ts +2 -2
  91. package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.js +2 -2
  92. package/src/serialization/resources/index.d.ts +4 -2
  93. package/src/serialization/resources/index.js +5 -3
  94. package/src/serialization/resources/services/client/requests/ServiceUpdateParams.d.ts +2 -0
  95. package/src/serialization/resources/services/client/requests/ServiceUpdateParams.js +2 -0
  96. package/src/serialization/resources/sessions/client/requests/EventCreationParams.d.ts +5 -2
  97. package/src/serialization/resources/sessions/client/requests/EventCreationParams.js +5 -2
  98. package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.d.ts +2 -0
  99. package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.js +2 -0
  100. package/src/serialization/types/AgentMessageGuideline.d.ts +14 -0
  101. package/src/serialization/types/{GuidelineMatch.js → AgentMessageGuideline.js} +4 -6
  102. package/src/serialization/types/AgentMessageGuidelineRationaleDto.d.ts +10 -0
  103. package/src/serialization/types/AgentMessageGuidelineRationaleDto.js +41 -0
  104. package/src/serialization/types/{Utterance.d.ts → CannedResponse.d.ts} +5 -4
  105. package/src/serialization/types/{Utterance.js → CannedResponse.js} +5 -4
  106. package/src/serialization/types/{UtteranceField.d.ts → CannedResponseField.d.ts} +2 -2
  107. package/src/serialization/types/{UtteranceField.js → CannedResponseField.js} +2 -2
  108. package/src/serialization/types/CannedResponseTagUpdateParams.d.ts +13 -0
  109. package/src/serialization/types/{CustomerExtraUpdateParams.js → CannedResponseTagUpdateParams.js} +3 -3
  110. package/src/serialization/types/{PreparationIterationTerm.d.ts → Capability.d.ts} +5 -4
  111. package/src/serialization/types/{PreparationIterationTerm.js → Capability.js} +5 -4
  112. package/src/serialization/types/{UtteranceTagUpdateParams.d.ts → CapabilityTagUpdateParams.d.ts} +2 -2
  113. package/src/serialization/types/{UtteranceTagUpdateParams.js → CapabilityTagUpdateParams.js} +2 -2
  114. package/src/serialization/types/CompositionModeDto.d.ts +1 -1
  115. package/src/serialization/types/CompositionModeDto.js +1 -1
  116. package/src/serialization/types/Customer.d.ts +1 -1
  117. package/src/serialization/types/Customer.js +1 -1
  118. package/src/serialization/types/CustomerMetadataUpdateParams.d.ts +13 -0
  119. package/src/serialization/types/{ContextVariableAndValue.js → CustomerMetadataUpdateParams.js} +4 -7
  120. package/src/serialization/types/GuidelineInvoiceData.d.ts +1 -1
  121. package/src/serialization/types/GuidelineInvoiceData.js +1 -1
  122. package/src/serialization/types/GuidelineMetadataUpdateParams.d.ts +2 -2
  123. package/src/serialization/types/GuidelineMetadataUpdateParams.js +2 -2
  124. package/src/serialization/types/GuidelinePayload.d.ts +3 -2
  125. package/src/serialization/types/GuidelinePayload.js +3 -2
  126. package/src/serialization/types/{ToolResult.d.ts → McpServiceParams.d.ts} +3 -4
  127. package/src/serialization/types/{ToolResult.js → McpServiceParams.js} +3 -4
  128. package/src/serialization/types/Participant.d.ts +13 -0
  129. package/src/serialization/types/{UtteranceRequest.js → Participant.js} +4 -5
  130. package/src/serialization/types/RelationshipKindDto.d.ts +1 -1
  131. package/src/serialization/types/RelationshipKindDto.js +1 -1
  132. package/src/serialization/types/Session.d.ts +2 -0
  133. package/src/serialization/types/Session.js +2 -0
  134. package/src/serialization/types/SessionModeDto.d.ts +10 -0
  135. package/src/serialization/types/{UtteranceReasonDto.js → SessionModeDto.js} +2 -2
  136. package/src/serialization/types/ToolServiceKindDto.d.ts +1 -1
  137. package/src/serialization/types/ToolServiceKindDto.js +1 -1
  138. package/src/serialization/types/index.d.ts +11 -19
  139. package/src/serialization/types/index.js +11 -19
  140. package/src/api/resources/utterances/client/Client.d.ts +0 -102
  141. package/src/api/resources/utterances/client/requests/UtteranceCreationParams.d.ts +0 -23
  142. package/src/api/resources/utterances/client/requests/index.d.ts +0 -3
  143. package/src/api/types/ContextVariableAndValue.d.ts +0 -17
  144. package/src/api/types/EventInspectionResult.d.ts +0 -13
  145. package/src/api/types/EventTrace.d.ts +0 -15
  146. package/src/api/types/GenerationInfo.d.ts +0 -16
  147. package/src/api/types/GuidelineMatch.d.ts +0 -18
  148. package/src/api/types/GuidelineMatchingInspection.d.ts +0 -13
  149. package/src/api/types/MessageGenerationInspection.d.ts +0 -11
  150. package/src/api/types/PreparationIteration.d.ts +0 -18
  151. package/src/api/types/PreparationIterationGenerations.d.ts +0 -12
  152. package/src/api/types/PreparationIterationTerm.d.ts +0 -16
  153. package/src/api/types/ToolCall.d.ts +0 -14
  154. package/src/api/types/ToolResult.d.ts +0 -11
  155. package/src/api/types/ToolResult.js +0 -5
  156. package/src/api/types/UsageInfo.d.ts +0 -14
  157. package/src/api/types/UsageInfo.js +0 -5
  158. package/src/api/types/Utterance.d.ts +0 -16
  159. package/src/api/types/Utterance.js +0 -5
  160. package/src/api/types/UtteranceField.d.ts +0 -10
  161. package/src/api/types/UtteranceField.js +0 -5
  162. package/src/api/types/UtteranceReasonDto.d.ts +0 -11
  163. package/src/api/types/UtteranceRequest.js +0 -5
  164. package/src/api/types/UtteranceTagUpdateParams.d.ts +0 -15
  165. package/src/api/types/UtteranceTagUpdateParams.js +0 -5
  166. package/src/serialization/resources/utterances/client/requests/UtteranceCreationParams.d.ts +0 -15
  167. package/src/serialization/resources/utterances/client/requests/UtteranceUpdateParams.d.ts +0 -16
  168. package/src/serialization/resources/utterances/client/requests/index.d.ts +0 -2
  169. package/src/serialization/resources/utterances/client/requests/index.js +0 -7
  170. package/src/serialization/types/ContextVariableAndValue.d.ts +0 -16
  171. package/src/serialization/types/CustomerExtraUpdateParams.d.ts +0 -13
  172. package/src/serialization/types/EventInspectionResult.d.ts +0 -16
  173. package/src/serialization/types/EventInspectionResult.js +0 -47
  174. package/src/serialization/types/EventTrace.d.ts +0 -17
  175. package/src/serialization/types/EventTrace.js +0 -48
  176. package/src/serialization/types/GenerationInfo.d.ts +0 -16
  177. package/src/serialization/types/GenerationInfo.js +0 -47
  178. package/src/serialization/types/GuidelineMatch.d.ts +0 -16
  179. package/src/serialization/types/GuidelineMatchingInspection.d.ts +0 -14
  180. package/src/serialization/types/GuidelineMatchingInspection.js +0 -45
  181. package/src/serialization/types/MessageGenerationInspection.d.ts +0 -14
  182. package/src/serialization/types/MessageGenerationInspection.js +0 -45
  183. package/src/serialization/types/PreparationIteration.d.ts +0 -21
  184. package/src/serialization/types/PreparationIteration.js +0 -52
  185. package/src/serialization/types/PreparationIterationGenerations.d.ts +0 -15
  186. package/src/serialization/types/PreparationIterationGenerations.js +0 -46
  187. package/src/serialization/types/ToolCall.d.ts +0 -15
  188. package/src/serialization/types/ToolCall.js +0 -46
  189. package/src/serialization/types/UsageInfo.d.ts +0 -14
  190. package/src/serialization/types/UsageInfo.js +0 -47
  191. package/src/serialization/types/UtteranceReasonDto.d.ts +0 -10
  192. package/src/serialization/types/UtteranceRequest.d.ts +0 -14
  193. /package/src/api/resources/{utterances → cannedResponses}/client/index.d.ts +0 -0
  194. /package/src/api/resources/{utterances → cannedResponses}/client/index.js +0 -0
  195. /package/src/api/resources/{utterances/client/requests/UtteranceCreationParams.js → cannedResponses/client/requests/CannedResponseCreationParams.js} +0 -0
  196. /package/src/api/resources/{utterances/client/requests/UtteranceUpdateParams.js → cannedResponses/client/requests/CannedResponseUpdateParams.js} +0 -0
  197. /package/src/api/resources/{utterances/client/requests/UtterancesListRequest.js → cannedResponses/client/requests/CannedResponsesListRequest.js} +0 -0
  198. /package/src/api/resources/{utterances → cannedResponses}/client/requests/index.js +0 -0
  199. /package/src/api/resources/{utterances → cannedResponses}/index.d.ts +0 -0
  200. /package/src/api/resources/{utterances → cannedResponses}/index.js +0 -0
  201. /package/src/api/{types/ContextVariableAndValue.js → resources/capabilities/client/requests/CapabilitiesListRequest.js} +0 -0
  202. /package/src/api/{types/CustomerExtraUpdateParams.js → resources/capabilities/client/requests/CapabilityCreationParams.js} +0 -0
  203. /package/src/api/{types/EventInspectionResult.js → resources/capabilities/client/requests/CapabilityUpdateParams.js} +0 -0
  204. /package/src/{serialization/resources/utterances → api/resources/capabilities}/index.d.ts +0 -0
  205. /package/src/{serialization/resources/utterances → api/resources/capabilities}/index.js +0 -0
  206. /package/src/api/types/{EventTrace.js → AgentMessageGuideline.js} +0 -0
  207. /package/src/api/types/{GenerationInfo.js → CannedResponse.js} +0 -0
  208. /package/src/api/types/{GuidelineMatch.js → CannedResponseField.js} +0 -0
  209. /package/src/api/types/{GuidelineMatchingInspection.js → CannedResponseTagUpdateParams.js} +0 -0
  210. /package/src/api/types/{MessageGenerationInspection.js → Capability.js} +0 -0
  211. /package/src/api/types/{PreparationIteration.js → CapabilityTagUpdateParams.js} +0 -0
  212. /package/src/api/types/{PreparationIterationGenerations.js → CustomerMetadataUpdateParams.js} +0 -0
  213. /package/src/api/types/{PreparationIterationTerm.js → McpServiceParams.js} +0 -0
  214. /package/src/api/types/{ToolCall.js → Participant.js} +0 -0
  215. /package/src/serialization/resources/{utterances → cannedResponses}/client/index.d.ts +0 -0
  216. /package/src/serialization/resources/{utterances → cannedResponses}/client/index.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parlant-client",
3
- "version": "1.2.0",
3
+ "version": "3.0.0",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "files": [
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 { Utterances } from "./api/resources/utterances/client/Client";
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 _utterances: Utterances | undefined;
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 utterances(): Utterances;
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/utterances/client/Client");
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 utterances() {
48
+ get cannedResponses() {
48
49
  var _a;
49
- return ((_a = this._utterances) !== null && _a !== void 0 ? _a : (this._utterances = new Client_7.Utterances(this._options)));
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.Utterances = void 0;
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 Utterances {
57
+ class CannedResponses {
58
58
  constructor(_options) {
59
59
  this._options = _options;
60
60
  }
61
61
  /**
62
- * @param {Parlant.UtterancesListRequest} request
63
- * @param {Utterances.RequestOptions} requestOptions - Request-specific configuration.
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.utterances.list()
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)), "utterances"),
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.utterances.list.Response.parseOrThrow(_response.body, {
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 /utterances.");
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.UtteranceCreationParams} request
130
- * @param {Utterances.RequestOptions} requestOptions - Request-specific configuration.
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.utterances.create({
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)), "utterances"),
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.UtteranceCreationParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
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.Utterance.parseOrThrow(_response.body, {
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 /utterances.");
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 utterance by ID.
195
+ * Retrieves details of a specific canned response by ID.
194
196
  *
195
- * @param {string} utteranceId
196
- * @param {Utterances.RequestOptions} requestOptions - Request-specific configuration.
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.utterances.retrieve("t9a8g703f4")
204
+ * await client.cannedResponses.retrieve("t9a8g703f4")
203
205
  */
204
- retrieve(utteranceId, requestOptions) {
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)), `utterances/${encodeURIComponent(utteranceId)}`),
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.Utterance.parseOrThrow(_response.body, {
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 /utterances/{utterance_id}.");
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} utteranceId
255
- * @param {Utterances.RequestOptions} requestOptions - Request-specific configuration.
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.utterances.delete("t9a8g703f4")
263
+ * await client.cannedResponses.delete("t9a8g703f4")
262
264
  */
263
- delete(utteranceId, requestOptions) {
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)), `utterances/${encodeURIComponent(utteranceId)}`),
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 /utterances/{utterance_id}.");
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 utterance's attributes.
310
+ * Updates an existing canned response's attributes.
309
311
  *
310
312
  * Only provided attributes will be updated; others remain unchanged.
311
- * The utterance's ID and creation timestamp cannot be modified.
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} utteranceId
315
- * @param {Parlant.UtteranceUpdateParams} request
316
- * @param {Utterances.RequestOptions} requestOptions - Request-specific configuration.
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.utterances.update("t9a8g703f4", {
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(utteranceId_1) {
332
- return __awaiter(this, arguments, void 0, function* (utteranceId, request = {}, requestOptions) {
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)), `utterances/${encodeURIComponent(utteranceId)}`),
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.UtteranceUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
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.Utterance.parseOrThrow(_response.body, {
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 /utterances/{utterance_id}.");
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.Utterances = Utterances;
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 UtteranceUpdateParams {
17
- /** The textual content of the utterance. */
16
+ export interface CannedResponseUpdateParams {
17
+ /** The textual content of the canned response. */
18
18
  value?: string;
19
- /** A sequence of utterance fields associated with the utterance. */
20
- fields?: Parlant.UtteranceField[];
21
- tags?: Parlant.UtteranceTagUpdateParams;
19
+ /** A sequence of canned response fields associated with the canned response. */
20
+ fields?: Parlant.CannedResponseField[];
21
+ tags?: Parlant.CannedResponseTagUpdateParams;
22
22
  }
@@ -5,9 +5,9 @@
5
5
  * @example
6
6
  * {}
7
7
  */
8
- export interface UtterancesListRequest {
8
+ export interface CannedResponsesListRequest {
9
9
  /**
10
- * Filter utterances by tags
10
+ * Filter canned responses by tags
11
11
  */
12
12
  tags?: string | string[];
13
13
  }
@@ -0,0 +1,3 @@
1
+ export { type CannedResponsesListRequest } from "./CannedResponsesListRequest";
2
+ export { type CannedResponseCreationParams } from "./CannedResponseCreationParams";
3
+ export { type CannedResponseUpdateParams } from "./CannedResponseUpdateParams";
@@ -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
+ }