mavenagi 1.2.61 → 1.2.62

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 (164) hide show
  1. package/BaseClient.js +2 -2
  2. package/Client.d.ts +6 -0
  3. package/Client.js +40 -30
  4. package/api/resources/actions/client/Client.d.ts +16 -0
  5. package/api/resources/actions/client/Client.js +16 -0
  6. package/api/resources/capabilities/client/Client.d.ts +118 -0
  7. package/api/resources/capabilities/client/Client.js +521 -0
  8. package/api/resources/capabilities/client/index.d.ts +1 -0
  9. package/api/resources/capabilities/client/index.js +17 -0
  10. package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +36 -0
  11. package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.js +3 -0
  12. package/api/resources/capabilities/client/requests/DeleteCapabilityByTypeRequest.d.ts +18 -0
  13. package/api/resources/capabilities/client/requests/DeleteCapabilityByTypeRequest.js +3 -0
  14. package/api/resources/capabilities/client/requests/GetCapabilityByTypeRequest.d.ts +22 -0
  15. package/api/resources/capabilities/client/requests/GetCapabilityByTypeRequest.js +3 -0
  16. package/api/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.d.ts +24 -0
  17. package/api/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.js +3 -0
  18. package/api/resources/capabilities/client/requests/index.d.ts +4 -0
  19. package/api/resources/capabilities/client/requests/index.js +2 -0
  20. package/api/resources/capabilities/exports.d.ts +2 -0
  21. package/api/resources/capabilities/exports.js +21 -0
  22. package/api/resources/capabilities/index.d.ts +2 -0
  23. package/api/resources/capabilities/index.js +18 -0
  24. package/api/resources/capabilities/types/CapabilitiesSearchResponse.d.ts +43 -0
  25. package/api/resources/capabilities/types/CapabilitiesSearchResponse.js +3 -0
  26. package/api/resources/capabilities/types/CapabilityResponse.d.ts +23 -0
  27. package/api/resources/capabilities/types/CapabilityResponse.js +3 -0
  28. package/api/resources/capabilities/types/CapabilitySortField.d.ts +7 -0
  29. package/api/resources/capabilities/types/CapabilitySortField.js +10 -0
  30. package/api/resources/capabilities/types/CapabilitySummary.d.ts +28 -0
  31. package/api/resources/capabilities/types/CapabilitySummary.js +3 -0
  32. package/api/resources/capabilities/types/index.d.ts +4 -0
  33. package/api/resources/capabilities/types/index.js +20 -0
  34. package/api/resources/charters/types/CharterSearchFilter.d.ts +12 -9
  35. package/api/resources/commons/types/ActionResponse.d.ts +11 -2
  36. package/api/resources/commons/types/BaseConversationResponse.d.ts +6 -0
  37. package/api/resources/commons/types/CapabilityBase.d.ts +23 -0
  38. package/api/resources/commons/types/CapabilityBase.js +3 -0
  39. package/api/resources/{intelligentFields/types/IntelligentFieldStatus.d.ts → commons/types/CapabilityStatus.d.ts} +6 -3
  40. package/api/resources/{intelligentFields/types/IntelligentFieldStatus.js → commons/types/CapabilityStatus.js} +6 -3
  41. package/api/resources/commons/types/CapabilityType.d.ts +8 -0
  42. package/api/resources/commons/types/CapabilityType.js +11 -0
  43. package/api/resources/commons/types/EntityType.d.ts +5 -1
  44. package/api/resources/commons/types/EntityType.js +5 -1
  45. package/api/resources/commons/types/ErrorMessage.d.ts +3 -0
  46. package/api/resources/commons/types/ErrorReason.d.ts +31 -0
  47. package/api/resources/commons/types/ErrorReason.js +34 -0
  48. package/api/resources/commons/types/index.d.ts +4 -0
  49. package/api/resources/commons/types/index.js +4 -0
  50. package/api/resources/conversation/client/Client.d.ts +1 -0
  51. package/api/resources/conversation/client/Client.js +1 -0
  52. package/api/resources/conversationKickoffs/client/Client.d.ts +45 -0
  53. package/api/resources/conversationKickoffs/client/Client.js +175 -0
  54. package/api/resources/conversationKickoffs/client/index.d.ts +1 -0
  55. package/api/resources/conversationKickoffs/client/index.js +17 -0
  56. package/api/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.d.ts +22 -0
  57. package/api/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.js +3 -0
  58. package/api/resources/conversationKickoffs/client/requests/index.d.ts +1 -0
  59. package/api/resources/conversationKickoffs/client/requests/index.js +2 -0
  60. package/api/resources/conversationKickoffs/exports.d.ts +2 -0
  61. package/api/resources/conversationKickoffs/exports.js +21 -0
  62. package/api/resources/conversationKickoffs/index.d.ts +2 -0
  63. package/api/resources/conversationKickoffs/index.js +18 -0
  64. package/api/resources/conversationKickoffs/types/ConversationKickoff.d.ts +27 -0
  65. package/api/resources/conversationKickoffs/types/ConversationKickoff.js +3 -0
  66. package/api/resources/conversationKickoffs/types/index.d.ts +1 -0
  67. package/api/resources/conversationKickoffs/types/index.js +17 -0
  68. package/api/resources/index.d.ts +6 -0
  69. package/api/resources/index.js +7 -1
  70. package/api/resources/intelligentFields/client/Client.d.ts +13 -1
  71. package/api/resources/intelligentFields/client/Client.js +13 -1
  72. package/api/resources/intelligentFields/client/requests/IntelligentFieldDeleteRequest.d.ts +1 -1
  73. package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +1 -1
  74. package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +2 -2
  75. package/api/resources/intelligentFields/types/EnumOption.d.ts +5 -0
  76. package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +0 -4
  77. package/api/resources/intelligentFields/types/IntelligentFieldDetailResponse.d.ts +1 -1
  78. package/api/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +6 -1
  79. package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +2 -8
  80. package/api/resources/intelligentFields/types/index.d.ts +0 -1
  81. package/api/resources/intelligentFields/types/index.js +0 -1
  82. package/api/resources/knowledge/client/Client.d.ts +3 -0
  83. package/api/resources/knowledge/client/Client.js +3 -0
  84. package/api/resources/triggers/client/Client.d.ts +21 -0
  85. package/api/resources/triggers/client/Client.js +21 -0
  86. package/api/resources/triggers/types/EventTriggerBase.d.ts +0 -4
  87. package/api/resources/triggers/types/EventTriggerRequest.d.ts +4 -0
  88. package/api/resources/triggers/types/EventTriggerResponse.d.ts +11 -3
  89. package/package.json +1 -1
  90. package/reference.md +461 -1
  91. package/serialization/resources/capabilities/client/index.d.ts +1 -0
  92. package/serialization/resources/capabilities/client/index.js +17 -0
  93. package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +21 -0
  94. package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.js +55 -0
  95. package/serialization/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.d.ts +10 -0
  96. package/serialization/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.js +42 -0
  97. package/serialization/resources/capabilities/client/requests/index.d.ts +2 -0
  98. package/serialization/resources/capabilities/client/requests/index.js +7 -0
  99. package/serialization/resources/capabilities/index.d.ts +2 -0
  100. package/serialization/resources/capabilities/index.js +18 -0
  101. package/serialization/resources/capabilities/types/CapabilitiesSearchResponse.d.ts +11 -0
  102. package/serialization/resources/capabilities/types/CapabilitiesSearchResponse.js +45 -0
  103. package/serialization/resources/capabilities/types/CapabilityResponse.d.ts +23 -0
  104. package/serialization/resources/capabilities/types/CapabilityResponse.js +53 -0
  105. package/serialization/resources/capabilities/types/CapabilitySortField.d.ts +7 -0
  106. package/serialization/resources/{intelligentFields/types/IntelligentFieldStatus.js → capabilities/types/CapabilitySortField.js} +2 -2
  107. package/serialization/resources/capabilities/types/CapabilitySummary.d.ts +13 -0
  108. package/serialization/resources/capabilities/types/CapabilitySummary.js +47 -0
  109. package/serialization/resources/capabilities/types/index.d.ts +4 -0
  110. package/serialization/resources/capabilities/types/index.js +20 -0
  111. package/serialization/resources/charters/types/CharterSearchFilter.d.ts +1 -0
  112. package/serialization/resources/charters/types/CharterSearchFilter.js +1 -0
  113. package/serialization/resources/commons/types/ActionResponse.d.ts +3 -2
  114. package/serialization/resources/commons/types/ActionResponse.js +4 -2
  115. package/serialization/resources/commons/types/BaseConversationResponse.d.ts +1 -0
  116. package/serialization/resources/commons/types/BaseConversationResponse.js +1 -0
  117. package/serialization/resources/commons/types/CapabilityBase.d.ts +14 -0
  118. package/serialization/resources/commons/types/CapabilityBase.js +46 -0
  119. package/serialization/resources/{intelligentFields/types/IntelligentFieldStatus.d.ts → commons/types/CapabilityStatus.d.ts} +2 -2
  120. package/serialization/resources/commons/types/CapabilityStatus.js +39 -0
  121. package/serialization/resources/commons/types/CapabilityType.d.ts +7 -0
  122. package/serialization/resources/commons/types/CapabilityType.js +39 -0
  123. package/serialization/resources/commons/types/EntityType.d.ts +1 -1
  124. package/serialization/resources/commons/types/EntityType.js +1 -1
  125. package/serialization/resources/commons/types/ErrorMessage.d.ts +2 -0
  126. package/serialization/resources/commons/types/ErrorMessage.js +2 -0
  127. package/serialization/resources/commons/types/ErrorReason.d.ts +7 -0
  128. package/serialization/resources/commons/types/ErrorReason.js +49 -0
  129. package/serialization/resources/commons/types/index.d.ts +4 -0
  130. package/serialization/resources/commons/types/index.js +4 -0
  131. package/serialization/resources/conversationKickoffs/client/index.d.ts +1 -0
  132. package/serialization/resources/conversationKickoffs/client/index.js +17 -0
  133. package/serialization/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.d.ts +12 -0
  134. package/serialization/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.js +44 -0
  135. package/serialization/resources/conversationKickoffs/client/requests/index.d.ts +1 -0
  136. package/serialization/resources/conversationKickoffs/client/requests/index.js +5 -0
  137. package/serialization/resources/conversationKickoffs/index.d.ts +2 -0
  138. package/serialization/resources/conversationKickoffs/index.js +18 -0
  139. package/serialization/resources/conversationKickoffs/types/ConversationKickoff.d.ts +11 -0
  140. package/serialization/resources/conversationKickoffs/types/ConversationKickoff.js +45 -0
  141. package/serialization/resources/conversationKickoffs/types/index.d.ts +1 -0
  142. package/serialization/resources/conversationKickoffs/types/index.js +17 -0
  143. package/serialization/resources/index.d.ts +6 -0
  144. package/serialization/resources/index.js +7 -1
  145. package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +2 -2
  146. package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +2 -2
  147. package/serialization/resources/intelligentFields/types/EnumOption.d.ts +1 -0
  148. package/serialization/resources/intelligentFields/types/EnumOption.js +1 -0
  149. package/serialization/resources/intelligentFields/types/IntelligentFieldCore.d.ts +0 -2
  150. package/serialization/resources/intelligentFields/types/IntelligentFieldCore.js +0 -2
  151. package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +2 -0
  152. package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.js +2 -0
  153. package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +2 -5
  154. package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -5
  155. package/serialization/resources/intelligentFields/types/index.d.ts +0 -1
  156. package/serialization/resources/intelligentFields/types/index.js +0 -1
  157. package/serialization/resources/triggers/types/EventTriggerBase.d.ts +0 -2
  158. package/serialization/resources/triggers/types/EventTriggerBase.js +0 -2
  159. package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +2 -0
  160. package/serialization/resources/triggers/types/EventTriggerRequest.js +2 -0
  161. package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +2 -1
  162. package/serialization/resources/triggers/types/EventTriggerResponse.js +3 -1
  163. package/version.d.ts +1 -1
  164. package/version.js +1 -1
@@ -0,0 +1,45 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient";
3
+ import * as core from "../../../../core";
4
+ import * as MavenAGI from "../../../index";
5
+ export declare namespace ConversationKickoffsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class ConversationKickoffsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ConversationKickoffsClient.Options>;
12
+ constructor(options: ConversationKickoffsClient.Options);
13
+ /**
14
+ * Register or update one of the calling app's Conversation Kickoffs for this agent. An app may
15
+ * hold multiple independent installs, and any number of an agent's kickoffs may run at once.
16
+ *
17
+ * A newly installed kickoff starts inactive, so installing one never changes an agent's
18
+ * behaviour on its own. Updating an existing one rewrites its name and description and leaves
19
+ * its status alone, so re-registering on every install refresh never deactivates a kickoff
20
+ * that is already live. Use the capability APIs to activate it, and to read, search or delete
21
+ * it afterwards.
22
+ *
23
+ * @param {MavenAGI.CreateConversationKickoffRequest} request
24
+ * @param {ConversationKickoffsClient.RequestOptions} requestOptions - Request-specific configuration.
25
+ *
26
+ * @throws {@link MavenAGI.NotFoundError}
27
+ * @throws {@link MavenAGI.BadRequestError}
28
+ * @throws {@link MavenAGI.PayloadTooLargeError}
29
+ * @throws {@link MavenAGI.TooManyRequestsError}
30
+ * @throws {@link MavenAGI.ServerError}
31
+ * @throws {@link errors.MavenAGIError}
32
+ * @throws {@link errors.MavenAGITimeoutError}
33
+ *
34
+ * @example
35
+ * await client.conversationKickoffs.createOrUpdate({
36
+ * kickoffId: {
37
+ * referenceId: "greet-returning-customer"
38
+ * },
39
+ * name: "Greet returning customer",
40
+ * description: "Looks up the customer's open orders before the agent's first reply"
41
+ * })
42
+ */
43
+ createOrUpdate(request: MavenAGI.CreateConversationKickoffRequest, requestOptions?: ConversationKickoffsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.ConversationKickoff>;
44
+ private __createOrUpdate;
45
+ }
@@ -0,0 +1,175 @@
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.ConversationKickoffsClient = void 0;
47
+ const BaseClient_1 = require("../../../../BaseClient");
48
+ const core = __importStar(require("../../../../core"));
49
+ const headers_1 = require("../../../../core/headers");
50
+ const requestBody_1 = require("../../../../core/requestBody");
51
+ const environments = __importStar(require("../../../../environments"));
52
+ const handleNonStatusCodeError_1 = require("../../../../errors/handleNonStatusCodeError");
53
+ const errors = __importStar(require("../../../../errors/index"));
54
+ const serializers = __importStar(require("../../../../serialization/index"));
55
+ const MavenAGI = __importStar(require("../../../index"));
56
+ class ConversationKickoffsClient {
57
+ constructor(options) {
58
+ this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
59
+ }
60
+ /**
61
+ * Register or update one of the calling app's Conversation Kickoffs for this agent. An app may
62
+ * hold multiple independent installs, and any number of an agent's kickoffs may run at once.
63
+ *
64
+ * A newly installed kickoff starts inactive, so installing one never changes an agent's
65
+ * behaviour on its own. Updating an existing one rewrites its name and description and leaves
66
+ * its status alone, so re-registering on every install refresh never deactivates a kickoff
67
+ * that is already live. Use the capability APIs to activate it, and to read, search or delete
68
+ * it afterwards.
69
+ *
70
+ * @param {MavenAGI.CreateConversationKickoffRequest} request
71
+ * @param {ConversationKickoffsClient.RequestOptions} requestOptions - Request-specific configuration.
72
+ *
73
+ * @throws {@link MavenAGI.NotFoundError}
74
+ * @throws {@link MavenAGI.BadRequestError}
75
+ * @throws {@link MavenAGI.PayloadTooLargeError}
76
+ * @throws {@link MavenAGI.TooManyRequestsError}
77
+ * @throws {@link MavenAGI.ServerError}
78
+ * @throws {@link errors.MavenAGIError}
79
+ * @throws {@link errors.MavenAGITimeoutError}
80
+ *
81
+ * @example
82
+ * await client.conversationKickoffs.createOrUpdate({
83
+ * kickoffId: {
84
+ * referenceId: "greet-returning-customer"
85
+ * },
86
+ * name: "Greet returning customer",
87
+ * description: "Looks up the customer's open orders before the agent's first reply"
88
+ * })
89
+ */
90
+ createOrUpdate(request, requestOptions) {
91
+ return core.HttpResponsePromise.fromPromise(this.__createOrUpdate(request, requestOptions));
92
+ }
93
+ __createOrUpdate(request, requestOptions) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
96
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
97
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
98
+ "X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
99
+ "X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
100
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
101
+ const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
102
+ url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, "/v1/conversation-kickoffs"),
103
+ method: "PUT",
104
+ headers: _headers,
105
+ contentType: "application/json",
106
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
107
+ requestType: "json",
108
+ body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.CreateConversationKickoffRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
109
+ timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
110
+ maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
111
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
112
+ fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
113
+ logging: this._options.logging,
114
+ });
115
+ if (_response.ok) {
116
+ return {
117
+ data: serializers.ConversationKickoff.parseOrThrow(_response.body, {
118
+ unrecognizedObjectKeys: "passthrough",
119
+ allowUnrecognizedUnionMembers: true,
120
+ allowUnrecognizedEnumValues: true,
121
+ breadcrumbsPrefix: ["response"],
122
+ }),
123
+ rawResponse: _response.rawResponse,
124
+ };
125
+ }
126
+ if (_response.error.reason === "status-code") {
127
+ switch (_response.error.statusCode) {
128
+ case 404:
129
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
130
+ unrecognizedObjectKeys: "passthrough",
131
+ allowUnrecognizedUnionMembers: true,
132
+ allowUnrecognizedEnumValues: true,
133
+ breadcrumbsPrefix: ["response"],
134
+ }), _response.rawResponse);
135
+ case 400:
136
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
137
+ unrecognizedObjectKeys: "passthrough",
138
+ allowUnrecognizedUnionMembers: true,
139
+ allowUnrecognizedEnumValues: true,
140
+ breadcrumbsPrefix: ["response"],
141
+ }), _response.rawResponse);
142
+ case 413:
143
+ throw new MavenAGI.PayloadTooLargeError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
144
+ unrecognizedObjectKeys: "passthrough",
145
+ allowUnrecognizedUnionMembers: true,
146
+ allowUnrecognizedEnumValues: true,
147
+ breadcrumbsPrefix: ["response"],
148
+ }), _response.rawResponse);
149
+ case 429:
150
+ throw new MavenAGI.TooManyRequestsError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
151
+ unrecognizedObjectKeys: "passthrough",
152
+ allowUnrecognizedUnionMembers: true,
153
+ allowUnrecognizedEnumValues: true,
154
+ breadcrumbsPrefix: ["response"],
155
+ }), _response.rawResponse);
156
+ case 500:
157
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
158
+ unrecognizedObjectKeys: "passthrough",
159
+ allowUnrecognizedUnionMembers: true,
160
+ allowUnrecognizedEnumValues: true,
161
+ breadcrumbsPrefix: ["response"],
162
+ }), _response.rawResponse);
163
+ default:
164
+ throw new errors.MavenAGIError({
165
+ statusCode: _response.error.statusCode,
166
+ body: _response.error.body,
167
+ rawResponse: _response.rawResponse,
168
+ });
169
+ }
170
+ }
171
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/v1/conversation-kickoffs");
172
+ });
173
+ }
174
+ }
175
+ exports.ConversationKickoffsClient = ConversationKickoffsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,22 @@
1
+ import type * as MavenAGI from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * kickoffId: {
6
+ * referenceId: "greet-returning-customer"
7
+ * },
8
+ * name: "Greet returning customer",
9
+ * description: "Looks up the customer's open orders before the agent's first reply"
10
+ * }
11
+ */
12
+ export interface CreateConversationKickoffRequest {
13
+ /**
14
+ * ID that uniquely identifies this Conversation Kickoff. Must be unique within the
15
+ * calling app.
16
+ */
17
+ kickoffId: MavenAGI.EntityIdBase;
18
+ /** The kickoff's display name, shown to whoever manages the agent. */
19
+ name: string;
20
+ /** What the kickoff does, shown to whoever manages the agent. */
21
+ description?: string;
22
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { CreateConversationKickoffRequest } from "./CreateConversationKickoffRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { ConversationKickoffsClient } from "./client/Client";
2
+ export * from "./client/index";
@@ -0,0 +1,21 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ConversationKickoffsClient = void 0;
19
+ var Client_1 = require("./client/Client");
20
+ Object.defineProperty(exports, "ConversationKickoffsClient", { enumerable: true, get: function () { return Client_1.ConversationKickoffsClient; } });
21
+ __exportStar(require("./client/index"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * from "./types";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,27 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * A Conversation Kickoff installed on an agent: code that runs when a conversation is created,
4
+ * before the agent produces its first reply.
5
+ *
6
+ * A kickoff has no settings of its own beyond the fields every capability has.
7
+ *
8
+ * @example
9
+ * {
10
+ * kickoffId: {
11
+ * referenceId: "greet-returning-customer",
12
+ * appId: "my-billing-system",
13
+ * organizationId: "acme",
14
+ * agentId: "support",
15
+ * type: MavenAGI.EntityType.ConversationKickoff
16
+ * },
17
+ * name: "Greet returning customer",
18
+ * description: "Looks the customer up and welcomes them back by name",
19
+ * status: MavenAGI.CapabilityStatus.Inactive,
20
+ * createdAt: new Date("2026-01-15T10:30:00.000Z"),
21
+ * updatedAt: new Date("2026-01-15T10:30:00.000Z")
22
+ * }
23
+ */
24
+ export interface ConversationKickoff extends MavenAGI.CapabilityBase {
25
+ /** ID that uniquely identifies this Conversation Kickoff. */
26
+ kickoffId: MavenAGI.EntityId;
27
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./ConversationKickoff";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ConversationKickoff"), exports);
@@ -14,6 +14,9 @@ export * from "./appSettings/client/requests";
14
14
  export * from "./appSettings/types";
15
15
  export * as assets from "./assets";
16
16
  export * from "./assets/types";
17
+ export * as capabilities from "./capabilities";
18
+ export * from "./capabilities/client/requests";
19
+ export * from "./capabilities/types";
17
20
  export * as charters from "./charters";
18
21
  export * from "./charters/client/requests";
19
22
  export * from "./charters/types";
@@ -23,6 +26,9 @@ export * from "./commons/types";
23
26
  export * as conversation from "./conversation";
24
27
  export * from "./conversation/client/requests";
25
28
  export * from "./conversation/types";
29
+ export * as conversationKickoffs from "./conversationKickoffs";
30
+ export * from "./conversationKickoffs/client/requests";
31
+ export * from "./conversationKickoffs/types";
26
32
  export * as customers from "./customers";
27
33
  export * from "./customers/client/requests";
28
34
  export * from "./customers/types";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.voiceConversations = exports.voice = exports.users = exports.triggers = exports.translations = exports.segments = exports.organizations = exports.knowledge = exports.intelligentFields = exports.integrations = exports.inbox = exports.events = exports.developersCommons = exports.customers = exports.conversation = exports.commons = exports.charters = exports.assets = exports.appSettings = exports.appDirectory = exports.analytics = exports.agents = exports.actions = void 0;
39
+ exports.voiceConversations = exports.voice = exports.users = exports.triggers = exports.translations = exports.segments = exports.organizations = exports.knowledge = exports.intelligentFields = exports.integrations = exports.inbox = exports.events = exports.developersCommons = exports.customers = exports.conversationKickoffs = exports.conversation = exports.commons = exports.charters = exports.capabilities = exports.assets = exports.appSettings = exports.appDirectory = exports.analytics = exports.agents = exports.actions = void 0;
40
40
  exports.actions = __importStar(require("./actions"));
41
41
  __exportStar(require("./actions/client/requests"), exports);
42
42
  __exportStar(require("./actions/types"), exports);
@@ -53,6 +53,9 @@ __exportStar(require("./appSettings/client/requests"), exports);
53
53
  __exportStar(require("./appSettings/types"), exports);
54
54
  exports.assets = __importStar(require("./assets"));
55
55
  __exportStar(require("./assets/types"), exports);
56
+ exports.capabilities = __importStar(require("./capabilities"));
57
+ __exportStar(require("./capabilities/client/requests"), exports);
58
+ __exportStar(require("./capabilities/types"), exports);
56
59
  exports.charters = __importStar(require("./charters"));
57
60
  __exportStar(require("./charters/client/requests"), exports);
58
61
  __exportStar(require("./charters/types"), exports);
@@ -62,6 +65,9 @@ __exportStar(require("./commons/types"), exports);
62
65
  exports.conversation = __importStar(require("./conversation"));
63
66
  __exportStar(require("./conversation/client/requests"), exports);
64
67
  __exportStar(require("./conversation/types"), exports);
68
+ exports.conversationKickoffs = __importStar(require("./conversationKickoffs"));
69
+ __exportStar(require("./conversationKickoffs/client/requests"), exports);
70
+ __exportStar(require("./conversationKickoffs/types"), exports);
65
71
  exports.customers = __importStar(require("./customers"));
66
72
  __exportStar(require("./customers/client/requests"), exports);
67
73
  __exportStar(require("./customers/types"), exports);
@@ -40,7 +40,8 @@ export declare class IntelligentFieldsClient {
40
40
  * validationType: "STRING",
41
41
  * enumOptions: [{
42
42
  * value: "HIGH",
43
- * label: "High Priority"
43
+ * label: "High Priority",
44
+ * description: "The customer is blocked or reports an outage."
44
45
  * }, {
45
46
  * value: "MEDIUM",
46
47
  * label: "Medium Priority"
@@ -54,6 +55,12 @@ export declare class IntelligentFieldsClient {
54
55
  createOrUpdate(request: MavenAGI.IntelligentFieldRequest, requestOptions?: IntelligentFieldsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.IntelligentFieldResponse>;
55
56
  private __createOrUpdate;
56
57
  /**
58
+ * @deprecated
59
+ *
60
+ * Deprecated. Use `GET /v1/capabilities/INTELLIGENT_FIELD/{referenceId}`, which reads any
61
+ * kind of capability the same way. It does not carry `referencingCharters`; search
62
+ * charters to find the ones that reference a capability.
63
+ *
57
64
  * Get an intelligent field by its supplied ID
58
65
  *
59
66
  * @param {string} fieldReferenceId - The reference ID of the intelligent field to get. All other entity ID fields are inferred from the request.
@@ -106,6 +113,11 @@ export declare class IntelligentFieldsClient {
106
113
  patch(fieldReferenceId: string, request?: MavenAGI.IntelligentFieldPatchRequest, requestOptions?: IntelligentFieldsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.IntelligentFieldResponse>;
107
114
  private __patch;
108
115
  /**
116
+ * @deprecated
117
+ *
118
+ * Deprecated. Use `DELETE /v1/capabilities/INTELLIGENT_FIELD/{referenceId}`, which
119
+ * deletes any kind of capability the same way. That endpoint returns no body.
120
+ *
109
121
  * Soft delete an intelligent field. Only INACTIVE fields can be deleted.
110
122
  *
111
123
  * Deleted fields are excluded from search results but can still be retrieved by ID.
@@ -87,7 +87,8 @@ class IntelligentFieldsClient {
87
87
  * validationType: "STRING",
88
88
  * enumOptions: [{
89
89
  * value: "HIGH",
90
- * label: "High Priority"
90
+ * label: "High Priority",
91
+ * description: "The customer is blocked or reports an outage."
91
92
  * }, {
92
93
  * value: "MEDIUM",
93
94
  * label: "Medium Priority"
@@ -183,6 +184,12 @@ class IntelligentFieldsClient {
183
184
  });
184
185
  }
185
186
  /**
187
+ * @deprecated
188
+ *
189
+ * Deprecated. Use `GET /v1/capabilities/INTELLIGENT_FIELD/{referenceId}`, which reads any
190
+ * kind of capability the same way. It does not carry `referencingCharters`; search
191
+ * charters to find the ones that reference a capability.
192
+ *
186
193
  * Get an intelligent field by its supplied ID
187
194
  *
188
195
  * @param {string} fieldReferenceId - The reference ID of the intelligent field to get. All other entity ID fields are inferred from the request.
@@ -406,6 +413,11 @@ class IntelligentFieldsClient {
406
413
  });
407
414
  }
408
415
  /**
416
+ * @deprecated
417
+ *
418
+ * Deprecated. Use `DELETE /v1/capabilities/INTELLIGENT_FIELD/{referenceId}`, which
419
+ * deletes any kind of capability the same way. That endpoint returns no body.
420
+ *
409
421
  * Soft delete an intelligent field. Only INACTIVE fields can be deleted.
410
422
  *
411
423
  * Deleted fields are excluded from search results but can still be retrieved by ID.
@@ -5,7 +5,7 @@
5
5
  export interface IntelligentFieldDeleteRequest {
6
6
  /** The App ID of the intelligent field to delete. If not provided, the ID of the calling app will be used. */
7
7
  appId?: string;
8
- /** The agent variant reference ID of the intelligent field to delete. */
8
+ /** The agent variant to stage the delete in, by reference ID. Required on an agent with versioned intelligent fields; a delete that omits it there is rejected with reason `VARIANT_REQUIRED`. */
9
9
  variantReferenceId?: string;
10
10
  /** The App ID of the agent variant reference for the intelligent field to delete. If not provided, the ID of the calling app will be used. */
11
11
  variantAppId?: string;
@@ -5,7 +5,7 @@
5
5
  export interface IntelligentFieldGetRequest {
6
6
  /** The App ID of the intelligent field to get. If not provided the ID of the calling app will be used. */
7
7
  appId?: string;
8
- /** The agent variant reference ID to resolve the intelligent field's version through. If not provided, defaults to the agent's production variant. */
8
+ /** The agent variant reference ID to resolve the intelligent field's version through. Required on an agent with versioned intelligent fields; a request that omits it there is rejected with reason `VARIANT_REQUIRED`. Otherwise, if omitted, the agent's only variant is used. */
9
9
  variantReferenceId?: string;
10
10
  /** The App ID of the agent variant reference. If not provided, the ID of the calling app will be used. */
11
11
  variantAppId?: string;
@@ -23,12 +23,12 @@ export interface IntelligentFieldPatchRequest {
23
23
  * field beyond that limit is rejected. A field referenced by an active precondition
24
24
  * cannot be deactivated.
25
25
  */
26
- status?: MavenAGI.IntelligentFieldStatus;
26
+ status?: MavenAGI.CapabilityStatus;
27
27
  /** A plain text description of the intelligent field. */
28
28
  description?: string;
29
29
  /** Updated enum options for fields that constrain the LLM to a finite set. Omit to leave unchanged. The new list must be a superset of the existing options (add-only; removals are rejected). */
30
30
  enumOptions?: MavenAGI.EnumOption[];
31
- /** The agent variant to stage this patch in, by reference ID. Its owning app is `variantAppId`. */
31
+ /** The agent variant to stage this patch in, by reference ID. Its owning app is `variantAppId`. Required on an agent with versioned intelligent fields; a patch that omits it there is rejected with reason `VARIANT_REQUIRED`. */
32
32
  variantId?: MavenAGI.EntityIdBase;
33
33
  /** The App ID of the agent variant named by `variantId`. If not provided, the ID of the calling app will be used — name the owning app to patch in a variant the caller does not own, as the platform's own seeded variants are. */
34
34
  variantAppId?: string;
@@ -8,4 +8,9 @@ export interface EnumOption {
8
8
  value: string;
9
9
  /** Display label for the option */
10
10
  label?: string;
11
+ /**
12
+ * Instructions that tell the LLM when to pick this option. Up to 1200 characters. On a
13
+ * patch, an option sent without a description has its description cleared.
14
+ */
15
+ description?: string;
11
16
  }
@@ -3,10 +3,6 @@ import type * as MavenAGI from "../../../index";
3
3
  * The content of an intelligent field -- what it is called, and what the LLM should produce for it.
4
4
  */
5
5
  export interface IntelligentFieldCore {
6
- /** Display name for the intelligent field */
7
- name: string;
8
- /** A plain text description of the intelligent field. */
9
- description?: string;
10
6
  /**
11
7
  * The type of value this field holds. It constrains the schema the LLM is asked to fill
12
8
  * and the JSON type of the computed `value`.
@@ -11,7 +11,7 @@ import type * as MavenAGI from "../../../index";
11
11
  * },
12
12
  * name: "Ticket Priority",
13
13
  * description: "The priority of the conversation based on urgency",
14
- * status: MavenAGI.IntelligentFieldStatus.Inactive,
14
+ * status: MavenAGI.CapabilityStatus.Inactive,
15
15
  * entityType: MavenAGI.EntityType.Conversation,
16
16
  * validationType: MavenAGI.IntelligentFieldType.String,
17
17
  * enumOptions: [{
@@ -11,7 +11,8 @@ import type * as MavenAGI from "../../../index";
11
11
  * validationType: MavenAGI.IntelligentFieldType.String,
12
12
  * enumOptions: [{
13
13
  * value: "HIGH",
14
- * label: "High Priority"
14
+ * label: "High Priority",
15
+ * description: "The customer is blocked or reports an outage."
15
16
  * }, {
16
17
  * value: "MEDIUM",
17
18
  * label: "Medium Priority"
@@ -23,6 +24,10 @@ import type * as MavenAGI from "../../../index";
23
24
  * }
24
25
  */
25
26
  export interface IntelligentFieldRequest extends MavenAGI.IntelligentFieldBase {
27
+ /** Display name for the intelligent field */
28
+ name: string;
29
+ /** A plain text description of the intelligent field. */
30
+ description?: string;
26
31
  /**
27
32
  * ID that uniquely identifies this intelligent field. `referenceId` is supplied by the
28
33
  * caller and is how the field is addressed on every other endpoint.
@@ -11,7 +11,7 @@ import type * as MavenAGI from "../../../index";
11
11
  * },
12
12
  * name: "Ticket Priority",
13
13
  * description: "The priority of the conversation based on urgency",
14
- * status: MavenAGI.IntelligentFieldStatus.Inactive,
14
+ * status: MavenAGI.CapabilityStatus.Inactive,
15
15
  * entityType: MavenAGI.EntityType.Conversation,
16
16
  * validationType: MavenAGI.IntelligentFieldType.String,
17
17
  * enumOptions: [{
@@ -29,13 +29,7 @@ import type * as MavenAGI from "../../../index";
29
29
  * updatedAt: new Date("2024-01-15T10:30:00.000Z")
30
30
  * }
31
31
  */
32
- export interface IntelligentFieldResponse extends MavenAGI.IntelligentFieldBase {
32
+ export interface IntelligentFieldResponse extends MavenAGI.IntelligentFieldBase, MavenAGI.CapabilityBase {
33
33
  /** ID that uniquely identifies this intelligent field */
34
34
  fieldId: MavenAGI.EntityId;
35
- /** Lifecycle state for whether this field is evaluated by workflows. Defaults to INACTIVE on creation. Use PATCH to activate. */
36
- status: MavenAGI.IntelligentFieldStatus;
37
- /** The date and time the intelligent field was created */
38
- createdAt?: Date;
39
- /** The date and time the intelligent field was last updated */
40
- updatedAt?: Date;
41
35
  }
@@ -4,7 +4,6 @@ export * from "./IntelligentFieldCore";
4
4
  export * from "./IntelligentFieldDetailResponse";
5
5
  export * from "./IntelligentFieldRequest";
6
6
  export * from "./IntelligentFieldResponse";
7
- export * from "./IntelligentFieldStatus";
8
7
  export * from "./IntelligentFieldType";
9
8
  export * from "./IntelligentFieldValueEntityFilter";
10
9
  export * from "./IntelligentFieldValueFieldFilter";