mavenagi 0.0.0-alpha.4 → 0.0.0-alpha.6

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 (184) hide show
  1. package/Client.d.ts +5 -5
  2. package/Client.js +3 -3
  3. package/README.md +15 -31
  4. package/api/resources/actions/client/Client.d.ts +19 -65
  5. package/api/resources/actions/client/Client.js +31 -292
  6. package/api/resources/actions/types/{Action.d.ts → ActionBase.d.ts} +1 -7
  7. package/api/resources/actions/types/ActionParameter.d.ts +1 -0
  8. package/api/resources/actions/types/ActionRequest.d.ts +21 -0
  9. package/api/resources/actions/types/ActionResponse.d.ts +25 -0
  10. package/api/resources/actions/types/index.d.ts +3 -4
  11. package/api/resources/actions/types/index.js +3 -4
  12. package/api/resources/commons/types/EntityId.d.ts +14 -0
  13. package/api/resources/commons/types/EntityIdBase.d.ts +10 -0
  14. package/api/resources/commons/types/EntityType.d.ts +14 -0
  15. package/api/resources/commons/types/EntityType.js +13 -0
  16. package/api/resources/commons/types/index.d.ts +3 -0
  17. package/api/resources/commons/types/index.js +3 -0
  18. package/api/resources/conversation/client/Client.d.ts +20 -3
  19. package/api/resources/conversation/client/Client.js +118 -25
  20. package/api/resources/conversation/types/ConversationBase.d.ts +0 -2
  21. package/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
  22. package/api/resources/conversation/types/ConversationResponse.d.ts +2 -0
  23. package/api/resources/index.d.ts +1 -1
  24. package/api/resources/index.js +1 -1
  25. package/api/resources/knowledge/client/Client.d.ts +2 -2
  26. package/api/resources/knowledge/client/Client.js +21 -21
  27. package/api/resources/knowledge/types/KnowledgeBase.d.ts +1 -1
  28. package/api/resources/triggers/client/Client.d.ts +14 -12
  29. package/api/resources/triggers/client/Client.js +25 -23
  30. package/{dist/api/resources/triggers/types/EventTrigger.d.ts → api/resources/triggers/types/EventTriggerBase.d.ts} +1 -3
  31. package/api/resources/triggers/types/EventTriggerRequest.d.ts +18 -0
  32. package/api/resources/triggers/types/EventTriggerResponse.d.ts +22 -0
  33. package/api/resources/triggers/types/index.d.ts +3 -1
  34. package/api/resources/triggers/types/index.js +3 -1
  35. package/api/resources/{user → users}/client/Client.d.ts +12 -12
  36. package/api/resources/{user → users}/client/Client.js +11 -11
  37. package/dist/Client.d.ts +5 -5
  38. package/dist/Client.js +3 -3
  39. package/dist/api/resources/actions/client/Client.d.ts +19 -65
  40. package/dist/api/resources/actions/client/Client.js +31 -292
  41. package/dist/api/resources/actions/types/{Action.d.ts → ActionBase.d.ts} +1 -7
  42. package/dist/api/resources/actions/types/ActionParameter.d.ts +1 -0
  43. package/dist/api/resources/actions/types/ActionRequest.d.ts +21 -0
  44. package/dist/api/resources/actions/types/ActionResponse.d.ts +25 -0
  45. package/dist/api/resources/actions/types/ActionResponse.js +4 -0
  46. package/dist/api/resources/actions/types/index.d.ts +3 -4
  47. package/dist/api/resources/actions/types/index.js +3 -4
  48. package/dist/api/resources/commons/types/EntityId.d.ts +14 -0
  49. package/dist/api/resources/commons/types/EntityId.js +4 -0
  50. package/dist/api/resources/commons/types/EntityIdBase.d.ts +10 -0
  51. package/dist/api/resources/commons/types/EntityIdBase.js +4 -0
  52. package/dist/api/resources/commons/types/EntityType.d.ts +14 -0
  53. package/dist/api/resources/commons/types/EntityType.js +13 -0
  54. package/dist/api/resources/commons/types/index.d.ts +3 -0
  55. package/dist/api/resources/commons/types/index.js +3 -0
  56. package/dist/api/resources/conversation/client/Client.d.ts +20 -3
  57. package/dist/api/resources/conversation/client/Client.js +118 -25
  58. package/dist/api/resources/conversation/types/ConversationBase.d.ts +0 -2
  59. package/dist/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
  60. package/dist/api/resources/conversation/types/ConversationResponse.d.ts +2 -0
  61. package/dist/api/resources/index.d.ts +1 -1
  62. package/dist/api/resources/index.js +1 -1
  63. package/dist/api/resources/knowledge/client/Client.d.ts +2 -2
  64. package/dist/api/resources/knowledge/client/Client.js +21 -21
  65. package/dist/api/resources/knowledge/types/KnowledgeBase.d.ts +1 -1
  66. package/dist/api/resources/triggers/client/Client.d.ts +14 -12
  67. package/dist/api/resources/triggers/client/Client.js +25 -23
  68. package/{api/resources/triggers/types/EventTrigger.d.ts → dist/api/resources/triggers/types/EventTriggerBase.d.ts} +1 -3
  69. package/dist/api/resources/triggers/types/EventTriggerBase.js +4 -0
  70. package/dist/api/resources/triggers/types/EventTriggerRequest.d.ts +18 -0
  71. package/dist/api/resources/triggers/types/EventTriggerRequest.js +4 -0
  72. package/dist/api/resources/triggers/types/EventTriggerResponse.d.ts +22 -0
  73. package/dist/api/resources/triggers/types/EventTriggerResponse.js +4 -0
  74. package/dist/api/resources/triggers/types/index.d.ts +3 -1
  75. package/dist/api/resources/triggers/types/index.js +3 -1
  76. package/dist/api/resources/{user → users}/client/Client.d.ts +12 -12
  77. package/dist/api/resources/{user → users}/client/Client.js +11 -11
  78. package/dist/serialization/resources/actions/types/{Action.d.ts → ActionBase.d.ts} +2 -5
  79. package/{serialization/resources/actions/types/Action.js → dist/serialization/resources/actions/types/ActionBase.js} +1 -4
  80. package/dist/serialization/resources/actions/types/ActionParameter.d.ts +1 -0
  81. package/dist/serialization/resources/actions/types/ActionParameter.js +1 -0
  82. package/dist/serialization/resources/actions/types/ActionRequest.d.ts +14 -0
  83. package/dist/serialization/resources/actions/types/ActionRequest.js +11 -0
  84. package/dist/serialization/resources/actions/types/ActionResponse.d.ts +14 -0
  85. package/dist/serialization/resources/actions/types/ActionResponse.js +11 -0
  86. package/dist/serialization/resources/actions/types/index.d.ts +3 -4
  87. package/dist/serialization/resources/actions/types/index.js +3 -4
  88. package/dist/serialization/resources/commons/types/EntityId.d.ts +17 -0
  89. package/dist/serialization/resources/commons/types/EntityId.js +14 -0
  90. package/{serialization/resources/actions/types/ActionSetBase.d.ts → dist/serialization/resources/commons/types/EntityIdBase.d.ts} +3 -4
  91. package/dist/serialization/resources/commons/types/EntityIdBase.js +7 -0
  92. package/dist/serialization/resources/commons/types/EntityType.d.ts +10 -0
  93. package/dist/serialization/resources/commons/types/EntityType.js +14 -0
  94. package/dist/serialization/resources/commons/types/index.d.ts +3 -0
  95. package/dist/serialization/resources/commons/types/index.js +3 -0
  96. package/dist/serialization/resources/conversation/client/addConversationMetadata.d.ts +13 -0
  97. package/dist/serialization/resources/conversation/client/addConversationMetadata.js +6 -0
  98. package/dist/serialization/resources/conversation/client/index.d.ts +1 -0
  99. package/dist/serialization/resources/conversation/client/index.js +1 -0
  100. package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +0 -2
  101. package/dist/serialization/resources/conversation/types/ConversationBase.js +0 -2
  102. package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
  103. package/dist/serialization/resources/conversation/types/ConversationRequest.js +2 -0
  104. package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -0
  105. package/dist/serialization/resources/conversation/types/ConversationResponse.js +2 -0
  106. package/dist/serialization/resources/triggers/types/{EventTrigger.d.ts → EventTriggerBase.d.ts} +2 -3
  107. package/dist/serialization/resources/triggers/types/{EventTrigger.js → EventTriggerBase.js} +1 -2
  108. package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +14 -0
  109. package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +11 -0
  110. package/dist/serialization/resources/triggers/types/EventTriggerResponse.d.ts +14 -0
  111. package/dist/serialization/resources/triggers/types/EventTriggerResponse.js +11 -0
  112. package/dist/serialization/resources/triggers/types/index.d.ts +3 -1
  113. package/dist/serialization/resources/triggers/types/index.js +3 -1
  114. package/package.json +1 -1
  115. package/serialization/resources/actions/types/{Action.d.ts → ActionBase.d.ts} +2 -5
  116. package/{dist/serialization/resources/actions/types/Action.js → serialization/resources/actions/types/ActionBase.js} +1 -4
  117. package/serialization/resources/actions/types/ActionParameter.d.ts +1 -0
  118. package/serialization/resources/actions/types/ActionParameter.js +1 -0
  119. package/serialization/resources/actions/types/ActionRequest.d.ts +14 -0
  120. package/serialization/resources/actions/types/ActionRequest.js +11 -0
  121. package/serialization/resources/actions/types/ActionResponse.d.ts +14 -0
  122. package/serialization/resources/actions/types/ActionResponse.js +11 -0
  123. package/serialization/resources/actions/types/index.d.ts +3 -4
  124. package/serialization/resources/actions/types/index.js +3 -4
  125. package/serialization/resources/commons/types/EntityId.d.ts +17 -0
  126. package/serialization/resources/commons/types/EntityId.js +14 -0
  127. package/{dist/serialization/resources/actions/types/ActionSetBase.d.ts → serialization/resources/commons/types/EntityIdBase.d.ts} +3 -4
  128. package/serialization/resources/commons/types/EntityIdBase.js +7 -0
  129. package/serialization/resources/commons/types/EntityType.d.ts +10 -0
  130. package/serialization/resources/commons/types/EntityType.js +14 -0
  131. package/serialization/resources/commons/types/index.d.ts +3 -0
  132. package/serialization/resources/commons/types/index.js +3 -0
  133. package/serialization/resources/conversation/client/addConversationMetadata.d.ts +13 -0
  134. package/serialization/resources/conversation/client/addConversationMetadata.js +6 -0
  135. package/serialization/resources/conversation/client/index.d.ts +1 -0
  136. package/serialization/resources/conversation/client/index.js +1 -0
  137. package/serialization/resources/conversation/types/ConversationBase.d.ts +0 -2
  138. package/serialization/resources/conversation/types/ConversationBase.js +0 -2
  139. package/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
  140. package/serialization/resources/conversation/types/ConversationRequest.js +2 -0
  141. package/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -0
  142. package/serialization/resources/conversation/types/ConversationResponse.js +2 -0
  143. package/serialization/resources/triggers/types/{EventTrigger.d.ts → EventTriggerBase.d.ts} +2 -3
  144. package/serialization/resources/triggers/types/{EventTrigger.js → EventTriggerBase.js} +1 -2
  145. package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +14 -0
  146. package/serialization/resources/triggers/types/EventTriggerRequest.js +11 -0
  147. package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +14 -0
  148. package/serialization/resources/triggers/types/EventTriggerResponse.js +11 -0
  149. package/serialization/resources/triggers/types/index.d.ts +3 -1
  150. package/serialization/resources/triggers/types/index.js +3 -1
  151. package/api/resources/actions/types/ActionSetBase.d.ts +0 -9
  152. package/api/resources/actions/types/ActionSetRequest.d.ts +0 -6
  153. package/api/resources/actions/types/ActionSetResponse.d.ts +0 -6
  154. package/dist/api/resources/actions/types/ActionSetBase.d.ts +0 -9
  155. package/dist/api/resources/actions/types/ActionSetRequest.d.ts +0 -6
  156. package/dist/api/resources/actions/types/ActionSetResponse.d.ts +0 -6
  157. package/dist/serialization/resources/actions/types/ActionSetBase.js +0 -8
  158. package/dist/serialization/resources/actions/types/ActionSetRequest.d.ts +0 -12
  159. package/dist/serialization/resources/actions/types/ActionSetRequest.js +0 -6
  160. package/dist/serialization/resources/actions/types/ActionSetResponse.d.ts +0 -12
  161. package/dist/serialization/resources/actions/types/ActionSetResponse.js +0 -6
  162. package/serialization/resources/actions/types/ActionSetBase.js +0 -8
  163. package/serialization/resources/actions/types/ActionSetRequest.d.ts +0 -12
  164. package/serialization/resources/actions/types/ActionSetRequest.js +0 -6
  165. package/serialization/resources/actions/types/ActionSetResponse.d.ts +0 -12
  166. package/serialization/resources/actions/types/ActionSetResponse.js +0 -6
  167. /package/api/resources/actions/types/{Action.js → ActionBase.js} +0 -0
  168. /package/api/resources/actions/types/{ActionSetBase.js → ActionRequest.js} +0 -0
  169. /package/api/resources/actions/types/{ActionSetRequest.js → ActionResponse.js} +0 -0
  170. /package/api/resources/{actions/types/ActionSetResponse.js → commons/types/EntityId.js} +0 -0
  171. /package/api/resources/{triggers/types/EventTrigger.js → commons/types/EntityIdBase.js} +0 -0
  172. /package/{dist/api/resources/actions/types/Action.js → api/resources/triggers/types/EventTriggerBase.js} +0 -0
  173. /package/{dist/api/resources/actions/types/ActionSetBase.js → api/resources/triggers/types/EventTriggerRequest.js} +0 -0
  174. /package/{dist/api/resources/actions/types/ActionSetRequest.js → api/resources/triggers/types/EventTriggerResponse.js} +0 -0
  175. /package/api/resources/{user → users}/client/index.d.ts +0 -0
  176. /package/api/resources/{user → users}/client/index.js +0 -0
  177. /package/api/resources/{user → users}/index.d.ts +0 -0
  178. /package/api/resources/{user → users}/index.js +0 -0
  179. /package/dist/api/resources/actions/types/{ActionSetResponse.js → ActionBase.js} +0 -0
  180. /package/dist/api/resources/{triggers/types/EventTrigger.js → actions/types/ActionRequest.js} +0 -0
  181. /package/dist/api/resources/{user → users}/client/index.d.ts +0 -0
  182. /package/dist/api/resources/{user → users}/client/index.js +0 -0
  183. /package/dist/api/resources/{user → users}/index.d.ts +0 -0
  184. /package/dist/api/resources/{user → users}/index.js +0 -0
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * entityId: {
9
+ * referenceId: "store-in-snowflake",
10
+ * appId: "snowflake",
11
+ * organizationId: "acme",
12
+ * agentId: "support",
13
+ * type: MavenAGI.EntityType.EventTrigger
14
+ * },
15
+ * description: "Stores conversation data in Snowflake",
16
+ * type: MavenAGI.EventTriggerType.ConversationCreated
17
+ * }
18
+ */
19
+ export interface EventTriggerResponse extends MavenAGI.EventTriggerBase {
20
+ /** ID that uniquely identifies this event trigger */
21
+ entityId: MavenAGI.EntityId;
22
+ }
@@ -1,2 +1,4 @@
1
- export * from "./EventTrigger";
1
+ export * from "./EventTriggerBase";
2
+ export * from "./EventTriggerRequest";
3
+ export * from "./EventTriggerResponse";
2
4
  export * from "./EventTriggerType";
@@ -1,2 +1,4 @@
1
- export * from "./EventTrigger";
1
+ export * from "./EventTriggerBase";
2
+ export * from "./EventTriggerRequest";
3
+ export * from "./EventTriggerResponse";
2
4
  export * from "./EventTriggerType";
@@ -4,13 +4,13 @@
4
4
  import * as environments from "../../../../environments";
5
5
  import * as core from "../../../../core";
6
6
  import * as MavenAGI from "../../../index";
7
- export declare namespace User {
7
+ export declare namespace Users {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
10
10
  appId?: core.Supplier<string | undefined>;
11
11
  appSecret?: core.Supplier<string | undefined>;
12
- organizationId: core.Supplier<string>;
13
- agentId: core.Supplier<string>;
12
+ xOrganizationId: core.Supplier<string>;
13
+ xAgentId: core.Supplier<string>;
14
14
  fetcher?: core.FetchFunction;
15
15
  }
16
16
  interface RequestOptions {
@@ -19,21 +19,21 @@ export declare namespace User {
19
19
  abortSignal?: AbortSignal;
20
20
  }
21
21
  }
22
- export declare class User {
23
- protected readonly _options: User.Options;
24
- constructor(_options: User.Options);
22
+ export declare class Users {
23
+ protected readonly _options: Users.Options;
24
+ constructor(_options: Users.Options);
25
25
  /**
26
26
  * Create a new user or update an existing one
27
27
  *
28
28
  * @param {MavenAGI.AppUser} request
29
- * @param {User.RequestOptions} requestOptions - Request-specific configuration.
29
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
30
30
  *
31
31
  * @throws {@link MavenAGI.NotFoundError}
32
32
  * @throws {@link MavenAGI.BadRequestError}
33
33
  * @throws {@link MavenAGI.ServerError}
34
34
  *
35
35
  * @example
36
- * await client.user.upsertAppUser({
36
+ * await client.users.upsertAppUser({
37
37
  * id: "string",
38
38
  * userIdentifiers: {
39
39
  * identifiers: new Set([{}])
@@ -43,20 +43,20 @@ export declare class User {
43
43
  * }
44
44
  * })
45
45
  */
46
- upsertAppUser(request: MavenAGI.AppUser, requestOptions?: User.RequestOptions): Promise<MavenAGI.AppUser>;
46
+ upsertAppUser(request: MavenAGI.AppUser, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUser>;
47
47
  /**
48
48
  * Get a user
49
49
  *
50
50
  * @param {string} userId - The ID of the user to get
51
- * @param {User.RequestOptions} requestOptions - Request-specific configuration.
51
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
52
52
  *
53
53
  * @throws {@link MavenAGI.NotFoundError}
54
54
  * @throws {@link MavenAGI.BadRequestError}
55
55
  * @throws {@link MavenAGI.ServerError}
56
56
  *
57
57
  * @example
58
- * await client.user.getAppUser("string")
58
+ * await client.users.getAppUser("string")
59
59
  */
60
- getAppUser(userId: string, requestOptions?: User.RequestOptions): Promise<MavenAGI.AppUser>;
60
+ getAppUser(userId: string, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUser>;
61
61
  protected _getAuthorizationHeader(): Promise<string | undefined>;
62
62
  }
@@ -16,7 +16,7 @@ import * as MavenAGI from "../../../index";
16
16
  import * as serializers from "../../../../serialization/index";
17
17
  import urlJoin from "url-join";
18
18
  import * as errors from "../../../../errors/index";
19
- export class User {
19
+ export class Users {
20
20
  constructor(_options) {
21
21
  this._options = _options;
22
22
  }
@@ -24,14 +24,14 @@ export class User {
24
24
  * Create a new user or update an existing one
25
25
  *
26
26
  * @param {MavenAGI.AppUser} request
27
- * @param {User.RequestOptions} requestOptions - Request-specific configuration.
27
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
28
28
  *
29
29
  * @throws {@link MavenAGI.NotFoundError}
30
30
  * @throws {@link MavenAGI.BadRequestError}
31
31
  * @throws {@link MavenAGI.ServerError}
32
32
  *
33
33
  * @example
34
- * await client.user.upsertAppUser({
34
+ * await client.users.upsertAppUser({
35
35
  * id: "string",
36
36
  * userIdentifiers: {
37
37
  * identifiers: new Set([{}])
@@ -49,11 +49,11 @@ export class User {
49
49
  method: "PUT",
50
50
  headers: {
51
51
  Authorization: yield this._getAuthorizationHeader(),
52
- "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
53
- "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
52
+ "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
53
+ "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
54
54
  "X-Fern-Language": "JavaScript",
55
55
  "X-Fern-SDK-Name": "mavenagi",
56
- "X-Fern-SDK-Version": "0.0.0-alpha.4",
56
+ "X-Fern-SDK-Version": "0.0.0-alpha.6",
57
57
  "X-Fern-Runtime": core.RUNTIME.type,
58
58
  "X-Fern-Runtime-Version": core.RUNTIME.version,
59
59
  },
@@ -120,14 +120,14 @@ export class User {
120
120
  * Get a user
121
121
  *
122
122
  * @param {string} userId - The ID of the user to get
123
- * @param {User.RequestOptions} requestOptions - Request-specific configuration.
123
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
124
124
  *
125
125
  * @throws {@link MavenAGI.NotFoundError}
126
126
  * @throws {@link MavenAGI.BadRequestError}
127
127
  * @throws {@link MavenAGI.ServerError}
128
128
  *
129
129
  * @example
130
- * await client.user.getAppUser("string")
130
+ * await client.users.getAppUser("string")
131
131
  */
132
132
  getAppUser(userId, requestOptions) {
133
133
  var _a, _b;
@@ -137,11 +137,11 @@ export class User {
137
137
  method: "GET",
138
138
  headers: {
139
139
  Authorization: yield this._getAuthorizationHeader(),
140
- "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
141
- "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
140
+ "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
141
+ "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
142
142
  "X-Fern-Language": "JavaScript",
143
143
  "X-Fern-SDK-Name": "mavenagi",
144
- "X-Fern-SDK-Version": "0.0.0-alpha.4",
144
+ "X-Fern-SDK-Version": "0.0.0-alpha.6",
145
145
  "X-Fern-Runtime": core.RUNTIME.type,
146
146
  "X-Fern-Runtime-Version": core.RUNTIME.version,
147
147
  },
package/dist/Client.d.ts CHANGED
@@ -7,14 +7,14 @@ import { Actions } from "./api/resources/actions/client/Client";
7
7
  import { Conversation } from "./api/resources/conversation/client/Client";
8
8
  import { Knowledge } from "./api/resources/knowledge/client/Client";
9
9
  import { Triggers } from "./api/resources/triggers/client/Client";
10
- import { User } from "./api/resources/user/client/Client";
10
+ import { Users } from "./api/resources/users/client/Client";
11
11
  export declare namespace MavenAGIClient {
12
12
  interface Options {
13
13
  environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
14
14
  appId?: core.Supplier<string | undefined>;
15
15
  appSecret?: core.Supplier<string | undefined>;
16
- organizationId: core.Supplier<string>;
17
- agentId: core.Supplier<string>;
16
+ xOrganizationId: core.Supplier<string>;
17
+ xAgentId: core.Supplier<string>;
18
18
  fetcher?: core.FetchFunction;
19
19
  }
20
20
  interface RequestOptions {
@@ -34,6 +34,6 @@ export declare class MavenAGIClient {
34
34
  get knowledge(): Knowledge;
35
35
  protected _triggers: Triggers | undefined;
36
36
  get triggers(): Triggers;
37
- protected _user: User | undefined;
38
- get user(): User;
37
+ protected _users: Users | undefined;
38
+ get users(): Users;
39
39
  }
package/dist/Client.js CHANGED
@@ -5,7 +5,7 @@ import { Actions } from "./api/resources/actions/client/Client";
5
5
  import { Conversation } from "./api/resources/conversation/client/Client";
6
6
  import { Knowledge } from "./api/resources/knowledge/client/Client";
7
7
  import { Triggers } from "./api/resources/triggers/client/Client";
8
- import { User } from "./api/resources/user/client/Client";
8
+ import { Users } from "./api/resources/users/client/Client";
9
9
  export class MavenAGIClient {
10
10
  constructor(_options) {
11
11
  this._options = _options;
@@ -26,8 +26,8 @@ export class MavenAGIClient {
26
26
  var _a;
27
27
  return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
28
28
  }
29
- get user() {
29
+ get users() {
30
30
  var _a;
31
- return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new User(this._options)));
31
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Users(this._options)));
32
32
  }
33
33
  }
@@ -9,8 +9,8 @@ export declare namespace Actions {
9
9
  environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
10
10
  appId?: core.Supplier<string | undefined>;
11
11
  appSecret?: core.Supplier<string | undefined>;
12
- organizationId: core.Supplier<string>;
13
- agentId: core.Supplier<string>;
12
+ xOrganizationId: core.Supplier<string>;
13
+ xAgentId: core.Supplier<string>;
14
14
  fetcher?: core.FetchFunction;
15
15
  }
16
16
  interface RequestOptions {
@@ -22,55 +22,10 @@ export declare namespace Actions {
22
22
  export declare class Actions {
23
23
  protected readonly _options: Actions.Options;
24
24
  constructor(_options: Actions.Options);
25
- /**
26
- * Update an action set or create it if it doesn't exist
27
- *
28
- * @param {MavenAGI.ActionSetRequest} request
29
- * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
30
- *
31
- * @throws {@link MavenAGI.NotFoundError}
32
- * @throws {@link MavenAGI.BadRequestError}
33
- * @throws {@link MavenAGI.ServerError}
34
- *
35
- * @example
36
- * await client.actions.createActionSet({
37
- * id: "string",
38
- * name: "string"
39
- * })
40
- */
41
- createActionSet(request: MavenAGI.ActionSetRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionSetResponse>;
42
- /**
43
- * Get an action set by its supplied ID
44
- *
45
- * @param {string} actionSetId - The ID of the action set to get
46
- * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
47
- *
48
- * @throws {@link MavenAGI.NotFoundError}
49
- * @throws {@link MavenAGI.BadRequestError}
50
- * @throws {@link MavenAGI.ServerError}
51
- *
52
- * @example
53
- * await client.actions.getActionSet("string")
54
- */
55
- getActionSet(actionSetId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionSetResponse>;
56
- /**
57
- * Delete an action set
58
- *
59
- * @param {string} actionSetId - The ID of the action set to delete
60
- * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
61
- *
62
- * @throws {@link MavenAGI.NotFoundError}
63
- * @throws {@link MavenAGI.BadRequestError}
64
- * @throws {@link MavenAGI.ServerError}
65
- *
66
- * @example
67
- * await client.actions.deleteActionSet("string")
68
- */
69
- deleteActionSet(actionSetId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
70
25
  /**
71
26
  * Update an action or create it if it doesn't exist
72
27
  *
73
- * @param {MavenAGI.Action} request
28
+ * @param {MavenAGI.ActionRequest} request
74
29
  * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
75
30
  *
76
31
  * @throws {@link MavenAGI.NotFoundError}
@@ -78,23 +33,22 @@ export declare class Actions {
78
33
  * @throws {@link MavenAGI.ServerError}
79
34
  *
80
35
  * @example
81
- * await client.actions.registerAction({
82
- * id: "string",
83
- * actionSetId: "string",
84
- * appId: "string",
85
- * name: "string",
86
- * description: "string",
87
- * userInteractionRequired: true,
88
- * buttonName: "string",
89
- * requiredUserContextFieldNames: new Set(["string"]),
90
- * userFormParameters: [{}]
36
+ * await client.actions.createOrUpdateAction({
37
+ * entityId: {
38
+ * referenceId: "get-balance"
39
+ * },
40
+ * name: "Get the user's balance",
41
+ * description: "This action calls an API to get the user's current balance.",
42
+ * userInteractionRequired: false,
43
+ * requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
44
+ * userFormParameters: []
91
45
  * })
92
46
  */
93
- registerAction(request: MavenAGI.Action, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.Action>;
47
+ createOrUpdateAction(request: MavenAGI.ActionRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
94
48
  /**
95
49
  * Get an action by its supplied ID
96
50
  *
97
- * @param {string} actionId - The ID of the action to get
51
+ * @param {string} referenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
98
52
  * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
99
53
  *
100
54
  * @throws {@link MavenAGI.NotFoundError}
@@ -102,13 +56,13 @@ export declare class Actions {
102
56
  * @throws {@link MavenAGI.ServerError}
103
57
  *
104
58
  * @example
105
- * await client.actions.getAction("string")
59
+ * await client.actions.getAction("get-balance")
106
60
  */
107
- getAction(actionId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.Action>;
61
+ getAction(referenceId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
108
62
  /**
109
63
  * Delete an action
110
64
  *
111
- * @param {string} actionId - The ID of the action to delete
65
+ * @param {string} referenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
112
66
  * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
113
67
  *
114
68
  * @throws {@link MavenAGI.NotFoundError}
@@ -116,8 +70,8 @@ export declare class Actions {
116
70
  * @throws {@link MavenAGI.ServerError}
117
71
  *
118
72
  * @example
119
- * await client.actions.deleteAction("string")
73
+ * await client.actions.deleteAction("get-balance")
120
74
  */
121
- deleteAction(actionId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
75
+ deleteAction(referenceId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
122
76
  protected _getAuthorizationHeader(): Promise<string | undefined>;
123
77
  }