agentbase-web-sdk 2.9.0 → 2.10.0
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/README.md +2 -2
- package/dist/cjs/sdk.js +812 -69
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +813 -70
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +812 -69
- package/package.json +2 -2
- package/types/enums/method.d.ts +9 -0
- package/types/enums/path-match.d.ts +4 -0
- package/types/enums/scenario.d.ts +6 -0
- package/types/enums/status.d.ts +5 -1
- package/types/index.d.ts +4 -1
- package/types/services/functions.d.ts +33 -7
- package/types/services/memory.d.ts +488 -16
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "agentbase-web-sdk",
|
|
3
3
|
"homepage": "https://appbase.local/support",
|
|
4
4
|
"description": "",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.10.0",
|
|
6
6
|
"license": "",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
"jsdelivr": "dist/iife/sdk.js",
|
|
50
50
|
"unpkg": "dist/iife/sdk.js",
|
|
51
51
|
"agentbase_provenance": {
|
|
52
|
-
"build_manifest_sha256": "
|
|
52
|
+
"build_manifest_sha256": "cf5a228579f38c6f19462c8a34ad7851d76cf277de4976f947d4c3a5b3314c96"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/types/enums/status.d.ts
CHANGED
|
@@ -13,5 +13,9 @@ export declare enum Status {
|
|
|
13
13
|
Succeeded = "succeeded",
|
|
14
14
|
PartialFailed = "partial_failed",
|
|
15
15
|
Failed = "failed",
|
|
16
|
-
Dead = "dead"
|
|
16
|
+
Dead = "dead",
|
|
17
|
+
Pending = "pending",
|
|
18
|
+
Approved = "approved",
|
|
19
|
+
Rejected = "rejected",
|
|
20
|
+
Superseded = "superseded"
|
|
17
21
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agentbase Agentbase SDK
|
|
3
3
|
*
|
|
4
|
-
* This SDK is compatible with Appwrite server version 2.
|
|
4
|
+
* This SDK is compatible with Appwrite server version 2.10.x.
|
|
5
5
|
* For older versions, please check
|
|
6
6
|
* [previous releases](https://github.com/agentbase/agentbase-web-sdk/releases).
|
|
7
7
|
*/
|
|
@@ -45,6 +45,8 @@ export { Theme } from './enums/theme';
|
|
|
45
45
|
export { Timezone } from './enums/timezone';
|
|
46
46
|
export { BrowserPermission } from './enums/browser-permission';
|
|
47
47
|
export { ImageFormat } from './enums/image-format';
|
|
48
|
+
export { PathMatch } from './enums/path-match';
|
|
49
|
+
export { Method } from './enums/method';
|
|
48
50
|
export { ExecutionMethod } from './enums/execution-method';
|
|
49
51
|
export { MemoryAccessMode } from './enums/memory-access-mode';
|
|
50
52
|
export { MemoryScope } from './enums/memory-scope';
|
|
@@ -67,6 +69,7 @@ export { ProfileType } from './enums/profile-type';
|
|
|
67
69
|
export { ProfileExtractionMode } from './enums/profile-extraction-mode';
|
|
68
70
|
export { RetentionPolicy } from './enums/retention-policy';
|
|
69
71
|
export { MemoryShareSubjectType } from './enums/memory-share-subject-type';
|
|
72
|
+
export { Scenario } from './enums/scenario';
|
|
70
73
|
export { OrganizationRole } from './enums/organization-role';
|
|
71
74
|
export { OrganizationUsageRange } from './enums/organization-usage-range';
|
|
72
75
|
export { ImageGravity } from './enums/image-gravity';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
+
import { PathMatch } from '../enums/path-match';
|
|
4
|
+
import { Method } from '../enums/method';
|
|
3
5
|
import { ExecutionMethod } from '../enums/execution-method';
|
|
4
6
|
export declare class Functions {
|
|
5
7
|
client: Client;
|
|
@@ -11,6 +13,9 @@ export declare class Functions {
|
|
|
11
13
|
* @param {number} params.limit - Maximum number of execution paths to return.
|
|
12
14
|
* @param {number} params.offset - Number of execution paths to skip.
|
|
13
15
|
* @param {boolean} params.total - When set to false, the total count returned will be 0.
|
|
16
|
+
* @param {string} params.xpath - Execution request path or regular expression. Empty means all paths.
|
|
17
|
+
* @param {PathMatch} params.pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
|
|
18
|
+
* @param {Method} params.method - HTTP method to filter. Empty means all methods.
|
|
14
19
|
* @throws {AgentbaseException}
|
|
15
20
|
* @returns {Promise<Models.ExecutionPathList>}
|
|
16
21
|
*/
|
|
@@ -19,6 +24,9 @@ export declare class Functions {
|
|
|
19
24
|
limit?: number;
|
|
20
25
|
offset?: number;
|
|
21
26
|
total?: boolean;
|
|
27
|
+
xpath?: string;
|
|
28
|
+
pathMatch?: PathMatch;
|
|
29
|
+
method?: Method;
|
|
22
30
|
}): Promise<Models.ExecutionPathList>;
|
|
23
31
|
/**
|
|
24
32
|
* Get a paginated list of distinct request paths from the current user function executions.
|
|
@@ -27,18 +35,23 @@ export declare class Functions {
|
|
|
27
35
|
* @param {number} limit - Maximum number of execution paths to return.
|
|
28
36
|
* @param {number} offset - Number of execution paths to skip.
|
|
29
37
|
* @param {boolean} total - When set to false, the total count returned will be 0.
|
|
38
|
+
* @param {string} xpath - Execution request path or regular expression. Empty means all paths.
|
|
39
|
+
* @param {PathMatch} pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
|
|
40
|
+
* @param {Method} method - HTTP method to filter. Empty means all methods.
|
|
30
41
|
* @throws {AgentbaseException}
|
|
31
42
|
* @returns {Promise<Models.ExecutionPathList>}
|
|
32
43
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
33
44
|
*/
|
|
34
|
-
listExecutionPaths(functionId: string, limit?: number, offset?: number, total?: boolean): Promise<Models.ExecutionPathList>;
|
|
45
|
+
listExecutionPaths(functionId: string, limit?: number, offset?: number, total?: boolean, xpath?: string, pathMatch?: PathMatch, method?: Method): Promise<Models.ExecutionPathList>;
|
|
35
46
|
/**
|
|
36
|
-
* Get a paginated list of function executions
|
|
47
|
+
* Get a paginated list of function executions matching the given request path and optional HTTP method.
|
|
37
48
|
*
|
|
38
49
|
* @param {string} params.functionId - Function ID.
|
|
39
|
-
* @param {string} params.xpath -
|
|
50
|
+
* @param {string} params.xpath - Execution request path or regular expression to match.
|
|
40
51
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. Maximum of 100 queries are allowed, each 4096 characters long.
|
|
41
52
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
53
|
+
* @param {PathMatch} params.pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
|
|
54
|
+
* @param {Method} params.method - HTTP method to filter. Empty means all methods.
|
|
42
55
|
* @throws {AgentbaseException}
|
|
43
56
|
* @returns {Promise<Models.ExecutionList>}
|
|
44
57
|
*/
|
|
@@ -47,25 +60,32 @@ export declare class Functions {
|
|
|
47
60
|
xpath: string;
|
|
48
61
|
queries?: string[];
|
|
49
62
|
total?: boolean;
|
|
63
|
+
pathMatch?: PathMatch;
|
|
64
|
+
method?: Method;
|
|
50
65
|
}): Promise<Models.ExecutionList>;
|
|
51
66
|
/**
|
|
52
|
-
* Get a paginated list of function executions
|
|
67
|
+
* Get a paginated list of function executions matching the given request path and optional HTTP method.
|
|
53
68
|
*
|
|
54
69
|
* @param {string} functionId - Function ID.
|
|
55
|
-
* @param {string} xpath -
|
|
70
|
+
* @param {string} xpath - Execution request path or regular expression to match.
|
|
56
71
|
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. Maximum of 100 queries are allowed, each 4096 characters long.
|
|
57
72
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
73
|
+
* @param {PathMatch} pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
|
|
74
|
+
* @param {Method} method - HTTP method to filter. Empty means all methods.
|
|
58
75
|
* @throws {AgentbaseException}
|
|
59
76
|
* @returns {Promise<Models.ExecutionList>}
|
|
60
77
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
61
78
|
*/
|
|
62
|
-
listExecutionsByPath(functionId: string, xpath: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
|
|
79
|
+
listExecutionsByPath(functionId: string, xpath: string, queries?: string[], total?: boolean, pathMatch?: PathMatch, method?: Method): Promise<Models.ExecutionList>;
|
|
63
80
|
/**
|
|
64
81
|
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
|
|
65
82
|
*
|
|
66
83
|
* @param {string} params.functionId - Function ID.
|
|
67
84
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
68
85
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
86
|
+
* @param {string} params.xpath - Execution request path or regular expression. Empty means all paths.
|
|
87
|
+
* @param {PathMatch} params.pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
|
|
88
|
+
* @param {Method} params.method - HTTP method to filter. Empty means all methods.
|
|
69
89
|
* @throws {AgentbaseException}
|
|
70
90
|
* @returns {Promise<Models.ExecutionList>}
|
|
71
91
|
*/
|
|
@@ -73,6 +93,9 @@ export declare class Functions {
|
|
|
73
93
|
functionId: string;
|
|
74
94
|
queries?: string[];
|
|
75
95
|
total?: boolean;
|
|
96
|
+
xpath?: string;
|
|
97
|
+
pathMatch?: PathMatch;
|
|
98
|
+
method?: Method;
|
|
76
99
|
}): Promise<Models.ExecutionList>;
|
|
77
100
|
/**
|
|
78
101
|
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
|
|
@@ -80,11 +103,14 @@ export declare class Functions {
|
|
|
80
103
|
* @param {string} functionId - Function ID.
|
|
81
104
|
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
82
105
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
106
|
+
* @param {string} xpath - Execution request path or regular expression. Empty means all paths.
|
|
107
|
+
* @param {PathMatch} pathMatch - Path matching mode: exact or regex. Regex patterns have no delimiters.
|
|
108
|
+
* @param {Method} method - HTTP method to filter. Empty means all methods.
|
|
83
109
|
* @throws {AgentbaseException}
|
|
84
110
|
* @returns {Promise<Models.ExecutionList>}
|
|
85
111
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
86
112
|
*/
|
|
87
|
-
listExecutions(functionId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
|
|
113
|
+
listExecutions(functionId: string, queries?: string[], total?: boolean, xpath?: string, pathMatch?: PathMatch, method?: Method): Promise<Models.ExecutionList>;
|
|
88
114
|
/**
|
|
89
115
|
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
|
|
90
116
|
*
|