agentbase-web-sdk 2.8.0 → 2.9.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 +79 -2
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +79 -2
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +79 -2
- package/package.json +2 -2
- package/types/index.d.ts +1 -1
- package/types/models.d.ts +29 -0
- package/types/services/databases.d.ts +4 -0
- package/types/services/documents-db.d.ts +4 -0
- package/types/services/functions.d.ts +56 -0
- package/types/services/tables-db.d.ts +4 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agentbase Agentbase SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
5
5
|
[](https://travis-ci.com/appwrite/sdk-generator)
|
|
6
6
|
|
|
7
7
|
Agentbase SDK for integrating your app with Agentbase APIs and tools.
|
|
@@ -28,7 +28,7 @@ import { Client, Account } from "agentbase-web-sdk";
|
|
|
28
28
|
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Agentbase services:
|
|
29
29
|
|
|
30
30
|
```html
|
|
31
|
-
<script src="https://cdn.jsdelivr.net/npm/agentbase-web-sdk@2.
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/agentbase-web-sdk@2.9.0"></script>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -614,9 +614,9 @@ class Client {
|
|
|
614
614
|
'x-sdk-name': 'Agentbase',
|
|
615
615
|
'x-sdk-platform': 'client',
|
|
616
616
|
'x-sdk-language': 'web',
|
|
617
|
-
'x-sdk-version': '2.
|
|
617
|
+
'x-sdk-version': '2.9.0',
|
|
618
618
|
'X-AppBase-SDK': 'true',
|
|
619
|
-
'X-Appwrite-Response-Format': '2.
|
|
619
|
+
'X-Appwrite-Response-Format': '2.9.0',
|
|
620
620
|
};
|
|
621
621
|
this.realtime = {
|
|
622
622
|
socket: undefined,
|
|
@@ -6307,6 +6307,83 @@ class Functions {
|
|
|
6307
6307
|
constructor(client) {
|
|
6308
6308
|
this.client = client;
|
|
6309
6309
|
}
|
|
6310
|
+
listExecutionPaths(paramsOrFirst, ...rest) {
|
|
6311
|
+
let params;
|
|
6312
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6313
|
+
params = (paramsOrFirst || {});
|
|
6314
|
+
}
|
|
6315
|
+
else {
|
|
6316
|
+
params = {
|
|
6317
|
+
functionId: paramsOrFirst,
|
|
6318
|
+
limit: rest[0],
|
|
6319
|
+
offset: rest[1],
|
|
6320
|
+
total: rest[2]
|
|
6321
|
+
};
|
|
6322
|
+
}
|
|
6323
|
+
const functionId = params.functionId;
|
|
6324
|
+
const limit = params.limit;
|
|
6325
|
+
const offset = params.offset;
|
|
6326
|
+
const total = params.total;
|
|
6327
|
+
if (typeof functionId === 'undefined') {
|
|
6328
|
+
throw new AgentbaseException('Missing required parameter: "functionId"');
|
|
6329
|
+
}
|
|
6330
|
+
const apiPath = '/functions/{functionId}/execution-paths'.replace('{functionId}', functionId);
|
|
6331
|
+
const payload = {};
|
|
6332
|
+
if (typeof limit !== 'undefined') {
|
|
6333
|
+
payload['limit'] = limit;
|
|
6334
|
+
}
|
|
6335
|
+
if (typeof offset !== 'undefined') {
|
|
6336
|
+
payload['offset'] = offset;
|
|
6337
|
+
}
|
|
6338
|
+
if (typeof total !== 'undefined') {
|
|
6339
|
+
payload['total'] = total;
|
|
6340
|
+
}
|
|
6341
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6342
|
+
const apiHeaders = {
|
|
6343
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
6344
|
+
};
|
|
6345
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
6346
|
+
}
|
|
6347
|
+
listExecutionsByPath(paramsOrFirst, ...rest) {
|
|
6348
|
+
let params;
|
|
6349
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6350
|
+
params = (paramsOrFirst || {});
|
|
6351
|
+
}
|
|
6352
|
+
else {
|
|
6353
|
+
params = {
|
|
6354
|
+
functionId: paramsOrFirst,
|
|
6355
|
+
xpath: rest[0],
|
|
6356
|
+
queries: rest[1],
|
|
6357
|
+
total: rest[2]
|
|
6358
|
+
};
|
|
6359
|
+
}
|
|
6360
|
+
const functionId = params.functionId;
|
|
6361
|
+
const xpath = params.xpath;
|
|
6362
|
+
const queries = params.queries;
|
|
6363
|
+
const total = params.total;
|
|
6364
|
+
if (typeof functionId === 'undefined') {
|
|
6365
|
+
throw new AgentbaseException('Missing required parameter: "functionId"');
|
|
6366
|
+
}
|
|
6367
|
+
if (typeof xpath === 'undefined') {
|
|
6368
|
+
throw new AgentbaseException('Missing required parameter: "xpath"');
|
|
6369
|
+
}
|
|
6370
|
+
const apiPath = '/functions/{functionId}/execution-paths/executions'.replace('{functionId}', functionId);
|
|
6371
|
+
const payload = {};
|
|
6372
|
+
if (typeof xpath !== 'undefined') {
|
|
6373
|
+
payload['path'] = xpath;
|
|
6374
|
+
}
|
|
6375
|
+
if (typeof queries !== 'undefined') {
|
|
6376
|
+
payload['queries'] = queries;
|
|
6377
|
+
}
|
|
6378
|
+
if (typeof total !== 'undefined') {
|
|
6379
|
+
payload['total'] = total;
|
|
6380
|
+
}
|
|
6381
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6382
|
+
const apiHeaders = {
|
|
6383
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
6384
|
+
};
|
|
6385
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
6386
|
+
}
|
|
6310
6387
|
listExecutions(paramsOrFirst, ...rest) {
|
|
6311
6388
|
let params;
|
|
6312
6389
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|