mavenagi 1.2.65 → 1.2.66

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 (159) hide show
  1. package/BaseClient.d.ts +4 -2
  2. package/BaseClient.js +8 -3
  3. package/README.md +2 -2
  4. package/api/resources/analytics/client/Client.d.ts +0 -38
  5. package/api/resources/analytics/client/Client.js +0 -120
  6. package/api/resources/analytics/types/AgentUserGroupBy.d.ts +15 -0
  7. package/api/resources/analytics/types/AgentUserRowIdentifier.d.ts +2 -0
  8. package/api/resources/analytics/types/AgentUserTableRequest.d.ts +7 -0
  9. package/api/resources/analytics/types/AgentUserTableResponse.d.ts +4 -1
  10. package/api/resources/analytics/types/index.d.ts +1 -10
  11. package/api/resources/analytics/types/index.js +1 -10
  12. package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +0 -4
  13. package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +5 -0
  14. package/api/resources/capabilities/types/CapabilityExecutionBase.d.ts +5 -0
  15. package/api/resources/capabilities/types/CapabilityExecutionsSearchResponse.d.ts +3 -1
  16. package/api/resources/commons/types/AdditionalDataKey.d.ts +81 -3
  17. package/api/resources/commons/types/AdditionalDataKey.js +81 -3
  18. package/api/resources/commons/types/BaseConversationResponse.d.ts +6 -0
  19. package/api/resources/commons/types/BotMessage.d.ts +1 -1
  20. package/api/resources/commons/types/ConversationResponse.d.ts +1 -0
  21. package/api/resources/commons/types/ConversationValueSource.d.ts +4 -1
  22. package/api/resources/commons/types/ErrorReason.d.ts +2 -2
  23. package/api/resources/commons/types/ErrorReason.js +2 -2
  24. package/api/resources/commons/types/EventBaseNoId.d.ts +6 -0
  25. package/api/resources/commons/types/EventFilter.d.ts +2 -0
  26. package/api/resources/commons/types/EventTriggerType.d.ts +7 -0
  27. package/api/resources/commons/types/EventTriggerType.js +7 -0
  28. package/api/resources/commons/types/InitializeConversationResponse.d.ts +40 -0
  29. package/api/resources/commons/types/MetadataConversationValueFilter.d.ts +3 -3
  30. package/api/resources/commons/types/SimulationActionBehavior.d.ts +3 -2
  31. package/api/resources/commons/types/SimulationActionMock.d.ts +2 -1
  32. package/api/resources/commons/types/UserDataValueSource.d.ts +8 -0
  33. package/api/resources/commons/types/UserEventName.d.ts +79 -4
  34. package/api/resources/commons/types/UserEventName.js +79 -4
  35. package/api/resources/commons/types/index.d.ts +2 -0
  36. package/api/resources/commons/types/index.js +2 -0
  37. package/api/resources/conversation/client/Client.d.ts +42 -22
  38. package/api/resources/conversation/client/Client.js +44 -23
  39. package/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +2 -0
  40. package/api/resources/conversation/types/ConversationRequest.d.ts +45 -0
  41. package/api/resources/conversation/types/DeliverConversationMessageRequest.d.ts +1 -1
  42. package/api/resources/conversation/types/index.d.ts +0 -3
  43. package/api/resources/conversation/types/index.js +0 -3
  44. package/api/resources/developersCommons/types/BaseDetailApp.d.ts +13 -4
  45. package/api/resources/developersCommons/types/Link.d.ts +1 -1
  46. package/api/resources/developersCommons/types/MarketplaceAppDetail.d.ts +2 -1
  47. package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +0 -2
  48. package/api/resources/knowledge/types/KnowledgeBaseFunctionBindings.d.ts +12 -0
  49. package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +1 -1
  50. package/api/resources/knowledge/types/index.d.ts +1 -0
  51. package/api/resources/knowledge/types/index.js +1 -0
  52. package/api/resources/organizations/client/Client.d.ts +13 -15
  53. package/api/resources/organizations/client/Client.js +13 -15
  54. package/api/resources/users/types/AgentUserField.d.ts +8 -0
  55. package/api/resources/users/types/AgentUserField.js +8 -0
  56. package/api/resources/users/types/AgentUserSearchRequest.d.ts +4 -0
  57. package/auth/AnyAuthProvider.d.ts +23 -0
  58. package/auth/AnyAuthProvider.js +46 -0
  59. package/auth/BearerAuthProvider.d.ts +20 -0
  60. package/auth/BearerAuthProvider.js +82 -0
  61. package/auth/index.d.ts +2 -0
  62. package/auth/index.js +5 -1
  63. package/package.json +1 -1
  64. package/reference.md +19 -117
  65. package/serialization/resources/analytics/types/AgentUserGroupBy.d.ts +15 -0
  66. package/serialization/resources/analytics/types/{FeedbackGroupBy.js → AgentUserGroupBy.js} +8 -4
  67. package/serialization/resources/analytics/types/AgentUserRowIdentifier.d.ts +2 -0
  68. package/serialization/resources/analytics/types/AgentUserRowIdentifier.js +2 -0
  69. package/serialization/resources/analytics/types/AgentUserTableRequest.d.ts +2 -0
  70. package/serialization/resources/analytics/types/AgentUserTableRequest.js +2 -0
  71. package/serialization/resources/analytics/types/index.d.ts +1 -10
  72. package/serialization/resources/analytics/types/index.js +1 -10
  73. package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +0 -2
  74. package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.js +0 -2
  75. package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +2 -0
  76. package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +2 -0
  77. package/serialization/resources/capabilities/types/CapabilityExecutionBase.d.ts +2 -0
  78. package/serialization/resources/capabilities/types/CapabilityExecutionBase.js +2 -0
  79. package/serialization/resources/commons/types/AdditionalDataKey.d.ts +1 -1
  80. package/serialization/resources/commons/types/AdditionalDataKey.js +26 -0
  81. package/serialization/resources/commons/types/BaseConversationResponse.d.ts +2 -0
  82. package/serialization/resources/commons/types/BaseConversationResponse.js +2 -0
  83. package/serialization/resources/commons/types/ConversationValueSource.d.ts +5 -1
  84. package/serialization/resources/commons/types/ConversationValueSource.js +2 -0
  85. package/serialization/resources/commons/types/EventBaseNoId.d.ts +2 -0
  86. package/serialization/resources/commons/types/EventBaseNoId.js +2 -0
  87. package/serialization/resources/commons/types/EventFilter.d.ts +2 -0
  88. package/serialization/resources/commons/types/EventFilter.js +2 -0
  89. package/serialization/resources/commons/types/UserDataValueSource.d.ts +9 -0
  90. package/serialization/resources/{analytics/types/FeedbackCount.js → commons/types/UserDataValueSource.js} +4 -2
  91. package/serialization/resources/commons/types/UserEventName.d.ts +1 -1
  92. package/serialization/resources/commons/types/UserEventName.js +25 -0
  93. package/serialization/resources/commons/types/index.d.ts +2 -0
  94. package/serialization/resources/commons/types/index.js +2 -0
  95. package/serialization/resources/conversation/types/ConversationFilter.d.ts +1 -1
  96. package/serialization/resources/conversation/types/ConversationFilter.js +1 -1
  97. package/serialization/resources/conversation/types/index.d.ts +0 -3
  98. package/serialization/resources/conversation/types/index.js +0 -3
  99. package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +0 -1
  100. package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +0 -1
  101. package/serialization/resources/knowledge/types/KnowledgeBaseFunctionBindings.d.ts +12 -0
  102. package/serialization/resources/{analytics/types/FeedbackAnalyticsRequest.js → knowledge/types/KnowledgeBaseFunctionBindings.js} +6 -5
  103. package/serialization/resources/knowledge/types/index.d.ts +1 -0
  104. package/serialization/resources/knowledge/types/index.js +1 -0
  105. package/serialization/resources/users/types/AgentUserField.d.ts +1 -1
  106. package/serialization/resources/users/types/AgentUserField.js +1 -1
  107. package/serialization/resources/users/types/AgentUserFilter.d.ts +1 -1
  108. package/serialization/resources/users/types/AgentUserFilter.js +1 -1
  109. package/version.d.ts +1 -1
  110. package/version.js +1 -1
  111. package/api/resources/analytics/types/FeedbackAnalyticsRequest.d.ts +0 -11
  112. package/api/resources/analytics/types/FeedbackColumnDefinition.d.ts +0 -5
  113. package/api/resources/analytics/types/FeedbackCount.d.ts +0 -4
  114. package/api/resources/analytics/types/FeedbackDistinctCount.d.ts +0 -9
  115. package/api/resources/analytics/types/FeedbackDistinctCount.js +0 -3
  116. package/api/resources/analytics/types/FeedbackGroupBy.d.ts +0 -5
  117. package/api/resources/analytics/types/FeedbackGroupBy.js +0 -3
  118. package/api/resources/analytics/types/FeedbackMetric.d.ts +0 -13
  119. package/api/resources/analytics/types/FeedbackMetric.js +0 -3
  120. package/api/resources/analytics/types/FeedbackRow.d.ts +0 -11
  121. package/api/resources/analytics/types/FeedbackRow.js +0 -3
  122. package/api/resources/analytics/types/FeedbackRowIdentifier.d.ts +0 -5
  123. package/api/resources/analytics/types/FeedbackRowIdentifier.js +0 -3
  124. package/api/resources/analytics/types/FeedbackTableRequest.d.ts +0 -38
  125. package/api/resources/analytics/types/FeedbackTableRequest.js +0 -3
  126. package/api/resources/analytics/types/FeedbackTableResponse.d.ts +0 -56
  127. package/api/resources/analytics/types/FeedbackTableResponse.js +0 -3
  128. package/api/resources/conversation/types/FeedbackField.d.ts +0 -7
  129. package/api/resources/conversation/types/FeedbackField.js +0 -10
  130. package/api/resources/conversation/types/FeedbackFilter.d.ts +0 -9
  131. package/api/resources/conversation/types/FeedbackFilter.js +0 -3
  132. package/serialization/resources/analytics/types/FeedbackAnalyticsRequest.d.ts +0 -11
  133. package/serialization/resources/analytics/types/FeedbackColumnDefinition.d.ts +0 -11
  134. package/serialization/resources/analytics/types/FeedbackColumnDefinition.js +0 -45
  135. package/serialization/resources/analytics/types/FeedbackCount.d.ts +0 -7
  136. package/serialization/resources/analytics/types/FeedbackDistinctCount.d.ts +0 -10
  137. package/serialization/resources/analytics/types/FeedbackDistinctCount.js +0 -42
  138. package/serialization/resources/analytics/types/FeedbackGroupBy.d.ts +0 -11
  139. package/serialization/resources/analytics/types/FeedbackMetric.d.ts +0 -15
  140. package/serialization/resources/analytics/types/FeedbackMetric.js +0 -49
  141. package/serialization/resources/analytics/types/FeedbackRow.d.ts +0 -14
  142. package/serialization/resources/analytics/types/FeedbackRow.js +0 -48
  143. package/serialization/resources/analytics/types/FeedbackRowIdentifier.d.ts +0 -11
  144. package/serialization/resources/analytics/types/FeedbackRowIdentifier.js +0 -45
  145. package/serialization/resources/analytics/types/FeedbackTableRequest.d.ts +0 -15
  146. package/serialization/resources/analytics/types/FeedbackTableRequest.js +0 -49
  147. package/serialization/resources/analytics/types/FeedbackTableResponse.d.ts +0 -11
  148. package/serialization/resources/analytics/types/FeedbackTableResponse.js +0 -45
  149. package/serialization/resources/conversation/types/FeedbackField.d.ts +0 -7
  150. package/serialization/resources/conversation/types/FeedbackField.js +0 -39
  151. package/serialization/resources/conversation/types/FeedbackFilter.d.ts +0 -15
  152. package/serialization/resources/conversation/types/FeedbackFilter.js +0 -47
  153. /package/api/resources/analytics/types/{FeedbackAnalyticsRequest.js → AgentUserGroupBy.js} +0 -0
  154. /package/api/resources/{conversation → commons}/types/SimulationFilter.d.ts +0 -0
  155. /package/api/resources/{conversation → commons}/types/SimulationFilter.js +0 -0
  156. /package/api/resources/{analytics/types/FeedbackColumnDefinition.js → commons/types/UserDataValueSource.js} +0 -0
  157. /package/api/resources/{analytics/types/FeedbackCount.js → knowledge/types/KnowledgeBaseFunctionBindings.js} +0 -0
  158. /package/serialization/resources/{conversation → commons}/types/SimulationFilter.d.ts +0 -0
  159. /package/serialization/resources/{conversation → commons}/types/SimulationFilter.js +0 -0
@@ -1,4 +1,49 @@
1
1
  import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * conversationId: {
6
+ * referenceId: "conversation-0"
7
+ * },
8
+ * messages: []
9
+ * }
10
+ *
11
+ * @example
12
+ * {
13
+ * conversationId: {
14
+ * referenceId: "simulation-0"
15
+ * },
16
+ * simulationContext: {
17
+ * actionMocks: [{
18
+ * actionId: {
19
+ * type: MavenAGI.EntityType.Action,
20
+ * appId: "my-app",
21
+ * referenceId: "refund-order"
22
+ * },
23
+ * behavior: {
24
+ * type: "fixedResponse",
25
+ * response: "Refunded order {{orderId}}"
26
+ * }
27
+ * }, {
28
+ * actionId: {
29
+ * type: MavenAGI.EntityType.Action,
30
+ * appId: "my-app",
31
+ * referenceId: "get-order-status"
32
+ * },
33
+ * behavior: {
34
+ * type: "fixedResponse",
35
+ * status: MavenAGI.ActionExecutionStatus.Error,
36
+ * response: "Order {{orderId}} was not found",
37
+ * errorMessage: "No order with ID {{orderId}}"
38
+ * }
39
+ * }],
40
+ * defaultActionBehavior: {
41
+ * type: "callApp"
42
+ * }
43
+ * },
44
+ * messages: []
45
+ * }
46
+ */
2
47
  export interface ConversationRequest {
3
48
  /** An externally supplied ID to uniquely identify this conversation */
4
49
  conversationId: MavenAGI.EntityIdBase;
@@ -1,6 +1,6 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface DeliverConversationMessageRequest {
3
- /** The ID of the conversation to deliver the message to. Message delivery will fail if the conversation does not have the `ASYNC` capability or if it is not `open`. */
3
+ /** The ID of the conversation to deliver the message to. Message delivery will fail if the conversation does not have the `ASYNC` capability, and a closed conversation (`open` set to false) returns a 400. */
4
4
  conversationId: MavenAGI.EntityIdWithoutAgent;
5
5
  /** The message to deliver. */
6
6
  message: MavenAGI.ConversationMessageRequest;
@@ -26,11 +26,8 @@ export * from "./DeliverMessageRequest";
26
26
  export * from "./DeliverMessageResponse";
27
27
  export * from "./DeliverUserMessageRequest";
28
28
  export * from "./DeliveryStatus";
29
- export * from "./FeedbackField";
30
- export * from "./FeedbackFilter";
31
29
  export * from "./FeedbackRequest";
32
30
  export * from "./NumericConversationField";
33
- export * from "./SimulationFilter";
34
31
  export * from "./StreamResponse";
35
32
  export * from "./SubmitActionFormRequest";
36
33
  export * from "./UpdateMetadataRequest";
@@ -42,11 +42,8 @@ __exportStar(require("./DeliverMessageRequest"), exports);
42
42
  __exportStar(require("./DeliverMessageResponse"), exports);
43
43
  __exportStar(require("./DeliverUserMessageRequest"), exports);
44
44
  __exportStar(require("./DeliveryStatus"), exports);
45
- __exportStar(require("./FeedbackField"), exports);
46
- __exportStar(require("./FeedbackFilter"), exports);
47
45
  __exportStar(require("./FeedbackRequest"), exports);
48
46
  __exportStar(require("./NumericConversationField"), exports);
49
- __exportStar(require("./SimulationFilter"), exports);
50
47
  __exportStar(require("./StreamResponse"), exports);
51
48
  __exportStar(require("./SubmitActionFormRequest"), exports);
52
49
  __exportStar(require("./UpdateMetadataRequest"), exports);
@@ -3,13 +3,22 @@ import type * as MavenAGI from "../../../index";
3
3
  * An app with the extra detail needed to render its page and drive installation.
4
4
  */
5
5
  export interface BaseDetailApp extends MavenAGI.BaseApp {
6
- /** Guidance shown while installing the app, for example how to obtain the credentials it asks for. */
6
+ /**
7
+ * Guidance shown while installing the app, for example how to obtain the credentials it asks for.
8
+ * May use [placeholders](https://developers.mavenagi.com/docs/documentation/configuration-and-integration/placeholders) such as `${agentId}`.
9
+ */
7
10
  installationInstructions?: string;
8
- /** Guidance shown once the app is installed. */
11
+ /** Guidance shown once the app is installed. May use [placeholders](https://developers.mavenagi.com/docs/documentation/configuration-and-integration/placeholders), settings included. */
9
12
  instructions?: string;
10
- /** URL of a preview image or demo for the app's detail page. */
13
+ /**
14
+ * URL of a preview image or demo for the app's detail page. May use [placeholders](https://developers.mavenagi.com/docs/documentation/configuration-and-integration/placeholders) such as
15
+ * `${appHost}` and `${settings.region}`.
16
+ */
11
17
  previewUrl?: string;
12
- /** Supporting links published by the author, such as documentation or a privacy policy. */
18
+ /**
19
+ * Supporting links published by the author, such as documentation or a privacy policy. Their URLs
20
+ * may use [placeholders](https://developers.mavenagi.com/docs/documentation/configuration-and-integration/placeholders) such as `${appHost}`, but never settings: links are public.
21
+ */
13
22
  links: MavenAGI.Link[];
14
23
  /**
15
24
  * The settings the app accepts. Drives the install form, and describes which values are files
@@ -6,6 +6,6 @@ export interface Link {
6
6
  title: string;
7
7
  /** Optional longer explanation of where the link goes. */
8
8
  description?: string;
9
- /** Destination URL. */
9
+ /** Destination URL. May use [placeholders](https://developers.mavenagi.com/docs/documentation/configuration-and-integration/placeholders) such as `${appHost}`. */
10
10
  url: string;
11
11
  }
@@ -1,7 +1,8 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  /**
3
3
  * A detailed app definition used when rendering an app detail page within the app directory.
4
- * The instructions, installationInstructions, previewUrl have their templated values substituted with appropriate values.
4
+ * The installationInstructions and links have their placeholders filled in for the agent, and, once the
5
+ * app is installed, so do the instructions and previewUrl. See [Placeholders](https://developers.mavenagi.com/docs/documentation/configuration-and-integration/placeholders).
5
6
  */
6
7
  export interface MarketplaceAppDetail extends MavenAGI.BaseDetailApp {
7
8
  /** Whether this app is currently installed on the agent the request was scoped to. */
@@ -30,6 +30,4 @@ export interface IntelligentFieldPatchRequest {
30
30
  enumOptions?: MavenAGI.EnumOption[];
31
31
  /** The agent variant to stage this patch in. Required on an agent with versioned intelligent fields; a patch that omits it there is rejected with reason `VARIANT_REQUIRED`. */
32
32
  variantId?: MavenAGI.EntityIdWithoutAgent;
33
- /** Deprecated, use `variantId.appId`, which wins when both are set. */
34
- variantAppId?: string;
35
33
  }
@@ -0,0 +1,12 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * The three Function versions that sync a knowledge base, all in its own app.
4
+ */
5
+ export interface KnowledgeBaseFunctionBindings {
6
+ /** Fetches the lookup data the other two Functions need, once per sync. */
7
+ fetchMetadata: MavenAGI.FunctionVersionBinding;
8
+ /** Fetches one page of raw records from the source. */
9
+ fetchDocuments: MavenAGI.FunctionVersionBinding;
10
+ /** Converts one page of raw records into documents. */
11
+ convertDocuments: MavenAGI.FunctionVersionBinding;
12
+ }
@@ -79,7 +79,7 @@ import type * as MavenAGI from "../../../index";
79
79
  export interface KnowledgeDocumentResponse extends MavenAGI.KnowledgeDocumentSearchResponse {
80
80
  /** The current processing status of the knowledge document */
81
81
  processingStatus?: MavenAGI.KnowledgeDocumentStatus;
82
- /** The content of the document in markdown format. Not shown directly to users. May be absent for asset-backed documents that have not yet been processed. */
82
+ /** The content of the document in markdown format. Not shown directly to users. May be absent for asset-backed documents that have not yet been processed, or on a document GET when the document's processed form is larger than 20,000,000 bytes. When content is absent, asset.url (if present) links to the original uploaded file. */
83
83
  content?: string;
84
84
  /** If the document is associated with an asset, this will contain the asset metadata */
85
85
  asset?: MavenAGI.AttachmentResponse;
@@ -4,6 +4,7 @@ export * from "./FinalizeKnowledgeBaseVersionRequest";
4
4
  export * from "./KnowledgeBaseDocumentDeltas";
5
5
  export * from "./KnowledgeBaseField";
6
6
  export * from "./KnowledgeBaseFilter";
7
+ export * from "./KnowledgeBaseFunctionBindings";
7
8
  export * from "./KnowledgeBaseIndexingProgressState";
8
9
  export * from "./KnowledgeBaseIndexingStatus";
9
10
  export * from "./KnowledgeBaseProperties";
@@ -20,6 +20,7 @@ __exportStar(require("./FinalizeKnowledgeBaseVersionRequest"), exports);
20
20
  __exportStar(require("./KnowledgeBaseDocumentDeltas"), exports);
21
21
  __exportStar(require("./KnowledgeBaseField"), exports);
22
22
  __exportStar(require("./KnowledgeBaseFilter"), exports);
23
+ __exportStar(require("./KnowledgeBaseFunctionBindings"), exports);
23
24
  __exportStar(require("./KnowledgeBaseIndexingProgressState"), exports);
24
25
  __exportStar(require("./KnowledgeBaseIndexingStatus"), exports);
25
26
  __exportStar(require("./KnowledgeBaseProperties"), exports);
@@ -13,9 +13,9 @@ export declare class OrganizationsClient {
13
13
  /**
14
14
  * Create a new organization.
15
15
  *
16
- * <Tip>
17
- * This endpoint requires additional permissions. Contact support to request access.
18
- * </Tip>
16
+ * Only Maven staff hold this permission.
17
+ *
18
+ * <Note>**Required permission:** `create:organization`</Note>
19
19
  *
20
20
  * @param {string} organizationReferenceId - The reference ID of the organization.
21
21
  * @param {MavenAGI.CreateOrganizationRequest} request
@@ -40,6 +40,8 @@ export declare class OrganizationsClient {
40
40
  /**
41
41
  * Get an organization by ID
42
42
  *
43
+ * <Note>**Required permission:** `read:organization`</Note>
44
+ *
43
45
  * @param {string} organizationReferenceId - The reference ID of the organization.
44
46
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
45
47
  *
@@ -60,9 +62,7 @@ export declare class OrganizationsClient {
60
62
  * Update mutable organization fields.
61
63
  * All fields will overwrite the existing value on the organization only if provided.
62
64
  *
63
- * <Tip>
64
- * This endpoint requires additional permissions. Contact support to request access.
65
- * </Tip>
65
+ * <Note>**Required permission:** `edit:organization`</Note>
66
66
  *
67
67
  * @param {string} organizationReferenceId - The reference ID of the organization.
68
68
  * @param {MavenAGI.OrganizationPatchRequest} request
@@ -84,9 +84,7 @@ export declare class OrganizationsClient {
84
84
  /**
85
85
  * Delete an organization.
86
86
  *
87
- * <Tip>
88
- * This endpoint requires additional permissions. Contact support to request access.
89
- * </Tip>
87
+ * <Note>**Required permission:** `delete:organization`</Note>
90
88
  *
91
89
  * @param {string} organizationReferenceId - The reference ID of the organization.
92
90
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -110,9 +108,9 @@ export declare class OrganizationsClient {
110
108
  * Retrieves structured conversation data across all organizations, formatted as a table,
111
109
  * allowing users to group, filter, and define specific metrics to display as columns.
112
110
  *
113
- * <Tip>
114
- * This endpoint requires additional permissions. Contact support to request access.
115
- * </Tip>
111
+ * Only Maven staff hold this permission.
112
+ *
113
+ * <Note>**Required permission:** `read:all-organizations`</Note>
116
114
  *
117
115
  * @param {MavenAGI.ConversationTableRequest} request
118
116
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -163,9 +161,9 @@ export declare class OrganizationsClient {
163
161
  * Fetches conversation data across all organizations, visualized in a chart format.
164
162
  * Supported chart types include pie chart, date histogram, and stacked bar charts.
165
163
  *
166
- * <Tip>
167
- * This endpoint requires additional permissions. Contact support to request access.
168
- * </Tip>
164
+ * Only Maven staff hold this permission.
165
+ *
166
+ * <Note>**Required permission:** `read:all-organizations`</Note>
169
167
  *
170
168
  * @param {MavenAGI.ConversationChartRequest} request
171
169
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -60,9 +60,9 @@ class OrganizationsClient {
60
60
  /**
61
61
  * Create a new organization.
62
62
  *
63
- * <Tip>
64
- * This endpoint requires additional permissions. Contact support to request access.
65
- * </Tip>
63
+ * Only Maven staff hold this permission.
64
+ *
65
+ * <Note>**Required permission:** `create:organization`</Note>
66
66
  *
67
67
  * @param {string} organizationReferenceId - The reference ID of the organization.
68
68
  * @param {MavenAGI.CreateOrganizationRequest} request
@@ -169,6 +169,8 @@ class OrganizationsClient {
169
169
  /**
170
170
  * Get an organization by ID
171
171
  *
172
+ * <Note>**Required permission:** `read:organization`</Note>
173
+ *
172
174
  * @param {string} organizationReferenceId - The reference ID of the organization.
173
175
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
174
176
  *
@@ -268,9 +270,7 @@ class OrganizationsClient {
268
270
  * Update mutable organization fields.
269
271
  * All fields will overwrite the existing value on the organization only if provided.
270
272
  *
271
- * <Tip>
272
- * This endpoint requires additional permissions. Contact support to request access.
273
- * </Tip>
273
+ * <Note>**Required permission:** `edit:organization`</Note>
274
274
  *
275
275
  * @param {string} organizationReferenceId - The reference ID of the organization.
276
276
  * @param {MavenAGI.OrganizationPatchRequest} request
@@ -374,9 +374,7 @@ class OrganizationsClient {
374
374
  /**
375
375
  * Delete an organization.
376
376
  *
377
- * <Tip>
378
- * This endpoint requires additional permissions. Contact support to request access.
379
- * </Tip>
377
+ * <Note>**Required permission:** `delete:organization`</Note>
380
378
  *
381
379
  * @param {string} organizationReferenceId - The reference ID of the organization.
382
380
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -471,9 +469,9 @@ class OrganizationsClient {
471
469
  * Retrieves structured conversation data across all organizations, formatted as a table,
472
470
  * allowing users to group, filter, and define specific metrics to display as columns.
473
471
  *
474
- * <Tip>
475
- * This endpoint requires additional permissions. Contact support to request access.
476
- * </Tip>
472
+ * Only Maven staff hold this permission.
473
+ *
474
+ * <Note>**Required permission:** `read:all-organizations`</Note>
477
475
  *
478
476
  * @param {MavenAGI.ConversationTableRequest} request
479
477
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -606,9 +604,9 @@ class OrganizationsClient {
606
604
  * Fetches conversation data across all organizations, visualized in a chart format.
607
605
  * Supported chart types include pie chart, date histogram, and stacked bar charts.
608
606
  *
609
- * <Tip>
610
- * This endpoint requires additional permissions. Contact support to request access.
611
- * </Tip>
607
+ * Only Maven staff hold this permission.
608
+ *
609
+ * <Note>**Required permission:** `read:all-organizations`</Note>
612
610
  *
613
611
  * @param {MavenAGI.ConversationChartRequest} request
614
612
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,5 +1,13 @@
1
1
  export declare const AgentUserField: {
2
2
  readonly CreatedAt: "CreatedAt";
3
3
  readonly UpdatedAt: "UpdatedAt";
4
+ /**
5
+ * Whether the user is anonymous, as `isAnonymous` filters on. Groups as a `boolean` value. */
6
+ readonly Anonymous: "Anonymous";
7
+ /**
8
+ * Selects a user-level intelligent field. When used, `intelligentFieldId` must also be set
9
+ * to identify which field. Grouping by it splits that field's users by value; a user without
10
+ * a value for it is left out. */
11
+ readonly IntelligentField: "IntelligentField";
4
12
  };
5
13
  export type AgentUserField = (typeof AgentUserField)[keyof typeof AgentUserField] | string;
@@ -5,4 +5,12 @@ exports.AgentUserField = void 0;
5
5
  exports.AgentUserField = {
6
6
  CreatedAt: "CreatedAt",
7
7
  UpdatedAt: "UpdatedAt",
8
+ /**
9
+ * Whether the user is anonymous, as `isAnonymous` filters on. Groups as a `boolean` value. */
10
+ Anonymous: "Anonymous",
11
+ /**
12
+ * Selects a user-level intelligent field. When used, `intelligentFieldId` must also be set
13
+ * to identify which field. Grouping by it splits that field's users by value; a user without
14
+ * a value for it is left out. */
15
+ IntelligentField: "IntelligentField",
8
16
  };
@@ -1,5 +1,9 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface AgentUserSearchRequest extends MavenAGI.BasePaginatedRequest {
3
+ /**
4
+ * Field to sort results by. `IntelligentField` is not supported here; intelligent fields
5
+ * can be filtered on via `filter.intelligentFields` and grouped through the analytics APIs.
6
+ */
3
7
  sort?: MavenAGI.AgentUserField;
4
8
  filter?: MavenAGI.AgentUserFilter;
5
9
  }
@@ -0,0 +1,23 @@
1
+ import type { NormalizedClientOptions } from "../BaseClient";
2
+ import type * as core from "../core";
3
+ export declare class AnyAuthProvider implements core.AuthProvider {
4
+ private readonly authProviders;
5
+ constructor(authProviders: core.AuthProvider[]);
6
+ getAuthRequest(arg?: {
7
+ endpointMetadata?: core.EndpointMetadata;
8
+ }): Promise<core.AuthRequest>;
9
+ }
10
+ export declare namespace AnyAuthProvider {
11
+ type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
12
+ type AtLeastOneOf<T extends readonly any[]> = {
13
+ [K in keyof T]: T[K] & Partial<UnionToIntersection<T[number]>>;
14
+ }[number];
15
+ export type AuthOptions<TAuthProviders extends readonly any[]> = AtLeastOneOf<TAuthProviders>;
16
+ export type Options<TOptions extends readonly any[]> = Partial<UnionToIntersection<TOptions[number]>>;
17
+ type InstantiatableAuthProvider = {
18
+ canCreate: (opts: NormalizedClientOptions) => boolean;
19
+ createInstance: (opts: NormalizedClientOptions) => core.AuthProvider;
20
+ };
21
+ export function createInstance(options: NormalizedClientOptions, authProviderClasses: InstantiatableAuthProvider[]): core.AuthProvider;
22
+ export {};
23
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
+ return new (P || (P = Promise))(function (resolve, reject) {
6
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
10
+ });
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.AnyAuthProvider = void 0;
14
+ class AnyAuthProvider {
15
+ constructor(authProviders) {
16
+ this.authProviders = authProviders;
17
+ }
18
+ getAuthRequest(arg) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ const availableProviders = this.authProviders;
21
+ for (const provider of availableProviders) {
22
+ try {
23
+ const authRequest = yield provider.getAuthRequest(arg);
24
+ if (authRequest.headers.Authorization != null || Object.keys(authRequest.headers).length > 0) {
25
+ return authRequest;
26
+ }
27
+ }
28
+ catch (_e) {
29
+ // Continue to next auth provider
30
+ }
31
+ }
32
+ // No auth credentials found
33
+ return { headers: {} };
34
+ });
35
+ }
36
+ }
37
+ exports.AnyAuthProvider = AnyAuthProvider;
38
+ (function (AnyAuthProvider) {
39
+ function createInstance(options, authProviderClasses) {
40
+ const authProviders = authProviderClasses
41
+ .filter((providerClass) => providerClass.canCreate(options))
42
+ .map((providerClass) => providerClass.createInstance(options));
43
+ return new AnyAuthProvider(authProviders);
44
+ }
45
+ AnyAuthProvider.createInstance = createInstance;
46
+ })(AnyAuthProvider || (exports.AnyAuthProvider = AnyAuthProvider = {}));
@@ -0,0 +1,20 @@
1
+ import * as core from "../core";
2
+ declare const TOKEN_PARAM: "token";
3
+ export declare class BearerAuthProvider implements core.AuthProvider {
4
+ private readonly options;
5
+ constructor(options: BearerAuthProvider.Options);
6
+ static canCreate(options: Partial<BearerAuthProvider.Options>): boolean;
7
+ getAuthRequest({ endpointMetadata, }?: {
8
+ endpointMetadata?: core.EndpointMetadata;
9
+ }): Promise<core.AuthRequest>;
10
+ }
11
+ export declare namespace BearerAuthProvider {
12
+ const AUTH_SCHEME: "Bearer";
13
+ const AUTH_CONFIG_ERROR_MESSAGE: string;
14
+ type Options = AuthOptions;
15
+ type AuthOptions = {
16
+ [TOKEN_PARAM]?: core.Supplier<core.BearerToken> | undefined;
17
+ };
18
+ function createInstance(options: Options): core.AuthProvider;
19
+ }
20
+ export {};
@@ -0,0 +1,82 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.BearerAuthProvider = void 0;
47
+ const core = __importStar(require("../core"));
48
+ const errors = __importStar(require("../errors/index"));
49
+ const TOKEN_PARAM = "token";
50
+ const ENV_TOKEN = "MAVENAGI_TOKEN";
51
+ class BearerAuthProvider {
52
+ constructor(options) {
53
+ this.options = options;
54
+ }
55
+ static canCreate(options) {
56
+ var _a;
57
+ return (options === null || options === void 0 ? void 0 : options[TOKEN_PARAM]) != null || ((_a = process.env) === null || _a === void 0 ? void 0 : _a[ENV_TOKEN]) != null;
58
+ }
59
+ getAuthRequest() {
60
+ return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
61
+ var _a, _b;
62
+ const token = (_a = (yield core.Supplier.get(this.options[TOKEN_PARAM]))) !== null && _a !== void 0 ? _a : (_b = process.env) === null || _b === void 0 ? void 0 : _b[ENV_TOKEN];
63
+ if (token == null) {
64
+ throw new errors.MavenAGIError({
65
+ message: BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,
66
+ });
67
+ }
68
+ return {
69
+ headers: { Authorization: `Bearer ${token}` },
70
+ };
71
+ });
72
+ }
73
+ }
74
+ exports.BearerAuthProvider = BearerAuthProvider;
75
+ (function (BearerAuthProvider) {
76
+ BearerAuthProvider.AUTH_SCHEME = "Bearer";
77
+ BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE = `Please provide '${TOKEN_PARAM}' when initializing the client, or set the '${ENV_TOKEN}' environment variable`;
78
+ function createInstance(options) {
79
+ return new BearerAuthProvider(options);
80
+ }
81
+ BearerAuthProvider.createInstance = createInstance;
82
+ })(BearerAuthProvider || (exports.BearerAuthProvider = BearerAuthProvider = {}));
package/auth/index.d.ts CHANGED
@@ -1 +1,3 @@
1
+ export { AnyAuthProvider } from "./AnyAuthProvider";
1
2
  export { BasicAuthProvider } from "./BasicAuthProvider";
3
+ export { BearerAuthProvider } from "./BearerAuthProvider";
package/auth/index.js CHANGED
@@ -1,5 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BasicAuthProvider = void 0;
3
+ exports.BearerAuthProvider = exports.BasicAuthProvider = exports.AnyAuthProvider = void 0;
4
+ var AnyAuthProvider_1 = require("./AnyAuthProvider");
5
+ Object.defineProperty(exports, "AnyAuthProvider", { enumerable: true, get: function () { return AnyAuthProvider_1.AnyAuthProvider; } });
4
6
  var BasicAuthProvider_1 = require("./BasicAuthProvider");
5
7
  Object.defineProperty(exports, "BasicAuthProvider", { enumerable: true, get: function () { return BasicAuthProvider_1.BasicAuthProvider; } });
8
+ var BearerAuthProvider_1 = require("./BearerAuthProvider");
9
+ Object.defineProperty(exports, "BearerAuthProvider", { enumerable: true, get: function () { return BearerAuthProvider_1.BearerAuthProvider; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mavenagi",
3
- "version": "1.2.65",
3
+ "version": "1.2.66",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",