mavenagi 1.2.35 → 1.2.37

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 (67) hide show
  1. package/Client.js +2 -2
  2. package/api/resources/commons/types/ConversationPreconditionResponse.d.ts +22 -0
  3. package/api/resources/commons/types/ConversationPreconditionResponse.js +3 -0
  4. package/api/resources/commons/types/IntelligentFieldPreconditionResponse.d.ts +13 -0
  5. package/api/resources/commons/types/IntelligentFieldPreconditionResponse.js +3 -0
  6. package/api/resources/commons/types/IntelligentFieldValueResponse.d.ts +1 -1
  7. package/api/resources/commons/types/PreconditionGroupResponse.d.ts +5 -0
  8. package/api/resources/commons/types/PreconditionGroupResponse.js +3 -0
  9. package/api/resources/commons/types/PreconditionResponse.d.ts +28 -0
  10. package/api/resources/commons/types/PreconditionResponse.js +3 -0
  11. package/api/resources/commons/types/index.d.ts +4 -0
  12. package/api/resources/commons/types/index.js +4 -0
  13. package/api/resources/segments/types/SegmentBase.d.ts +0 -3
  14. package/api/resources/segments/types/SegmentRequest.d.ts +2 -0
  15. package/api/resources/segments/types/SegmentResponse.d.ts +2 -0
  16. package/dist/Client.js +2 -2
  17. package/dist/api/resources/commons/types/ConversationPreconditionResponse.d.ts +22 -0
  18. package/dist/api/resources/commons/types/ConversationPreconditionResponse.js +3 -0
  19. package/dist/api/resources/commons/types/IntelligentFieldPreconditionResponse.d.ts +13 -0
  20. package/dist/api/resources/commons/types/IntelligentFieldPreconditionResponse.js +3 -0
  21. package/dist/api/resources/commons/types/IntelligentFieldValueResponse.d.ts +1 -1
  22. package/dist/api/resources/commons/types/PreconditionGroupResponse.d.ts +5 -0
  23. package/dist/api/resources/commons/types/PreconditionGroupResponse.js +3 -0
  24. package/dist/api/resources/commons/types/PreconditionResponse.d.ts +28 -0
  25. package/dist/api/resources/commons/types/PreconditionResponse.js +3 -0
  26. package/dist/api/resources/commons/types/index.d.ts +4 -0
  27. package/dist/api/resources/commons/types/index.js +4 -0
  28. package/dist/api/resources/segments/types/SegmentBase.d.ts +0 -3
  29. package/dist/api/resources/segments/types/SegmentRequest.d.ts +2 -0
  30. package/dist/api/resources/segments/types/SegmentResponse.d.ts +2 -0
  31. package/dist/serialization/resources/commons/types/ConversationPreconditionResponse.d.ts +31 -0
  32. package/dist/serialization/resources/commons/types/ConversationPreconditionResponse.js +57 -0
  33. package/dist/serialization/resources/commons/types/IntelligentFieldPreconditionResponse.d.ts +13 -0
  34. package/dist/serialization/resources/commons/types/IntelligentFieldPreconditionResponse.js +45 -0
  35. package/dist/serialization/resources/commons/types/PreconditionGroupResponse.d.ts +11 -0
  36. package/dist/serialization/resources/commons/types/PreconditionGroupResponse.js +44 -0
  37. package/dist/serialization/resources/commons/types/PreconditionResponse.d.ts +19 -0
  38. package/dist/serialization/resources/commons/types/PreconditionResponse.js +53 -0
  39. package/dist/serialization/resources/commons/types/index.d.ts +4 -0
  40. package/dist/serialization/resources/commons/types/index.js +4 -0
  41. package/dist/serialization/resources/segments/types/SegmentBase.d.ts +1 -2
  42. package/dist/serialization/resources/segments/types/SegmentBase.js +0 -2
  43. package/dist/serialization/resources/segments/types/SegmentRequest.d.ts +2 -1
  44. package/dist/serialization/resources/segments/types/SegmentRequest.js +2 -0
  45. package/dist/serialization/resources/segments/types/SegmentResponse.d.ts +2 -1
  46. package/dist/serialization/resources/segments/types/SegmentResponse.js +2 -0
  47. package/dist/version.d.ts +1 -1
  48. package/dist/version.js +1 -1
  49. package/package.json +1 -1
  50. package/serialization/resources/commons/types/ConversationPreconditionResponse.d.ts +31 -0
  51. package/serialization/resources/commons/types/ConversationPreconditionResponse.js +57 -0
  52. package/serialization/resources/commons/types/IntelligentFieldPreconditionResponse.d.ts +13 -0
  53. package/serialization/resources/commons/types/IntelligentFieldPreconditionResponse.js +45 -0
  54. package/serialization/resources/commons/types/PreconditionGroupResponse.d.ts +11 -0
  55. package/serialization/resources/commons/types/PreconditionGroupResponse.js +44 -0
  56. package/serialization/resources/commons/types/PreconditionResponse.d.ts +19 -0
  57. package/serialization/resources/commons/types/PreconditionResponse.js +53 -0
  58. package/serialization/resources/commons/types/index.d.ts +4 -0
  59. package/serialization/resources/commons/types/index.js +4 -0
  60. package/serialization/resources/segments/types/SegmentBase.d.ts +1 -2
  61. package/serialization/resources/segments/types/SegmentBase.js +0 -2
  62. package/serialization/resources/segments/types/SegmentRequest.d.ts +2 -1
  63. package/serialization/resources/segments/types/SegmentRequest.js +2 -0
  64. package/serialization/resources/segments/types/SegmentResponse.d.ts +2 -1
  65. package/serialization/resources/segments/types/SegmentResponse.js +2 -0
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.PreconditionResponse = void 0;
38
+ const core = __importStar(require("../../../../core"));
39
+ const serializers = __importStar(require("../../../index"));
40
+ const ConversationPreconditionResponse_1 = require("./ConversationPreconditionResponse");
41
+ const MetadataPrecondition_1 = require("./MetadataPrecondition");
42
+ exports.PreconditionResponse = core.serialization
43
+ .union("preconditionType", {
44
+ user: MetadataPrecondition_1.MetadataPrecondition,
45
+ conversation: core.serialization.object({
46
+ value: ConversationPreconditionResponse_1.ConversationPreconditionResponse,
47
+ }),
48
+ group: core.serialization.lazyObject(() => serializers.PreconditionGroupResponse),
49
+ })
50
+ .transform({
51
+ transform: (value) => value,
52
+ untransform: (value) => value,
53
+ });
@@ -61,6 +61,7 @@ export * from "./ConversationInformation";
61
61
  export * from "./ConversationMessageBase";
62
62
  export * from "./ConversationMessageResponse";
63
63
  export * from "./ConversationPrecondition";
64
+ export * from "./ConversationPreconditionResponse";
64
65
  export * from "./ConversationPreview";
65
66
  export * from "./ConversationResponse";
66
67
  export * from "./ConversationSummary";
@@ -108,6 +109,7 @@ export * from "./InboxItemStatus";
108
109
  export * from "./InboxItemType";
109
110
  export * from "./IntelligentFieldCondition";
110
111
  export * from "./IntelligentFieldPrecondition";
112
+ export * from "./IntelligentFieldPreconditionResponse";
111
113
  export * from "./IntelligentFieldValueResponse";
112
114
  export * from "./IpInfo";
113
115
  export * from "./KnowledgeContextByEntities";
@@ -141,7 +143,9 @@ export * from "./Precondition";
141
143
  export * from "./PreconditionBase";
142
144
  export * from "./PreconditionGroup";
143
145
  export * from "./PreconditionGroupOperator";
146
+ export * from "./PreconditionGroupResponse";
144
147
  export * from "./PreconditionOperator";
148
+ export * from "./PreconditionResponse";
145
149
  export * from "./Quality";
146
150
  export * from "./QualityReason";
147
151
  export * from "./ResponseConfig";
@@ -77,6 +77,7 @@ __exportStar(require("./ConversationInformation"), exports);
77
77
  __exportStar(require("./ConversationMessageBase"), exports);
78
78
  __exportStar(require("./ConversationMessageResponse"), exports);
79
79
  __exportStar(require("./ConversationPrecondition"), exports);
80
+ __exportStar(require("./ConversationPreconditionResponse"), exports);
80
81
  __exportStar(require("./ConversationPreview"), exports);
81
82
  __exportStar(require("./ConversationResponse"), exports);
82
83
  __exportStar(require("./ConversationSummary"), exports);
@@ -124,6 +125,7 @@ __exportStar(require("./InboxItemStatus"), exports);
124
125
  __exportStar(require("./InboxItemType"), exports);
125
126
  __exportStar(require("./IntelligentFieldCondition"), exports);
126
127
  __exportStar(require("./IntelligentFieldPrecondition"), exports);
128
+ __exportStar(require("./IntelligentFieldPreconditionResponse"), exports);
127
129
  __exportStar(require("./IntelligentFieldValueResponse"), exports);
128
130
  __exportStar(require("./IpInfo"), exports);
129
131
  __exportStar(require("./KnowledgeContextByEntities"), exports);
@@ -157,7 +159,9 @@ __exportStar(require("./Precondition"), exports);
157
159
  __exportStar(require("./PreconditionBase"), exports);
158
160
  __exportStar(require("./PreconditionGroup"), exports);
159
161
  __exportStar(require("./PreconditionGroupOperator"), exports);
162
+ __exportStar(require("./PreconditionGroupResponse"), exports);
160
163
  __exportStar(require("./PreconditionOperator"), exports);
164
+ __exportStar(require("./PreconditionResponse"), exports);
161
165
  __exportStar(require("./Quality"), exports);
162
166
  __exportStar(require("./QualityReason"), exports);
163
167
  __exportStar(require("./ResponseConfig"), exports);
@@ -1,11 +1,10 @@
1
1
  import type * as MavenAGI from "../../../../api/index";
2
2
  import * as core from "../../../../core";
3
- import * as serializers from "../../../index";
3
+ import type * as serializers from "../../../index";
4
4
  export declare const SegmentBase: core.serialization.ObjectSchema<serializers.SegmentBase.Raw, MavenAGI.SegmentBase>;
5
5
  export declare namespace SegmentBase {
6
6
  interface Raw {
7
7
  name: string;
8
8
  description?: string | null;
9
- precondition: serializers.Precondition.Raw;
10
9
  }
11
10
  }
@@ -36,9 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.SegmentBase = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
- const serializers = __importStar(require("../../../index"));
40
39
  exports.SegmentBase = core.serialization.object({
41
40
  name: core.serialization.string(),
42
41
  description: core.serialization.string().optional(),
43
- precondition: core.serialization.lazy(() => serializers.Precondition),
44
42
  });
@@ -1,6 +1,6 @@
1
1
  import type * as MavenAGI from "../../../../api/index";
2
2
  import * as core from "../../../../core";
3
- import type * as serializers from "../../../index";
3
+ import * as serializers from "../../../index";
4
4
  import { EntityIdBase } from "../../commons/types/EntityIdBase";
5
5
  import { SegmentBase } from "./SegmentBase";
6
6
  import { SegmentStatus } from "./SegmentStatus";
@@ -8,6 +8,7 @@ export declare const SegmentRequest: core.serialization.ObjectSchema<serializers
8
8
  export declare namespace SegmentRequest {
9
9
  interface Raw extends SegmentBase.Raw {
10
10
  segmentId: EntityIdBase.Raw;
11
+ precondition: serializers.Precondition.Raw;
11
12
  status?: SegmentStatus.Raw | null;
12
13
  }
13
14
  }
@@ -36,12 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.SegmentRequest = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
+ const serializers = __importStar(require("../../../index"));
39
40
  const EntityIdBase_1 = require("../../commons/types/EntityIdBase");
40
41
  const SegmentBase_1 = require("./SegmentBase");
41
42
  const SegmentStatus_1 = require("./SegmentStatus");
42
43
  exports.SegmentRequest = core.serialization
43
44
  .object({
44
45
  segmentId: EntityIdBase_1.EntityIdBase,
46
+ precondition: core.serialization.lazy(() => serializers.Precondition),
45
47
  status: SegmentStatus_1.SegmentStatus.optional(),
46
48
  })
47
49
  .extend(SegmentBase_1.SegmentBase);
@@ -1,6 +1,6 @@
1
1
  import type * as MavenAGI from "../../../../api/index";
2
2
  import * as core from "../../../../core";
3
- import type * as serializers from "../../../index";
3
+ import * as serializers from "../../../index";
4
4
  import { EntityId } from "../../commons/types/EntityId";
5
5
  import { SegmentBase } from "./SegmentBase";
6
6
  import { SegmentStatus } from "./SegmentStatus";
@@ -8,6 +8,7 @@ export declare const SegmentResponse: core.serialization.ObjectSchema<serializer
8
8
  export declare namespace SegmentResponse {
9
9
  interface Raw extends SegmentBase.Raw {
10
10
  segmentId: EntityId.Raw;
11
+ precondition: serializers.PreconditionResponse.Raw;
11
12
  createdAt: string;
12
13
  updatedAt: string;
13
14
  referencedKnowledgeBaseCount?: number | null;
@@ -36,12 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.SegmentResponse = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
+ const serializers = __importStar(require("../../../index"));
39
40
  const EntityId_1 = require("../../commons/types/EntityId");
40
41
  const SegmentBase_1 = require("./SegmentBase");
41
42
  const SegmentStatus_1 = require("./SegmentStatus");
42
43
  exports.SegmentResponse = core.serialization
43
44
  .object({
44
45
  segmentId: EntityId_1.EntityId,
46
+ precondition: core.serialization.lazy(() => serializers.PreconditionResponse),
45
47
  createdAt: core.serialization.date(),
46
48
  updatedAt: core.serialization.date(),
47
49
  referencedKnowledgeBaseCount: core.serialization.number().optional(),
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.35";
1
+ export declare const SDK_VERSION = "1.2.37";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.2.35";
4
+ exports.SDK_VERSION = "1.2.37";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mavenagi",
3
- "version": "1.2.35",
3
+ "version": "1.2.37",
4
4
  "private": false,
5
5
  "repository": "github:mavenagi/mavenagi-node",
6
6
  "main": "./index.js",
@@ -0,0 +1,31 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { AppPrecondition } from "./AppPrecondition";
5
+ import { ConversationExecutedActionPrecondition } from "./ConversationExecutedActionPrecondition";
6
+ import { IntelligentFieldPreconditionResponse } from "./IntelligentFieldPreconditionResponse";
7
+ import { MetadataPrecondition } from "./MetadataPrecondition";
8
+ import { ResponseConfigPrecondition } from "./ResponseConfigPrecondition";
9
+ import { TagsPrecondition } from "./TagsPrecondition";
10
+ export declare const ConversationPreconditionResponse: core.serialization.Schema<serializers.ConversationPreconditionResponse.Raw, MavenAGI.ConversationPreconditionResponse>;
11
+ export declare namespace ConversationPreconditionResponse {
12
+ type Raw = ConversationPreconditionResponse.Tags | ConversationPreconditionResponse.Metadata | ConversationPreconditionResponse.ActionExecuted | ConversationPreconditionResponse.ResponseConfig | ConversationPreconditionResponse.App | ConversationPreconditionResponse.IntelligentField;
13
+ interface Tags extends TagsPrecondition.Raw {
14
+ conversationPreconditionType: "tags";
15
+ }
16
+ interface Metadata extends MetadataPrecondition.Raw {
17
+ conversationPreconditionType: "metadata";
18
+ }
19
+ interface ActionExecuted extends ConversationExecutedActionPrecondition.Raw {
20
+ conversationPreconditionType: "actionExecuted";
21
+ }
22
+ interface ResponseConfig extends ResponseConfigPrecondition.Raw {
23
+ conversationPreconditionType: "responseConfig";
24
+ }
25
+ interface App extends AppPrecondition.Raw {
26
+ conversationPreconditionType: "app";
27
+ }
28
+ interface IntelligentField extends IntelligentFieldPreconditionResponse.Raw {
29
+ conversationPreconditionType: "intelligentField";
30
+ }
31
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ConversationPreconditionResponse = void 0;
38
+ const core = __importStar(require("../../../../core"));
39
+ const AppPrecondition_1 = require("./AppPrecondition");
40
+ const ConversationExecutedActionPrecondition_1 = require("./ConversationExecutedActionPrecondition");
41
+ const IntelligentFieldPreconditionResponse_1 = require("./IntelligentFieldPreconditionResponse");
42
+ const MetadataPrecondition_1 = require("./MetadataPrecondition");
43
+ const ResponseConfigPrecondition_1 = require("./ResponseConfigPrecondition");
44
+ const TagsPrecondition_1 = require("./TagsPrecondition");
45
+ exports.ConversationPreconditionResponse = core.serialization
46
+ .union("conversationPreconditionType", {
47
+ tags: TagsPrecondition_1.TagsPrecondition,
48
+ metadata: MetadataPrecondition_1.MetadataPrecondition,
49
+ actionExecuted: ConversationExecutedActionPrecondition_1.ConversationExecutedActionPrecondition,
50
+ responseConfig: ResponseConfigPrecondition_1.ResponseConfigPrecondition,
51
+ app: AppPrecondition_1.AppPrecondition,
52
+ intelligentField: IntelligentFieldPreconditionResponse_1.IntelligentFieldPreconditionResponse,
53
+ })
54
+ .transform({
55
+ transform: (value) => value,
56
+ untransform: (value) => value,
57
+ });
@@ -0,0 +1,13 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { EntityIdWithoutAgent } from "./EntityIdWithoutAgent";
5
+ import { IntelligentFieldCondition } from "./IntelligentFieldCondition";
6
+ export declare const IntelligentFieldPreconditionResponse: core.serialization.ObjectSchema<serializers.IntelligentFieldPreconditionResponse.Raw, MavenAGI.IntelligentFieldPreconditionResponse>;
7
+ export declare namespace IntelligentFieldPreconditionResponse {
8
+ interface Raw {
9
+ fieldIdWithoutAgent: EntityIdWithoutAgent.Raw;
10
+ name?: string | null;
11
+ fieldCondition: IntelligentFieldCondition.Raw;
12
+ }
13
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.IntelligentFieldPreconditionResponse = void 0;
38
+ const core = __importStar(require("../../../../core"));
39
+ const EntityIdWithoutAgent_1 = require("./EntityIdWithoutAgent");
40
+ const IntelligentFieldCondition_1 = require("./IntelligentFieldCondition");
41
+ exports.IntelligentFieldPreconditionResponse = core.serialization.object({
42
+ fieldIdWithoutAgent: EntityIdWithoutAgent_1.EntityIdWithoutAgent,
43
+ name: core.serialization.string().optional(),
44
+ fieldCondition: IntelligentFieldCondition_1.IntelligentFieldCondition,
45
+ });
@@ -0,0 +1,11 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import * as serializers from "../../../index";
4
+ import { PreconditionGroupOperator } from "./PreconditionGroupOperator";
5
+ export declare const PreconditionGroupResponse: core.serialization.ObjectSchema<serializers.PreconditionGroupResponse.Raw, MavenAGI.PreconditionGroupResponse>;
6
+ export declare namespace PreconditionGroupResponse {
7
+ interface Raw {
8
+ operator: PreconditionGroupOperator.Raw;
9
+ preconditions: serializers.PreconditionResponse.Raw[];
10
+ }
11
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.PreconditionGroupResponse = void 0;
38
+ const core = __importStar(require("../../../../core"));
39
+ const serializers = __importStar(require("../../../index"));
40
+ const PreconditionGroupOperator_1 = require("./PreconditionGroupOperator");
41
+ exports.PreconditionGroupResponse = core.serialization.object({
42
+ operator: PreconditionGroupOperator_1.PreconditionGroupOperator,
43
+ preconditions: core.serialization.list(core.serialization.lazy(() => serializers.PreconditionResponse)),
44
+ });
@@ -0,0 +1,19 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import * as serializers from "../../../index";
4
+ import { ConversationPreconditionResponse } from "./ConversationPreconditionResponse";
5
+ import { MetadataPrecondition } from "./MetadataPrecondition";
6
+ export declare const PreconditionResponse: core.serialization.Schema<serializers.PreconditionResponse.Raw, MavenAGI.PreconditionResponse>;
7
+ export declare namespace PreconditionResponse {
8
+ type Raw = PreconditionResponse.User | PreconditionResponse.Conversation | PreconditionResponse.Group;
9
+ interface User extends MetadataPrecondition.Raw {
10
+ preconditionType: "user";
11
+ }
12
+ interface Conversation {
13
+ preconditionType: "conversation";
14
+ value: ConversationPreconditionResponse.Raw;
15
+ }
16
+ interface Group extends serializers.PreconditionGroupResponse.Raw {
17
+ preconditionType: "group";
18
+ }
19
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.PreconditionResponse = void 0;
38
+ const core = __importStar(require("../../../../core"));
39
+ const serializers = __importStar(require("../../../index"));
40
+ const ConversationPreconditionResponse_1 = require("./ConversationPreconditionResponse");
41
+ const MetadataPrecondition_1 = require("./MetadataPrecondition");
42
+ exports.PreconditionResponse = core.serialization
43
+ .union("preconditionType", {
44
+ user: MetadataPrecondition_1.MetadataPrecondition,
45
+ conversation: core.serialization.object({
46
+ value: ConversationPreconditionResponse_1.ConversationPreconditionResponse,
47
+ }),
48
+ group: core.serialization.lazyObject(() => serializers.PreconditionGroupResponse),
49
+ })
50
+ .transform({
51
+ transform: (value) => value,
52
+ untransform: (value) => value,
53
+ });
@@ -61,6 +61,7 @@ export * from "./ConversationInformation";
61
61
  export * from "./ConversationMessageBase";
62
62
  export * from "./ConversationMessageResponse";
63
63
  export * from "./ConversationPrecondition";
64
+ export * from "./ConversationPreconditionResponse";
64
65
  export * from "./ConversationPreview";
65
66
  export * from "./ConversationResponse";
66
67
  export * from "./ConversationSummary";
@@ -108,6 +109,7 @@ export * from "./InboxItemStatus";
108
109
  export * from "./InboxItemType";
109
110
  export * from "./IntelligentFieldCondition";
110
111
  export * from "./IntelligentFieldPrecondition";
112
+ export * from "./IntelligentFieldPreconditionResponse";
111
113
  export * from "./IntelligentFieldValueResponse";
112
114
  export * from "./IpInfo";
113
115
  export * from "./KnowledgeContextByEntities";
@@ -141,7 +143,9 @@ export * from "./Precondition";
141
143
  export * from "./PreconditionBase";
142
144
  export * from "./PreconditionGroup";
143
145
  export * from "./PreconditionGroupOperator";
146
+ export * from "./PreconditionGroupResponse";
144
147
  export * from "./PreconditionOperator";
148
+ export * from "./PreconditionResponse";
145
149
  export * from "./Quality";
146
150
  export * from "./QualityReason";
147
151
  export * from "./ResponseConfig";
@@ -77,6 +77,7 @@ __exportStar(require("./ConversationInformation"), exports);
77
77
  __exportStar(require("./ConversationMessageBase"), exports);
78
78
  __exportStar(require("./ConversationMessageResponse"), exports);
79
79
  __exportStar(require("./ConversationPrecondition"), exports);
80
+ __exportStar(require("./ConversationPreconditionResponse"), exports);
80
81
  __exportStar(require("./ConversationPreview"), exports);
81
82
  __exportStar(require("./ConversationResponse"), exports);
82
83
  __exportStar(require("./ConversationSummary"), exports);
@@ -124,6 +125,7 @@ __exportStar(require("./InboxItemStatus"), exports);
124
125
  __exportStar(require("./InboxItemType"), exports);
125
126
  __exportStar(require("./IntelligentFieldCondition"), exports);
126
127
  __exportStar(require("./IntelligentFieldPrecondition"), exports);
128
+ __exportStar(require("./IntelligentFieldPreconditionResponse"), exports);
127
129
  __exportStar(require("./IntelligentFieldValueResponse"), exports);
128
130
  __exportStar(require("./IpInfo"), exports);
129
131
  __exportStar(require("./KnowledgeContextByEntities"), exports);
@@ -157,7 +159,9 @@ __exportStar(require("./Precondition"), exports);
157
159
  __exportStar(require("./PreconditionBase"), exports);
158
160
  __exportStar(require("./PreconditionGroup"), exports);
159
161
  __exportStar(require("./PreconditionGroupOperator"), exports);
162
+ __exportStar(require("./PreconditionGroupResponse"), exports);
160
163
  __exportStar(require("./PreconditionOperator"), exports);
164
+ __exportStar(require("./PreconditionResponse"), exports);
161
165
  __exportStar(require("./Quality"), exports);
162
166
  __exportStar(require("./QualityReason"), exports);
163
167
  __exportStar(require("./ResponseConfig"), exports);
@@ -1,11 +1,10 @@
1
1
  import type * as MavenAGI from "../../../../api/index";
2
2
  import * as core from "../../../../core";
3
- import * as serializers from "../../../index";
3
+ import type * as serializers from "../../../index";
4
4
  export declare const SegmentBase: core.serialization.ObjectSchema<serializers.SegmentBase.Raw, MavenAGI.SegmentBase>;
5
5
  export declare namespace SegmentBase {
6
6
  interface Raw {
7
7
  name: string;
8
8
  description?: string | null;
9
- precondition: serializers.Precondition.Raw;
10
9
  }
11
10
  }
@@ -36,9 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.SegmentBase = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
- const serializers = __importStar(require("../../../index"));
40
39
  exports.SegmentBase = core.serialization.object({
41
40
  name: core.serialization.string(),
42
41
  description: core.serialization.string().optional(),
43
- precondition: core.serialization.lazy(() => serializers.Precondition),
44
42
  });
@@ -1,6 +1,6 @@
1
1
  import type * as MavenAGI from "../../../../api/index";
2
2
  import * as core from "../../../../core";
3
- import type * as serializers from "../../../index";
3
+ import * as serializers from "../../../index";
4
4
  import { EntityIdBase } from "../../commons/types/EntityIdBase";
5
5
  import { SegmentBase } from "./SegmentBase";
6
6
  import { SegmentStatus } from "./SegmentStatus";
@@ -8,6 +8,7 @@ export declare const SegmentRequest: core.serialization.ObjectSchema<serializers
8
8
  export declare namespace SegmentRequest {
9
9
  interface Raw extends SegmentBase.Raw {
10
10
  segmentId: EntityIdBase.Raw;
11
+ precondition: serializers.Precondition.Raw;
11
12
  status?: SegmentStatus.Raw | null;
12
13
  }
13
14
  }
@@ -36,12 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.SegmentRequest = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
+ const serializers = __importStar(require("../../../index"));
39
40
  const EntityIdBase_1 = require("../../commons/types/EntityIdBase");
40
41
  const SegmentBase_1 = require("./SegmentBase");
41
42
  const SegmentStatus_1 = require("./SegmentStatus");
42
43
  exports.SegmentRequest = core.serialization
43
44
  .object({
44
45
  segmentId: EntityIdBase_1.EntityIdBase,
46
+ precondition: core.serialization.lazy(() => serializers.Precondition),
45
47
  status: SegmentStatus_1.SegmentStatus.optional(),
46
48
  })
47
49
  .extend(SegmentBase_1.SegmentBase);
@@ -1,6 +1,6 @@
1
1
  import type * as MavenAGI from "../../../../api/index";
2
2
  import * as core from "../../../../core";
3
- import type * as serializers from "../../../index";
3
+ import * as serializers from "../../../index";
4
4
  import { EntityId } from "../../commons/types/EntityId";
5
5
  import { SegmentBase } from "./SegmentBase";
6
6
  import { SegmentStatus } from "./SegmentStatus";
@@ -8,6 +8,7 @@ export declare const SegmentResponse: core.serialization.ObjectSchema<serializer
8
8
  export declare namespace SegmentResponse {
9
9
  interface Raw extends SegmentBase.Raw {
10
10
  segmentId: EntityId.Raw;
11
+ precondition: serializers.PreconditionResponse.Raw;
11
12
  createdAt: string;
12
13
  updatedAt: string;
13
14
  referencedKnowledgeBaseCount?: number | null;
@@ -36,12 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.SegmentResponse = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
+ const serializers = __importStar(require("../../../index"));
39
40
  const EntityId_1 = require("../../commons/types/EntityId");
40
41
  const SegmentBase_1 = require("./SegmentBase");
41
42
  const SegmentStatus_1 = require("./SegmentStatus");
42
43
  exports.SegmentResponse = core.serialization
43
44
  .object({
44
45
  segmentId: EntityId_1.EntityId,
46
+ precondition: core.serialization.lazy(() => serializers.PreconditionResponse),
45
47
  createdAt: core.serialization.date(),
46
48
  updatedAt: core.serialization.date(),
47
49
  referencedKnowledgeBaseCount: core.serialization.number().optional(),