mavenagi 0.0.0-alpha.26 → 0.0.0-alpha.28
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.
- package/Client.d.ts +3 -0
- package/Client.js +5 -0
- package/api/resources/actions/client/Client.js +6 -6
- package/api/resources/appSettings/client/Client.js +2 -2
- package/api/resources/conversation/client/Client.js +20 -20
- package/api/resources/conversation/types/BotResponseMetadata.d.ts +2 -0
- package/api/resources/conversation/types/UserMessage.d.ts +2 -0
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +2 -0
- package/api/resources/knowledge/client/Client.js +14 -14
- package/api/resources/translations/client/Client.d.ts +52 -0
- package/api/resources/translations/client/Client.js +130 -0
- package/api/resources/translations/client/index.d.ts +1 -0
- package/api/resources/translations/client/index.js +1 -0
- package/api/resources/translations/index.d.ts +2 -0
- package/api/resources/translations/index.js +2 -0
- package/api/resources/translations/types/TranslationRequest.d.ts +16 -0
- package/api/resources/translations/types/TranslationRequest.js +4 -0
- package/api/resources/translations/types/TranslationResponse.d.ts +13 -0
- package/api/resources/translations/types/TranslationResponse.js +4 -0
- package/api/resources/translations/types/index.d.ts +2 -0
- package/api/resources/translations/types/index.js +2 -0
- package/api/resources/triggers/client/Client.js +6 -6
- package/api/resources/users/client/Client.js +4 -4
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +5 -0
- package/dist/api/resources/actions/client/Client.js +6 -6
- package/dist/api/resources/appSettings/client/Client.js +2 -2
- package/dist/api/resources/conversation/client/Client.js +20 -20
- package/dist/api/resources/conversation/types/BotResponseMetadata.d.ts +2 -0
- package/dist/api/resources/conversation/types/UserMessage.d.ts +2 -0
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +2 -0
- package/dist/api/resources/knowledge/client/Client.js +14 -14
- package/dist/api/resources/translations/client/Client.d.ts +52 -0
- package/dist/api/resources/translations/client/Client.js +130 -0
- package/dist/api/resources/translations/client/index.d.ts +1 -0
- package/dist/api/resources/translations/client/index.js +1 -0
- package/dist/api/resources/translations/index.d.ts +2 -0
- package/dist/api/resources/translations/index.js +2 -0
- package/dist/api/resources/translations/types/TranslationRequest.d.ts +16 -0
- package/dist/api/resources/translations/types/TranslationRequest.js +4 -0
- package/dist/api/resources/translations/types/TranslationResponse.d.ts +13 -0
- package/dist/api/resources/translations/types/TranslationResponse.js +4 -0
- package/dist/api/resources/translations/types/index.d.ts +2 -0
- package/dist/api/resources/translations/types/index.js +2 -0
- package/dist/api/resources/triggers/client/Client.js +6 -6
- package/dist/api/resources/users/client/Client.js +4 -4
- package/dist/serialization/resources/conversation/types/BotResponseMetadata.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/BotResponseMetadata.js +1 -0
- package/dist/serialization/resources/conversation/types/UserMessage.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/UserMessage.js +1 -0
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +2 -0
- package/dist/serialization/resources/translations/index.d.ts +1 -0
- package/dist/serialization/resources/translations/index.js +1 -0
- package/dist/serialization/resources/translations/types/TranslationRequest.d.ts +13 -0
- package/dist/serialization/resources/translations/types/TranslationRequest.js +8 -0
- package/dist/serialization/resources/translations/types/TranslationResponse.d.ts +12 -0
- package/dist/serialization/resources/translations/types/TranslationResponse.js +7 -0
- package/dist/serialization/resources/translations/types/index.d.ts +2 -0
- package/dist/serialization/resources/translations/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +68 -0
- package/serialization/resources/conversation/types/BotResponseMetadata.d.ts +1 -0
- package/serialization/resources/conversation/types/BotResponseMetadata.js +1 -0
- package/serialization/resources/conversation/types/UserMessage.d.ts +1 -0
- package/serialization/resources/conversation/types/UserMessage.js +1 -0
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +2 -0
- package/serialization/resources/translations/index.d.ts +1 -0
- package/serialization/resources/translations/index.js +1 -0
- package/serialization/resources/translations/types/TranslationRequest.d.ts +13 -0
- package/serialization/resources/translations/types/TranslationRequest.js +8 -0
- package/serialization/resources/translations/types/TranslationResponse.d.ts +12 -0
- package/serialization/resources/translations/types/TranslationResponse.js +7 -0
- package/serialization/resources/translations/types/index.d.ts +2 -0
- package/serialization/resources/translations/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/Client.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Actions } from "./api/resources/actions/client/Client";
|
|
|
7
7
|
import { AppSettings } from "./api/resources/appSettings/client/Client";
|
|
8
8
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
9
9
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
10
|
+
import { Translations } from "./api/resources/translations/client/Client";
|
|
10
11
|
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
11
12
|
import { Users } from "./api/resources/users/client/Client";
|
|
12
13
|
export declare namespace MavenAGIClient {
|
|
@@ -44,6 +45,8 @@ export declare class MavenAGIClient {
|
|
|
44
45
|
get conversation(): Conversation;
|
|
45
46
|
protected _knowledge: Knowledge | undefined;
|
|
46
47
|
get knowledge(): Knowledge;
|
|
48
|
+
protected _translations: Translations | undefined;
|
|
49
|
+
get translations(): Translations;
|
|
47
50
|
protected _triggers: Triggers | undefined;
|
|
48
51
|
get triggers(): Triggers;
|
|
49
52
|
protected _users: Users | undefined;
|
package/Client.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Actions } from "./api/resources/actions/client/Client";
|
|
|
5
5
|
import { AppSettings } from "./api/resources/appSettings/client/Client";
|
|
6
6
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
7
7
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
8
|
+
import { Translations } from "./api/resources/translations/client/Client";
|
|
8
9
|
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
9
10
|
import { Users } from "./api/resources/users/client/Client";
|
|
10
11
|
export class MavenAGIClient {
|
|
@@ -27,6 +28,10 @@ export class MavenAGIClient {
|
|
|
27
28
|
var _a;
|
|
28
29
|
return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Knowledge(this._options)));
|
|
29
30
|
}
|
|
31
|
+
get translations() {
|
|
32
|
+
var _a;
|
|
33
|
+
return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Translations(this._options)));
|
|
34
|
+
}
|
|
30
35
|
get triggers() {
|
|
31
36
|
var _a;
|
|
32
37
|
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
|
|
@@ -64,8 +64,8 @@ export class Actions {
|
|
|
64
64
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
65
65
|
"X-Fern-Language": "JavaScript",
|
|
66
66
|
"X-Fern-SDK-Name": "mavenagi",
|
|
67
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
68
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
67
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
68
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
69
69
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
70
70
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
71
71
|
},
|
|
@@ -154,8 +154,8 @@ export class Actions {
|
|
|
154
154
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
155
155
|
"X-Fern-Language": "JavaScript",
|
|
156
156
|
"X-Fern-SDK-Name": "mavenagi",
|
|
157
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
158
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
157
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
158
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
159
159
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
160
160
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
161
161
|
},
|
|
@@ -243,8 +243,8 @@ export class Actions {
|
|
|
243
243
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
244
244
|
"X-Fern-Language": "JavaScript",
|
|
245
245
|
"X-Fern-SDK-Name": "mavenagi",
|
|
246
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
247
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
246
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
247
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
248
248
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
249
249
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
250
250
|
},
|
|
@@ -44,8 +44,8 @@ export class AppSettings {
|
|
|
44
44
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "mavenagi",
|
|
47
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
48
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
47
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
48
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
},
|
|
@@ -74,8 +74,8 @@ export class Conversation {
|
|
|
74
74
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
75
75
|
"X-Fern-Language": "JavaScript",
|
|
76
76
|
"X-Fern-SDK-Name": "mavenagi",
|
|
77
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
78
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
77
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
78
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
79
79
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
80
80
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
81
81
|
},
|
|
@@ -172,8 +172,8 @@ export class Conversation {
|
|
|
172
172
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
173
173
|
"X-Fern-Language": "JavaScript",
|
|
174
174
|
"X-Fern-SDK-Name": "mavenagi",
|
|
175
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
176
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
175
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
176
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
177
177
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
178
178
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
179
179
|
},
|
|
@@ -274,8 +274,8 @@ export class Conversation {
|
|
|
274
274
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
275
275
|
"X-Fern-Language": "JavaScript",
|
|
276
276
|
"X-Fern-SDK-Name": "mavenagi",
|
|
277
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
278
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
277
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
278
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
279
279
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
280
280
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
281
281
|
},
|
|
@@ -379,8 +379,8 @@ export class Conversation {
|
|
|
379
379
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
380
380
|
"X-Fern-Language": "JavaScript",
|
|
381
381
|
"X-Fern-SDK-Name": "mavenagi",
|
|
382
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
383
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
382
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
383
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
384
384
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
385
385
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
386
386
|
},
|
|
@@ -459,8 +459,8 @@ export class Conversation {
|
|
|
459
459
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
460
460
|
"X-Fern-Language": "JavaScript",
|
|
461
461
|
"X-Fern-SDK-Name": "mavenagi",
|
|
462
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
463
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
462
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
463
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
464
464
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
465
465
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
466
466
|
},
|
|
@@ -565,8 +565,8 @@ export class Conversation {
|
|
|
565
565
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
566
566
|
"X-Fern-Language": "JavaScript",
|
|
567
567
|
"X-Fern-SDK-Name": "mavenagi",
|
|
568
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
569
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
568
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
569
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
570
570
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
571
571
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
572
572
|
},
|
|
@@ -655,8 +655,8 @@ export class Conversation {
|
|
|
655
655
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
656
656
|
"X-Fern-Language": "JavaScript",
|
|
657
657
|
"X-Fern-SDK-Name": "mavenagi",
|
|
658
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
659
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
658
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
659
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
660
660
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
661
661
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
662
662
|
},
|
|
@@ -756,8 +756,8 @@ export class Conversation {
|
|
|
756
756
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
757
757
|
"X-Fern-Language": "JavaScript",
|
|
758
758
|
"X-Fern-SDK-Name": "mavenagi",
|
|
759
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
760
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
759
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
760
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
761
761
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
762
762
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
763
763
|
},
|
|
@@ -854,8 +854,8 @@ export class Conversation {
|
|
|
854
854
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
855
855
|
"X-Fern-Language": "JavaScript",
|
|
856
856
|
"X-Fern-SDK-Name": "mavenagi",
|
|
857
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
858
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
857
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
858
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
859
859
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
860
860
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
861
861
|
},
|
|
@@ -947,8 +947,8 @@ export class Conversation {
|
|
|
947
947
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
948
948
|
"X-Fern-Language": "JavaScript",
|
|
949
949
|
"X-Fern-SDK-Name": "mavenagi",
|
|
950
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
951
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
950
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
951
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
952
952
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
953
953
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
954
954
|
},
|
|
@@ -5,4 +5,6 @@ import * as MavenAGI from "../../../index";
|
|
|
5
5
|
export interface UserMessage extends MavenAGI.UserMessageBase {
|
|
6
6
|
/** The ID that uniquely identifies this message within the conversation */
|
|
7
7
|
conversationMessageId: MavenAGI.EntityId;
|
|
8
|
+
/** The language of the message in ISO 639-1 code format */
|
|
9
|
+
language?: string;
|
|
8
10
|
}
|
package/api/resources/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export * as conversation from "./conversation";
|
|
|
6
6
|
export * from "./conversation/types";
|
|
7
7
|
export * as knowledge from "./knowledge";
|
|
8
8
|
export * from "./knowledge/types";
|
|
9
|
+
export * as translations from "./translations";
|
|
10
|
+
export * from "./translations/types";
|
|
9
11
|
export * as triggers from "./triggers";
|
|
10
12
|
export * from "./triggers/types";
|
|
11
13
|
export * from "./commons/errors";
|
package/api/resources/index.js
CHANGED
|
@@ -6,6 +6,8 @@ export * as conversation from "./conversation";
|
|
|
6
6
|
export * from "./conversation/types";
|
|
7
7
|
export * as knowledge from "./knowledge";
|
|
8
8
|
export * from "./knowledge/types";
|
|
9
|
+
export * as translations from "./translations";
|
|
10
|
+
export * from "./translations/types";
|
|
9
11
|
export * as triggers from "./triggers";
|
|
10
12
|
export * from "./triggers/types";
|
|
11
13
|
export * from "./commons/errors";
|
|
@@ -51,8 +51,8 @@ export class Knowledge {
|
|
|
51
51
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "mavenagi",
|
|
54
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
55
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
54
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
55
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
},
|
|
@@ -141,8 +141,8 @@ export class Knowledge {
|
|
|
141
141
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
142
142
|
"X-Fern-Language": "JavaScript",
|
|
143
143
|
"X-Fern-SDK-Name": "mavenagi",
|
|
144
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
145
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
144
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
145
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
146
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
148
|
},
|
|
@@ -233,8 +233,8 @@ export class Knowledge {
|
|
|
233
233
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
234
234
|
"X-Fern-Language": "JavaScript",
|
|
235
235
|
"X-Fern-SDK-Name": "mavenagi",
|
|
236
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
237
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
236
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
237
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
238
238
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
239
239
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
240
240
|
},
|
|
@@ -323,8 +323,8 @@ export class Knowledge {
|
|
|
323
323
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
324
324
|
"X-Fern-Language": "JavaScript",
|
|
325
325
|
"X-Fern-SDK-Name": "mavenagi",
|
|
326
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
327
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
326
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
327
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
328
328
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
329
329
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
330
330
|
},
|
|
@@ -415,8 +415,8 @@ export class Knowledge {
|
|
|
415
415
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
416
416
|
"X-Fern-Language": "JavaScript",
|
|
417
417
|
"X-Fern-SDK-Name": "mavenagi",
|
|
418
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
419
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
418
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
419
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
420
420
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
421
421
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
422
422
|
},
|
|
@@ -513,8 +513,8 @@ export class Knowledge {
|
|
|
513
513
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
514
514
|
"X-Fern-Language": "JavaScript",
|
|
515
515
|
"X-Fern-SDK-Name": "mavenagi",
|
|
516
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
517
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
516
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
517
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
518
518
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
519
519
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
520
520
|
},
|
|
@@ -604,8 +604,8 @@ export class Knowledge {
|
|
|
604
604
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
605
605
|
"X-Fern-Language": "JavaScript",
|
|
606
606
|
"X-Fern-SDK-Name": "mavenagi",
|
|
607
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
608
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
607
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
608
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
609
609
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
610
610
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
611
611
|
},
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as MavenAGI from "../../../index";
|
|
7
|
+
export declare namespace Translations {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
|
+
appId?: core.Supplier<string | undefined>;
|
|
11
|
+
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
+
/** Override the X-Organization-Id header */
|
|
13
|
+
organizationId: core.Supplier<string>;
|
|
14
|
+
/** Override the X-Agent-Id header */
|
|
15
|
+
agentId: core.Supplier<string>;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
20
|
+
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the X-Organization-Id header */
|
|
26
|
+
organizationId?: string;
|
|
27
|
+
/** Override the X-Agent-Id header */
|
|
28
|
+
agentId?: string;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export declare class Translations {
|
|
32
|
+
protected readonly _options: Translations.Options;
|
|
33
|
+
constructor(_options: Translations.Options);
|
|
34
|
+
/**
|
|
35
|
+
* Translate text from one language to another
|
|
36
|
+
*
|
|
37
|
+
* @param {MavenAGI.TranslationRequest} request
|
|
38
|
+
* @param {Translations.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
41
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
42
|
+
* @throws {@link MavenAGI.ServerError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.translations.translate({
|
|
46
|
+
* text: "Hello world",
|
|
47
|
+
* targetLanguage: "es"
|
|
48
|
+
* })
|
|
49
|
+
*/
|
|
50
|
+
translate(request: MavenAGI.TranslationRequest, requestOptions?: Translations.RequestOptions): Promise<MavenAGI.TranslationResponse>;
|
|
51
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../environments";
|
|
14
|
+
import * as core from "../../../../core";
|
|
15
|
+
import * as MavenAGI from "../../../index";
|
|
16
|
+
import * as serializers from "../../../../serialization/index";
|
|
17
|
+
import urlJoin from "url-join";
|
|
18
|
+
import * as errors from "../../../../errors/index";
|
|
19
|
+
export class Translations {
|
|
20
|
+
constructor(_options) {
|
|
21
|
+
this._options = _options;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Translate text from one language to another
|
|
25
|
+
*
|
|
26
|
+
* @param {MavenAGI.TranslationRequest} request
|
|
27
|
+
* @param {Translations.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
30
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
31
|
+
* @throws {@link MavenAGI.ServerError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.translations.translate({
|
|
35
|
+
* text: "Hello world",
|
|
36
|
+
* targetLanguage: "es"
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
translate(request, requestOptions) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
43
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/translations/translate"),
|
|
44
|
+
method: "POST",
|
|
45
|
+
headers: {
|
|
46
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
47
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
48
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
49
|
+
"X-Fern-Language": "JavaScript",
|
|
50
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
51
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
52
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
53
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
54
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
55
|
+
},
|
|
56
|
+
contentType: "application/json",
|
|
57
|
+
requestType: "json",
|
|
58
|
+
body: serializers.TranslationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
59
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
60
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
61
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
62
|
+
});
|
|
63
|
+
if (_response.ok) {
|
|
64
|
+
return serializers.TranslationResponse.parseOrThrow(_response.body, {
|
|
65
|
+
unrecognizedObjectKeys: "passthrough",
|
|
66
|
+
allowUnrecognizedUnionMembers: true,
|
|
67
|
+
allowUnrecognizedEnumValues: true,
|
|
68
|
+
breadcrumbsPrefix: ["response"],
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (_response.error.reason === "status-code") {
|
|
72
|
+
switch (_response.error.statusCode) {
|
|
73
|
+
case 404:
|
|
74
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
75
|
+
unrecognizedObjectKeys: "passthrough",
|
|
76
|
+
allowUnrecognizedUnionMembers: true,
|
|
77
|
+
allowUnrecognizedEnumValues: true,
|
|
78
|
+
breadcrumbsPrefix: ["response"],
|
|
79
|
+
}));
|
|
80
|
+
case 400:
|
|
81
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
82
|
+
unrecognizedObjectKeys: "passthrough",
|
|
83
|
+
allowUnrecognizedUnionMembers: true,
|
|
84
|
+
allowUnrecognizedEnumValues: true,
|
|
85
|
+
breadcrumbsPrefix: ["response"],
|
|
86
|
+
}));
|
|
87
|
+
case 500:
|
|
88
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
89
|
+
unrecognizedObjectKeys: "passthrough",
|
|
90
|
+
allowUnrecognizedUnionMembers: true,
|
|
91
|
+
allowUnrecognizedEnumValues: true,
|
|
92
|
+
breadcrumbsPrefix: ["response"],
|
|
93
|
+
}));
|
|
94
|
+
default:
|
|
95
|
+
throw new errors.MavenAGIError({
|
|
96
|
+
statusCode: _response.error.statusCode,
|
|
97
|
+
body: _response.error.body,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
switch (_response.error.reason) {
|
|
102
|
+
case "non-json":
|
|
103
|
+
throw new errors.MavenAGIError({
|
|
104
|
+
statusCode: _response.error.statusCode,
|
|
105
|
+
body: _response.error.rawBody,
|
|
106
|
+
});
|
|
107
|
+
case "timeout":
|
|
108
|
+
throw new errors.MavenAGITimeoutError();
|
|
109
|
+
case "unknown":
|
|
110
|
+
throw new errors.MavenAGIError({
|
|
111
|
+
message: _response.error.errorMessage,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
_getAuthorizationHeader() {
|
|
117
|
+
var _a, _b;
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const appId = (_a = (yield core.Supplier.get(this._options.appId))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_ID"];
|
|
120
|
+
const appSecret = (_b = (yield core.Supplier.get(this._options.appSecret))) !== null && _b !== void 0 ? _b : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_SECRET"];
|
|
121
|
+
if (appId != null && appSecret != null) {
|
|
122
|
+
return core.BasicAuth.toAuthorizationHeader({
|
|
123
|
+
username: appId,
|
|
124
|
+
password: appSecret,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return undefined;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* text: "Hello world",
|
|
8
|
+
* targetLanguage: "es"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface TranslationRequest {
|
|
12
|
+
/** The text to translate */
|
|
13
|
+
text: string;
|
|
14
|
+
/** The target language to translate to, in ISO 639-1 code format. */
|
|
15
|
+
targetLanguage: string;
|
|
16
|
+
}
|
|
@@ -51,8 +51,8 @@ export class Triggers {
|
|
|
51
51
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "mavenagi",
|
|
54
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
55
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
54
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
55
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
},
|
|
@@ -141,8 +141,8 @@ export class Triggers {
|
|
|
141
141
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
142
142
|
"X-Fern-Language": "JavaScript",
|
|
143
143
|
"X-Fern-SDK-Name": "mavenagi",
|
|
144
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
145
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
144
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
145
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
146
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
148
|
},
|
|
@@ -230,8 +230,8 @@ export class Triggers {
|
|
|
230
230
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
231
231
|
"X-Fern-Language": "JavaScript",
|
|
232
232
|
"X-Fern-SDK-Name": "mavenagi",
|
|
233
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
234
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
233
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
234
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
235
235
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
236
236
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
237
237
|
},
|
|
@@ -59,8 +59,8 @@ export class Users {
|
|
|
59
59
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
60
60
|
"X-Fern-Language": "JavaScript",
|
|
61
61
|
"X-Fern-SDK-Name": "mavenagi",
|
|
62
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
63
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
62
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
63
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
64
64
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
65
65
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
66
|
},
|
|
@@ -149,8 +149,8 @@ export class Users {
|
|
|
149
149
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
150
150
|
"X-Fern-Language": "JavaScript",
|
|
151
151
|
"X-Fern-SDK-Name": "mavenagi",
|
|
152
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
153
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
152
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.28",
|
|
153
|
+
"User-Agent": "mavenagi/0.0.0-alpha.28",
|
|
154
154
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
155
155
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
156
156
|
},
|
package/dist/Client.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Actions } from "./api/resources/actions/client/Client";
|
|
|
7
7
|
import { AppSettings } from "./api/resources/appSettings/client/Client";
|
|
8
8
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
9
9
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
10
|
+
import { Translations } from "./api/resources/translations/client/Client";
|
|
10
11
|
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
11
12
|
import { Users } from "./api/resources/users/client/Client";
|
|
12
13
|
export declare namespace MavenAGIClient {
|
|
@@ -44,6 +45,8 @@ export declare class MavenAGIClient {
|
|
|
44
45
|
get conversation(): Conversation;
|
|
45
46
|
protected _knowledge: Knowledge | undefined;
|
|
46
47
|
get knowledge(): Knowledge;
|
|
48
|
+
protected _translations: Translations | undefined;
|
|
49
|
+
get translations(): Translations;
|
|
47
50
|
protected _triggers: Triggers | undefined;
|
|
48
51
|
get triggers(): Triggers;
|
|
49
52
|
protected _users: Users | undefined;
|