parlant-client 0.5.0 → 0.8.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 (138) hide show
  1. package/LICENSE +202 -0
  2. package/package.json +3 -3
  3. package/src/Client.d.ts +0 -7
  4. package/src/Client.js +0 -80
  5. package/src/api/errors/GatewayTimeoutError.d.ts +7 -0
  6. package/src/{serialization/types/FreshnessRules.js → api/errors/GatewayTimeoutError.js} +13 -11
  7. package/src/api/errors/NotFoundError.d.ts +7 -0
  8. package/src/{serialization/types/DayOfWeekDto.js → api/errors/NotFoundError.js} +13 -3
  9. package/src/api/errors/ServiceUnavailableError.d.ts +7 -0
  10. package/src/api/errors/ServiceUnavailableError.js +41 -0
  11. package/src/api/errors/UnprocessableEntityError.d.ts +1 -2
  12. package/src/api/errors/index.d.ts +3 -0
  13. package/src/api/errors/index.js +3 -0
  14. package/src/api/resources/agents/client/Client.d.ts +42 -5
  15. package/src/api/resources/agents/client/Client.js +52 -29
  16. package/src/api/resources/agents/client/requests/AgentCreationParams.d.ts +6 -1
  17. package/src/api/resources/agents/client/requests/AgentUpdateParams.d.ts +8 -1
  18. package/src/api/resources/contextVariables/client/Client.d.ts +80 -22
  19. package/src/api/resources/contextVariables/client/Client.js +107 -76
  20. package/src/api/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +11 -2
  21. package/src/api/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +8 -2
  22. package/src/api/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.d.ts +4 -1
  23. package/src/api/resources/contextVariables/client/requests/ContextVariablesRetrieveRequest.d.ts +3 -0
  24. package/src/api/resources/customers/client/Client.d.ts +51 -5
  25. package/src/api/resources/customers/client/Client.js +61 -29
  26. package/src/api/resources/customers/client/requests/CustomerCreationParams.d.ts +7 -1
  27. package/src/api/resources/customers/client/requests/CustomerUpdateParams.d.ts +16 -2
  28. package/src/api/resources/evaluations/client/Client.d.ts +34 -3
  29. package/src/api/resources/evaluations/client/Client.js +40 -15
  30. package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +12 -2
  31. package/src/api/resources/evaluations/client/requests/EvaluationsRetrieveRequest.d.ts +3 -0
  32. package/src/api/resources/glossary/client/Client.d.ts +42 -11
  33. package/src/api/resources/glossary/client/Client.js +55 -41
  34. package/src/api/resources/glossary/client/requests/TermCreationParams.d.ts +6 -2
  35. package/src/api/resources/glossary/client/requests/TermUpdateParams.d.ts +8 -1
  36. package/src/api/resources/guidelines/client/Client.d.ts +114 -12
  37. package/src/api/resources/guidelines/client/Client.js +129 -42
  38. package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +41 -3
  39. package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +20 -1
  40. package/src/api/resources/services/client/Client.d.ts +59 -4
  41. package/src/api/resources/services/client/Client.js +70 -22
  42. package/src/api/resources/services/client/requests/ServiceUpdateParams.d.ts +7 -1
  43. package/src/api/resources/sessions/client/Client.d.ts +77 -11
  44. package/src/api/resources/sessions/client/Client.js +103 -71
  45. package/src/api/resources/sessions/client/requests/EventCreationParams.d.ts +6 -1
  46. package/src/api/resources/sessions/client/requests/SessionCreationParams.d.ts +9 -1
  47. package/src/api/resources/sessions/client/requests/SessionUpdateParams.d.ts +7 -1
  48. package/src/api/resources/sessions/client/requests/SessionsDeleteEventsRequest.d.ts +3 -0
  49. package/src/api/resources/sessions/client/requests/SessionsListEventsRequest.d.ts +0 -3
  50. package/src/api/resources/tags/client/Client.d.ts +31 -4
  51. package/src/api/resources/tags/client/Client.js +41 -28
  52. package/src/api/resources/tags/client/requests/TagCreationParams.d.ts +2 -1
  53. package/src/api/resources/tags/client/requests/TagUpdateParams.d.ts +2 -1
  54. package/src/api/types/Agent.d.ts +13 -0
  55. package/src/api/types/CoherenceCheck.d.ts +5 -0
  56. package/src/api/types/CoherenceCheckKindDto.d.ts +3 -0
  57. package/src/api/types/ConnectionKindDto.d.ts +16 -0
  58. package/src/api/types/ConnectionProposition.d.ts +3 -0
  59. package/src/api/types/ConnectionPropositionKindDto.d.ts +3 -0
  60. package/src/api/types/ConsumptionOffsets.d.ts +5 -1
  61. package/src/api/types/ConsumptionOffsetsUpdateParams.d.ts +4 -0
  62. package/src/api/types/ContextVariable.d.ts +12 -1
  63. package/src/api/types/ContextVariableAndValue.d.ts +7 -0
  64. package/src/api/types/ContextVariableReadResult.d.ts +4 -0
  65. package/src/api/types/ContextVariableValue.d.ts +9 -0
  66. package/src/api/types/Customer.d.ts +11 -0
  67. package/src/api/types/CustomerExtraUpdateParams.d.ts +5 -0
  68. package/src/api/types/CustomerTagUpdateParams.d.ts +15 -0
  69. package/src/api/types/Evaluation.d.ts +7 -0
  70. package/src/api/types/EvaluationStatusDto.d.ts +3 -0
  71. package/src/api/types/Event.d.ts +8 -1
  72. package/src/api/types/EventInspectionResult.d.ts +4 -0
  73. package/src/api/types/EventKindDto.d.ts +5 -0
  74. package/src/api/types/EventSourceDto.d.ts +5 -0
  75. package/src/api/types/EventTrace.d.ts +6 -0
  76. package/src/api/types/GenerationInfo.d.ts +6 -0
  77. package/src/api/types/Guideline.d.ts +6 -0
  78. package/src/api/types/GuidelineConnection.d.ts +7 -0
  79. package/src/api/types/GuidelineConnectionAddition.d.ts +5 -0
  80. package/src/api/types/GuidelineConnectionUpdateParams.d.ts +6 -0
  81. package/src/api/types/GuidelineContent.d.ts +8 -0
  82. package/src/api/types/GuidelineCreationResult.d.ts +3 -0
  83. package/src/api/types/GuidelineInvoiceData.d.ts +3 -0
  84. package/src/api/types/GuidelinePayload.d.ts +6 -0
  85. package/src/api/types/GuidelinePayloadOperationDto.d.ts +3 -0
  86. package/src/api/types/GuidelineProposition.d.ts +8 -0
  87. package/src/api/types/GuidelinePropositionInspection.d.ts +5 -0
  88. package/src/api/types/GuidelineToolAssociation.d.ts +6 -0
  89. package/src/api/types/GuidelineToolAssociationUpdateParams.d.ts +3 -0
  90. package/src/api/types/GuidelineWithConnectionsAndToolAssociations.d.ts +3 -0
  91. package/src/api/types/Invoice.d.ts +8 -0
  92. package/src/api/types/InvoiceData.d.ts +5 -0
  93. package/src/api/types/MessageGenerationInspection.d.ts +4 -0
  94. package/src/api/types/Moderation.d.ts +3 -0
  95. package/src/api/types/OpenApiServiceParams.d.ts +12 -0
  96. package/src/api/types/Payload.d.ts +5 -0
  97. package/src/api/types/PayloadKindDto.d.ts +5 -0
  98. package/src/api/types/PreparationIteration.d.ts +7 -0
  99. package/src/api/types/PreparationIterationGenerations.d.ts +4 -0
  100. package/src/api/types/SdkServiceParams.d.ts +7 -0
  101. package/src/api/types/Service.d.ts +10 -0
  102. package/src/api/types/Session.d.ts +8 -0
  103. package/src/api/types/Tag.d.ts +9 -0
  104. package/src/api/types/Term.d.ts +9 -0
  105. package/src/api/types/Tool.d.ts +12 -0
  106. package/src/api/types/ToolCall.d.ts +5 -0
  107. package/src/api/types/ToolId.d.ts +5 -0
  108. package/src/api/types/ToolParameter.d.ts +8 -0
  109. package/src/api/types/ToolParameterTypeDto.d.ts +5 -0
  110. package/src/api/types/ToolResult.d.ts +4 -0
  111. package/src/api/types/ToolServiceKindDto.d.ts +9 -0
  112. package/src/api/types/UsageInfo.d.ts +6 -0
  113. package/src/api/types/index.d.ts +1 -3
  114. package/src/api/types/index.js +1 -3
  115. package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +1 -2
  116. package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.js +1 -2
  117. package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +1 -2
  118. package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.js +1 -2
  119. package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.d.ts +2 -2
  120. package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.js +2 -2
  121. package/src/serialization/types/ConsumptionOffsets.d.ts +1 -1
  122. package/src/serialization/types/ConsumptionOffsets.js +1 -1
  123. package/src/serialization/types/ContextVariable.d.ts +1 -2
  124. package/src/serialization/types/ContextVariable.js +1 -2
  125. package/src/serialization/types/{TagsUpdateParams.d.ts → CustomerTagUpdateParams.d.ts} +2 -2
  126. package/src/serialization/types/{TagsUpdateParams.js → CustomerTagUpdateParams.js} +2 -2
  127. package/src/serialization/types/Event.d.ts +2 -1
  128. package/src/serialization/types/Event.js +2 -1
  129. package/src/serialization/types/index.d.ts +1 -3
  130. package/src/serialization/types/index.js +1 -3
  131. package/src/api/types/DayOfWeekDto.d.ts +0 -13
  132. package/src/api/types/DayOfWeekDto.js +0 -15
  133. package/src/api/types/FreshnessRules.d.ts +0 -12
  134. package/src/api/types/TagsUpdateParams.d.ts +0 -7
  135. package/src/api/types/TagsUpdateParams.js +0 -5
  136. package/src/serialization/types/DayOfWeekDto.d.ts +0 -10
  137. package/src/serialization/types/FreshnessRules.d.ts +0 -18
  138. /package/src/api/types/{FreshnessRules.js → CustomerTagUpdateParams.js} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2024 Emcie Co Ltd.
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parlant-client",
3
- "version": "0.5.0",
3
+ "version": "0.8.0",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "files": [
@@ -11,8 +11,8 @@
11
11
  "test": "jest --detectOpenHandles"
12
12
  },
13
13
  "keywords": [],
14
- "author": "yam@emcie.co",
15
- "license": "MIT",
14
+ "author": "Yam Marcovitz <yam@emcie.co>",
15
+ "license": "Apache-2.0",
16
16
  "description": "",
17
17
  "devDependencies": {
18
18
  "@types/jest": "^29.5.14",
package/src/Client.d.ts CHANGED
@@ -27,13 +27,6 @@ export declare namespace ParlantClient {
27
27
  export declare class ParlantClient {
28
28
  protected readonly _options: ParlantClient.Options;
29
29
  constructor(_options: ParlantClient.Options);
30
- /**
31
- * @param {ParlantClient.RequestOptions} requestOptions - Request-specific configuration.
32
- *
33
- * @example
34
- * await client.rootGet()
35
- */
36
- rootGet(requestOptions?: ParlantClient.RequestOptions): Promise<unknown>;
37
30
  protected _agents: Agents | undefined;
38
31
  get agents(): Agents;
39
32
  protected _guidelines: Guidelines | undefined;
package/src/Client.js CHANGED
@@ -2,42 +2,8 @@
2
2
  /**
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
28
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
- return new (P || (P = Promise))(function (resolve, reject) {
31
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
- step((generator = generator.apply(thisArg, _arguments || [])).next());
35
- });
36
- };
37
5
  Object.defineProperty(exports, "__esModule", { value: true });
38
6
  exports.ParlantClient = void 0;
39
- const core = __importStar(require("./core"));
40
- const errors = __importStar(require("./errors/index"));
41
7
  const Client_1 = require("./api/resources/agents/client/Client");
42
8
  const Client_2 = require("./api/resources/guidelines/client/Client");
43
9
  const Client_3 = require("./api/resources/glossary/client/Client");
@@ -51,52 +17,6 @@ class ParlantClient {
51
17
  constructor(_options) {
52
18
  this._options = _options;
53
19
  }
54
- /**
55
- * @param {ParlantClient.RequestOptions} requestOptions - Request-specific configuration.
56
- *
57
- * @example
58
- * await client.rootGet()
59
- */
60
- rootGet(requestOptions) {
61
- return __awaiter(this, void 0, void 0, function* () {
62
- const _response = yield core.fetcher({
63
- url: yield core.Supplier.get(this._options.environment),
64
- method: "GET",
65
- headers: {
66
- "X-Fern-Language": "JavaScript",
67
- "X-Fern-Runtime": core.RUNTIME.type,
68
- "X-Fern-Runtime-Version": core.RUNTIME.version,
69
- },
70
- contentType: "application/json",
71
- requestType: "json",
72
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
73
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
74
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
75
- });
76
- if (_response.ok) {
77
- return _response.body;
78
- }
79
- if (_response.error.reason === "status-code") {
80
- throw new errors.ParlantError({
81
- statusCode: _response.error.statusCode,
82
- body: _response.error.body,
83
- });
84
- }
85
- switch (_response.error.reason) {
86
- case "non-json":
87
- throw new errors.ParlantError({
88
- statusCode: _response.error.statusCode,
89
- body: _response.error.rawBody,
90
- });
91
- case "timeout":
92
- throw new errors.ParlantTimeoutError();
93
- case "unknown":
94
- throw new errors.ParlantError({
95
- message: _response.error.errorMessage,
96
- });
97
- }
98
- });
99
- }
100
20
  get agents() {
101
21
  var _a;
102
22
  return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_1.Agents(this._options)));
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index";
5
+ export declare class GatewayTimeoutError extends errors.ParlantError {
6
+ constructor(body?: unknown);
7
+ }
@@ -26,14 +26,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.FreshnessRules = void 0;
30
- const core = __importStar(require("../../core"));
31
- const DayOfWeekDto_1 = require("./DayOfWeekDto");
32
- exports.FreshnessRules = core.serialization.object({
33
- months: core.serialization.list(core.serialization.number()).optional(),
34
- daysOfMonth: core.serialization.property("days_of_month", core.serialization.list(core.serialization.number()).optional()),
35
- daysOfWeek: core.serialization.property("days_of_week", core.serialization.list(DayOfWeekDto_1.DayOfWeekDto).optional()),
36
- hours: core.serialization.list(core.serialization.number()).optional(),
37
- minutes: core.serialization.list(core.serialization.number()).optional(),
38
- seconds: core.serialization.list(core.serialization.number()).optional(),
39
- });
29
+ exports.GatewayTimeoutError = void 0;
30
+ const errors = __importStar(require("../../errors/index"));
31
+ class GatewayTimeoutError extends errors.ParlantError {
32
+ constructor(body) {
33
+ super({
34
+ message: "GatewayTimeoutError",
35
+ statusCode: 504,
36
+ body: body,
37
+ });
38
+ Object.setPrototypeOf(this, GatewayTimeoutError.prototype);
39
+ }
40
+ }
41
+ exports.GatewayTimeoutError = GatewayTimeoutError;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index";
5
+ export declare class NotFoundError extends errors.ParlantError {
6
+ constructor(body?: unknown);
7
+ }
@@ -26,6 +26,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.DayOfWeekDto = void 0;
30
- const core = __importStar(require("../../core"));
31
- exports.DayOfWeekDto = core.serialization.enum_(["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]);
29
+ exports.NotFoundError = void 0;
30
+ const errors = __importStar(require("../../errors/index"));
31
+ class NotFoundError extends errors.ParlantError {
32
+ constructor(body) {
33
+ super({
34
+ message: "NotFoundError",
35
+ statusCode: 404,
36
+ body: body,
37
+ });
38
+ Object.setPrototypeOf(this, NotFoundError.prototype);
39
+ }
40
+ }
41
+ exports.NotFoundError = NotFoundError;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index";
5
+ export declare class ServiceUnavailableError extends errors.ParlantError {
6
+ constructor(body?: unknown);
7
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ServiceUnavailableError = void 0;
30
+ const errors = __importStar(require("../../errors/index"));
31
+ class ServiceUnavailableError extends errors.ParlantError {
32
+ constructor(body) {
33
+ super({
34
+ message: "ServiceUnavailableError",
35
+ statusCode: 503,
36
+ body: body,
37
+ });
38
+ Object.setPrototypeOf(this, ServiceUnavailableError.prototype);
39
+ }
40
+ }
41
+ exports.ServiceUnavailableError = ServiceUnavailableError;
@@ -2,7 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as errors from "../../errors/index";
5
- import * as Parlant from "../index";
6
5
  export declare class UnprocessableEntityError extends errors.ParlantError {
7
- constructor(body: Parlant.HttpValidationError);
6
+ constructor(body?: unknown);
8
7
  }
@@ -1 +1,4 @@
1
1
  export * from "./UnprocessableEntityError";
2
+ export * from "./NotFoundError";
3
+ export * from "./GatewayTimeoutError";
4
+ export * from "./ServiceUnavailableError";
@@ -15,3 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./UnprocessableEntityError"), exports);
18
+ __exportStar(require("./NotFoundError"), exports);
19
+ __exportStar(require("./GatewayTimeoutError"), exports);
20
+ __exportStar(require("./ServiceUnavailableError"), exports);
@@ -20,6 +20,11 @@ export declare class Agents {
20
20
  protected readonly _options: Agents.Options;
21
21
  constructor(_options: Agents.Options);
22
22
  /**
23
+ * Retrieves a list of all agents in the system.
24
+ *
25
+ * Returns an empty list if no agents exist.
26
+ * Agents are returned in no guaranteed order.
27
+ *
23
28
  * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
24
29
  *
25
30
  * @example
@@ -27,6 +32,17 @@ export declare class Agents {
27
32
  */
28
33
  list(requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent[]>;
29
34
  /**
35
+ * Creates a new agent in the system.
36
+ *
37
+ * The agent will be initialized with the provided name and optional settings.
38
+ * A unique identifier will be automatically generated.
39
+ *
40
+ * Default behaviors:
41
+ *
42
+ * - `name` defaults to `"Unnamed Agent"` if not provided
43
+ * - `description` defaults to `None`
44
+ * - `max_engine_iterations` defaults to `None` (uses system default)
45
+ *
30
46
  * @param {Parlant.AgentCreationParams} request
31
47
  * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
32
48
  *
@@ -34,14 +50,19 @@ export declare class Agents {
34
50
  *
35
51
  * @example
36
52
  * await client.agents.create({
37
- * name: "name"
53
+ * name: "Haxon",
54
+ * description: "Technical Support Assistant",
55
+ * maxEngineIterations: 3
38
56
  * })
39
57
  */
40
58
  create(request: Parlant.AgentCreationParams, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
41
59
  /**
42
- * @param {string} agentId
60
+ * Retrieves details of a specific agent by ID.
61
+ *
62
+ * @param {string} agentId - Unique identifier for the agent
43
63
  * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
44
64
  *
65
+ * @throws {@link Parlant.NotFoundError}
45
66
  * @throws {@link Parlant.UnprocessableEntityError}
46
67
  *
47
68
  * @example
@@ -49,9 +70,15 @@ export declare class Agents {
49
70
  */
50
71
  retrieve(agentId: string, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
51
72
  /**
52
- * @param {string} agentId
73
+ * Deletes an agent from the agent.
74
+ *
75
+ * Deleting a non-existent agent will return 404.
76
+ * No content will be returned from a successful deletion.
77
+ *
78
+ * @param {string} agentId - Unique identifier for the agent
53
79
  * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
54
80
  *
81
+ * @throws {@link Parlant.NotFoundError}
55
82
  * @throws {@link Parlant.UnprocessableEntityError}
56
83
  *
57
84
  * @example
@@ -59,14 +86,24 @@ export declare class Agents {
59
86
  */
60
87
  delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<void>;
61
88
  /**
62
- * @param {string} agentId
89
+ * Updates an existing agent's attributes.
90
+ *
91
+ * Only the provided attributes will be updated; others will remain unchanged.
92
+ * The agent's ID and creation timestamp cannot be modified.
93
+ *
94
+ * @param {string} agentId - Unique identifier for the agent
63
95
  * @param {Parlant.AgentUpdateParams} request
64
96
  * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
65
97
  *
98
+ * @throws {@link Parlant.NotFoundError}
66
99
  * @throws {@link Parlant.UnprocessableEntityError}
67
100
  *
68
101
  * @example
69
- * await client.agents.update("agent_id")
102
+ * await client.agents.update("agent_id", {
103
+ * name: "Haxon",
104
+ * description: "Technical Support Assistant",
105
+ * maxEngineIterations: 3
106
+ * })
70
107
  */
71
108
  update(agentId: string, request?: Parlant.AgentUpdateParams, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
72
109
  }