@memori.ai/memori-api-client 0.1.0 → 0.1.1
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/dist/apiFetcher.d.ts +0 -7
- package/dist/engine.d.ts +0 -20
- package/dist/index.d.ts +0 -20
- package/dist/memori-api-client.cjs.development.js +2 -213
- package/dist/memori-api-client.cjs.development.js.map +1 -1
- package/dist/memori-api-client.cjs.production.min.js +1 -1
- package/dist/memori-api-client.cjs.production.min.js.map +1 -1
- package/dist/memori-api-client.esm.js +2 -213
- package/dist/memori-api-client.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/apiFetcher.ts +1 -8
- package/src/engine.ts +0 -6
- package/dist/engine/memori.d.ts +0 -30
- package/dist/engine/webhooks.d.ts +0 -21
- package/src/engine/memori.ts +0 -51
- package/src/engine/webhooks.ts +0 -32
package/dist/engine/memori.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec, Memori } from '../types';
|
|
2
|
-
declare const _default: (apiUrl: string) => {
|
|
3
|
-
/**
|
|
4
|
-
* Registration of a new Memori object.
|
|
5
|
-
* @param {Memori} memori - The Memori object
|
|
6
|
-
*/
|
|
7
|
-
postMemori: (memori: Partial<Omit<Memori, 'memoriID'>>) => Promise<ResponseSpec>;
|
|
8
|
-
/**
|
|
9
|
-
* Updates an existing Memori object.
|
|
10
|
-
* @param {Memori} memori - The Memori object
|
|
11
|
-
*/
|
|
12
|
-
patchMemori: (memori: Partial<Memori> & {
|
|
13
|
-
memoriID: string;
|
|
14
|
-
}) => Promise<ResponseSpec>;
|
|
15
|
-
/**
|
|
16
|
-
* Deletes an existing Memori object.
|
|
17
|
-
* @param {string} memoriId The Memori object ID
|
|
18
|
-
*/
|
|
19
|
-
deleteMemori: (memoriId: string) => Promise<ResponseSpec>;
|
|
20
|
-
/**
|
|
21
|
-
* Lists Memori objects, with optional filtering.
|
|
22
|
-
*/
|
|
23
|
-
postSearchMemori: () => Promise<ResponseSpec>;
|
|
24
|
-
};
|
|
25
|
-
/******************
|
|
26
|
-
* *
|
|
27
|
-
* Memori *
|
|
28
|
-
* *
|
|
29
|
-
******************/
|
|
30
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec } from '../types';
|
|
2
|
-
declare const _default: (apiUrl: string) => {
|
|
3
|
-
/**
|
|
4
|
-
* Returns test slot values. Currently available test slots are:<ul><li><code>number</code>: integer numbers between 1 and 10</li><li><code>letter</code>: uppercase letters between A and Z</li><li><code>greek_letter</code>: capitalized Greek letters between Alpha and Omega</li></ul>
|
|
5
|
-
*/
|
|
6
|
-
postTestSlot: () => Promise<ResponseSpec>;
|
|
7
|
-
/**
|
|
8
|
-
* Returns test intent results. Currently available test intents are:<ul><li><code>ECHO</code>: emits the intent utterance as-is.</li><li><code>COMBINE_LETTER_AND_NUMBER</code>: requires a letter slot and a number slot,
|
|
9
|
-
emits the content of the two slots in justaxposition, e.g. "A10".</li><li><code>DATE_RANGE</code>: requires a date slot, emits the date range indicated
|
|
10
|
-
by the date slot in the format "yyyy/MM/dd - yyyy/MM/dd".</li><li><code>AUTOINCREMENT</code>: returns a progressive number that increments by 1
|
|
11
|
-
each time the intent is called.</li><li><code>FIBONACCI</code>: returns the next element of the Fibonacci series, using
|
|
12
|
-
context variables to store the series progression.</li></ul>
|
|
13
|
-
*/
|
|
14
|
-
postTestIntent: () => Promise<ResponseSpec>;
|
|
15
|
-
};
|
|
16
|
-
/********************
|
|
17
|
-
* *
|
|
18
|
-
* WebHooks *
|
|
19
|
-
* *
|
|
20
|
-
********************/
|
|
21
|
-
export default _default;
|
package/src/engine/memori.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec, Memori } from '../types';
|
|
2
|
-
import { apiFetcher } from '../apiFetcher';
|
|
3
|
-
|
|
4
|
-
/******************
|
|
5
|
-
* *
|
|
6
|
-
* Memori *
|
|
7
|
-
* *
|
|
8
|
-
******************/
|
|
9
|
-
|
|
10
|
-
export default (apiUrl: string) => ({
|
|
11
|
-
/**
|
|
12
|
-
* Registration of a new Memori object.
|
|
13
|
-
* @param {Memori} memori - The Memori object
|
|
14
|
-
*/
|
|
15
|
-
postMemori: async (memori: Partial<Omit<Memori, 'memoriID'>>) =>
|
|
16
|
-
apiFetcher(`/Memori`, {
|
|
17
|
-
method: 'POST',
|
|
18
|
-
apiUrl,
|
|
19
|
-
body: memori,
|
|
20
|
-
}) as Promise<ResponseSpec>,
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Updates an existing Memori object.
|
|
24
|
-
* @param {Memori} memori - The Memori object
|
|
25
|
-
*/
|
|
26
|
-
patchMemori: async (memori: Partial<Memori> & { memoriID: string }) =>
|
|
27
|
-
apiFetcher(`/Memori/${memori.memoriID}`, {
|
|
28
|
-
method: 'PATCH',
|
|
29
|
-
apiUrl,
|
|
30
|
-
body: memori,
|
|
31
|
-
}) as Promise<ResponseSpec>,
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Deletes an existing Memori object.
|
|
35
|
-
* @param {string} memoriId The Memori object ID
|
|
36
|
-
*/
|
|
37
|
-
deleteMemori: async (memoriId: string) =>
|
|
38
|
-
apiFetcher(`/Memori/${memoriId}`, {
|
|
39
|
-
method: 'DELETE',
|
|
40
|
-
apiUrl,
|
|
41
|
-
}) as Promise<ResponseSpec>,
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Lists Memori objects, with optional filtering.
|
|
45
|
-
*/
|
|
46
|
-
postSearchMemori: async () =>
|
|
47
|
-
apiFetcher(`/SearchMemori`, {
|
|
48
|
-
method: 'GET',
|
|
49
|
-
apiUrl,
|
|
50
|
-
}) as Promise<ResponseSpec>,
|
|
51
|
-
});
|
package/src/engine/webhooks.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec } from '../types';
|
|
2
|
-
import { apiFetcher } from '../apiFetcher';
|
|
3
|
-
|
|
4
|
-
/********************
|
|
5
|
-
* *
|
|
6
|
-
* WebHooks *
|
|
7
|
-
* *
|
|
8
|
-
********************/
|
|
9
|
-
|
|
10
|
-
export default (apiUrl: string) => ({
|
|
11
|
-
/**
|
|
12
|
-
* Returns test slot values. Currently available test slots are:<ul><li><code>number</code>: integer numbers between 1 and 10</li><li><code>letter</code>: uppercase letters between A and Z</li><li><code>greek_letter</code>: capitalized Greek letters between Alpha and Omega</li></ul>
|
|
13
|
-
*/
|
|
14
|
-
postTestSlot: async () =>
|
|
15
|
-
apiFetcher(`/TestSlot`, {
|
|
16
|
-
method: 'GET',
|
|
17
|
-
apiUrl,
|
|
18
|
-
}) as Promise<ResponseSpec>,
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Returns test intent results. Currently available test intents are:<ul><li><code>ECHO</code>: emits the intent utterance as-is.</li><li><code>COMBINE_LETTER_AND_NUMBER</code>: requires a letter slot and a number slot,
|
|
22
|
-
emits the content of the two slots in justaxposition, e.g. "A10".</li><li><code>DATE_RANGE</code>: requires a date slot, emits the date range indicated
|
|
23
|
-
by the date slot in the format "yyyy/MM/dd - yyyy/MM/dd".</li><li><code>AUTOINCREMENT</code>: returns a progressive number that increments by 1
|
|
24
|
-
each time the intent is called.</li><li><code>FIBONACCI</code>: returns the next element of the Fibonacci series, using
|
|
25
|
-
context variables to store the series progression.</li></ul>
|
|
26
|
-
*/
|
|
27
|
-
postTestIntent: async () =>
|
|
28
|
-
apiFetcher(`/TestIntent`, {
|
|
29
|
-
method: 'GET',
|
|
30
|
-
apiUrl,
|
|
31
|
-
}) as Promise<ResponseSpec>,
|
|
32
|
-
});
|