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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/src/Client.d.ts +1 -1
  3. package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +1 -0
  4. package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +1 -0
  5. package/src/api/resources/journeys/client/requests/JourneyCreationParams.d.ts +1 -0
  6. package/src/api/resources/journeys/client/requests/JourneyUpdateParams.d.ts +1 -0
  7. package/src/api/resources/tags/client/Client.d.ts +6 -3
  8. package/src/api/resources/tags/client/Client.js +22 -8
  9. package/src/api/resources/tags/client/requests/TagsListRequest.d.ts +13 -0
  10. package/src/api/resources/tags/client/requests/TagsListRequest.js +5 -0
  11. package/src/api/resources/tags/client/requests/index.d.ts +1 -0
  12. package/src/api/types/Guideline.d.ts +1 -0
  13. package/src/api/types/Journey.d.ts +1 -0
  14. package/src/api/types/ToolServiceKindDto.d.ts +2 -2
  15. package/src/api/types/ValidationError.d.ts +2 -0
  16. package/src/serialization/client/healthCheckHealthzGet.d.ts +2 -2
  17. package/src/serialization/client/healthCheckHealthzGet.js +1 -1
  18. package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +1 -0
  19. package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.js +1 -0
  20. package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +1 -0
  21. package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.js +1 -0
  22. package/src/serialization/resources/journeys/client/requests/JourneyCreationParams.d.ts +1 -0
  23. package/src/serialization/resources/journeys/client/requests/JourneyCreationParams.js +1 -0
  24. package/src/serialization/resources/journeys/client/requests/JourneyUpdateParams.d.ts +1 -0
  25. package/src/serialization/resources/journeys/client/requests/JourneyUpdateParams.js +1 -0
  26. package/src/serialization/types/Guideline.d.ts +1 -0
  27. package/src/serialization/types/Guideline.js +1 -0
  28. package/src/serialization/types/Journey.d.ts +1 -0
  29. package/src/serialization/types/Journey.js +1 -0
  30. package/src/serialization/types/ValidationError.d.ts +2 -0
  31. package/src/serialization/types/ValidationError.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parlant-client",
3
- "version": "3.2.0",
3
+ "version": "3.3.1",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "files": [
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, string>>;
70
+ healthCheckHealthzGet(requestOptions?: ParlantClient.RequestOptions): Promise<Record<string, unknown>>;
71
71
  }
@@ -36,4 +36,5 @@ export interface GuidelineCreationParams {
36
36
  track?: boolean;
37
37
  /** The labels associated with the guideline */
38
38
  labels?: string[];
39
+ priority?: number;
39
40
  }
@@ -42,4 +42,5 @@ export interface GuidelineUpdateParams {
42
42
  metadata?: Parlant.GuidelineMetadataUpdateParams;
43
43
  compositionMode?: Parlant.CompositionModeDto;
44
44
  labels?: Parlant.GuidelineLabelsUpdateParams;
45
+ priority?: number;
45
46
  }
@@ -25,4 +25,5 @@ export interface JourneyCreationParams {
25
25
  compositionMode?: Parlant.CompositionModeDto;
26
26
  /** Labels associated with the journey */
27
27
  labels?: string[];
28
+ priority?: number;
28
29
  }
@@ -17,4 +17,5 @@ export interface JourneyUpdateParams {
17
17
  tags?: Parlant.JourneyTagUpdateParams;
18
18
  compositionMode?: Parlant.CompositionModeDto;
19
19
  labels?: Parlant.JourneyLabelsUpdateParams;
20
+ priority?: number;
20
21
  }
@@ -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(requestOptions) {
73
- return __awaiter(this, void 0, void 0, function* () {
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
- throw new errors.ParlantError({
95
- statusCode: _response.error.statusCode,
96
- body: _response.error.body,
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":
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface TagsListRequest {
9
+ /**
10
+ * Filter tags by name
11
+ */
12
+ name?: string;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,3 @@
1
+ export { type TagsListRequest } from "./TagsListRequest";
1
2
  export { type TagCreationParams } from "./TagCreationParams";
2
3
  export { type TagUpdateParams } from "./TagUpdateParams";
@@ -26,4 +26,5 @@ export interface Guideline {
26
26
  track?: boolean;
27
27
  /** The labels associated with the guideline */
28
28
  labels?: string[];
29
+ priority?: number;
29
30
  }
@@ -19,4 +19,5 @@ export interface Journey {
19
19
  compositionMode?: Parlant.CompositionModeDto;
20
20
  /** Labels associated with the journey */
21
21
  labels?: string[];
22
+ priority?: number;
22
23
  }
@@ -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
  */
@@ -6,4 +6,6 @@ export interface ValidationError {
6
6
  loc: Parlant.ValidationErrorLocItem[];
7
7
  msg: string;
8
8
  type: string;
9
+ input?: unknown;
10
+ ctx?: Record<string, unknown>;
9
11
  }
@@ -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, 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, 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.string());
41
+ exports.Response = core.serialization.record(core.serialization.string(), core.serialization.unknown());
@@ -20,5 +20,6 @@ export declare namespace GuidelineCreationParams {
20
20
  composition_mode?: CompositionModeDto.Raw | null;
21
21
  track?: boolean | null;
22
22
  labels?: string[] | null;
23
+ priority?: number | null;
23
24
  }
24
25
  }
@@ -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
  });
@@ -23,5 +23,6 @@ export declare namespace GuidelineUpdateParams {
23
23
  metadata?: GuidelineMetadataUpdateParams.Raw | null;
24
24
  composition_mode?: CompositionModeDto.Raw | null;
25
25
  labels?: GuidelineLabelsUpdateParams.Raw | null;
26
+ priority?: number | null;
26
27
  }
27
28
  }
@@ -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
  });
@@ -15,5 +15,6 @@ export declare namespace JourneyCreationParams {
15
15
  tags?: string[] | null;
16
16
  composition_mode?: CompositionModeDto.Raw | null;
17
17
  labels?: string[] | null;
18
+ priority?: number | null;
18
19
  }
19
20
  }
@@ -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
  });
@@ -17,5 +17,6 @@ export declare namespace JourneyUpdateParams {
17
17
  tags?: JourneyTagUpdateParams.Raw | null;
18
18
  composition_mode?: CompositionModeDto.Raw | null;
19
19
  labels?: JourneyLabelsUpdateParams.Raw | null;
20
+ priority?: number | null;
20
21
  }
21
22
  }
@@ -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
  });
@@ -20,5 +20,6 @@ export declare namespace Guideline {
20
20
  composition_mode?: CompositionModeDto.Raw | null;
21
21
  track?: boolean | null;
22
22
  labels?: string[] | null;
23
+ priority?: number | null;
23
24
  }
24
25
  }
@@ -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
  });
@@ -15,5 +15,6 @@ export declare namespace Journey {
15
15
  tags?: string[] | null;
16
16
  composition_mode?: CompositionModeDto.Raw | null;
17
17
  labels?: string[] | null;
18
+ priority?: number | null;
18
19
  }
19
20
  }
@@ -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
  });
@@ -11,5 +11,7 @@ export declare namespace ValidationError {
11
11
  loc: ValidationErrorLocItem.Raw[];
12
12
  msg: string;
13
13
  type: string;
14
+ input?: unknown | null;
15
+ ctx?: Record<string, unknown> | null;
14
16
  }
15
17
  }
@@ -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
  });