@memori.ai/memori-api-client 6.0.6 → 6.0.7
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/CHANGELOG.md +7 -0
- package/dist/engine/session.d.ts +1 -1
- package/dist/engine/session.js +2 -1
- package/dist/engine/session.js.map +1 -1
- package/dist/engine.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/esm/engine/session.d.ts +1 -1
- package/esm/engine/session.js +2 -1
- package/esm/engine/session.js.map +1 -1
- package/esm/engine.d.ts +2 -2
- package/esm/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/engine/session.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [6.0.7](https://github.com/memori-ai/memori-api-client/compare/v6.0.6...v6.0.7) (2025-04-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Maintenance
|
|
7
|
+
|
|
8
|
+
* add userAgent param to init session ([8662707](https://github.com/memori-ai/memori-api-client/commit/8662707cbb9f74872115938a939b3ff0d3ce087e))
|
|
9
|
+
|
|
3
10
|
## [6.0.6](https://github.com/memori-ai/memori-api-client/compare/v6.0.5...v6.0.6) (2025-03-25)
|
|
4
11
|
|
|
5
12
|
|
package/dist/engine/session.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResponseSpec, OpenSession, DialogState } from '../types';
|
|
2
2
|
declare const _default: (apiUrl: string) => {
|
|
3
|
-
initSession: (params: OpenSession) => Promise<ResponseSpec & {
|
|
3
|
+
initSession: (params: OpenSession, userAgent?: string) => Promise<ResponseSpec & {
|
|
4
4
|
sessionID: string;
|
|
5
5
|
currentState: DialogState;
|
|
6
6
|
}>;
|
package/dist/engine/session.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const apiFetcher_1 = require("../apiFetcher");
|
|
4
4
|
exports.default = (apiUrl) => ({
|
|
5
|
-
initSession: async (params) => (0, apiFetcher_1.apiFetcher)(`/Session`, {
|
|
5
|
+
initSession: async (params, userAgent) => (0, apiFetcher_1.apiFetcher)(`/Session`, {
|
|
6
6
|
method: 'POST',
|
|
7
7
|
body: params,
|
|
8
|
+
headers: userAgent ? { 'User-Agent': userAgent } : undefined,
|
|
8
9
|
apiUrl,
|
|
9
10
|
}),
|
|
10
11
|
getSession: async (sessionId) => (0, apiFetcher_1.apiFetcher)(`/Session/${sessionId}`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/engine/session.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAIlC,WAAW,EAAE,KAAK,EAAE,MAAmB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/engine/session.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAIlC,WAAW,EAAE,KAAK,EAAE,MAAmB,EAAE,SAAkB,EAAE,EAAE,CAC7D,IAAA,uBAAU,EAAC,UAAU,EAAE;QACrB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS;QAC5D,MAAM;KACP,CAKA;IAMH,UAAU,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CACtC,IAAA,uBAAU,EAAC,YAAY,SAAS,EAAE,EAAE;QAClC,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAIA;IAMH,aAAa,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CACzC,IAAA,uBAAU,EAAC,YAAY,SAAS,EAAE,EAAE;QAClC,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CAA0B;CAC9B,CAAC,CAAC"}
|
package/dist/engine.d.ts
CHANGED
|
@@ -335,7 +335,7 @@ declare const _default: (apiUrl: string) => {
|
|
|
335
335
|
eventLogs: import("./types").EventLog[];
|
|
336
336
|
}>;
|
|
337
337
|
};
|
|
338
|
-
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
338
|
+
initSession: (params: import("./types").OpenSession, userAgent?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
339
339
|
sessionID: string;
|
|
340
340
|
currentState: import("./types").DialogState;
|
|
341
341
|
}>;
|
|
@@ -344,7 +344,7 @@ declare const _default: (apiUrl: string) => {
|
|
|
344
344
|
}>;
|
|
345
345
|
deleteSession: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
346
346
|
session: {
|
|
347
|
-
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
347
|
+
initSession: (params: import("./types").OpenSession, userAgent?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
348
348
|
sessionID: string;
|
|
349
349
|
currentState: import("./types").DialogState;
|
|
350
350
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -344,7 +344,7 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
344
344
|
eventLogs: import("./types").EventLog[];
|
|
345
345
|
}>;
|
|
346
346
|
};
|
|
347
|
-
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
347
|
+
initSession: (params: import("./types").OpenSession, userAgent?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
348
348
|
sessionID: string;
|
|
349
349
|
currentState: import("./types").DialogState;
|
|
350
350
|
}>;
|
|
@@ -353,7 +353,7 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
353
353
|
}>;
|
|
354
354
|
deleteSession: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
355
355
|
session: {
|
|
356
|
-
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
356
|
+
initSession: (params: import("./types").OpenSession, userAgent?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
357
357
|
sessionID: string;
|
|
358
358
|
currentState: import("./types").DialogState;
|
|
359
359
|
}>;
|
package/esm/engine/session.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResponseSpec, OpenSession, DialogState } from '../types';
|
|
2
2
|
declare const _default: (apiUrl: string) => {
|
|
3
|
-
initSession: (params: OpenSession) => Promise<ResponseSpec & {
|
|
3
|
+
initSession: (params: OpenSession, userAgent?: string) => Promise<ResponseSpec & {
|
|
4
4
|
sessionID: string;
|
|
5
5
|
currentState: DialogState;
|
|
6
6
|
}>;
|
package/esm/engine/session.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { apiFetcher } from '../apiFetcher';
|
|
2
2
|
export default (apiUrl) => ({
|
|
3
|
-
initSession: async (params) => apiFetcher(`/Session`, {
|
|
3
|
+
initSession: async (params, userAgent) => apiFetcher(`/Session`, {
|
|
4
4
|
method: 'POST',
|
|
5
5
|
body: params,
|
|
6
|
+
headers: userAgent ? { 'User-Agent': userAgent } : undefined,
|
|
6
7
|
apiUrl,
|
|
7
8
|
}),
|
|
8
9
|
getSession: async (sessionId) => apiFetcher(`/Session/${sessionId}`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/engine/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAIlC,WAAW,EAAE,KAAK,EAAE,MAAmB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/engine/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAIlC,WAAW,EAAE,KAAK,EAAE,MAAmB,EAAE,SAAkB,EAAE,EAAE,CAC7D,UAAU,CAAC,UAAU,EAAE;QACrB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS;QAC5D,MAAM;KACP,CAKA;IAMH,UAAU,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CACtC,UAAU,CAAC,YAAY,SAAS,EAAE,EAAE;QAClC,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAIA;IAMH,aAAa,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CACzC,UAAU,CAAC,YAAY,SAAS,EAAE,EAAE;QAClC,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CAA0B;CAC9B,CAAC,CAAC"}
|
package/esm/engine.d.ts
CHANGED
|
@@ -335,7 +335,7 @@ declare const _default: (apiUrl: string) => {
|
|
|
335
335
|
eventLogs: import("./types").EventLog[];
|
|
336
336
|
}>;
|
|
337
337
|
};
|
|
338
|
-
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
338
|
+
initSession: (params: import("./types").OpenSession, userAgent?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
339
339
|
sessionID: string;
|
|
340
340
|
currentState: import("./types").DialogState;
|
|
341
341
|
}>;
|
|
@@ -344,7 +344,7 @@ declare const _default: (apiUrl: string) => {
|
|
|
344
344
|
}>;
|
|
345
345
|
deleteSession: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
346
346
|
session: {
|
|
347
|
-
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
347
|
+
initSession: (params: import("./types").OpenSession, userAgent?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
348
348
|
sessionID: string;
|
|
349
349
|
currentState: import("./types").DialogState;
|
|
350
350
|
}>;
|
package/esm/index.d.ts
CHANGED
|
@@ -344,7 +344,7 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
344
344
|
eventLogs: import("./types").EventLog[];
|
|
345
345
|
}>;
|
|
346
346
|
};
|
|
347
|
-
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
347
|
+
initSession: (params: import("./types").OpenSession, userAgent?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
348
348
|
sessionID: string;
|
|
349
349
|
currentState: import("./types").DialogState;
|
|
350
350
|
}>;
|
|
@@ -353,7 +353,7 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
353
353
|
}>;
|
|
354
354
|
deleteSession: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
355
355
|
session: {
|
|
356
|
-
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
356
|
+
initSession: (params: import("./types").OpenSession, userAgent?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
357
357
|
sessionID: string;
|
|
358
358
|
currentState: import("./types").DialogState;
|
|
359
359
|
}>;
|
package/package.json
CHANGED
package/src/engine/session.ts
CHANGED
|
@@ -11,10 +11,11 @@ export default (apiUrl: string) => ({
|
|
|
11
11
|
/**
|
|
12
12
|
* Initializes a new Dialog State Machine session for an existing Memori.
|
|
13
13
|
*/
|
|
14
|
-
initSession: async (params: OpenSession) =>
|
|
14
|
+
initSession: async (params: OpenSession, userAgent?: string) =>
|
|
15
15
|
apiFetcher(`/Session`, {
|
|
16
16
|
method: 'POST',
|
|
17
17
|
body: params,
|
|
18
|
+
headers: userAgent ? { 'User-Agent': userAgent } : undefined,
|
|
18
19
|
apiUrl,
|
|
19
20
|
}) as Promise<
|
|
20
21
|
ResponseSpec & {
|