parlant-client 3.2.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Client.d.ts +1 -1
- package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +1 -0
- package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +1 -0
- package/src/api/resources/journeys/client/requests/JourneyCreationParams.d.ts +1 -0
- package/src/api/resources/journeys/client/requests/JourneyUpdateParams.d.ts +1 -0
- package/src/api/resources/tags/client/Client.d.ts +6 -3
- package/src/api/resources/tags/client/Client.js +22 -8
- package/src/api/resources/tags/client/requests/TagsListRequest.d.ts +13 -0
- package/src/api/resources/tags/client/requests/TagsListRequest.js +5 -0
- package/src/api/resources/tags/client/requests/index.d.ts +1 -0
- package/src/api/types/Guideline.d.ts +1 -0
- package/src/api/types/Journey.d.ts +1 -0
- package/src/api/types/ToolServiceKindDto.d.ts +2 -2
- package/src/api/types/ValidationError.d.ts +2 -0
- package/src/serialization/client/healthCheckHealthzGet.d.ts +2 -2
- package/src/serialization/client/healthCheckHealthzGet.js +1 -1
- package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +1 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.js +1 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +1 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.js +1 -0
- package/src/serialization/resources/journeys/client/requests/JourneyCreationParams.d.ts +1 -0
- package/src/serialization/resources/journeys/client/requests/JourneyCreationParams.js +1 -0
- package/src/serialization/resources/journeys/client/requests/JourneyUpdateParams.d.ts +1 -0
- package/src/serialization/resources/journeys/client/requests/JourneyUpdateParams.js +1 -0
- package/src/serialization/types/Guideline.d.ts +1 -0
- package/src/serialization/types/Guideline.js +1 -0
- package/src/serialization/types/Journey.d.ts +1 -0
- package/src/serialization/types/Journey.js +1 -0
- package/src/serialization/types/ValidationError.d.ts +2 -0
- package/src/serialization/types/ValidationError.js +2 -0
package/package.json
CHANGED
package/src/Client.d.ts
CHANGED
|
@@ -67,5 +67,5 @@ export declare class ParlantClient {
|
|
|
67
67
|
* @example
|
|
68
68
|
* await client.healthCheckHealthzGet()
|
|
69
69
|
*/
|
|
70
|
-
healthCheckHealthzGet(requestOptions?: ParlantClient.RequestOptions): Promise<Record<string,
|
|
70
|
+
healthCheckHealthzGet(requestOptions?: ParlantClient.RequestOptions): Promise<Record<string, unknown>>;
|
|
71
71
|
}
|
|
@@ -24,17 +24,20 @@ export declare class Tags {
|
|
|
24
24
|
protected readonly _options: Tags.Options;
|
|
25
25
|
constructor(_options: Tags.Options);
|
|
26
26
|
/**
|
|
27
|
-
* Lists all tags in the system.
|
|
27
|
+
* Lists all tags in the system, optionally filtered by name.
|
|
28
28
|
*
|
|
29
|
-
* Returns an empty list if no tags exist.
|
|
29
|
+
* Returns an empty list if no tags exist or none match the filter.
|
|
30
30
|
* Tags are returned in no particular order.
|
|
31
31
|
*
|
|
32
|
+
* @param {Parlant.TagsListRequest} request
|
|
32
33
|
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
34
|
*
|
|
35
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
36
|
+
*
|
|
34
37
|
* @example
|
|
35
38
|
* await client.tags.list()
|
|
36
39
|
*/
|
|
37
|
-
list(requestOptions?: Tags.RequestOptions): Promise<Parlant.Tag[]>;
|
|
40
|
+
list(request?: Parlant.TagsListRequest, requestOptions?: Tags.RequestOptions): Promise<Parlant.Tag[]>;
|
|
38
41
|
/**
|
|
39
42
|
* Creates a new tag with the specified name.
|
|
40
43
|
*
|
|
@@ -59,24 +59,33 @@ class Tags {
|
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Lists all tags in the system.
|
|
62
|
+
* Lists all tags in the system, optionally filtered by name.
|
|
63
63
|
*
|
|
64
|
-
* Returns an empty list if no tags exist.
|
|
64
|
+
* Returns an empty list if no tags exist or none match the filter.
|
|
65
65
|
* Tags are returned in no particular order.
|
|
66
66
|
*
|
|
67
|
+
* @param {Parlant.TagsListRequest} request
|
|
67
68
|
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
69
|
*
|
|
70
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
71
|
+
*
|
|
69
72
|
* @example
|
|
70
73
|
* await client.tags.list()
|
|
71
74
|
*/
|
|
72
|
-
list(
|
|
73
|
-
return __awaiter(this,
|
|
75
|
+
list() {
|
|
76
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
77
|
var _a;
|
|
78
|
+
const { name } = request;
|
|
79
|
+
const _queryParams = {};
|
|
80
|
+
if (name != null) {
|
|
81
|
+
_queryParams["name"] = name;
|
|
82
|
+
}
|
|
75
83
|
const _response = yield core.fetcher({
|
|
76
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)), "tags"),
|
|
77
85
|
method: "GET",
|
|
78
86
|
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),
|
|
79
87
|
contentType: "application/json",
|
|
88
|
+
queryParameters: _queryParams,
|
|
80
89
|
requestType: "json",
|
|
81
90
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
91
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -91,10 +100,15 @@ class Tags {
|
|
|
91
100
|
});
|
|
92
101
|
}
|
|
93
102
|
if (_response.error.reason === "status-code") {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
switch (_response.error.statusCode) {
|
|
104
|
+
case 422:
|
|
105
|
+
throw new Parlant.UnprocessableEntityError(_response.error.body);
|
|
106
|
+
default:
|
|
107
|
+
throw new errors.ParlantError({
|
|
108
|
+
statusCode: _response.error.statusCode,
|
|
109
|
+
body: _response.error.body,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
98
112
|
}
|
|
99
113
|
switch (_response.error.reason) {
|
|
100
114
|
case "non-json":
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* Attributes:
|
|
8
8
|
* "sdk": Native integration using the Parlant SDK protocol. Enables advanced features
|
|
9
9
|
* like bidirectional communication and streaming results.
|
|
10
|
-
* "openapi": Integration via OpenAPI specification. Simpler to set up but limited
|
|
11
|
-
* to basic request/response patterns.
|
|
10
|
+
* "openapi": (Deprecated) Integration via OpenAPI specification. Simpler to set up but limited
|
|
11
|
+
* to basic request/response patterns. Please migrate to SDK services.
|
|
12
12
|
* "mcp": Integration with tool servers using the popular MCP (Model Context Protocol)
|
|
13
13
|
* implemented by wide variety of 3rd parties.
|
|
14
14
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as serializers from "../index";
|
|
5
5
|
import * as core from "../../core";
|
|
6
|
-
export declare const Response: core.serialization.Schema<serializers.healthCheckHealthzGet.Response.Raw, Record<string,
|
|
6
|
+
export declare const Response: core.serialization.Schema<serializers.healthCheckHealthzGet.Response.Raw, Record<string, unknown>>;
|
|
7
7
|
export declare namespace Response {
|
|
8
|
-
type Raw = Record<string,
|
|
8
|
+
type Raw = Record<string, unknown>;
|
|
9
9
|
}
|
|
@@ -38,4 +38,4 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.Response = void 0;
|
|
40
40
|
const core = __importStar(require("../../core"));
|
|
41
|
-
exports.Response = core.serialization.record(core.serialization.string(), core.serialization.
|
|
41
|
+
exports.Response = core.serialization.record(core.serialization.string(), core.serialization.unknown());
|
|
@@ -52,4 +52,5 @@ exports.GuidelineCreationParams = core.serialization.object({
|
|
|
52
52
|
compositionMode: core.serialization.property("composition_mode", CompositionModeDto_1.CompositionModeDto.optional()),
|
|
53
53
|
track: core.serialization.boolean().optional(),
|
|
54
54
|
labels: core.serialization.list(core.serialization.string()).optional(),
|
|
55
|
+
priority: core.serialization.number().optional(),
|
|
55
56
|
});
|
|
@@ -55,4 +55,5 @@ exports.GuidelineUpdateParams = core.serialization.object({
|
|
|
55
55
|
metadata: GuidelineMetadataUpdateParams_1.GuidelineMetadataUpdateParams.optional(),
|
|
56
56
|
compositionMode: core.serialization.property("composition_mode", CompositionModeDto_1.CompositionModeDto.optional()),
|
|
57
57
|
labels: GuidelineLabelsUpdateParams_1.GuidelineLabelsUpdateParams.optional(),
|
|
58
|
+
priority: core.serialization.number().optional(),
|
|
58
59
|
});
|
|
@@ -47,4 +47,5 @@ exports.JourneyCreationParams = core.serialization.object({
|
|
|
47
47
|
tags: core.serialization.list(core.serialization.string()).optional(),
|
|
48
48
|
compositionMode: core.serialization.property("composition_mode", CompositionModeDto_1.CompositionModeDto.optional()),
|
|
49
49
|
labels: core.serialization.list(core.serialization.string()).optional(),
|
|
50
|
+
priority: core.serialization.number().optional(),
|
|
50
51
|
});
|
|
@@ -49,4 +49,5 @@ exports.JourneyUpdateParams = core.serialization.object({
|
|
|
49
49
|
tags: JourneyTagUpdateParams_1.JourneyTagUpdateParams.optional(),
|
|
50
50
|
compositionMode: core.serialization.property("composition_mode", CompositionModeDto_1.CompositionModeDto.optional()),
|
|
51
51
|
labels: JourneyLabelsUpdateParams_1.JourneyLabelsUpdateParams.optional(),
|
|
52
|
+
priority: core.serialization.number().optional(),
|
|
52
53
|
});
|
|
@@ -52,4 +52,5 @@ exports.Guideline = core.serialization.object({
|
|
|
52
52
|
compositionMode: core.serialization.property("composition_mode", CompositionModeDto_1.CompositionModeDto.optional()),
|
|
53
53
|
track: core.serialization.boolean().optional(),
|
|
54
54
|
labels: core.serialization.list(core.serialization.string()).optional(),
|
|
55
|
+
priority: core.serialization.number().optional(),
|
|
55
56
|
});
|
|
@@ -47,4 +47,5 @@ exports.Journey = core.serialization.object({
|
|
|
47
47
|
tags: core.serialization.list(core.serialization.string()).optional(),
|
|
48
48
|
compositionMode: core.serialization.property("composition_mode", CompositionModeDto_1.CompositionModeDto.optional()),
|
|
49
49
|
labels: core.serialization.list(core.serialization.string()).optional(),
|
|
50
|
+
priority: core.serialization.number().optional(),
|
|
50
51
|
});
|
|
@@ -43,4 +43,6 @@ exports.ValidationError = core.serialization.object({
|
|
|
43
43
|
loc: core.serialization.list(ValidationErrorLocItem_1.ValidationErrorLocItem),
|
|
44
44
|
msg: core.serialization.string(),
|
|
45
45
|
type: core.serialization.string(),
|
|
46
|
+
input: core.serialization.unknown().optional(),
|
|
47
|
+
ctx: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
|
|
46
48
|
});
|