mavenagi 0.0.0-alpha.11 → 0.0.0-alpha.12

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 (139) hide show
  1. package/Client.d.ts +9 -0
  2. package/README.md +41 -4
  3. package/api/resources/actions/client/Client.d.ts +9 -0
  4. package/api/resources/actions/client/Client.js +18 -15
  5. package/api/resources/commons/types/EntityType.d.ts +2 -1
  6. package/api/resources/commons/types/EntityType.js +1 -0
  7. package/api/resources/commons/types/FeedbackBase.d.ts +10 -0
  8. package/api/resources/commons/types/index.d.ts +1 -1
  9. package/api/resources/commons/types/index.js +1 -1
  10. package/api/resources/conversation/client/Client.d.ts +18 -3
  11. package/api/resources/conversation/client/Client.js +71 -58
  12. package/api/resources/conversation/types/FeedbackRequest.d.ts +8 -1
  13. package/api/resources/knowledge/client/Client.d.ts +9 -0
  14. package/api/resources/knowledge/client/Client.js +44 -37
  15. package/api/resources/triggers/client/Client.d.ts +9 -0
  16. package/api/resources/triggers/client/Client.js +18 -15
  17. package/api/resources/users/client/Client.d.ts +9 -0
  18. package/api/resources/users/client/Client.js +13 -11
  19. package/core/fetcher/Fetcher.d.ts +4 -1
  20. package/core/fetcher/Fetcher.js +18 -159
  21. package/core/fetcher/createRequestUrl.d.ts +1 -0
  22. package/core/fetcher/createRequestUrl.js +6 -0
  23. package/core/fetcher/getFetchFn.d.ts +4 -0
  24. package/core/fetcher/getFetchFn.js +32 -0
  25. package/core/fetcher/getRequestBody.d.ts +7 -0
  26. package/core/fetcher/getRequestBody.js +19 -0
  27. package/core/fetcher/getResponseBody.d.ts +1 -0
  28. package/core/fetcher/getResponseBody.js +48 -0
  29. package/core/fetcher/makeRequest.d.ts +1 -0
  30. package/core/fetcher/makeRequest.js +38 -0
  31. package/core/fetcher/requestWithRetries.d.ts +1 -0
  32. package/core/fetcher/requestWithRetries.js +28 -0
  33. package/core/fetcher/signals.d.ts +12 -0
  34. package/core/fetcher/signals.js +32 -0
  35. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  36. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +222 -0
  37. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  38. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +104 -0
  39. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +30 -0
  40. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +204 -0
  41. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +17 -0
  42. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
  43. package/core/runtime/runtime.d.ts +1 -0
  44. package/core/runtime/runtime.js +1 -0
  45. package/core/schemas/Schema.d.ts +7 -4
  46. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  47. package/core/schemas/builders/lazy/lazy.js +8 -19
  48. package/core/schemas/builders/lazy/lazyObject.js +1 -10
  49. package/core/schemas/builders/list/list.js +31 -44
  50. package/core/schemas/builders/object/object.js +90 -111
  51. package/core/schemas/builders/object/types.d.ts +2 -2
  52. package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  53. package/core/schemas/builders/record/record.js +49 -60
  54. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  55. package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  56. package/core/schemas/builders/set/set.js +6 -15
  57. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  58. package/core/schemas/builders/union/union.js +51 -62
  59. package/core/schemas/utils/maybeSkipValidation.js +3 -12
  60. package/dist/Client.d.ts +9 -0
  61. package/dist/api/resources/actions/client/Client.d.ts +9 -0
  62. package/dist/api/resources/actions/client/Client.js +18 -15
  63. package/dist/api/resources/commons/types/EntityType.d.ts +2 -1
  64. package/dist/api/resources/commons/types/EntityType.js +1 -0
  65. package/dist/api/resources/commons/types/FeedbackBase.d.ts +10 -0
  66. package/dist/api/resources/commons/types/index.d.ts +1 -1
  67. package/dist/api/resources/commons/types/index.js +1 -1
  68. package/dist/api/resources/conversation/client/Client.d.ts +18 -3
  69. package/dist/api/resources/conversation/client/Client.js +71 -58
  70. package/dist/api/resources/conversation/types/FeedbackRequest.d.ts +8 -1
  71. package/dist/api/resources/knowledge/client/Client.d.ts +9 -0
  72. package/dist/api/resources/knowledge/client/Client.js +44 -37
  73. package/dist/api/resources/triggers/client/Client.d.ts +9 -0
  74. package/dist/api/resources/triggers/client/Client.js +18 -15
  75. package/dist/api/resources/users/client/Client.d.ts +9 -0
  76. package/dist/api/resources/users/client/Client.js +13 -11
  77. package/dist/core/fetcher/Fetcher.d.ts +4 -1
  78. package/dist/core/fetcher/Fetcher.js +18 -159
  79. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  80. package/dist/core/fetcher/createRequestUrl.js +6 -0
  81. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  82. package/dist/core/fetcher/getFetchFn.js +32 -0
  83. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  84. package/dist/core/fetcher/getRequestBody.js +19 -0
  85. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  86. package/dist/core/fetcher/getResponseBody.js +48 -0
  87. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  88. package/dist/core/fetcher/makeRequest.js +38 -0
  89. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  90. package/dist/core/fetcher/requestWithRetries.js +28 -0
  91. package/dist/core/fetcher/signals.d.ts +12 -0
  92. package/dist/core/fetcher/signals.js +32 -0
  93. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  94. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +222 -0
  95. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  96. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +104 -0
  97. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +30 -0
  98. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +204 -0
  99. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +17 -0
  100. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
  101. package/dist/core/runtime/runtime.d.ts +1 -0
  102. package/dist/core/runtime/runtime.js +1 -0
  103. package/dist/core/schemas/Schema.d.ts +7 -4
  104. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  105. package/dist/core/schemas/builders/lazy/lazy.js +8 -19
  106. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
  107. package/dist/core/schemas/builders/list/list.js +31 -44
  108. package/dist/core/schemas/builders/object/object.js +90 -111
  109. package/dist/core/schemas/builders/object/types.d.ts +2 -2
  110. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  111. package/dist/core/schemas/builders/record/record.js +49 -60
  112. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  113. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  114. package/dist/core/schemas/builders/set/set.js +6 -15
  115. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  116. package/dist/core/schemas/builders/union/union.js +51 -62
  117. package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
  118. package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
  119. package/dist/serialization/resources/commons/types/EntityType.js +1 -0
  120. package/{serialization/resources/commons/types/Feedback.d.ts → dist/serialization/resources/commons/types/FeedbackBase.d.ts} +2 -5
  121. package/{serialization/resources/commons/types/Feedback.js → dist/serialization/resources/commons/types/FeedbackBase.js} +1 -4
  122. package/dist/serialization/resources/commons/types/index.d.ts +1 -1
  123. package/dist/serialization/resources/commons/types/index.js +1 -1
  124. package/dist/serialization/resources/conversation/types/FeedbackRequest.d.ts +7 -2
  125. package/dist/serialization/resources/conversation/types/FeedbackRequest.js +10 -2
  126. package/package.json +7 -2
  127. package/reference.md +1723 -0
  128. package/serialization/resources/commons/types/EntityType.d.ts +1 -1
  129. package/serialization/resources/commons/types/EntityType.js +1 -0
  130. package/{dist/serialization/resources/commons/types/Feedback.d.ts → serialization/resources/commons/types/FeedbackBase.d.ts} +2 -5
  131. package/{dist/serialization/resources/commons/types/Feedback.js → serialization/resources/commons/types/FeedbackBase.js} +1 -4
  132. package/serialization/resources/commons/types/index.d.ts +1 -1
  133. package/serialization/resources/commons/types/index.js +1 -1
  134. package/serialization/resources/conversation/types/FeedbackRequest.d.ts +7 -2
  135. package/serialization/resources/conversation/types/FeedbackRequest.js +10 -2
  136. package/api/resources/commons/types/Feedback.d.ts +0 -16
  137. package/dist/api/resources/commons/types/Feedback.d.ts +0 -16
  138. /package/api/resources/commons/types/{Feedback.js → FeedbackBase.js} +0 -0
  139. /package/dist/api/resources/commons/types/{Feedback.js → FeedbackBase.js} +0 -0
@@ -6,5 +6,5 @@ import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  export declare const EntityType: core.serialization.Schema<serializers.EntityType.Raw, MavenAGI.EntityType>;
8
8
  export declare namespace EntityType {
9
- type Raw = "CONVERSATION" | "CONVERSATION_MESSAGE" | "KNOWLEDGE_BASE" | "KNOWLEDGE_DOCUMENT" | "ACTION" | "USER" | "USER_EVENT" | "EVENT_TRIGGER" | "USER_PROFILE";
9
+ type Raw = "CONVERSATION" | "CONVERSATION_MESSAGE" | "KNOWLEDGE_BASE" | "KNOWLEDGE_DOCUMENT" | "ACTION" | "USER" | "USER_EVENT" | "EVENT_TRIGGER" | "USER_PROFILE" | "FEEDBACK";
10
10
  }
@@ -12,4 +12,5 @@ export const EntityType = core.serialization.enum_([
12
12
  "USER_EVENT",
13
13
  "EVENT_TRIGGER",
14
14
  "USER_PROFILE",
15
+ "FEEDBACK",
15
16
  ]);
@@ -5,12 +5,9 @@ import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { FeedbackType } from "./FeedbackType";
8
- export declare const Feedback: core.serialization.ObjectSchema<serializers.Feedback.Raw, MavenAGI.Feedback>;
9
- export declare namespace Feedback {
8
+ export declare const FeedbackBase: core.serialization.ObjectSchema<serializers.FeedbackBase.Raw, MavenAGI.FeedbackBase>;
9
+ export declare namespace FeedbackBase {
10
10
  interface Raw {
11
- id: string;
12
- conversationId: string;
13
- conversationMessageId: string;
14
11
  type: FeedbackType.Raw;
15
12
  text?: string | null;
16
13
  }
@@ -3,10 +3,7 @@
3
3
  */
4
4
  import * as core from "../../../../core";
5
5
  import { FeedbackType } from "./FeedbackType";
6
- export const Feedback = core.serialization.object({
7
- id: core.serialization.string(),
8
- conversationId: core.serialization.string(),
9
- conversationMessageId: core.serialization.string(),
6
+ export const FeedbackBase = core.serialization.object({
10
7
  type: FeedbackType,
11
8
  text: core.serialization.string().optional(),
12
9
  });
@@ -3,8 +3,8 @@ export * from "./EntityType";
3
3
  export * from "./EntityIdBase";
4
4
  export * from "./EntityId";
5
5
  export * from "./User";
6
+ export * from "./FeedbackBase";
6
7
  export * from "./FeedbackType";
7
- export * from "./Feedback";
8
8
  export * from "./AppUserIdentification";
9
9
  export * from "./AppUserIdentifier";
10
10
  export * from "./AppUserIdentifyingPropertyType";
@@ -3,8 +3,8 @@ export * from "./EntityType";
3
3
  export * from "./EntityIdBase";
4
4
  export * from "./EntityId";
5
5
  export * from "./User";
6
+ export * from "./FeedbackBase";
6
7
  export * from "./FeedbackType";
7
- export * from "./Feedback";
8
8
  export * from "./AppUserIdentification";
9
9
  export * from "./AppUserIdentifier";
10
10
  export * from "./AppUserIdentifyingPropertyType";
@@ -4,8 +4,13 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { Feedback } from "../../commons/types/Feedback";
7
+ import { EntityIdBase } from "../../commons/types/EntityIdBase";
8
+ import { FeedbackBase } from "../../commons/types/FeedbackBase";
8
9
  export declare const FeedbackRequest: core.serialization.ObjectSchema<serializers.FeedbackRequest.Raw, MavenAGI.FeedbackRequest>;
9
10
  export declare namespace FeedbackRequest {
10
- type Raw = Feedback.Raw;
11
+ interface Raw extends FeedbackBase.Raw {
12
+ feedbackId: EntityIdBase.Raw;
13
+ conversationId: EntityIdBase.Raw;
14
+ conversationMessageId: EntityIdBase.Raw;
15
+ }
11
16
  }
@@ -1,5 +1,13 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import { Feedback } from "../../commons/types/Feedback";
5
- export const FeedbackRequest = Feedback;
4
+ import * as core from "../../../../core";
5
+ import { EntityIdBase } from "../../commons/types/EntityIdBase";
6
+ import { FeedbackBase } from "../../commons/types/FeedbackBase";
7
+ export const FeedbackRequest = core.serialization
8
+ .object({
9
+ feedbackId: EntityIdBase,
10
+ conversationId: EntityIdBase,
11
+ conversationMessageId: EntityIdBase,
12
+ })
13
+ .extend(FeedbackBase);
@@ -1,16 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as MavenAGI from "../../../index";
5
- export interface Feedback {
6
- /** The ID of the piece of feedback */
7
- id: string;
8
- /** The ID of the conversation the feedback is about */
9
- conversationId: string;
10
- /** The ID of the conversation message the feedback is about */
11
- conversationMessageId: string;
12
- /** The type of feedback */
13
- type: MavenAGI.FeedbackType;
14
- /** The feedback text */
15
- text?: string;
16
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as MavenAGI from "../../../index";
5
- export interface Feedback {
6
- /** The ID of the piece of feedback */
7
- id: string;
8
- /** The ID of the conversation the feedback is about */
9
- conversationId: string;
10
- /** The ID of the conversation message the feedback is about */
11
- conversationMessageId: string;
12
- /** The type of feedback */
13
- type: MavenAGI.FeedbackType;
14
- /** The feedback text */
15
- text?: string;
16
- }