mavenagi 0.0.0-alpha.20 → 0.0.0-alpha.22

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 (111) hide show
  1. package/README.md +19 -6
  2. package/api/resources/actions/client/Client.d.ts +1 -1
  3. package/api/resources/actions/client/Client.js +7 -4
  4. package/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +1 -3
  5. package/api/resources/actions/types/ConversationPrecondition.d.ts +2 -6
  6. package/api/resources/actions/types/MetadataPrecondition.d.ts +1 -3
  7. package/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  8. package/api/resources/actions/types/PreconditionBase.js +4 -0
  9. package/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  10. package/api/resources/actions/types/TagsPrecondition.js +4 -0
  11. package/api/resources/actions/types/index.d.ts +4 -2
  12. package/api/resources/actions/types/index.js +4 -2
  13. package/api/resources/appSettings/client/Client.js +2 -1
  14. package/api/resources/conversation/client/Client.d.ts +20 -9
  15. package/api/resources/conversation/client/Client.js +40 -19
  16. package/api/resources/conversation/types/ConversationAnalysis.d.ts +4 -0
  17. package/api/resources/knowledge/client/Client.d.ts +4 -4
  18. package/api/resources/knowledge/client/Client.js +18 -11
  19. package/api/resources/triggers/client/Client.d.ts +1 -1
  20. package/api/resources/triggers/client/Client.js +7 -4
  21. package/api/resources/users/client/Client.d.ts +2 -2
  22. package/api/resources/users/client/Client.js +6 -4
  23. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
  24. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
  25. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
  26. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
  27. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
  28. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
  29. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
  30. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
  31. package/core/schemas/Schema.d.ts +1 -0
  32. package/core/schemas/Schema.js +1 -0
  33. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  34. package/core/schemas/builders/bigint/bigint.js +46 -0
  35. package/core/schemas/builders/bigint/index.d.ts +1 -0
  36. package/core/schemas/builders/bigint/index.js +1 -0
  37. package/core/schemas/builders/index.d.ts +1 -0
  38. package/core/schemas/builders/index.js +1 -0
  39. package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  40. package/dist/api/resources/actions/client/Client.d.ts +1 -1
  41. package/dist/api/resources/actions/client/Client.js +7 -4
  42. package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +1 -3
  43. package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +2 -6
  44. package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +1 -3
  45. package/dist/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  46. package/dist/api/resources/actions/types/PreconditionBase.js +4 -0
  47. package/dist/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  48. package/dist/api/resources/actions/types/TagsPrecondition.js +4 -0
  49. package/dist/api/resources/actions/types/index.d.ts +4 -2
  50. package/dist/api/resources/actions/types/index.js +4 -2
  51. package/dist/api/resources/appSettings/client/Client.js +2 -1
  52. package/dist/api/resources/conversation/client/Client.d.ts +20 -9
  53. package/dist/api/resources/conversation/client/Client.js +40 -19
  54. package/dist/api/resources/conversation/types/ConversationAnalysis.d.ts +4 -0
  55. package/dist/api/resources/knowledge/client/Client.d.ts +4 -4
  56. package/dist/api/resources/knowledge/client/Client.js +18 -11
  57. package/dist/api/resources/triggers/client/Client.d.ts +1 -1
  58. package/dist/api/resources/triggers/client/Client.js +7 -4
  59. package/dist/api/resources/users/client/Client.d.ts +2 -2
  60. package/dist/api/resources/users/client/Client.js +6 -4
  61. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
  62. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
  63. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
  64. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
  65. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
  66. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
  67. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
  68. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
  69. package/dist/core/schemas/Schema.d.ts +1 -0
  70. package/dist/core/schemas/Schema.js +1 -0
  71. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  72. package/dist/core/schemas/builders/bigint/bigint.js +46 -0
  73. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  74. package/dist/core/schemas/builders/bigint/index.js +1 -0
  75. package/dist/core/schemas/builders/index.d.ts +1 -0
  76. package/dist/core/schemas/builders/index.js +1 -0
  77. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  78. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +2 -3
  79. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +5 -4
  80. package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +2 -2
  81. package/dist/serialization/resources/actions/types/ConversationPrecondition.js +2 -3
  82. package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +2 -3
  83. package/dist/serialization/resources/actions/types/MetadataPrecondition.js +5 -4
  84. package/dist/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  85. package/dist/serialization/resources/actions/types/PreconditionBase.js +8 -0
  86. package/dist/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  87. package/dist/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  88. package/dist/serialization/resources/actions/types/index.d.ts +4 -2
  89. package/dist/serialization/resources/actions/types/index.js +4 -2
  90. package/dist/serialization/resources/conversation/types/ConversationAnalysis.d.ts +2 -0
  91. package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +2 -0
  92. package/dist/version.d.ts +1 -0
  93. package/dist/version.js +1 -0
  94. package/package.json +6 -1
  95. package/reference.md +30 -17
  96. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +2 -3
  97. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +5 -4
  98. package/serialization/resources/actions/types/ConversationPrecondition.d.ts +2 -2
  99. package/serialization/resources/actions/types/ConversationPrecondition.js +2 -3
  100. package/serialization/resources/actions/types/MetadataPrecondition.d.ts +2 -3
  101. package/serialization/resources/actions/types/MetadataPrecondition.js +5 -4
  102. package/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  103. package/serialization/resources/actions/types/PreconditionBase.js +8 -0
  104. package/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  105. package/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  106. package/serialization/resources/actions/types/index.d.ts +4 -2
  107. package/serialization/resources/actions/types/index.js +4 -2
  108. package/serialization/resources/conversation/types/ConversationAnalysis.d.ts +2 -0
  109. package/serialization/resources/conversation/types/ConversationAnalysis.js +2 -0
  110. package/version.d.ts +1 -0
  111. package/version.js +1 -0
@@ -0,0 +1,46 @@
1
+ import { SchemaType } from "../../Schema";
2
+ import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType";
3
+ import { maybeSkipValidation } from "../../utils/maybeSkipValidation";
4
+ import { getSchemaUtils } from "../schema-utils";
5
+ export function bigint() {
6
+ const baseSchema = {
7
+ parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
8
+ if (typeof raw !== "string") {
9
+ return {
10
+ ok: false,
11
+ errors: [
12
+ {
13
+ path: breadcrumbsPrefix,
14
+ message: getErrorMessageForIncorrectType(raw, "string"),
15
+ },
16
+ ],
17
+ };
18
+ }
19
+ return {
20
+ ok: true,
21
+ value: BigInt(raw),
22
+ };
23
+ },
24
+ json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
25
+ if (typeof bigint === "bigint") {
26
+ return {
27
+ ok: true,
28
+ value: bigint.toString(),
29
+ };
30
+ }
31
+ else {
32
+ return {
33
+ ok: false,
34
+ errors: [
35
+ {
36
+ path: breadcrumbsPrefix,
37
+ message: getErrorMessageForIncorrectType(bigint, "bigint"),
38
+ },
39
+ ],
40
+ };
41
+ }
42
+ },
43
+ getType: () => SchemaType.BIGINT,
44
+ };
45
+ return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema));
46
+ }
@@ -0,0 +1 @@
1
+ export { bigint } from "./bigint";
@@ -0,0 +1 @@
1
+ export { bigint } from "./bigint";
@@ -1,3 +1,4 @@
1
+ export * from "./bigint";
1
2
  export * from "./date";
2
3
  export * from "./enum";
3
4
  export * from "./lazy";
@@ -1,3 +1,4 @@
1
+ export * from "./bigint";
1
2
  export * from "./date";
2
3
  export * from "./enum";
3
4
  export * from "./lazy";
@@ -8,9 +8,13 @@ function getTypeAsString(value) {
8
8
  if (value === null) {
9
9
  return "null";
10
10
  }
11
+ if (value instanceof BigInt) {
12
+ return "BigInt";
13
+ }
11
14
  switch (typeof value) {
12
15
  case "string":
13
16
  return `"${value}"`;
17
+ case "bigint":
14
18
  case "number":
15
19
  case "boolean":
16
20
  case "undefined":
@@ -4,11 +4,10 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { PreconditionOperator } from "./PreconditionOperator";
7
+ import { PreconditionBase } from "./PreconditionBase";
8
8
  export declare const ConversationExecutedActionPrecondition: core.serialization.ObjectSchema<serializers.ConversationExecutedActionPrecondition.Raw, MavenAGI.ConversationExecutedActionPrecondition>;
9
9
  export declare namespace ConversationExecutedActionPrecondition {
10
- interface Raw {
11
- operator?: PreconditionOperator.Raw | null;
10
+ interface Raw extends PreconditionBase.Raw {
12
11
  actionId: string;
13
12
  appId?: string | null;
14
13
  }
@@ -2,9 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
- import { PreconditionOperator } from "./PreconditionOperator";
6
- export const ConversationExecutedActionPrecondition = core.serialization.object({
7
- operator: PreconditionOperator.optional(),
5
+ import { PreconditionBase } from "./PreconditionBase";
6
+ export const ConversationExecutedActionPrecondition = core.serialization
7
+ .object({
8
8
  actionId: core.serialization.string(),
9
9
  appId: core.serialization.string().optional(),
10
- });
10
+ })
11
+ .extend(PreconditionBase);
@@ -4,14 +4,14 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
+ import { TagsPrecondition } from "./TagsPrecondition";
7
8
  import { MetadataPrecondition } from "./MetadataPrecondition";
8
9
  import { ConversationExecutedActionPrecondition } from "./ConversationExecutedActionPrecondition";
9
10
  export declare const ConversationPrecondition: core.serialization.Schema<serializers.ConversationPrecondition.Raw, MavenAGI.ConversationPrecondition>;
10
11
  export declare namespace ConversationPrecondition {
11
12
  type Raw = ConversationPrecondition.Tags | ConversationPrecondition.Metadata | ConversationPrecondition.ActionExecuted;
12
- interface Tags {
13
+ interface Tags extends TagsPrecondition.Raw {
13
14
  conversationPreconditionType: "tags";
14
- value: string[];
15
15
  }
16
16
  interface Metadata extends MetadataPrecondition.Raw {
17
17
  conversationPreconditionType: "metadata";
@@ -2,13 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
+ import { TagsPrecondition } from "./TagsPrecondition";
5
6
  import { MetadataPrecondition } from "./MetadataPrecondition";
6
7
  import { ConversationExecutedActionPrecondition } from "./ConversationExecutedActionPrecondition";
7
8
  export const ConversationPrecondition = core.serialization
8
9
  .union("conversationPreconditionType", {
9
- tags: core.serialization.object({
10
- value: core.serialization.set(core.serialization.string()),
11
- }),
10
+ tags: TagsPrecondition,
12
11
  metadata: MetadataPrecondition,
13
12
  actionExecuted: ConversationExecutedActionPrecondition,
14
13
  })
@@ -4,11 +4,10 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { PreconditionOperator } from "./PreconditionOperator";
7
+ import { PreconditionBase } from "./PreconditionBase";
8
8
  export declare const MetadataPrecondition: core.serialization.ObjectSchema<serializers.MetadataPrecondition.Raw, MavenAGI.MetadataPrecondition>;
9
9
  export declare namespace MetadataPrecondition {
10
- interface Raw {
11
- operator?: PreconditionOperator.Raw | null;
10
+ interface Raw extends PreconditionBase.Raw {
12
11
  key: string;
13
12
  value?: string | null;
14
13
  }
@@ -2,9 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
- import { PreconditionOperator } from "./PreconditionOperator";
6
- export const MetadataPrecondition = core.serialization.object({
7
- operator: PreconditionOperator.optional(),
5
+ import { PreconditionBase } from "./PreconditionBase";
6
+ export const MetadataPrecondition = core.serialization
7
+ .object({
8
8
  key: core.serialization.string(),
9
9
  value: core.serialization.string().optional(),
10
- });
10
+ })
11
+ .extend(PreconditionBase);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as MavenAGI from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { PreconditionOperator } from "./PreconditionOperator";
8
+ export declare const PreconditionBase: core.serialization.ObjectSchema<serializers.PreconditionBase.Raw, MavenAGI.PreconditionBase>;
9
+ export declare namespace PreconditionBase {
10
+ interface Raw {
11
+ operator?: PreconditionOperator.Raw | null;
12
+ }
13
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core";
5
+ import { PreconditionOperator } from "./PreconditionOperator";
6
+ export const PreconditionBase = core.serialization.object({
7
+ operator: PreconditionOperator.optional(),
8
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as MavenAGI from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { PreconditionBase } from "./PreconditionBase";
8
+ export declare const TagsPrecondition: core.serialization.ObjectSchema<serializers.TagsPrecondition.Raw, MavenAGI.TagsPrecondition>;
9
+ export declare namespace TagsPrecondition {
10
+ interface Raw extends PreconditionBase.Raw {
11
+ tags: string[];
12
+ }
13
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core";
5
+ import { PreconditionBase } from "./PreconditionBase";
6
+ export const TagsPrecondition = core.serialization
7
+ .object({
8
+ tags: core.serialization.set(core.serialization.string()),
9
+ })
10
+ .extend(PreconditionBase);
@@ -3,9 +3,11 @@ export * from "./ActionParameter";
3
3
  export * from "./ActionRequest";
4
4
  export * from "./ActionResponse";
5
5
  export * from "./Precondition";
6
- export * from "./MetadataPrecondition";
7
6
  export * from "./PreconditionOperator";
7
+ export * from "./PreconditionBase";
8
+ export * from "./MetadataPrecondition";
8
9
  export * from "./ConversationPrecondition";
9
- export * from "./PreconditionGroup";
10
10
  export * from "./PreconditionGroupOperator";
11
+ export * from "./PreconditionGroup";
12
+ export * from "./TagsPrecondition";
11
13
  export * from "./ConversationExecutedActionPrecondition";
@@ -3,9 +3,11 @@ export * from "./ActionParameter";
3
3
  export * from "./ActionRequest";
4
4
  export * from "./ActionResponse";
5
5
  export * from "./Precondition";
6
- export * from "./MetadataPrecondition";
7
6
  export * from "./PreconditionOperator";
7
+ export * from "./PreconditionBase";
8
+ export * from "./MetadataPrecondition";
8
9
  export * from "./ConversationPrecondition";
9
- export * from "./PreconditionGroup";
10
10
  export * from "./PreconditionGroupOperator";
11
+ export * from "./PreconditionGroup";
12
+ export * from "./TagsPrecondition";
11
13
  export * from "./ConversationExecutedActionPrecondition";
@@ -10,6 +10,8 @@ export declare namespace ConversationAnalysis {
10
10
  interface Raw {
11
11
  userRequest?: string | null;
12
12
  agentResponse?: string | null;
13
+ resolutionStatus?: string | null;
14
+ category?: string | null;
13
15
  sentiment?: Sentiment.Raw | null;
14
16
  }
15
17
  }
@@ -6,5 +6,7 @@ import { Sentiment } from "./Sentiment";
6
6
  export const ConversationAnalysis = core.serialization.object({
7
7
  userRequest: core.serialization.string().optional(),
8
8
  agentResponse: core.serialization.string().optional(),
9
+ resolutionStatus: core.serialization.string().optional(),
10
+ category: core.serialization.string().optional(),
9
11
  sentiment: Sentiment.optional(),
10
12
  });
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION = "0.0.0-alpha.22";
@@ -0,0 +1 @@
1
+ export const SDK_VERSION = "0.0.0-alpha.22";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mavenagi",
3
- "version": "0.0.0-alpha.20",
3
+ "version": "0.0.0-alpha.22",
4
4
  "private": false,
5
5
  "repository": "https://github.com/mavenagi/mavenagi-node",
6
6
  "main": "./index.js",
@@ -17,12 +17,17 @@
17
17
  "formdata-node": "^6.0.3",
18
18
  "node-fetch": "2.7.0",
19
19
  "qs": "6.11.2",
20
+ "readable-stream": "^4.5.2",
20
21
  "js-base64": "3.7.2"
21
22
  },
22
23
  "devDependencies": {
23
24
  "@types/url-join": "4.0.1",
24
25
  "@types/qs": "6.9.8",
25
26
  "@types/node-fetch": "2.6.9",
27
+ "@types/readable-stream": "^4.0.15",
28
+ "fetch-mock-jest": "^1.5.1",
29
+ "webpack": "^5.94.0",
30
+ "ts-loader": "^9.3.1",
26
31
  "jest": "29.7.0",
27
32
  "@types/jest": "29.5.5",
28
33
  "ts-jest": "29.1.1",
package/reference.md CHANGED
@@ -40,7 +40,7 @@ await client.actions.createOrUpdate({
40
40
  userFormParameters: [],
41
41
  precondition: {
42
42
  preconditionType: "group",
43
- operator: MavenAGI.PreconditionGroupOperator.And,
43
+ operator: "AND",
44
44
  preconditions: [
45
45
  {
46
46
  preconditionType: "user",
@@ -304,16 +304,29 @@ await client.conversation.initialize({
304
304
  conversationId: {
305
305
  referenceId: "string",
306
306
  },
307
- messages: [{}],
307
+ messages: [
308
+ {
309
+ conversationMessageId: {
310
+ referenceId: "string",
311
+ },
312
+ userId: {
313
+ referenceId: "string",
314
+ },
315
+ text: "string",
316
+ userMessageType: "USER",
317
+ createdAt: "2024-01-15T09:30:00Z",
318
+ updatedAt: "2024-01-15T09:30:00Z",
319
+ },
320
+ ],
308
321
  responseConfig: {
309
- capabilities: [MavenAGI.Capability.Markdown],
322
+ capabilities: ["MARKDOWN"],
310
323
  isCopilot: true,
311
- responseLength: MavenAGI.ResponseLength.Short,
324
+ responseLength: "SHORT",
312
325
  },
313
326
  subject: "string",
314
327
  url: "string",
315
- createdAt: new Date("2024-01-15T09:30:00.000Z"),
316
- updatedAt: new Date("2024-01-15T09:30:00.000Z"),
328
+ createdAt: "2024-01-15T09:30:00Z",
329
+ updatedAt: "2024-01-15T09:30:00Z",
317
330
  tags: new Set(["string"]),
318
331
  metadata: {
319
332
  string: "string",
@@ -453,9 +466,9 @@ await client.conversation.appendNewMessages("string", [
453
466
  referenceId: "string",
454
467
  },
455
468
  text: "string",
456
- userMessageType: MavenAGI.UserConversationMessageType.User,
457
- createdAt: new Date("2024-01-15T09:30:00.000Z"),
458
- updatedAt: new Date("2024-01-15T09:30:00.000Z"),
469
+ userMessageType: "USER",
470
+ createdAt: "2024-01-15T09:30:00Z",
471
+ updatedAt: "2024-01-15T09:30:00Z",
459
472
  },
460
473
  ]);
461
474
  ```
@@ -836,7 +849,7 @@ await client.conversation.createFeedback({
836
849
  conversationMessageId: {
837
850
  referenceId: "string",
838
851
  },
839
- type: MavenAGI.FeedbackType.ThumbsUp,
852
+ type: "THUMBS_UP",
840
853
  text: "string",
841
854
  });
842
855
  ```
@@ -1059,7 +1072,7 @@ await client.knowledge.createOrUpdateKnowledgeBase({
1059
1072
  referenceId: "help-center",
1060
1073
  },
1061
1074
  name: "Help center",
1062
- type: MavenAGI.KnowledgeBaseType.Api,
1075
+ type: "API",
1063
1076
  });
1064
1077
  ```
1065
1078
 
@@ -1187,7 +1200,7 @@ Create a new knowledge base version. Only supported on API knowledge bases. Will
1187
1200
 
1188
1201
  ```typescript
1189
1202
  await client.knowledge.createKnowledgeBaseVersion("help-center", {
1190
- type: MavenAGI.KnowledgeBaseVersionType.Full,
1203
+ type: "FULL",
1191
1204
  });
1192
1205
  ```
1193
1206
 
@@ -1326,7 +1339,7 @@ await client.knowledge.createKnowledgeDocument("help-center", {
1326
1339
  knowledgeDocumentId: {
1327
1340
  referenceId: "getting-started",
1328
1341
  },
1329
- contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
1342
+ contentType: "MARKDOWN",
1330
1343
  content: "## Getting started\\nThis is a getting started guide for the help center.",
1331
1344
  title: "Getting started",
1332
1345
  });
@@ -1404,7 +1417,7 @@ await client.knowledge.updateKnowledgeDocument("help-center", {
1404
1417
  knowledgeDocumentId: {
1405
1418
  referenceId: "getting-started",
1406
1419
  },
1407
- contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
1420
+ contentType: "MARKDOWN",
1408
1421
  content: "## Getting started\\nThis is a getting started guide for the help center.",
1409
1422
  title: "Getting started",
1410
1423
  });
@@ -1556,7 +1569,7 @@ await client.triggers.createOrUpdate({
1556
1569
  referenceId: "store-in-snowflake",
1557
1570
  },
1558
1571
  description: "Stores conversation data in Snowflake",
1559
- type: MavenAGI.EventTriggerType.ConversationCreated,
1572
+ type: "CONVERSATION_CREATED",
1560
1573
  });
1561
1574
  ```
1562
1575
 
@@ -1755,13 +1768,13 @@ await client.users.createOrUpdate({
1755
1768
  identifiers: new Set([
1756
1769
  {
1757
1770
  value: "joe@myapp.com",
1758
- type: MavenAGI.AppUserIdentifyingPropertyType.Email,
1771
+ type: "EMAIL",
1759
1772
  },
1760
1773
  ]),
1761
1774
  data: {
1762
1775
  name: {
1763
1776
  value: "Joe",
1764
- visibility: MavenAGI.VisibilityType.Visible,
1777
+ visibility: "VISIBLE",
1765
1778
  },
1766
1779
  },
1767
1780
  });
@@ -4,11 +4,10 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { PreconditionOperator } from "./PreconditionOperator";
7
+ import { PreconditionBase } from "./PreconditionBase";
8
8
  export declare const ConversationExecutedActionPrecondition: core.serialization.ObjectSchema<serializers.ConversationExecutedActionPrecondition.Raw, MavenAGI.ConversationExecutedActionPrecondition>;
9
9
  export declare namespace ConversationExecutedActionPrecondition {
10
- interface Raw {
11
- operator?: PreconditionOperator.Raw | null;
10
+ interface Raw extends PreconditionBase.Raw {
12
11
  actionId: string;
13
12
  appId?: string | null;
14
13
  }
@@ -2,9 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
- import { PreconditionOperator } from "./PreconditionOperator";
6
- export const ConversationExecutedActionPrecondition = core.serialization.object({
7
- operator: PreconditionOperator.optional(),
5
+ import { PreconditionBase } from "./PreconditionBase";
6
+ export const ConversationExecutedActionPrecondition = core.serialization
7
+ .object({
8
8
  actionId: core.serialization.string(),
9
9
  appId: core.serialization.string().optional(),
10
- });
10
+ })
11
+ .extend(PreconditionBase);
@@ -4,14 +4,14 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
+ import { TagsPrecondition } from "./TagsPrecondition";
7
8
  import { MetadataPrecondition } from "./MetadataPrecondition";
8
9
  import { ConversationExecutedActionPrecondition } from "./ConversationExecutedActionPrecondition";
9
10
  export declare const ConversationPrecondition: core.serialization.Schema<serializers.ConversationPrecondition.Raw, MavenAGI.ConversationPrecondition>;
10
11
  export declare namespace ConversationPrecondition {
11
12
  type Raw = ConversationPrecondition.Tags | ConversationPrecondition.Metadata | ConversationPrecondition.ActionExecuted;
12
- interface Tags {
13
+ interface Tags extends TagsPrecondition.Raw {
13
14
  conversationPreconditionType: "tags";
14
- value: string[];
15
15
  }
16
16
  interface Metadata extends MetadataPrecondition.Raw {
17
17
  conversationPreconditionType: "metadata";
@@ -2,13 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
+ import { TagsPrecondition } from "./TagsPrecondition";
5
6
  import { MetadataPrecondition } from "./MetadataPrecondition";
6
7
  import { ConversationExecutedActionPrecondition } from "./ConversationExecutedActionPrecondition";
7
8
  export const ConversationPrecondition = core.serialization
8
9
  .union("conversationPreconditionType", {
9
- tags: core.serialization.object({
10
- value: core.serialization.set(core.serialization.string()),
11
- }),
10
+ tags: TagsPrecondition,
12
11
  metadata: MetadataPrecondition,
13
12
  actionExecuted: ConversationExecutedActionPrecondition,
14
13
  })
@@ -4,11 +4,10 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { PreconditionOperator } from "./PreconditionOperator";
7
+ import { PreconditionBase } from "./PreconditionBase";
8
8
  export declare const MetadataPrecondition: core.serialization.ObjectSchema<serializers.MetadataPrecondition.Raw, MavenAGI.MetadataPrecondition>;
9
9
  export declare namespace MetadataPrecondition {
10
- interface Raw {
11
- operator?: PreconditionOperator.Raw | null;
10
+ interface Raw extends PreconditionBase.Raw {
12
11
  key: string;
13
12
  value?: string | null;
14
13
  }
@@ -2,9 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
- import { PreconditionOperator } from "./PreconditionOperator";
6
- export const MetadataPrecondition = core.serialization.object({
7
- operator: PreconditionOperator.optional(),
5
+ import { PreconditionBase } from "./PreconditionBase";
6
+ export const MetadataPrecondition = core.serialization
7
+ .object({
8
8
  key: core.serialization.string(),
9
9
  value: core.serialization.string().optional(),
10
- });
10
+ })
11
+ .extend(PreconditionBase);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as MavenAGI from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { PreconditionOperator } from "./PreconditionOperator";
8
+ export declare const PreconditionBase: core.serialization.ObjectSchema<serializers.PreconditionBase.Raw, MavenAGI.PreconditionBase>;
9
+ export declare namespace PreconditionBase {
10
+ interface Raw {
11
+ operator?: PreconditionOperator.Raw | null;
12
+ }
13
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core";
5
+ import { PreconditionOperator } from "./PreconditionOperator";
6
+ export const PreconditionBase = core.serialization.object({
7
+ operator: PreconditionOperator.optional(),
8
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as MavenAGI from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { PreconditionBase } from "./PreconditionBase";
8
+ export declare const TagsPrecondition: core.serialization.ObjectSchema<serializers.TagsPrecondition.Raw, MavenAGI.TagsPrecondition>;
9
+ export declare namespace TagsPrecondition {
10
+ interface Raw extends PreconditionBase.Raw {
11
+ tags: string[];
12
+ }
13
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core";
5
+ import { PreconditionBase } from "./PreconditionBase";
6
+ export const TagsPrecondition = core.serialization
7
+ .object({
8
+ tags: core.serialization.set(core.serialization.string()),
9
+ })
10
+ .extend(PreconditionBase);
@@ -3,9 +3,11 @@ export * from "./ActionParameter";
3
3
  export * from "./ActionRequest";
4
4
  export * from "./ActionResponse";
5
5
  export * from "./Precondition";
6
- export * from "./MetadataPrecondition";
7
6
  export * from "./PreconditionOperator";
7
+ export * from "./PreconditionBase";
8
+ export * from "./MetadataPrecondition";
8
9
  export * from "./ConversationPrecondition";
9
- export * from "./PreconditionGroup";
10
10
  export * from "./PreconditionGroupOperator";
11
+ export * from "./PreconditionGroup";
12
+ export * from "./TagsPrecondition";
11
13
  export * from "./ConversationExecutedActionPrecondition";
@@ -3,9 +3,11 @@ export * from "./ActionParameter";
3
3
  export * from "./ActionRequest";
4
4
  export * from "./ActionResponse";
5
5
  export * from "./Precondition";
6
- export * from "./MetadataPrecondition";
7
6
  export * from "./PreconditionOperator";
7
+ export * from "./PreconditionBase";
8
+ export * from "./MetadataPrecondition";
8
9
  export * from "./ConversationPrecondition";
9
- export * from "./PreconditionGroup";
10
10
  export * from "./PreconditionGroupOperator";
11
+ export * from "./PreconditionGroup";
12
+ export * from "./TagsPrecondition";
11
13
  export * from "./ConversationExecutedActionPrecondition";
@@ -10,6 +10,8 @@ export declare namespace ConversationAnalysis {
10
10
  interface Raw {
11
11
  userRequest?: string | null;
12
12
  agentResponse?: string | null;
13
+ resolutionStatus?: string | null;
14
+ category?: string | null;
13
15
  sentiment?: Sentiment.Raw | null;
14
16
  }
15
17
  }
@@ -6,5 +6,7 @@ import { Sentiment } from "./Sentiment";
6
6
  export const ConversationAnalysis = core.serialization.object({
7
7
  userRequest: core.serialization.string().optional(),
8
8
  agentResponse: core.serialization.string().optional(),
9
+ resolutionStatus: core.serialization.string().optional(),
10
+ category: core.serialization.string().optional(),
9
11
  sentiment: Sentiment.optional(),
10
12
  });
package/version.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION = "0.0.0-alpha.22";
package/version.js ADDED
@@ -0,0 +1 @@
1
+ export const SDK_VERSION = "0.0.0-alpha.22";