Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@memori.ai/memori-api-client

Package Overview
Dependencies
Maintainers
0
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@memori.ai/memori-api-client - npm Package Compare versions

Comparing version 5.3.1 to 5.4.0

dist/backend/tenant.d.ts

7

CHANGELOG.md
## [5.4.0](https://github.com/memori-ai/memori-api-client/compare/v5.3.1...v5.4.0) (2025-01-08)
### Features
* add missing apis ([f2ea77f](https://github.com/memori-ai/memori-api-client/commit/f2ea77f5195865d8bde00ae992cb195e5ea644b6))
## [5.3.1](https://github.com/memori-ai/memori-api-client/compare/v5.3.0...v5.3.1) (2025-01-07)

@@ -4,0 +11,0 @@

56

dist/backend.d.ts
declare const backendAPI: (apiUrl: string) => {
healthCheck: () => Promise<import("./types").ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
getTenantList: (authToken: string) => Promise<import("./types").ResponseSpec & {
tenants: import("./types").TenantBase[];
}>;
createTenant: (authToken: string, name: string, tenant: Partial<import("./types").TenantBase>) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
patchTenant: (authToken: string, name: string, tenant: Partial<import("./types").TenantBase>) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
postOutcome: (authToken: string, outcomeCode: string) => Promise<import("./types").ResponseSpec>;

@@ -17,3 +30,7 @@ getUserBadges: (authToken: string) => Promise<import("./types").ResponseSpec & {

completionConfigID: string;
}) => Promise<import("./types").ResponseSpec>;
}) => Promise<import("./types").ResponseSpec & {
config: import("./types").CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;
deleteCompletionConfig: (authToken: string, configID: string) => Promise<import("./types").ResponseSpec>;

@@ -24,2 +41,4 @@ createCompletionConfig: (authToken: string, config: import("./types").CompletionConfig & {

config: import("./types").CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;

@@ -151,5 +170,2 @@ analyzeUserQuery: (authToken: string, memoriID: string, params: import("./types").AnalysisParams) => Promise<import("./types").ResponseSpec & {

recoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").Tenant;
}>;
resendVerificationCode: (user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec>;

@@ -220,2 +236,5 @@ createUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {

getAsset: (fileName: string, sessionID: string) => Promise<any>;
getAssetList: (authToken: string) => Promise<import("./types").ResponseSpec & {
assets: import("./types").Asset[];
}>;
updateAsset: (authToken: string, assetURL: string, asset: import("./types").Asset) => Promise<import("./types").ResponseSpec & {

@@ -231,2 +250,5 @@ asset: import("./types").Asset;

getAsset: (fileName: string, sessionID: string) => Promise<any>;
getAssetList: (authToken: string) => Promise<import("./types").ResponseSpec & {
assets: import("./types").Asset[];
}>;
updateAsset: (authToken: string, assetURL: string, asset: import("./types").Asset) => Promise<import("./types").ResponseSpec & {

@@ -333,5 +355,2 @@ asset: import("./types").Asset;

recoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").Tenant;
}>;
resendVerificationCode: (user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec>;

@@ -453,3 +472,7 @@ createUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {

completionConfigID: string;
}) => Promise<import("./types").ResponseSpec>;
}) => Promise<import("./types").ResponseSpec & {
config: import("./types").CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;
deleteCompletionConfig: (authToken: string, configID: string) => Promise<import("./types").ResponseSpec>;

@@ -460,2 +483,4 @@ createCompletionConfig: (authToken: string, config: import("./types").CompletionConfig & {

config: import("./types").CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;

@@ -472,3 +497,18 @@ };

};
tenant: {
healthCheck: () => Promise<import("./types").ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
getTenantList: (authToken: string) => Promise<import("./types").ResponseSpec & {
tenants: import("./types").TenantBase[];
}>;
createTenant: (authToken: string, name: string, tenant: Partial<import("./types").TenantBase>) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
patchTenant: (authToken: string, name: string, tenant: Partial<import("./types").TenantBase>) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
};
};
export default backendAPI;

@@ -16,2 +16,3 @@ "use strict";

const badge_1 = tslib_1.__importDefault(require("./backend/badge"));
const tenant_1 = tslib_1.__importDefault(require("./backend/tenant"));
const backendAPI = (apiUrl) => ({

@@ -30,2 +31,3 @@ asset: (0, asset_1.default)(apiUrl),

badge: (0, badge_1.default)(apiUrl),
tenant: (0, tenant_1.default)(apiUrl),
...(0, asset_1.default)(apiUrl),

@@ -43,4 +45,5 @@ ...(0, memori_1.default)(apiUrl),

...(0, badge_1.default)(apiUrl),
...(0, tenant_1.default)(apiUrl),
});
exports.default = backendAPI;
//# sourceMappingURL=backend.js.map

@@ -8,2 +8,5 @@ import { ResponseSpec, Asset } from '../types';

getAsset: (fileName: string, sessionID: string) => Promise<any>;
getAssetList: (authToken: string) => Promise<ResponseSpec & {
assets: Asset[];
}>;
updateAsset: (authToken: string, assetURL: string, asset: Asset) => Promise<ResponseSpec & {

@@ -10,0 +13,0 @@ asset: Asset;

@@ -21,2 +21,6 @@ "use strict";

}),
getAssetList: (authToken) => (0, apiFetcher_1.apiFetcher)(`/Assets/${authToken}`, {
apiUrl,
method: 'GET',
}),
updateAsset: (authToken, assetURL, asset) => (0, apiFetcher_1.apiFetcher)(`/Asset/${authToken}/${assetURL.split('/').reverse()[0]}`, {

@@ -23,0 +27,0 @@ apiUrl,

@@ -11,3 +11,7 @@ import { ResponseSpec, CompletionConfig } from '../types';

completionConfigID: string;
}) => Promise<ResponseSpec>;
}) => Promise<ResponseSpec & {
config: CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;
deleteCompletionConfig: (authToken: string, configID: string) => Promise<ResponseSpec>;

@@ -18,4 +22,6 @@ createCompletionConfig: (authToken: string, config: CompletionConfig & {

config: CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;
};
export default _default;

5

dist/backend/user.d.ts

@@ -1,2 +0,2 @@

import { ResponseSpec, Tenant, User, UserFilters } from '../types';
import { ResponseSpec, User, UserFilters } from '../types';
declare const _default: (apiUrl: string) => {

@@ -40,5 +40,2 @@ userSignUp: (user: User) => Promise<ResponseSpec & {

recoverUsername: (user: User) => Promise<ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<ResponseSpec & {
tenant: Tenant;
}>;
resendVerificationCode: (user: Partial<User>) => Promise<ResponseSpec>;

@@ -45,0 +42,0 @@ createUser: (authToken: string, user: Partial<User>) => Promise<ResponseSpec & {

@@ -62,5 +62,2 @@ "use strict";

}),
getTenantConfig: (tenantName) => (0, apiFetcher_1.apiFetcher)(`/Tenant/${tenantName}`, {
apiUrl,
}),
resendVerificationCode: (user) => (0, apiFetcher_1.apiFetcher)(`/ResendVerificationCode`, {

@@ -67,0 +64,0 @@ apiUrl,

@@ -305,2 +305,5 @@ declare const _default: (apiUrl: string) => {

}>;
getSessionEventLogs: (sessionID: string, eventLogSessionID: string) => Promise<import("./types").ResponseSpec & {
eventLogs: import("./types").EventLog[];
}>;
stats: {

@@ -322,2 +325,5 @@ getTextQualityIndexes: (sessionId: string) => Promise<import("./types").ResponseSpec & {

}>;
getSessionEventLogs: (sessionID: string, eventLogSessionID: string) => Promise<import("./types").ResponseSpec & {
eventLogs: import("./types").EventLog[];
}>;
};

@@ -440,2 +446,11 @@ initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {

}>;
suggestAnswer: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
answer: string;
}>;
suggestTags: (sessionId: string, question: string, answer: string, questionVariants?: string[] | undefined) => Promise<import("./types").ResponseSpec & {
tags: string[];
}>;
suggestQuestions: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
questions: string[];
}>;
nlp: {

@@ -460,2 +475,11 @@ getWordVector: (sessionId: string, word: string) => Promise<import("./types").ResponseSpec & {

}>;
suggestAnswer: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
answer: string;
}>;
suggestTags: (sessionId: string, question: string, answer: string, questionVariants?: string[] | undefined) => Promise<import("./types").ResponseSpec & {
tags: string[];
}>;
suggestQuestions: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
questions: string[];
}>;
};

@@ -462,0 +486,0 @@ getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {

@@ -21,3 +21,12 @@ import { ResponseSpec } from '../types';

}>;
suggestAnswer: (sessionId: string, text: string) => Promise<ResponseSpec & {
answer: string;
}>;
suggestTags: (sessionId: string, question: string, answer: string, questionVariants?: string[]) => Promise<ResponseSpec & {
tags: string[];
}>;
suggestQuestions: (sessionId: string, text: string) => Promise<ResponseSpec & {
questions: string[];
}>;
};
export default _default;

@@ -33,3 +33,18 @@ "use strict";

}),
suggestAnswer: async (sessionId, text) => (0, apiFetcher_1.apiFetcher)(`/SuggestAnswer/${sessionId}`, {
method: 'POST',
apiUrl,
body: { text },
}),
suggestTags: async (sessionId, question, answer, questionVariants) => (0, apiFetcher_1.apiFetcher)(`/SuggestTags/${sessionId}`, {
method: 'POST',
apiUrl,
body: { question, answer, questionVariants },
}),
suggestQuestions: async (sessionId, text) => (0, apiFetcher_1.apiFetcher)(`/SuggestQuestions/${sessionId}`, {
method: 'POST',
apiUrl,
body: { text },
}),
});
//# sourceMappingURL=nlp.js.map

@@ -18,3 +18,6 @@ import { ResponseSpec, Memory, EventLog } from '../types';

}>;
getSessionEventLogs: (sessionID: string, eventLogSessionID: string) => Promise<ResponseSpec & {
eventLogs: EventLog[];
}>;
};
export default _default;

@@ -21,3 +21,7 @@ "use strict";

}),
getSessionEventLogs: async (sessionID, eventLogSessionID) => (0, apiFetcher_1.apiFetcher)(`/SessionEventLogs/${sessionID}/${eventLogSessionID}`, {
method: 'GET',
apiUrl,
}),
});
//# sourceMappingURL=stats.js.map
declare const backendAPI: (apiUrl: string) => {
healthCheck: () => Promise<import("./types").ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
getTenantList: (authToken: string) => Promise<import("./types").ResponseSpec & {
tenants: import("./types").TenantBase[];
}>;
createTenant: (authToken: string, name: string, tenant: Partial<import("./types").TenantBase>) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
patchTenant: (authToken: string, name: string, tenant: Partial<import("./types").TenantBase>) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
postOutcome: (authToken: string, outcomeCode: string) => Promise<import("./types").ResponseSpec>;

@@ -17,3 +30,7 @@ getUserBadges: (authToken: string) => Promise<import("./types").ResponseSpec & {

completionConfigID: string;
}) => Promise<import("./types").ResponseSpec>;
}) => Promise<import("./types").ResponseSpec & {
config: import("./types").CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;
deleteCompletionConfig: (authToken: string, configID: string) => Promise<import("./types").ResponseSpec>;

@@ -24,2 +41,4 @@ createCompletionConfig: (authToken: string, config: import("./types").CompletionConfig & {

config: import("./types").CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;

@@ -151,5 +170,2 @@ analyzeUserQuery: (authToken: string, memoriID: string, params: import("./types").AnalysisParams) => Promise<import("./types").ResponseSpec & {

recoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").Tenant;
}>;
resendVerificationCode: (user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec>;

@@ -220,2 +236,5 @@ createUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {

getAsset: (fileName: string, sessionID: string) => Promise<any>;
getAssetList: (authToken: string) => Promise<import("./types").ResponseSpec & {
assets: import("./types").Asset[];
}>;
updateAsset: (authToken: string, assetURL: string, asset: import("./types").Asset) => Promise<import("./types").ResponseSpec & {

@@ -231,2 +250,5 @@ asset: import("./types").Asset;

getAsset: (fileName: string, sessionID: string) => Promise<any>;
getAssetList: (authToken: string) => Promise<import("./types").ResponseSpec & {
assets: import("./types").Asset[];
}>;
updateAsset: (authToken: string, assetURL: string, asset: import("./types").Asset) => Promise<import("./types").ResponseSpec & {

@@ -333,5 +355,2 @@ asset: import("./types").Asset;

recoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").Tenant;
}>;
resendVerificationCode: (user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec>;

@@ -453,3 +472,7 @@ createUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {

completionConfigID: string;
}) => Promise<import("./types").ResponseSpec>;
}) => Promise<import("./types").ResponseSpec & {
config: import("./types").CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;
deleteCompletionConfig: (authToken: string, configID: string) => Promise<import("./types").ResponseSpec>;

@@ -460,2 +483,4 @@ createCompletionConfig: (authToken: string, config: import("./types").CompletionConfig & {

config: import("./types").CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;

@@ -472,3 +497,18 @@ };

};
tenant: {
healthCheck: () => Promise<import("./types").ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
getTenantList: (authToken: string) => Promise<import("./types").ResponseSpec & {
tenants: import("./types").TenantBase[];
}>;
createTenant: (authToken: string, name: string, tenant: Partial<import("./types").TenantBase>) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
patchTenant: (authToken: string, name: string, tenant: Partial<import("./types").TenantBase>) => Promise<import("./types").ResponseSpec & {
tenant: import("./types").TenantBase;
}>;
};
};
export default backendAPI;

@@ -13,2 +13,3 @@ import memori from './backend/memori';

import badge from './backend/badge';
import tenant from './backend/tenant';
const backendAPI = (apiUrl) => ({

@@ -27,2 +28,3 @@ asset: asset(apiUrl),

badge: badge(apiUrl),
tenant: tenant(apiUrl),
...asset(apiUrl),

@@ -40,4 +42,5 @@ ...memori(apiUrl),

...badge(apiUrl),
...tenant(apiUrl),
});
export default backendAPI;
//# sourceMappingURL=backend.js.map

@@ -8,2 +8,5 @@ import { ResponseSpec, Asset } from '../types';

getAsset: (fileName: string, sessionID: string) => Promise<any>;
getAssetList: (authToken: string) => Promise<ResponseSpec & {
assets: Asset[];
}>;
updateAsset: (authToken: string, assetURL: string, asset: Asset) => Promise<ResponseSpec & {

@@ -10,0 +13,0 @@ asset: Asset;

@@ -19,2 +19,6 @@ import { apiFetcher } from '../apiFetcher';

}),
getAssetList: (authToken) => apiFetcher(`/Assets/${authToken}`, {
apiUrl,
method: 'GET',
}),
updateAsset: (authToken, assetURL, asset) => apiFetcher(`/Asset/${authToken}/${assetURL.split('/').reverse()[0]}`, {

@@ -21,0 +25,0 @@ apiUrl,

@@ -11,3 +11,7 @@ import { ResponseSpec, CompletionConfig } from '../types';

completionConfigID: string;
}) => Promise<ResponseSpec>;
}) => Promise<ResponseSpec & {
config: CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;
deleteCompletionConfig: (authToken: string, configID: string) => Promise<ResponseSpec>;

@@ -18,4 +22,6 @@ createCompletionConfig: (authToken: string, config: CompletionConfig & {

config: CompletionConfig;
appliedMemoriIDs?: string[] | undefined;
appliedMemoriNames?: string[] | undefined;
}>;
};
export default _default;

@@ -1,2 +0,2 @@

import { ResponseSpec, Tenant, User, UserFilters } from '../types';
import { ResponseSpec, User, UserFilters } from '../types';
declare const _default: (apiUrl: string) => {

@@ -40,5 +40,2 @@ userSignUp: (user: User) => Promise<ResponseSpec & {

recoverUsername: (user: User) => Promise<ResponseSpec>;
getTenantConfig: (tenantName: string) => Promise<ResponseSpec & {
tenant: Tenant;
}>;
resendVerificationCode: (user: Partial<User>) => Promise<ResponseSpec>;

@@ -45,0 +42,0 @@ createUser: (authToken: string, user: Partial<User>) => Promise<ResponseSpec & {

@@ -60,5 +60,2 @@ import { apiFetcher } from '../apiFetcher';

}),
getTenantConfig: (tenantName) => apiFetcher(`/Tenant/${tenantName}`, {
apiUrl,
}),
resendVerificationCode: (user) => apiFetcher(`/ResendVerificationCode`, {

@@ -65,0 +62,0 @@ apiUrl,

@@ -305,2 +305,5 @@ declare const _default: (apiUrl: string) => {

}>;
getSessionEventLogs: (sessionID: string, eventLogSessionID: string) => Promise<import("./types").ResponseSpec & {
eventLogs: import("./types").EventLog[];
}>;
stats: {

@@ -322,2 +325,5 @@ getTextQualityIndexes: (sessionId: string) => Promise<import("./types").ResponseSpec & {

}>;
getSessionEventLogs: (sessionID: string, eventLogSessionID: string) => Promise<import("./types").ResponseSpec & {
eventLogs: import("./types").EventLog[];
}>;
};

@@ -440,2 +446,11 @@ initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {

}>;
suggestAnswer: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
answer: string;
}>;
suggestTags: (sessionId: string, question: string, answer: string, questionVariants?: string[] | undefined) => Promise<import("./types").ResponseSpec & {
tags: string[];
}>;
suggestQuestions: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
questions: string[];
}>;
nlp: {

@@ -460,2 +475,11 @@ getWordVector: (sessionId: string, word: string) => Promise<import("./types").ResponseSpec & {

}>;
suggestAnswer: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
answer: string;
}>;
suggestTags: (sessionId: string, question: string, answer: string, questionVariants?: string[] | undefined) => Promise<import("./types").ResponseSpec & {
tags: string[];
}>;
suggestQuestions: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
questions: string[];
}>;
};

@@ -462,0 +486,0 @@ getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {

@@ -21,3 +21,12 @@ import { ResponseSpec } from '../types';

}>;
suggestAnswer: (sessionId: string, text: string) => Promise<ResponseSpec & {
answer: string;
}>;
suggestTags: (sessionId: string, question: string, answer: string, questionVariants?: string[]) => Promise<ResponseSpec & {
tags: string[];
}>;
suggestQuestions: (sessionId: string, text: string) => Promise<ResponseSpec & {
questions: string[];
}>;
};
export default _default;

@@ -31,3 +31,18 @@ import { apiFetcher } from '../apiFetcher';

}),
suggestAnswer: async (sessionId, text) => apiFetcher(`/SuggestAnswer/${sessionId}`, {
method: 'POST',
apiUrl,
body: { text },
}),
suggestTags: async (sessionId, question, answer, questionVariants) => apiFetcher(`/SuggestTags/${sessionId}`, {
method: 'POST',
apiUrl,
body: { question, answer, questionVariants },
}),
suggestQuestions: async (sessionId, text) => apiFetcher(`/SuggestQuestions/${sessionId}`, {
method: 'POST',
apiUrl,
body: { text },
}),
});
//# sourceMappingURL=nlp.js.map

@@ -18,3 +18,6 @@ import { ResponseSpec, Memory, EventLog } from '../types';

}>;
getSessionEventLogs: (sessionID: string, eventLogSessionID: string) => Promise<ResponseSpec & {
eventLogs: EventLog[];
}>;
};
export default _default;

@@ -19,3 +19,7 @@ import { apiFetcher } from '../apiFetcher';

}),
getSessionEventLogs: async (sessionID, eventLogSessionID) => apiFetcher(`/SessionEventLogs/${sessionID}/${eventLogSessionID}`, {
method: 'GET',
apiUrl,
}),
});
//# sourceMappingURL=stats.js.map
{
"version": "5.3.1",
"version": "5.4.0",
"name": "@memori.ai/memori-api-client",

@@ -4,0 +4,0 @@ "description": "React library to integrate a Memori in your app or website",

@@ -13,2 +13,3 @@ import memori from './backend/memori';

import badge from './backend/badge';
import tenant from './backend/tenant';

@@ -28,2 +29,3 @@ const backendAPI = (apiUrl: string) => ({

badge: badge(apiUrl),
tenant: tenant(apiUrl),
...asset(apiUrl),

@@ -41,4 +43,5 @@ ...memori(apiUrl),

...badge(apiUrl),
...tenant(apiUrl),
});
export default backendAPI;

@@ -70,2 +70,13 @@ import { ResponseSpec, Asset } from '../types';

/**
* Gets a list of Asset objects owned the currently logged in User.
* @param {string} authToken - The login token
* @returns The list of Asset objects.
*/
getAssetList: (authToken: string) =>
apiFetcher(`/Assets/${authToken}`, {
apiUrl,
method: 'GET',
}) as Promise<ResponseSpec & { assets: Asset[] }>,
/**
* Updates an Asset object

@@ -72,0 +83,0 @@ * @param {string} authToken - The login token

@@ -52,3 +52,9 @@ import { ResponseSpec, CompletionConfig } from '../types';

body: config,
}) as Promise<ResponseSpec>,
}) as Promise<
ResponseSpec & {
config: CompletionConfig;
appliedMemoriIDs?: string[];
appliedMemoriNames?: string[];
}
>,

@@ -77,3 +83,9 @@ /**

body: config,
}) as Promise<ResponseSpec & { config: CompletionConfig }>,
}) as Promise<
ResponseSpec & {
config: CompletionConfig;
appliedMemoriIDs?: string[];
appliedMemoriNames?: string[];
}
>,
});

@@ -186,15 +186,2 @@ import { ResponseSpec, Tenant, User, UserFilters } from '../types';

/**
* Gets the details of a Tenant object.
* @param tenantName - The name of the tenant
*/
getTenantConfig: (tenantName: string) =>
apiFetcher(`/Tenant/${tenantName}`, {
apiUrl,
}) as Promise<
ResponseSpec & {
tenant: Tenant;
}
>,
/**
* Re-sends the verification code to confirm a pending User registration.

@@ -201,0 +188,0 @@ * @param {User} user - The user object

@@ -116,2 +116,68 @@ import { ResponseSpec } from '../types';

>,
/**
* Tries to suggest the answer for a question, using as much content as possible from the session's associated Memori object.
* @param {string} sessionId The session ID
* @param {string} text Text of the sentence.
*/
suggestAnswer: async (sessionId: string, text: string) =>
apiFetcher(`/SuggestAnswer/${sessionId}`, {
method: 'POST',
apiUrl,
body: { text },
}) as Promise<
ResponseSpec & {
/**
* Suggested answer. May be null if no answer could be suggested.
*/
answer: string;
}
>,
/**
* Tries to suggest tags for a a question and its answer.
* Differently from ```SuggestAnswer```, no content from the session's associated Memori object is used.
* @param {string} sessionId The session ID
* @param {string} question Text of question.
* @param {string} answer Answer to the question (and its variants).
* @param {string[]=} questionVariants Optional list of question variants.
*/
suggestTags: async (
sessionId: string,
question: string,
answer: string,
questionVariants?: string[]
) =>
apiFetcher(`/SuggestTags/${sessionId}`, {
method: 'POST',
apiUrl,
body: { question, answer, questionVariants },
}) as Promise<
ResponseSpec & {
/**
* Suggested tags. May be null or empty if no tags could be suggested.
*/
tags: string[];
}
>,
/**
* Tries to suggest questions for an answer.
* Differently from ```SuggestAnswer```, no content from the session's associated Memori object is used.
* @param {string} sessionId The session ID
* @param {string} text Text of the sentence.
*/
suggestQuestions: async (sessionId: string, text: string) =>
apiFetcher(`/SuggestQuestions/${sessionId}`, {
method: 'POST',
apiUrl,
body: { text },
}) as Promise<
ResponseSpec & {
/**
* Suggested questions. May be null or empty if no questions could be suggested.
*/
questions: string[];
}
>,
});

@@ -116,2 +116,17 @@ import { ResponseSpec, Stats, Memory, EventLog } from '../types';

>,
/**
* Gets the Event Log objects for the Memori of the current session recorded during a specific other session.
* @param {string} sessionID The session ID
* @param {string} eventLogSessionID The session ID for which Event Log objects are being searched
*/
getSessionEventLogs: async (sessionID: string, eventLogSessionID: string) =>
apiFetcher(`/SessionEventLogs/${sessionID}/${eventLogSessionID}`, {
method: 'GET',
apiUrl,
}) as Promise<
ResponseSpec & {
eventLogs: EventLog[];
}
>,
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc