@memori.ai/memori-api-client 6.6.0 → 6.6.2
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 +74 -1
- package/dist/backend/asset.d.ts +3 -0
- package/dist/backend/asset.js +11 -0
- package/dist/backend/asset.js.map +1 -1
- package/dist/backend/tenant.d.ts +2 -2
- package/dist/backend/tenant.js +2 -2
- package/dist/backend/tenant.js.map +1 -1
- package/dist/backend/tenant.test.js +2 -2
- package/dist/backend/tenant.test.js.map +1 -1
- package/dist/backend/trustedApplication.d.ts +17 -0
- package/dist/backend/trustedApplication.js +26 -0
- package/dist/backend/trustedApplication.js.map +1 -0
- package/dist/backend/trustedApplication.test.d.ts +1 -0
- package/dist/backend/trustedApplication.test.js +14 -0
- package/dist/backend/trustedApplication.test.js.map +1 -0
- package/dist/backend/userPwl.d.ts +36 -0
- package/dist/backend/userPwl.js +53 -0
- package/dist/backend/userPwl.js.map +1 -0
- package/dist/backend.d.ts +104 -4
- package/dist/backend.js +6 -0
- package/dist/backend.js.map +1 -1
- package/dist/engine/chatLogs.d.ts +3 -0
- package/dist/engine/chatLogs.js +4 -0
- package/dist/engine/chatLogs.js.map +1 -1
- package/dist/engine.d.ts +6 -0
- package/dist/index.d.ts +110 -4
- package/dist/types.d.ts +17 -1
- package/esm/backend/asset.d.ts +3 -0
- package/esm/backend/asset.js +11 -0
- package/esm/backend/asset.js.map +1 -1
- package/esm/backend/tenant.d.ts +2 -2
- package/esm/backend/tenant.js +2 -2
- package/esm/backend/tenant.js.map +1 -1
- package/esm/backend/tenant.test.js +2 -2
- package/esm/backend/tenant.test.js.map +1 -1
- package/esm/backend/trustedApplication.d.ts +17 -0
- package/esm/backend/trustedApplication.js +24 -0
- package/esm/backend/trustedApplication.js.map +1 -0
- package/esm/backend/trustedApplication.test.d.ts +1 -0
- package/esm/backend/trustedApplication.test.js +11 -0
- package/esm/backend/trustedApplication.test.js.map +1 -0
- package/esm/backend/userPwl.d.ts +36 -0
- package/esm/backend/userPwl.js +51 -0
- package/esm/backend/userPwl.js.map +1 -0
- package/esm/backend.d.ts +104 -4
- package/esm/backend.js +6 -0
- package/esm/backend.js.map +1 -1
- package/esm/engine/chatLogs.d.ts +3 -0
- package/esm/engine/chatLogs.js +4 -0
- package/esm/engine/chatLogs.js.map +1 -1
- package/esm/engine.d.ts +6 -0
- package/esm/index.d.ts +110 -4
- package/esm/types.d.ts +17 -1
- package/package.json +1 -1
- package/src/backend/asset.ts +34 -0
- package/src/backend/tenant.test.ts +4 -2
- package/src/backend/tenant.ts +4 -4
- package/src/backend/trustedApplication.test.ts +21 -0
- package/src/backend/trustedApplication.ts +64 -0
- package/src/backend/userPwl.ts +155 -0
- package/src/backend.ts +6 -0
- package/src/engine/chatLogs.ts +27 -0
- package/src/types.ts +18 -1
package/esm/backend.d.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
declare const backendAPI: (apiUrl: string) => {
|
|
2
|
+
createTrustedApplication: (authToken: string, trustedApplication: import("./types").TrustedApplication) => Promise<import("./types").ResponseSpec & {
|
|
3
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
4
|
+
}>;
|
|
5
|
+
getTrustedApplication: (authToken: string, trustedApplicationID: string) => Promise<import("./types").ResponseSpec & {
|
|
6
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
7
|
+
}>;
|
|
8
|
+
updateTrustedApplication: (authToken: string, trustedApplicationID: string, trustedApplication: import("./types").TrustedApplication) => Promise<import("./types").ResponseSpec & {
|
|
9
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
10
|
+
}>;
|
|
11
|
+
deleteTrustedApplication: (authToken: string, trustedApplicationID: string) => Promise<import("./types").ResponseSpec>;
|
|
12
|
+
getTrustedApplicationsList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
13
|
+
trustedApplications: import("./types").TrustedApplication[];
|
|
14
|
+
}>;
|
|
2
15
|
healthCheck: () => Promise<import("./types").ResponseSpec>;
|
|
3
|
-
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
16
|
+
getTenantConfig: (authToken: string, tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
4
17
|
tenant: import("./types").Tenant;
|
|
5
18
|
}>;
|
|
6
|
-
getTenant: (tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
19
|
+
getTenant: (authToken: string, tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
7
20
|
tenant: import("./types").Tenant;
|
|
8
21
|
}>;
|
|
9
22
|
getTenantList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -146,6 +159,38 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
146
159
|
updateIntegration: (authToken: string, integrationID: string, integration: import("./types").Integration) => Promise<import("./types").ResponseSpec & {
|
|
147
160
|
integration: import("./types").Integration;
|
|
148
161
|
}>;
|
|
162
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
163
|
+
user: import("./types").User;
|
|
164
|
+
token?: string | undefined;
|
|
165
|
+
flowID?: string | undefined;
|
|
166
|
+
}>;
|
|
167
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
168
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
169
|
+
user: import("./types").User;
|
|
170
|
+
}>;
|
|
171
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
172
|
+
user: import("./types").User;
|
|
173
|
+
}>;
|
|
174
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
175
|
+
users: import("./types").User[];
|
|
176
|
+
}>;
|
|
177
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
178
|
+
users: import("./types").User[];
|
|
179
|
+
count: number;
|
|
180
|
+
}>;
|
|
181
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
182
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
183
|
+
user: import("./types").User;
|
|
184
|
+
}>;
|
|
185
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
186
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
187
|
+
user: import("./types").User;
|
|
188
|
+
}>;
|
|
189
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
190
|
+
user: import("./types").User;
|
|
191
|
+
token?: string | undefined;
|
|
192
|
+
flowID?: string | undefined;
|
|
193
|
+
}>;
|
|
149
194
|
userSignUp: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
150
195
|
user: import("./types").User;
|
|
151
196
|
}>;
|
|
@@ -249,6 +294,9 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
249
294
|
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
250
295
|
asset: import("./types").Asset;
|
|
251
296
|
}>;
|
|
297
|
+
uploadAssetUnlogged: (fileName: string, fileUrl: string, memoriID: string, sessionID: string) => Promise<import("./types").ResponseSpec & {
|
|
298
|
+
asset: import("./types").Asset;
|
|
299
|
+
}>;
|
|
252
300
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
|
253
301
|
getAssetList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
254
302
|
assets: import("./types").Asset[];
|
|
@@ -262,6 +310,9 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
262
310
|
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
263
311
|
asset: import("./types").Asset;
|
|
264
312
|
}>;
|
|
313
|
+
uploadAssetUnlogged: (fileName: string, fileUrl: string, memoriID: string, sessionID: string) => Promise<import("./types").ResponseSpec & {
|
|
314
|
+
asset: import("./types").Asset;
|
|
315
|
+
}>;
|
|
265
316
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
|
266
317
|
getAssetList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
267
318
|
assets: import("./types").Asset[];
|
|
@@ -374,6 +425,40 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
374
425
|
user: import("./types").User;
|
|
375
426
|
}>;
|
|
376
427
|
};
|
|
428
|
+
userPwl: {
|
|
429
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
430
|
+
user: import("./types").User;
|
|
431
|
+
token?: string | undefined;
|
|
432
|
+
flowID?: string | undefined;
|
|
433
|
+
}>;
|
|
434
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
435
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
436
|
+
user: import("./types").User;
|
|
437
|
+
}>;
|
|
438
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
439
|
+
user: import("./types").User;
|
|
440
|
+
}>;
|
|
441
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
442
|
+
users: import("./types").User[];
|
|
443
|
+
}>;
|
|
444
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
445
|
+
users: import("./types").User[];
|
|
446
|
+
count: number;
|
|
447
|
+
}>;
|
|
448
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
449
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
450
|
+
user: import("./types").User;
|
|
451
|
+
}>;
|
|
452
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
453
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
454
|
+
user: import("./types").User;
|
|
455
|
+
}>;
|
|
456
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
457
|
+
user: import("./types").User;
|
|
458
|
+
token?: string | undefined;
|
|
459
|
+
flowID?: string | undefined;
|
|
460
|
+
}>;
|
|
461
|
+
};
|
|
377
462
|
integration: {
|
|
378
463
|
getMemoriIntegrationsList: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec & {
|
|
379
464
|
integrations: import("./types").Integration[];
|
|
@@ -525,10 +610,10 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
525
610
|
};
|
|
526
611
|
tenant: {
|
|
527
612
|
healthCheck: () => Promise<import("./types").ResponseSpec>;
|
|
528
|
-
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
613
|
+
getTenantConfig: (authToken: string, tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
529
614
|
tenant: import("./types").Tenant;
|
|
530
615
|
}>;
|
|
531
|
-
getTenant: (tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
616
|
+
getTenant: (authToken: string, tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
532
617
|
tenant: import("./types").Tenant;
|
|
533
618
|
}>;
|
|
534
619
|
getTenantList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -541,5 +626,20 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
541
626
|
tenant: import("./types").Tenant;
|
|
542
627
|
}>;
|
|
543
628
|
};
|
|
629
|
+
trustedApplication: {
|
|
630
|
+
createTrustedApplication: (authToken: string, trustedApplication: import("./types").TrustedApplication) => Promise<import("./types").ResponseSpec & {
|
|
631
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
632
|
+
}>;
|
|
633
|
+
getTrustedApplication: (authToken: string, trustedApplicationID: string) => Promise<import("./types").ResponseSpec & {
|
|
634
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
635
|
+
}>;
|
|
636
|
+
updateTrustedApplication: (authToken: string, trustedApplicationID: string, trustedApplication: import("./types").TrustedApplication) => Promise<import("./types").ResponseSpec & {
|
|
637
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
638
|
+
}>;
|
|
639
|
+
deleteTrustedApplication: (authToken: string, trustedApplicationID: string) => Promise<import("./types").ResponseSpec>;
|
|
640
|
+
getTrustedApplicationsList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
641
|
+
trustedApplications: import("./types").TrustedApplication[];
|
|
642
|
+
}>;
|
|
643
|
+
};
|
|
544
644
|
};
|
|
545
645
|
export default backendAPI;
|
package/esm/backend.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import memori from './backend/memori';
|
|
2
2
|
import user from './backend/user';
|
|
3
|
+
import userPwl from './backend/userPwl';
|
|
3
4
|
import integration from './backend/integration';
|
|
4
5
|
import asset from './backend/asset';
|
|
5
6
|
import invitation from './backend/invitation';
|
|
@@ -11,10 +12,12 @@ import analysis from './backend/analysis';
|
|
|
11
12
|
import completionConfig from './backend/completionConfig';
|
|
12
13
|
import badge from './backend/badge';
|
|
13
14
|
import tenant from './backend/tenant';
|
|
15
|
+
import trustedApplication from './backend/trustedApplication';
|
|
14
16
|
const backendAPI = (apiUrl) => ({
|
|
15
17
|
asset: asset(apiUrl),
|
|
16
18
|
memori: memori(apiUrl),
|
|
17
19
|
user: user(apiUrl),
|
|
20
|
+
userPwl: userPwl(apiUrl),
|
|
18
21
|
integration: integration(apiUrl),
|
|
19
22
|
invitation: invitation(apiUrl),
|
|
20
23
|
consumptionLogs: consumptionLogs(apiUrl),
|
|
@@ -25,9 +28,11 @@ const backendAPI = (apiUrl) => ({
|
|
|
25
28
|
completionConfig: completionConfig(apiUrl),
|
|
26
29
|
badge: badge(apiUrl),
|
|
27
30
|
tenant: tenant(apiUrl),
|
|
31
|
+
trustedApplication: trustedApplication(apiUrl),
|
|
28
32
|
...asset(apiUrl),
|
|
29
33
|
...memori(apiUrl),
|
|
30
34
|
...user(apiUrl),
|
|
35
|
+
...userPwl(apiUrl),
|
|
31
36
|
...integration(apiUrl),
|
|
32
37
|
...invitation(apiUrl),
|
|
33
38
|
...consumptionLogs(apiUrl),
|
|
@@ -38,6 +43,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
38
43
|
...completionConfig(apiUrl),
|
|
39
44
|
...badge(apiUrl),
|
|
40
45
|
...tenant(apiUrl),
|
|
46
|
+
...trustedApplication(apiUrl),
|
|
41
47
|
});
|
|
42
48
|
export default backendAPI;
|
|
43
49
|
//# sourceMappingURL=backend.js.map
|
package/esm/backend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,MAAM,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,OAAO,MAA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C;IAChB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjB,GAAG,IAAI,CAAC,MAAM,CAAC;IACf,GAAG,OAAO,CAAC,MAAM,CAAC;IAClB,GAAG,WAAW,CAAC,MAAM,CAAC;IACtB,GAAG,UAAU,CAAC,MAAM,CAAC;IACrB,GAAG,eAAe,CAAC,MAAM,CAAC;IAC1B,GAAG,aAAa,CAAC,MAAM,CAAC;IACxB,GAAG,YAAY,CAAC,MAAM,CAAC;IACvB,GAAG,OAAO,CAAC,MAAM,CAAC;IAClB,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnB,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC3B,GAAG,KAAK,CAAC,MAAM,CAAC;IAChB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjB,GAAG,kBAAkB,CAAC,MAAM,CAAC;CAC9B,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
package/esm/engine/chatLogs.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
3
3
|
getChatLogs: (sessionId: string, dateFrom?: string, dateTo?: string) => Promise<ResponseSpec & {
|
|
4
4
|
chatLogs: ChatLog[];
|
|
5
5
|
}>;
|
|
6
|
+
getChatLogsPaged: (sessionId: string, dateFrom: string, dateTo: string, from: number, howMany: number) => Promise<ResponseSpec & {
|
|
7
|
+
chatLogs: ChatLog[];
|
|
8
|
+
}>;
|
|
6
9
|
getChatLogsByUser: (sessionId: string, dateFrom?: string, dateTo?: string) => Promise<ResponseSpec & {
|
|
7
10
|
chatLogs: ChatLog[];
|
|
8
11
|
}>;
|
package/esm/engine/chatLogs.js
CHANGED
|
@@ -4,6 +4,10 @@ export default (apiUrl) => ({
|
|
|
4
4
|
method: 'GET',
|
|
5
5
|
apiUrl,
|
|
6
6
|
}),
|
|
7
|
+
getChatLogsPaged: async (sessionId, dateFrom, dateTo, from, howMany) => apiFetcher(`/ChatLogsPaged/${sessionId}/${dateFrom}/${dateTo}/${from}/${howMany}`, {
|
|
8
|
+
method: 'GET',
|
|
9
|
+
apiUrl,
|
|
10
|
+
}),
|
|
7
11
|
getChatLogsByUser: async (sessionId, dateFrom, dateTo) => apiFetcher(`/CurrentUserChatLogs/${sessionId}${dateFrom ? `/${dateFrom}` : ''}${dateFrom && dateTo ? `/${dateTo}` : ''}`, {
|
|
8
12
|
method: 'GET',
|
|
9
13
|
apiUrl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatLogs.js","sourceRoot":"","sources":["../../src/engine/chatLogs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAOlC,WAAW,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAiB,EAAE,MAAe,EAAE,EAAE,CAC3E,UAAU,CACR,aAAa,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GACrD,QAAQ,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EACtC,EAAE,EACF;QACE,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAKF;IAQH,iBAAiB,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAiB,EAAE,MAAe,EAAE,EAAE,CACjF,UAAU,CACR,wBAAwB,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAChE,QAAQ,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EACtC,EAAE,EACF;QACE,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAKF;IAOH,kBAAkB,EAAE,KAAK,EAAE,SAAiB,EAAE,gBAAwB,EAAE,EAAE,CACxE,UAAU,CAAC,oBAAoB,SAAS,IAAI,gBAAgB,EAAE,EAAE;QAC9D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IAQH,cAAc,EAAE,KAAK,EACnB,SAAiB,EACjB,QAAiB,EACjB,MAAe,EACf,EAAE,CACF,UAAU,CACR,aAAa,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GACrD,QAAQ,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EACtC,EAAE,EACF;QACE,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CACuB;IAO5B,aAAa,EAAE,KAAK,EAAE,SAAiB,EAAE,SAAiB,EAAE,EAAE,CAC5D,UAAU,CAAC,YAAY,SAAS,IAAI,SAAS,EAAE,EAAE;QAC/C,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CAA0B;CAC9B,CAAC,CAAC"}
|
package/esm/engine.d.ts
CHANGED
|
@@ -192,6 +192,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
192
192
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
193
193
|
chatLogs: import("./types").ChatLog[];
|
|
194
194
|
}>;
|
|
195
|
+
getChatLogsPaged: (sessionId: string, dateFrom: string, dateTo: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
196
|
+
chatLogs: import("./types").ChatLog[];
|
|
197
|
+
}>;
|
|
195
198
|
getChatLogsByUser: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
196
199
|
chatLogs: import("./types").ChatLog[];
|
|
197
200
|
}>;
|
|
@@ -207,6 +210,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
207
210
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
208
211
|
chatLogs: import("./types").ChatLog[];
|
|
209
212
|
}>;
|
|
213
|
+
getChatLogsPaged: (sessionId: string, dateFrom: string, dateTo: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
214
|
+
chatLogs: import("./types").ChatLog[];
|
|
215
|
+
}>;
|
|
210
216
|
getChatLogsByUser: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
211
217
|
chatLogs: import("./types").ChatLog[];
|
|
212
218
|
}>;
|
package/esm/index.d.ts
CHANGED
|
@@ -201,6 +201,9 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
201
201
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
202
202
|
chatLogs: import("./types").ChatLog[];
|
|
203
203
|
}>;
|
|
204
|
+
getChatLogsPaged: (sessionId: string, dateFrom: string, dateTo: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
205
|
+
chatLogs: import("./types").ChatLog[];
|
|
206
|
+
}>;
|
|
204
207
|
getChatLogsByUser: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
205
208
|
chatLogs: import("./types").ChatLog[];
|
|
206
209
|
}>;
|
|
@@ -216,6 +219,9 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
216
219
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
217
220
|
chatLogs: import("./types").ChatLog[];
|
|
218
221
|
}>;
|
|
222
|
+
getChatLogsPaged: (sessionId: string, dateFrom: string, dateTo: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
223
|
+
chatLogs: import("./types").ChatLog[];
|
|
224
|
+
}>;
|
|
219
225
|
getChatLogsByUser: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
220
226
|
chatLogs: import("./types").ChatLog[];
|
|
221
227
|
}>;
|
|
@@ -745,11 +751,24 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
745
751
|
deleteCorrelationPair: (sessionId: string, pairId: string) => Promise<import("./types").ResponseSpec>;
|
|
746
752
|
};
|
|
747
753
|
backend: {
|
|
754
|
+
createTrustedApplication: (authToken: string, trustedApplication: import("./types").TrustedApplication) => Promise<import("./types").ResponseSpec & {
|
|
755
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
756
|
+
}>;
|
|
757
|
+
getTrustedApplication: (authToken: string, trustedApplicationID: string) => Promise<import("./types").ResponseSpec & {
|
|
758
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
759
|
+
}>;
|
|
760
|
+
updateTrustedApplication: (authToken: string, trustedApplicationID: string, trustedApplication: import("./types").TrustedApplication) => Promise<import("./types").ResponseSpec & {
|
|
761
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
762
|
+
}>;
|
|
763
|
+
deleteTrustedApplication: (authToken: string, trustedApplicationID: string) => Promise<import("./types").ResponseSpec>;
|
|
764
|
+
getTrustedApplicationsList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
765
|
+
trustedApplications: import("./types").TrustedApplication[];
|
|
766
|
+
}>;
|
|
748
767
|
healthCheck: () => Promise<import("./types").ResponseSpec>;
|
|
749
|
-
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
768
|
+
getTenantConfig: (authToken: string, tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
750
769
|
tenant: import("./types").Tenant;
|
|
751
770
|
}>;
|
|
752
|
-
getTenant: (tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
771
|
+
getTenant: (authToken: string, tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
753
772
|
tenant: import("./types").Tenant;
|
|
754
773
|
}>;
|
|
755
774
|
getTenantList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -892,6 +911,38 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
892
911
|
updateIntegration: (authToken: string, integrationID: string, integration: import("./types").Integration) => Promise<import("./types").ResponseSpec & {
|
|
893
912
|
integration: import("./types").Integration;
|
|
894
913
|
}>;
|
|
914
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
915
|
+
user: import("./types").User;
|
|
916
|
+
token?: string | undefined;
|
|
917
|
+
flowID?: string | undefined;
|
|
918
|
+
}>;
|
|
919
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
920
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
921
|
+
user: import("./types").User;
|
|
922
|
+
}>;
|
|
923
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
924
|
+
user: import("./types").User;
|
|
925
|
+
}>;
|
|
926
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
927
|
+
users: import("./types").User[];
|
|
928
|
+
}>;
|
|
929
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
930
|
+
users: import("./types").User[];
|
|
931
|
+
count: number;
|
|
932
|
+
}>;
|
|
933
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
934
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
935
|
+
user: import("./types").User;
|
|
936
|
+
}>;
|
|
937
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
938
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
939
|
+
user: import("./types").User;
|
|
940
|
+
}>;
|
|
941
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
942
|
+
user: import("./types").User;
|
|
943
|
+
token?: string | undefined;
|
|
944
|
+
flowID?: string | undefined;
|
|
945
|
+
}>;
|
|
895
946
|
userSignUp: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
896
947
|
user: import("./types").User;
|
|
897
948
|
}>;
|
|
@@ -995,6 +1046,9 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
995
1046
|
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
996
1047
|
asset: import("./types").Asset;
|
|
997
1048
|
}>;
|
|
1049
|
+
uploadAssetUnlogged: (fileName: string, fileUrl: string, memoriID: string, sessionID: string) => Promise<import("./types").ResponseSpec & {
|
|
1050
|
+
asset: import("./types").Asset;
|
|
1051
|
+
}>;
|
|
998
1052
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
|
999
1053
|
getAssetList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1000
1054
|
assets: import("./types").Asset[];
|
|
@@ -1008,6 +1062,9 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
1008
1062
|
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
1009
1063
|
asset: import("./types").Asset;
|
|
1010
1064
|
}>;
|
|
1065
|
+
uploadAssetUnlogged: (fileName: string, fileUrl: string, memoriID: string, sessionID: string) => Promise<import("./types").ResponseSpec & {
|
|
1066
|
+
asset: import("./types").Asset;
|
|
1067
|
+
}>;
|
|
1011
1068
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
|
1012
1069
|
getAssetList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1013
1070
|
assets: import("./types").Asset[];
|
|
@@ -1120,6 +1177,40 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
1120
1177
|
user: import("./types").User;
|
|
1121
1178
|
}>;
|
|
1122
1179
|
};
|
|
1180
|
+
userPwl: {
|
|
1181
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
1182
|
+
user: import("./types").User;
|
|
1183
|
+
token?: string | undefined;
|
|
1184
|
+
flowID?: string | undefined;
|
|
1185
|
+
}>;
|
|
1186
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
1187
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1188
|
+
user: import("./types").User;
|
|
1189
|
+
}>;
|
|
1190
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
1191
|
+
user: import("./types").User;
|
|
1192
|
+
}>;
|
|
1193
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1194
|
+
users: import("./types").User[];
|
|
1195
|
+
}>;
|
|
1196
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
1197
|
+
users: import("./types").User[];
|
|
1198
|
+
count: number;
|
|
1199
|
+
}>;
|
|
1200
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
1201
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
1202
|
+
user: import("./types").User;
|
|
1203
|
+
}>;
|
|
1204
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
1205
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
1206
|
+
user: import("./types").User;
|
|
1207
|
+
}>;
|
|
1208
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
1209
|
+
user: import("./types").User;
|
|
1210
|
+
token?: string | undefined;
|
|
1211
|
+
flowID?: string | undefined;
|
|
1212
|
+
}>;
|
|
1213
|
+
};
|
|
1123
1214
|
integration: {
|
|
1124
1215
|
getMemoriIntegrationsList: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec & {
|
|
1125
1216
|
integrations: import("./types").Integration[];
|
|
@@ -1271,10 +1362,10 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
1271
1362
|
};
|
|
1272
1363
|
tenant: {
|
|
1273
1364
|
healthCheck: () => Promise<import("./types").ResponseSpec>;
|
|
1274
|
-
getTenantConfig: (tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
1365
|
+
getTenantConfig: (authToken: string, tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
1275
1366
|
tenant: import("./types").Tenant;
|
|
1276
1367
|
}>;
|
|
1277
|
-
getTenant: (tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
1368
|
+
getTenant: (authToken: string, tenantName: string) => Promise<import("./types").ResponseSpec & {
|
|
1278
1369
|
tenant: import("./types").Tenant;
|
|
1279
1370
|
}>;
|
|
1280
1371
|
getTenantList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -1287,6 +1378,21 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
1287
1378
|
tenant: import("./types").Tenant;
|
|
1288
1379
|
}>;
|
|
1289
1380
|
};
|
|
1381
|
+
trustedApplication: {
|
|
1382
|
+
createTrustedApplication: (authToken: string, trustedApplication: import("./types").TrustedApplication) => Promise<import("./types").ResponseSpec & {
|
|
1383
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
1384
|
+
}>;
|
|
1385
|
+
getTrustedApplication: (authToken: string, trustedApplicationID: string) => Promise<import("./types").ResponseSpec & {
|
|
1386
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
1387
|
+
}>;
|
|
1388
|
+
updateTrustedApplication: (authToken: string, trustedApplicationID: string, trustedApplication: import("./types").TrustedApplication) => Promise<import("./types").ResponseSpec & {
|
|
1389
|
+
trustedApplication: import("./types").TrustedApplication;
|
|
1390
|
+
}>;
|
|
1391
|
+
deleteTrustedApplication: (authToken: string, trustedApplicationID: string) => Promise<import("./types").ResponseSpec>;
|
|
1392
|
+
getTrustedApplicationsList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1393
|
+
trustedApplications: import("./types").TrustedApplication[];
|
|
1394
|
+
}>;
|
|
1395
|
+
};
|
|
1290
1396
|
};
|
|
1291
1397
|
};
|
|
1292
1398
|
export default api;
|
package/esm/types.d.ts
CHANGED
|
@@ -329,6 +329,7 @@ export declare type Tenant = {
|
|
|
329
329
|
billingDelegation?: boolean;
|
|
330
330
|
creationTimestamp?: string;
|
|
331
331
|
lastChangeTimestamp?: string;
|
|
332
|
+
perplexityAPIKey?: string;
|
|
332
333
|
};
|
|
333
334
|
export declare type LocalizationKeyContent = {
|
|
334
335
|
key: string;
|
|
@@ -389,11 +390,12 @@ export declare type ConsumptionLog = {
|
|
|
389
390
|
export declare type Notification = {
|
|
390
391
|
notificationID: string;
|
|
391
392
|
timestamp: string;
|
|
392
|
-
severity: 'INFO' | 'WARN' | 'ALERT' | 'AWARD' | '
|
|
393
|
+
severity: 'INFO' | 'WARN' | 'ALERT' | 'AWARD' | 'CHANGELOG';
|
|
393
394
|
type: 'BROADCAST' | 'TENANT' | 'USER';
|
|
394
395
|
tenantID?: string;
|
|
395
396
|
userID?: string;
|
|
396
397
|
validFrom?: string;
|
|
398
|
+
userName?: string;
|
|
397
399
|
validTo?: string;
|
|
398
400
|
texts: {
|
|
399
401
|
'it-IT': string;
|
|
@@ -510,6 +512,7 @@ export declare type OpenSession = {
|
|
|
510
512
|
recoveryTokens?: string[];
|
|
511
513
|
tag?: string;
|
|
512
514
|
pin?: string;
|
|
515
|
+
continueFromChatLogID?: string;
|
|
513
516
|
initialContextVars?: {
|
|
514
517
|
[key: string]: string;
|
|
515
518
|
};
|
|
@@ -983,3 +986,16 @@ export declare type MacroFunction = {
|
|
|
983
986
|
obfuscated?: boolean;
|
|
984
987
|
}[];
|
|
985
988
|
};
|
|
989
|
+
export declare type TrustedApplication = {
|
|
990
|
+
trustedApplicationID: string;
|
|
991
|
+
tenantID: string;
|
|
992
|
+
name: string;
|
|
993
|
+
description: string;
|
|
994
|
+
baseUrl: string;
|
|
995
|
+
authorizationToken: string;
|
|
996
|
+
isEnabled: boolean;
|
|
997
|
+
createdByUserID: string;
|
|
998
|
+
lastModifiedByUserID: string;
|
|
999
|
+
creationTimestamp: string;
|
|
1000
|
+
lastChangeTimestamp: string;
|
|
1001
|
+
};
|
package/package.json
CHANGED
package/src/backend/asset.ts
CHANGED
|
@@ -54,6 +54,40 @@ export default (apiUrl: string) => ({
|
|
|
54
54
|
>;
|
|
55
55
|
},
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Uploads a file and creates a new Asset object for unlogged users.
|
|
59
|
+
* @param {string} fileName - The file name
|
|
60
|
+
* @param {string} fileUrl - The URL of the file to upload
|
|
61
|
+
* @param {string} memoriID - The memori ID
|
|
62
|
+
* @param {string} sessionID - The session ID
|
|
63
|
+
* @returns Response of an Upload Asset request.
|
|
64
|
+
*/
|
|
65
|
+
uploadAssetUnlogged: async (
|
|
66
|
+
fileName: string,
|
|
67
|
+
fileUrl: string,
|
|
68
|
+
memoriID: string,
|
|
69
|
+
sessionID: string
|
|
70
|
+
) => {
|
|
71
|
+
const data = new FormData();
|
|
72
|
+
const file = await fetch(fileUrl);
|
|
73
|
+
const fileBlob = await file.blob();
|
|
74
|
+
|
|
75
|
+
data.append(fileName, fileBlob, fileName);
|
|
76
|
+
|
|
77
|
+
const upload = await fetch(
|
|
78
|
+
`${apiUrl}/Asset/unlogged/${memoriID}/${sessionID}`,
|
|
79
|
+
{
|
|
80
|
+
method: 'POST',
|
|
81
|
+
body: data,
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
return (await upload.json()) as Promise<
|
|
85
|
+
ResponseSpec & {
|
|
86
|
+
asset: Asset;
|
|
87
|
+
}
|
|
88
|
+
>;
|
|
89
|
+
},
|
|
90
|
+
|
|
57
91
|
/**
|
|
58
92
|
* Downloads a file from an Asset object
|
|
59
93
|
* @param {string} fileName - The file name
|
|
@@ -5,11 +5,13 @@ const client = memori('https://backend.memori.ai');
|
|
|
5
5
|
describe('backend/tenant api', () => {
|
|
6
6
|
it('works on tenant apis', async () => {
|
|
7
7
|
expect(
|
|
8
|
-
await client.backend.tenant.getTenant('www.aisuru.com')
|
|
8
|
+
await client.backend.tenant.getTenant('www.aisuru.com', 'www.aisuru.com')
|
|
9
9
|
).not.toBeNull();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('works on tenant apis with shorthand version', async () => {
|
|
13
|
-
expect(
|
|
13
|
+
expect(
|
|
14
|
+
await client.backend.getTenant('www.aisuru.com', 'www.aisuru.com')
|
|
15
|
+
).not.toBeNull();
|
|
14
16
|
});
|
|
15
17
|
});
|
package/src/backend/tenant.ts
CHANGED
|
@@ -17,8 +17,8 @@ export default (apiUrl: string) => ({
|
|
|
17
17
|
* @alias getTenant
|
|
18
18
|
* @deprecated
|
|
19
19
|
*/
|
|
20
|
-
getTenantConfig: (tenantName: string) =>
|
|
21
|
-
apiFetcher(`/Tenant/${tenantName}`, { apiUrl }) as Promise<
|
|
20
|
+
getTenantConfig: (authToken: string, tenantName: string) =>
|
|
21
|
+
apiFetcher(`/Tenant/${authToken}/${tenantName}`, { apiUrl }) as Promise<
|
|
22
22
|
ResponseSpec & {
|
|
23
23
|
tenant: Tenant;
|
|
24
24
|
}
|
|
@@ -28,8 +28,8 @@ export default (apiUrl: string) => ({
|
|
|
28
28
|
* Gets the details of a Tenant object.
|
|
29
29
|
* @param tenantName - The name of the tenant
|
|
30
30
|
*/
|
|
31
|
-
getTenant: (tenantName: string) =>
|
|
32
|
-
apiFetcher(`/Tenant/${tenantName}`, { apiUrl }) as Promise<
|
|
31
|
+
getTenant: (authToken: string, tenantName: string) =>
|
|
32
|
+
apiFetcher(`/Tenant/${authToken}/${tenantName}`, { apiUrl }) as Promise<
|
|
33
33
|
ResponseSpec & {
|
|
34
34
|
tenant: Tenant;
|
|
35
35
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import memori from '../index';
|
|
2
|
+
|
|
3
|
+
const client = memori('https://backend.memori.ai');
|
|
4
|
+
|
|
5
|
+
describe('backend/trustedApplication api', () => {
|
|
6
|
+
it('works on trustedApplication apis', async () => {
|
|
7
|
+
expect(
|
|
8
|
+
await client.backend.trustedApplication.getTrustedApplicationsList(
|
|
9
|
+
'768b9654-e781-4c3c-81fa-ae1529d1bfbe'
|
|
10
|
+
)
|
|
11
|
+
).not.toBeNull();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('works on trustedApplication apis with shorthand version', async () => {
|
|
15
|
+
expect(
|
|
16
|
+
await client.backend.getTrustedApplicationsList(
|
|
17
|
+
'768b9654-e781-4c3c-81fa-ae1529d1bfbe'
|
|
18
|
+
)
|
|
19
|
+
).not.toBeNull();
|
|
20
|
+
});
|
|
21
|
+
});
|