agentbase-web-sdk 2.8.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/dist/iife/sdk.js CHANGED
@@ -4412,9 +4412,9 @@
4412
4412
  'x-sdk-name': 'Agentbase',
4413
4413
  'x-sdk-platform': 'client',
4414
4414
  'x-sdk-language': 'web',
4415
- 'x-sdk-version': '2.8.0',
4415
+ 'x-sdk-version': '2.10.0',
4416
4416
  'X-AppBase-SDK': 'true',
4417
- 'X-Appwrite-Response-Format': '2.8.0',
4417
+ 'X-Appwrite-Response-Format': '2.10.0',
4418
4418
  };
4419
4419
  this.realtime = {
4420
4420
  socket: undefined,
@@ -10105,6 +10105,108 @@
10105
10105
  constructor(client) {
10106
10106
  this.client = client;
10107
10107
  }
10108
+ listExecutionPaths(paramsOrFirst, ...rest) {
10109
+ let params;
10110
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10111
+ params = (paramsOrFirst || {});
10112
+ }
10113
+ else {
10114
+ params = {
10115
+ functionId: paramsOrFirst,
10116
+ limit: rest[0],
10117
+ offset: rest[1],
10118
+ total: rest[2],
10119
+ xpath: rest[3],
10120
+ pathMatch: rest[4],
10121
+ method: rest[5]
10122
+ };
10123
+ }
10124
+ const functionId = params.functionId;
10125
+ const limit = params.limit;
10126
+ const offset = params.offset;
10127
+ const total = params.total;
10128
+ const xpath = params.xpath;
10129
+ const pathMatch = params.pathMatch;
10130
+ const method = params.method;
10131
+ if (typeof functionId === 'undefined') {
10132
+ throw new AgentbaseException('Missing required parameter: "functionId"');
10133
+ }
10134
+ const apiPath = '/functions/{functionId}/execution-paths'.replace('{functionId}', functionId);
10135
+ const payload = {};
10136
+ if (typeof limit !== 'undefined') {
10137
+ payload['limit'] = limit;
10138
+ }
10139
+ if (typeof offset !== 'undefined') {
10140
+ payload['offset'] = offset;
10141
+ }
10142
+ if (typeof total !== 'undefined') {
10143
+ payload['total'] = total;
10144
+ }
10145
+ if (typeof xpath !== 'undefined') {
10146
+ payload['path'] = xpath;
10147
+ }
10148
+ if (typeof pathMatch !== 'undefined') {
10149
+ payload['pathMatch'] = pathMatch;
10150
+ }
10151
+ if (typeof method !== 'undefined') {
10152
+ payload['method'] = method;
10153
+ }
10154
+ const uri = new URL(this.client.config.endpoint + apiPath);
10155
+ const apiHeaders = {
10156
+ 'X-Appwrite-Project': this.client.config.project,
10157
+ };
10158
+ return this.client.call('get', uri, apiHeaders, payload);
10159
+ }
10160
+ listExecutionsByPath(paramsOrFirst, ...rest) {
10161
+ let params;
10162
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10163
+ params = (paramsOrFirst || {});
10164
+ }
10165
+ else {
10166
+ params = {
10167
+ functionId: paramsOrFirst,
10168
+ xpath: rest[0],
10169
+ queries: rest[1],
10170
+ total: rest[2],
10171
+ pathMatch: rest[3],
10172
+ method: rest[4]
10173
+ };
10174
+ }
10175
+ const functionId = params.functionId;
10176
+ const xpath = params.xpath;
10177
+ const queries = params.queries;
10178
+ const total = params.total;
10179
+ const pathMatch = params.pathMatch;
10180
+ const method = params.method;
10181
+ if (typeof functionId === 'undefined') {
10182
+ throw new AgentbaseException('Missing required parameter: "functionId"');
10183
+ }
10184
+ if (typeof xpath === 'undefined') {
10185
+ throw new AgentbaseException('Missing required parameter: "xpath"');
10186
+ }
10187
+ const apiPath = '/functions/{functionId}/execution-paths/executions'.replace('{functionId}', functionId);
10188
+ const payload = {};
10189
+ if (typeof xpath !== 'undefined') {
10190
+ payload['path'] = xpath;
10191
+ }
10192
+ if (typeof queries !== 'undefined') {
10193
+ payload['queries'] = queries;
10194
+ }
10195
+ if (typeof total !== 'undefined') {
10196
+ payload['total'] = total;
10197
+ }
10198
+ if (typeof pathMatch !== 'undefined') {
10199
+ payload['pathMatch'] = pathMatch;
10200
+ }
10201
+ if (typeof method !== 'undefined') {
10202
+ payload['method'] = method;
10203
+ }
10204
+ const uri = new URL(this.client.config.endpoint + apiPath);
10205
+ const apiHeaders = {
10206
+ 'X-Appwrite-Project': this.client.config.project,
10207
+ };
10208
+ return this.client.call('get', uri, apiHeaders, payload);
10209
+ }
10108
10210
  listExecutions(paramsOrFirst, ...rest) {
10109
10211
  let params;
10110
10212
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -10114,12 +10216,18 @@
10114
10216
  params = {
10115
10217
  functionId: paramsOrFirst,
10116
10218
  queries: rest[0],
10117
- total: rest[1]
10219
+ total: rest[1],
10220
+ xpath: rest[2],
10221
+ pathMatch: rest[3],
10222
+ method: rest[4]
10118
10223
  };
10119
10224
  }
10120
10225
  const functionId = params.functionId;
10121
10226
  const queries = params.queries;
10122
10227
  const total = params.total;
10228
+ const xpath = params.xpath;
10229
+ const pathMatch = params.pathMatch;
10230
+ const method = params.method;
10123
10231
  if (typeof functionId === 'undefined') {
10124
10232
  throw new AgentbaseException('Missing required parameter: "functionId"');
10125
10233
  }
@@ -10131,6 +10239,15 @@
10131
10239
  if (typeof total !== 'undefined') {
10132
10240
  payload['total'] = total;
10133
10241
  }
10242
+ if (typeof xpath !== 'undefined') {
10243
+ payload['path'] = xpath;
10244
+ }
10245
+ if (typeof pathMatch !== 'undefined') {
10246
+ payload['pathMatch'] = pathMatch;
10247
+ }
10248
+ if (typeof method !== 'undefined') {
10249
+ payload['method'] = method;
10250
+ }
10134
10251
  const uri = new URL(this.client.config.endpoint + apiPath);
10135
10252
  const apiHeaders = {
10136
10253
  'X-Appwrite-Project': this.client.config.project,
@@ -10996,25 +11113,29 @@
10996
11113
  scope: rest[0],
10997
11114
  memoryType: rest[1],
10998
11115
  recordKind: rest[2],
10999
- content: rest[3],
11000
- messages: rest[4],
11001
- agentId: rest[5],
11002
- runId: rest[6],
11003
- sessionId: rest[7],
11004
- sensitivity: rest[8],
11005
- handlingPolicy: rest[9],
11006
- metadata: rest[10],
11007
- infer: rest[11],
11008
- reRemember: rest[12],
11009
- async: rest[13]
11116
+ pipelineId: rest[3],
11117
+ content: rest[4],
11118
+ messages: rest[5],
11119
+ media: rest[6],
11120
+ agentId: rest[7],
11121
+ runId: rest[8],
11122
+ sessionId: rest[9],
11123
+ sensitivity: rest[10],
11124
+ handlingPolicy: rest[11],
11125
+ metadata: rest[12],
11126
+ infer: rest[13],
11127
+ reRemember: rest[14],
11128
+ async: rest[15]
11010
11129
  };
11011
11130
  }
11012
11131
  const userId = params.userId;
11013
11132
  const scope = params.scope;
11014
11133
  const memoryType = params.memoryType;
11015
11134
  const recordKind = params.recordKind;
11135
+ const pipelineId = params.pipelineId;
11016
11136
  const content = params.content;
11017
11137
  const messages = params.messages;
11138
+ const media = params.media;
11018
11139
  const agentId = params.agentId;
11019
11140
  const runId = params.runId;
11020
11141
  const sessionId = params.sessionId;
@@ -11038,12 +11159,18 @@
11038
11159
  }
11039
11160
  const apiPath = '/memory/memories';
11040
11161
  const payload = {};
11162
+ if (typeof pipelineId !== 'undefined') {
11163
+ payload['pipelineId'] = pipelineId;
11164
+ }
11041
11165
  if (typeof content !== 'undefined') {
11042
11166
  payload['content'] = content;
11043
11167
  }
11044
11168
  if (typeof messages !== 'undefined') {
11045
11169
  payload['messages'] = messages;
11046
11170
  }
11171
+ if (typeof media !== 'undefined') {
11172
+ payload['media'] = media;
11173
+ }
11047
11174
  if (typeof userId !== 'undefined') {
11048
11175
  payload['userId'] = userId;
11049
11176
  }
@@ -11098,12 +11225,14 @@
11098
11225
  else {
11099
11226
  params = {
11100
11227
  userId: paramsOrFirst,
11101
- limit: rest[0],
11102
- reason: rest[1],
11103
- source: rest[2]
11228
+ memorySubStoreId: rest[0],
11229
+ limit: rest[1],
11230
+ reason: rest[2],
11231
+ source: rest[3]
11104
11232
  };
11105
11233
  }
11106
11234
  const userId = params.userId;
11235
+ const memorySubStoreId = params.memorySubStoreId;
11107
11236
  const limit = params.limit;
11108
11237
  const reason = params.reason;
11109
11238
  const source = params.source;
@@ -11112,6 +11241,9 @@
11112
11241
  if (typeof userId !== 'undefined') {
11113
11242
  payload['userId'] = userId;
11114
11243
  }
11244
+ if (typeof memorySubStoreId !== 'undefined') {
11245
+ payload['memorySubStoreId'] = memorySubStoreId;
11246
+ }
11115
11247
  if (typeof limit !== 'undefined') {
11116
11248
  payload['limit'] = limit;
11117
11249
  }
@@ -11639,7 +11771,7 @@
11639
11771
  }
11640
11772
  submitDistillation(paramsOrFirst, ...rest) {
11641
11773
  let params;
11642
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scope' in paramsOrFirst || 'userId' in paramsOrFirst || 'agentId' in paramsOrFirst || 'sessionId' in paramsOrFirst || 'runId' in paramsOrFirst || 'memorySubStoreId' in paramsOrFirst || 'sourceId' in paramsOrFirst || 'sourceType' in paramsOrFirst || 'messages' in paramsOrFirst || 'toolEvents' in paramsOrFirst || 'mode' in paramsOrFirst || 'idempotencyKey' in paramsOrFirst))) {
11774
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scope' in paramsOrFirst || 'userId' in paramsOrFirst || 'agentId' in paramsOrFirst || 'sessionId' in paramsOrFirst || 'runId' in paramsOrFirst || 'memorySubStoreId' in paramsOrFirst || 'pipelineId' in paramsOrFirst || 'sourceId' in paramsOrFirst || 'sourceType' in paramsOrFirst || 'messages' in paramsOrFirst || 'toolEvents' in paramsOrFirst || 'mode' in paramsOrFirst || 'idempotencyKey' in paramsOrFirst))) {
11643
11775
  params = (paramsOrFirst || {});
11644
11776
  }
11645
11777
  else {
@@ -11650,12 +11782,13 @@
11650
11782
  sessionId: rest[2],
11651
11783
  runId: rest[3],
11652
11784
  memorySubStoreId: rest[4],
11653
- sourceId: rest[5],
11654
- sourceType: rest[6],
11655
- messages: rest[7],
11656
- toolEvents: rest[8],
11657
- mode: rest[9],
11658
- idempotencyKey: rest[10]
11785
+ pipelineId: rest[5],
11786
+ sourceId: rest[6],
11787
+ sourceType: rest[7],
11788
+ messages: rest[8],
11789
+ toolEvents: rest[9],
11790
+ mode: rest[10],
11791
+ idempotencyKey: rest[11]
11659
11792
  };
11660
11793
  }
11661
11794
  const scope = params.scope;
@@ -11664,6 +11797,7 @@
11664
11797
  const sessionId = params.sessionId;
11665
11798
  const runId = params.runId;
11666
11799
  const memorySubStoreId = params.memorySubStoreId;
11800
+ const pipelineId = params.pipelineId;
11667
11801
  const sourceId = params.sourceId;
11668
11802
  const sourceType = params.sourceType;
11669
11803
  const messages = params.messages;
@@ -11690,6 +11824,9 @@
11690
11824
  if (typeof memorySubStoreId !== 'undefined') {
11691
11825
  payload['memorySubStoreId'] = memorySubStoreId;
11692
11826
  }
11827
+ if (typeof pipelineId !== 'undefined') {
11828
+ payload['pipelineId'] = pipelineId;
11829
+ }
11693
11830
  if (typeof sourceId !== 'undefined') {
11694
11831
  payload['sourceId'] = sourceId;
11695
11832
  }
@@ -12283,13 +12420,15 @@
12283
12420
  else {
12284
12421
  params = {
12285
12422
  userId: paramsOrFirst,
12286
- format: rest[0],
12287
- data: rest[1],
12288
- records: rest[2],
12289
- dryRun: rest[3]
12423
+ pipelineId: rest[0],
12424
+ format: rest[1],
12425
+ data: rest[2],
12426
+ records: rest[3],
12427
+ dryRun: rest[4]
12290
12428
  };
12291
12429
  }
12292
12430
  const userId = params.userId;
12431
+ const pipelineId = params.pipelineId;
12293
12432
  const format = params.format;
12294
12433
  const data = params.data;
12295
12434
  const records = params.records;
@@ -12299,6 +12438,9 @@
12299
12438
  }
12300
12439
  const apiPath = '/memory/memories/imports';
12301
12440
  const payload = {};
12441
+ if (typeof pipelineId !== 'undefined') {
12442
+ payload['pipelineId'] = pipelineId;
12443
+ }
12302
12444
  if (typeof userId !== 'undefined') {
12303
12445
  payload['userId'] = userId;
12304
12446
  }
@@ -12343,6 +12485,125 @@
12343
12485
  };
12344
12486
  return this.client.call('get', uri, apiHeaders, payload);
12345
12487
  }
12488
+ listKnowledgeReviews(paramsOrFirst, ...rest) {
12489
+ let params;
12490
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scope' in paramsOrFirst || 'userId' in paramsOrFirst || 'agentId' in paramsOrFirst || 'sessionId' in paramsOrFirst || 'runId' in paramsOrFirst || 'memorySubStoreId' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'status' in paramsOrFirst || 'knowledgeId' in paramsOrFirst))) {
12491
+ params = (paramsOrFirst || {});
12492
+ }
12493
+ else {
12494
+ params = {
12495
+ scope: paramsOrFirst,
12496
+ userId: rest[0],
12497
+ agentId: rest[1],
12498
+ sessionId: rest[2],
12499
+ runId: rest[3],
12500
+ memorySubStoreId: rest[4],
12501
+ limit: rest[5],
12502
+ offset: rest[6],
12503
+ status: rest[7],
12504
+ knowledgeId: rest[8]
12505
+ };
12506
+ }
12507
+ const scope = params.scope;
12508
+ const userId = params.userId;
12509
+ const agentId = params.agentId;
12510
+ const sessionId = params.sessionId;
12511
+ const runId = params.runId;
12512
+ const memorySubStoreId = params.memorySubStoreId;
12513
+ const limit = params.limit;
12514
+ const offset = params.offset;
12515
+ const status = params.status;
12516
+ const knowledgeId = params.knowledgeId;
12517
+ const apiPath = '/memory/memories/knowledge/reviews';
12518
+ const payload = {};
12519
+ if (typeof scope !== 'undefined') {
12520
+ payload['scope'] = scope;
12521
+ }
12522
+ if (typeof userId !== 'undefined') {
12523
+ payload['userId'] = userId;
12524
+ }
12525
+ if (typeof agentId !== 'undefined') {
12526
+ payload['agentId'] = agentId;
12527
+ }
12528
+ if (typeof sessionId !== 'undefined') {
12529
+ payload['sessionId'] = sessionId;
12530
+ }
12531
+ if (typeof runId !== 'undefined') {
12532
+ payload['runId'] = runId;
12533
+ }
12534
+ if (typeof memorySubStoreId !== 'undefined') {
12535
+ payload['memorySubStoreId'] = memorySubStoreId;
12536
+ }
12537
+ if (typeof limit !== 'undefined') {
12538
+ payload['limit'] = limit;
12539
+ }
12540
+ if (typeof offset !== 'undefined') {
12541
+ payload['offset'] = offset;
12542
+ }
12543
+ if (typeof status !== 'undefined') {
12544
+ payload['status'] = status;
12545
+ }
12546
+ if (typeof knowledgeId !== 'undefined') {
12547
+ payload['knowledgeId'] = knowledgeId;
12548
+ }
12549
+ const uri = new URL(this.client.config.endpoint + apiPath);
12550
+ const apiHeaders = {
12551
+ 'X-Appwrite-Project': this.client.config.project,
12552
+ };
12553
+ return this.client.call('get', uri, apiHeaders, payload);
12554
+ }
12555
+ getKnowledgeReview(paramsOrFirst, ...rest) {
12556
+ let params;
12557
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
12558
+ params = (paramsOrFirst || {});
12559
+ }
12560
+ else {
12561
+ params = {
12562
+ reviewId: paramsOrFirst,
12563
+ scope: rest[0],
12564
+ userId: rest[1],
12565
+ agentId: rest[2],
12566
+ sessionId: rest[3],
12567
+ runId: rest[4],
12568
+ memorySubStoreId: rest[5]
12569
+ };
12570
+ }
12571
+ const reviewId = params.reviewId;
12572
+ const scope = params.scope;
12573
+ const userId = params.userId;
12574
+ const agentId = params.agentId;
12575
+ const sessionId = params.sessionId;
12576
+ const runId = params.runId;
12577
+ const memorySubStoreId = params.memorySubStoreId;
12578
+ if (typeof reviewId === 'undefined') {
12579
+ throw new AgentbaseException('Missing required parameter: "reviewId"');
12580
+ }
12581
+ const apiPath = '/memory/memories/knowledge/reviews/{reviewId}'.replace('{reviewId}', reviewId);
12582
+ const payload = {};
12583
+ if (typeof scope !== 'undefined') {
12584
+ payload['scope'] = scope;
12585
+ }
12586
+ if (typeof userId !== 'undefined') {
12587
+ payload['userId'] = userId;
12588
+ }
12589
+ if (typeof agentId !== 'undefined') {
12590
+ payload['agentId'] = agentId;
12591
+ }
12592
+ if (typeof sessionId !== 'undefined') {
12593
+ payload['sessionId'] = sessionId;
12594
+ }
12595
+ if (typeof runId !== 'undefined') {
12596
+ payload['runId'] = runId;
12597
+ }
12598
+ if (typeof memorySubStoreId !== 'undefined') {
12599
+ payload['memorySubStoreId'] = memorySubStoreId;
12600
+ }
12601
+ const uri = new URL(this.client.config.endpoint + apiPath);
12602
+ const apiHeaders = {
12603
+ 'X-Appwrite-Project': this.client.config.project,
12604
+ };
12605
+ return this.client.call('get', uri, apiHeaders, payload);
12606
+ }
12346
12607
  updateKnowledge(paramsOrFirst, ...rest) {
12347
12608
  let params;
12348
12609
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -12446,10 +12707,193 @@
12446
12707
  if (typeof knowledgeId === 'undefined') {
12447
12708
  throw new AgentbaseException('Missing required parameter: "knowledgeId"');
12448
12709
  }
12449
- if (typeof expectedVersion === 'undefined') {
12450
- throw new AgentbaseException('Missing required parameter: "expectedVersion"');
12451
- }
12452
- const apiPath = '/memory/memories/knowledge/{knowledgeId}'.replace('{knowledgeId}', knowledgeId);
12710
+ if (typeof expectedVersion === 'undefined') {
12711
+ throw new AgentbaseException('Missing required parameter: "expectedVersion"');
12712
+ }
12713
+ const apiPath = '/memory/memories/knowledge/{knowledgeId}'.replace('{knowledgeId}', knowledgeId);
12714
+ const payload = {};
12715
+ if (typeof scope !== 'undefined') {
12716
+ payload['scope'] = scope;
12717
+ }
12718
+ if (typeof userId !== 'undefined') {
12719
+ payload['userId'] = userId;
12720
+ }
12721
+ if (typeof agentId !== 'undefined') {
12722
+ payload['agentId'] = agentId;
12723
+ }
12724
+ if (typeof sessionId !== 'undefined') {
12725
+ payload['sessionId'] = sessionId;
12726
+ }
12727
+ if (typeof runId !== 'undefined') {
12728
+ payload['runId'] = runId;
12729
+ }
12730
+ if (typeof memorySubStoreId !== 'undefined') {
12731
+ payload['memorySubStoreId'] = memorySubStoreId;
12732
+ }
12733
+ if (typeof expectedVersion !== 'undefined') {
12734
+ payload['expectedVersion'] = expectedVersion;
12735
+ }
12736
+ if (typeof reason !== 'undefined') {
12737
+ payload['reason'] = reason;
12738
+ }
12739
+ if (typeof source !== 'undefined') {
12740
+ payload['source'] = source;
12741
+ }
12742
+ const uri = new URL(this.client.config.endpoint + apiPath);
12743
+ const apiHeaders = {
12744
+ 'X-Appwrite-Project': this.client.config.project,
12745
+ 'content-type': 'application/json',
12746
+ };
12747
+ return this.client.call('delete', uri, apiHeaders, payload);
12748
+ }
12749
+ getKnowledgeDiff(paramsOrFirst, ...rest) {
12750
+ let params;
12751
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
12752
+ params = (paramsOrFirst || {});
12753
+ }
12754
+ else {
12755
+ params = {
12756
+ knowledgeId: paramsOrFirst,
12757
+ toRevisionId: rest[0],
12758
+ scope: rest[1],
12759
+ userId: rest[2],
12760
+ agentId: rest[3],
12761
+ sessionId: rest[4],
12762
+ runId: rest[5],
12763
+ memorySubStoreId: rest[6],
12764
+ fromRevisionId: rest[7]
12765
+ };
12766
+ }
12767
+ const knowledgeId = params.knowledgeId;
12768
+ const toRevisionId = params.toRevisionId;
12769
+ const scope = params.scope;
12770
+ const userId = params.userId;
12771
+ const agentId = params.agentId;
12772
+ const sessionId = params.sessionId;
12773
+ const runId = params.runId;
12774
+ const memorySubStoreId = params.memorySubStoreId;
12775
+ const fromRevisionId = params.fromRevisionId;
12776
+ if (typeof knowledgeId === 'undefined') {
12777
+ throw new AgentbaseException('Missing required parameter: "knowledgeId"');
12778
+ }
12779
+ if (typeof toRevisionId === 'undefined') {
12780
+ throw new AgentbaseException('Missing required parameter: "toRevisionId"');
12781
+ }
12782
+ const apiPath = '/memory/memories/knowledge/{knowledgeId}/diff'.replace('{knowledgeId}', knowledgeId);
12783
+ const payload = {};
12784
+ if (typeof scope !== 'undefined') {
12785
+ payload['scope'] = scope;
12786
+ }
12787
+ if (typeof userId !== 'undefined') {
12788
+ payload['userId'] = userId;
12789
+ }
12790
+ if (typeof agentId !== 'undefined') {
12791
+ payload['agentId'] = agentId;
12792
+ }
12793
+ if (typeof sessionId !== 'undefined') {
12794
+ payload['sessionId'] = sessionId;
12795
+ }
12796
+ if (typeof runId !== 'undefined') {
12797
+ payload['runId'] = runId;
12798
+ }
12799
+ if (typeof memorySubStoreId !== 'undefined') {
12800
+ payload['memorySubStoreId'] = memorySubStoreId;
12801
+ }
12802
+ if (typeof fromRevisionId !== 'undefined') {
12803
+ payload['fromRevisionId'] = fromRevisionId;
12804
+ }
12805
+ if (typeof toRevisionId !== 'undefined') {
12806
+ payload['toRevisionId'] = toRevisionId;
12807
+ }
12808
+ const uri = new URL(this.client.config.endpoint + apiPath);
12809
+ const apiHeaders = {
12810
+ 'X-Appwrite-Project': this.client.config.project,
12811
+ };
12812
+ return this.client.call('get', uri, apiHeaders, payload);
12813
+ }
12814
+ listKnowledgeEvents(paramsOrFirst, ...rest) {
12815
+ let params;
12816
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
12817
+ params = (paramsOrFirst || {});
12818
+ }
12819
+ else {
12820
+ params = {
12821
+ knowledgeId: paramsOrFirst,
12822
+ scope: rest[0],
12823
+ userId: rest[1],
12824
+ agentId: rest[2],
12825
+ sessionId: rest[3],
12826
+ runId: rest[4],
12827
+ memorySubStoreId: rest[5]
12828
+ };
12829
+ }
12830
+ const knowledgeId = params.knowledgeId;
12831
+ const scope = params.scope;
12832
+ const userId = params.userId;
12833
+ const agentId = params.agentId;
12834
+ const sessionId = params.sessionId;
12835
+ const runId = params.runId;
12836
+ const memorySubStoreId = params.memorySubStoreId;
12837
+ if (typeof knowledgeId === 'undefined') {
12838
+ throw new AgentbaseException('Missing required parameter: "knowledgeId"');
12839
+ }
12840
+ const apiPath = '/memory/memories/knowledge/{knowledgeId}/events'.replace('{knowledgeId}', knowledgeId);
12841
+ const payload = {};
12842
+ if (typeof scope !== 'undefined') {
12843
+ payload['scope'] = scope;
12844
+ }
12845
+ if (typeof userId !== 'undefined') {
12846
+ payload['userId'] = userId;
12847
+ }
12848
+ if (typeof agentId !== 'undefined') {
12849
+ payload['agentId'] = agentId;
12850
+ }
12851
+ if (typeof sessionId !== 'undefined') {
12852
+ payload['sessionId'] = sessionId;
12853
+ }
12854
+ if (typeof runId !== 'undefined') {
12855
+ payload['runId'] = runId;
12856
+ }
12857
+ if (typeof memorySubStoreId !== 'undefined') {
12858
+ payload['memorySubStoreId'] = memorySubStoreId;
12859
+ }
12860
+ const uri = new URL(this.client.config.endpoint + apiPath);
12861
+ const apiHeaders = {
12862
+ 'X-Appwrite-Project': this.client.config.project,
12863
+ };
12864
+ return this.client.call('get', uri, apiHeaders, payload);
12865
+ }
12866
+ listKnowledgeRevisions(paramsOrFirst, ...rest) {
12867
+ let params;
12868
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
12869
+ params = (paramsOrFirst || {});
12870
+ }
12871
+ else {
12872
+ params = {
12873
+ knowledgeId: paramsOrFirst,
12874
+ scope: rest[0],
12875
+ userId: rest[1],
12876
+ agentId: rest[2],
12877
+ sessionId: rest[3],
12878
+ runId: rest[4],
12879
+ memorySubStoreId: rest[5],
12880
+ limit: rest[6],
12881
+ offset: rest[7]
12882
+ };
12883
+ }
12884
+ const knowledgeId = params.knowledgeId;
12885
+ const scope = params.scope;
12886
+ const userId = params.userId;
12887
+ const agentId = params.agentId;
12888
+ const sessionId = params.sessionId;
12889
+ const runId = params.runId;
12890
+ const memorySubStoreId = params.memorySubStoreId;
12891
+ const limit = params.limit;
12892
+ const offset = params.offset;
12893
+ if (typeof knowledgeId === 'undefined') {
12894
+ throw new AgentbaseException('Missing required parameter: "knowledgeId"');
12895
+ }
12896
+ const apiPath = '/memory/memories/knowledge/{knowledgeId}/revisions'.replace('{knowledgeId}', knowledgeId);
12453
12897
  const payload = {};
12454
12898
  if (typeof scope !== 'undefined') {
12455
12899
  payload['scope'] = scope;
@@ -12469,21 +12913,17 @@
12469
12913
  if (typeof memorySubStoreId !== 'undefined') {
12470
12914
  payload['memorySubStoreId'] = memorySubStoreId;
12471
12915
  }
12472
- if (typeof expectedVersion !== 'undefined') {
12473
- payload['expectedVersion'] = expectedVersion;
12474
- }
12475
- if (typeof reason !== 'undefined') {
12476
- payload['reason'] = reason;
12916
+ if (typeof limit !== 'undefined') {
12917
+ payload['limit'] = limit;
12477
12918
  }
12478
- if (typeof source !== 'undefined') {
12479
- payload['source'] = source;
12919
+ if (typeof offset !== 'undefined') {
12920
+ payload['offset'] = offset;
12480
12921
  }
12481
12922
  const uri = new URL(this.client.config.endpoint + apiPath);
12482
12923
  const apiHeaders = {
12483
12924
  'X-Appwrite-Project': this.client.config.project,
12484
- 'content-type': 'application/json',
12485
12925
  };
12486
- return this.client.call('delete', uri, apiHeaders, payload);
12926
+ return this.client.call('get', uri, apiHeaders, payload);
12487
12927
  }
12488
12928
  createKnowledgeObservation(paramsOrFirst, ...rest) {
12489
12929
  let params;
@@ -12713,7 +13153,7 @@
12713
13153
  }
12714
13154
  search(paramsOrFirst, ...rest) {
12715
13155
  let params;
12716
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13156
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
12717
13157
  params = (paramsOrFirst || {});
12718
13158
  }
12719
13159
  else {
@@ -12721,25 +13161,27 @@
12721
13161
  query: paramsOrFirst,
12722
13162
  searchMode: rest[0],
12723
13163
  retrieval: rest[1],
12724
- userId: rest[2],
12725
- agentId: rest[3],
12726
- runId: rest[4],
12727
- scope: rest[5],
12728
- memoryType: rest[6],
12729
- recordKind: rest[7],
12730
- filter: rest[8],
12731
- limit: rest[9],
12732
- cursor: rest[10],
12733
- sort: rest[11],
12734
- memorySubStoreId: rest[12],
12735
- sessionId: rest[13],
12736
- groupId: rest[14],
12737
- accessMode: rest[15]
13164
+ media: rest[2],
13165
+ userId: rest[3],
13166
+ agentId: rest[4],
13167
+ runId: rest[5],
13168
+ scope: rest[6],
13169
+ memoryType: rest[7],
13170
+ recordKind: rest[8],
13171
+ filter: rest[9],
13172
+ limit: rest[10],
13173
+ cursor: rest[11],
13174
+ sort: rest[12],
13175
+ memorySubStoreId: rest[13],
13176
+ sessionId: rest[14],
13177
+ groupId: rest[15],
13178
+ accessMode: rest[16]
12738
13179
  };
12739
13180
  }
12740
13181
  const query = params.query;
12741
13182
  const searchMode = params.searchMode;
12742
13183
  const retrieval = params.retrieval;
13184
+ const media = params.media;
12743
13185
  const userId = params.userId;
12744
13186
  const agentId = params.agentId;
12745
13187
  const runId = params.runId;
@@ -12754,9 +13196,6 @@
12754
13196
  const sessionId = params.sessionId;
12755
13197
  const groupId = params.groupId;
12756
13198
  const accessMode = params.accessMode;
12757
- if (typeof query === 'undefined') {
12758
- throw new AgentbaseException('Missing required parameter: "query"');
12759
- }
12760
13199
  const apiPath = '/memory/memories/search';
12761
13200
  const payload = {};
12762
13201
  if (typeof query !== 'undefined') {
@@ -12768,6 +13207,9 @@
12768
13207
  if (typeof retrieval !== 'undefined') {
12769
13208
  payload['retrieval'] = retrieval;
12770
13209
  }
13210
+ if (typeof media !== 'undefined') {
13211
+ payload['media'] = media;
13212
+ }
12771
13213
  if (typeof userId !== 'undefined') {
12772
13214
  payload['userId'] = userId;
12773
13215
  }
@@ -13177,14 +13619,16 @@
13177
13619
  else {
13178
13620
  params = {
13179
13621
  userId: paramsOrFirst,
13180
- profileType: rest[0],
13181
- messages: rest[1],
13182
- sourceMemoryIds: rest[2],
13183
- sessionId: rest[3],
13184
- mode: rest[4]
13622
+ pipelineId: rest[0],
13623
+ profileType: rest[1],
13624
+ messages: rest[2],
13625
+ sourceMemoryIds: rest[3],
13626
+ sessionId: rest[4],
13627
+ mode: rest[5]
13185
13628
  };
13186
13629
  }
13187
13630
  const userId = params.userId;
13631
+ const pipelineId = params.pipelineId;
13188
13632
  const profileType = params.profileType;
13189
13633
  const messages = params.messages;
13190
13634
  const sourceMemoryIds = params.sourceMemoryIds;
@@ -13195,6 +13639,9 @@
13195
13639
  }
13196
13640
  const apiPath = '/memory/memories/users/{userId}/profile/extractions'.replace('{userId}', userId);
13197
13641
  const payload = {};
13642
+ if (typeof pipelineId !== 'undefined') {
13643
+ payload['pipelineId'] = pipelineId;
13644
+ }
13198
13645
  if (typeof profileType !== 'undefined') {
13199
13646
  payload['profileType'] = profileType;
13200
13647
  }
@@ -13225,16 +13672,21 @@
13225
13672
  else {
13226
13673
  params = {
13227
13674
  userId: paramsOrFirst,
13228
- profileType: rest[0]
13675
+ pipelineId: rest[0],
13676
+ profileType: rest[1]
13229
13677
  };
13230
13678
  }
13231
13679
  const userId = params.userId;
13680
+ const pipelineId = params.pipelineId;
13232
13681
  const profileType = params.profileType;
13233
13682
  if (typeof userId === 'undefined') {
13234
13683
  throw new AgentbaseException('Missing required parameter: "userId"');
13235
13684
  }
13236
13685
  const apiPath = '/memory/memories/users/{userId}/profile/rebuild'.replace('{userId}', userId);
13237
13686
  const payload = {};
13687
+ if (typeof pipelineId !== 'undefined') {
13688
+ payload['pipelineId'] = pipelineId;
13689
+ }
13238
13690
  if (typeof profileType !== 'undefined') {
13239
13691
  payload['profileType'] = profileType;
13240
13692
  }
@@ -13348,11 +13800,13 @@
13348
13800
  else {
13349
13801
  params = {
13350
13802
  memoryId: paramsOrFirst,
13351
- reason: rest[0],
13352
- source: rest[1]
13803
+ memorySubStoreId: rest[0],
13804
+ reason: rest[1],
13805
+ source: rest[2]
13353
13806
  };
13354
13807
  }
13355
13808
  const memoryId = params.memoryId;
13809
+ const memorySubStoreId = params.memorySubStoreId;
13356
13810
  const reason = params.reason;
13357
13811
  const source = params.source;
13358
13812
  if (typeof memoryId === 'undefined') {
@@ -13360,6 +13814,9 @@
13360
13814
  }
13361
13815
  const apiPath = '/memory/memories/{memoryId}'.replace('{memoryId}', memoryId);
13362
13816
  const payload = {};
13817
+ if (typeof memorySubStoreId !== 'undefined') {
13818
+ payload['memorySubStoreId'] = memorySubStoreId;
13819
+ }
13363
13820
  if (typeof reason !== 'undefined') {
13364
13821
  payload['reason'] = reason;
13365
13822
  }
@@ -13499,6 +13956,340 @@
13499
13956
  };
13500
13957
  return this.client.call('get', uri, apiHeaders, payload);
13501
13958
  }
13959
+ listPipelines(paramsOrFirst) {
13960
+ let params;
13961
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst))) {
13962
+ params = (paramsOrFirst || {});
13963
+ }
13964
+ else {
13965
+ params = {
13966
+ scenario: paramsOrFirst
13967
+ };
13968
+ }
13969
+ const scenario = params.scenario;
13970
+ const apiPath = '/memory/pipelines';
13971
+ const payload = {};
13972
+ if (typeof scenario !== 'undefined') {
13973
+ payload['scenario'] = scenario;
13974
+ }
13975
+ const uri = new URL(this.client.config.endpoint + apiPath);
13976
+ const apiHeaders = {
13977
+ 'X-Appwrite-Project': this.client.config.project,
13978
+ };
13979
+ return this.client.call('get', uri, apiHeaders, payload);
13980
+ }
13981
+ createPipeline(paramsOrFirst, ...rest) {
13982
+ let params;
13983
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst || 'fromDefaults' in paramsOrFirst || 'config' in paramsOrFirst))) {
13984
+ params = (paramsOrFirst || {});
13985
+ }
13986
+ else {
13987
+ params = {
13988
+ scenario: paramsOrFirst,
13989
+ fromDefaults: rest[0],
13990
+ config: rest[1]
13991
+ };
13992
+ }
13993
+ const scenario = params.scenario;
13994
+ const fromDefaults = params.fromDefaults;
13995
+ const config = params.config;
13996
+ const apiPath = '/memory/pipelines';
13997
+ const payload = {};
13998
+ if (typeof scenario !== 'undefined') {
13999
+ payload['scenario'] = scenario;
14000
+ }
14001
+ if (typeof fromDefaults !== 'undefined') {
14002
+ payload['fromDefaults'] = fromDefaults;
14003
+ }
14004
+ if (typeof config !== 'undefined') {
14005
+ payload['config'] = config;
14006
+ }
14007
+ const uri = new URL(this.client.config.endpoint + apiPath);
14008
+ const apiHeaders = {
14009
+ 'X-Appwrite-Project': this.client.config.project,
14010
+ 'content-type': 'application/json',
14011
+ };
14012
+ return this.client.call('post', uri, apiHeaders, payload);
14013
+ }
14014
+ setDefaultPipeline(paramsOrFirst, ...rest) {
14015
+ let params;
14016
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst || 'pipelineId' in paramsOrFirst || 'expectedRevision' in paramsOrFirst))) {
14017
+ params = (paramsOrFirst || {});
14018
+ }
14019
+ else {
14020
+ params = {
14021
+ scenario: paramsOrFirst,
14022
+ pipelineId: rest[0],
14023
+ expectedRevision: rest[1]
14024
+ };
14025
+ }
14026
+ const scenario = params.scenario;
14027
+ const pipelineId = params.pipelineId;
14028
+ const expectedRevision = params.expectedRevision;
14029
+ const apiPath = '/memory/pipelines/default';
14030
+ const payload = {};
14031
+ if (typeof scenario !== 'undefined') {
14032
+ payload['scenario'] = scenario;
14033
+ }
14034
+ if (typeof pipelineId !== 'undefined') {
14035
+ payload['pipelineId'] = pipelineId;
14036
+ }
14037
+ if (typeof expectedRevision !== 'undefined') {
14038
+ payload['expectedRevision'] = expectedRevision;
14039
+ }
14040
+ const uri = new URL(this.client.config.endpoint + apiPath);
14041
+ const apiHeaders = {
14042
+ 'X-Appwrite-Project': this.client.config.project,
14043
+ 'content-type': 'application/json',
14044
+ };
14045
+ return this.client.call('put', uri, apiHeaders, payload);
14046
+ }
14047
+ getPipeline(paramsOrFirst) {
14048
+ let params;
14049
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14050
+ params = (paramsOrFirst || {});
14051
+ }
14052
+ else {
14053
+ params = {
14054
+ pipelineId: paramsOrFirst
14055
+ };
14056
+ }
14057
+ const pipelineId = params.pipelineId;
14058
+ if (typeof pipelineId === 'undefined') {
14059
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
14060
+ }
14061
+ const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
14062
+ const payload = {};
14063
+ const uri = new URL(this.client.config.endpoint + apiPath);
14064
+ const apiHeaders = {
14065
+ 'X-Appwrite-Project': this.client.config.project,
14066
+ };
14067
+ return this.client.call('get', uri, apiHeaders, payload);
14068
+ }
14069
+ updatePipeline(paramsOrFirst, ...rest) {
14070
+ let params;
14071
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14072
+ params = (paramsOrFirst || {});
14073
+ }
14074
+ else {
14075
+ params = {
14076
+ pipelineId: paramsOrFirst,
14077
+ expectedRevision: rest[0],
14078
+ config: rest[1]
14079
+ };
14080
+ }
14081
+ const pipelineId = params.pipelineId;
14082
+ const expectedRevision = params.expectedRevision;
14083
+ const config = params.config;
14084
+ if (typeof pipelineId === 'undefined') {
14085
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
14086
+ }
14087
+ if (typeof expectedRevision === 'undefined') {
14088
+ throw new AgentbaseException('Missing required parameter: "expectedRevision"');
14089
+ }
14090
+ if (typeof config === 'undefined') {
14091
+ throw new AgentbaseException('Missing required parameter: "config"');
14092
+ }
14093
+ const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
14094
+ const payload = {};
14095
+ if (typeof expectedRevision !== 'undefined') {
14096
+ payload['expectedRevision'] = expectedRevision;
14097
+ }
14098
+ if (typeof config !== 'undefined') {
14099
+ payload['config'] = config;
14100
+ }
14101
+ const uri = new URL(this.client.config.endpoint + apiPath);
14102
+ const apiHeaders = {
14103
+ 'X-Appwrite-Project': this.client.config.project,
14104
+ 'content-type': 'application/json',
14105
+ };
14106
+ return this.client.call('patch', uri, apiHeaders, payload);
14107
+ }
14108
+ deletePipeline(paramsOrFirst, ...rest) {
14109
+ let params;
14110
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14111
+ params = (paramsOrFirst || {});
14112
+ }
14113
+ else {
14114
+ params = {
14115
+ pipelineId: paramsOrFirst,
14116
+ expectedRevision: rest[0]
14117
+ };
14118
+ }
14119
+ const pipelineId = params.pipelineId;
14120
+ const expectedRevision = params.expectedRevision;
14121
+ if (typeof pipelineId === 'undefined') {
14122
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
14123
+ }
14124
+ if (typeof expectedRevision === 'undefined') {
14125
+ throw new AgentbaseException('Missing required parameter: "expectedRevision"');
14126
+ }
14127
+ const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
14128
+ const payload = {};
14129
+ if (typeof expectedRevision !== 'undefined') {
14130
+ payload['expectedRevision'] = expectedRevision;
14131
+ }
14132
+ const uri = new URL(this.client.config.endpoint + apiPath);
14133
+ const apiHeaders = {
14134
+ 'X-Appwrite-Project': this.client.config.project,
14135
+ 'content-type': 'application/json',
14136
+ };
14137
+ return this.client.call('delete', uri, apiHeaders, payload);
14138
+ }
14139
+ publishPipeline(paramsOrFirst, ...rest) {
14140
+ let params;
14141
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14142
+ params = (paramsOrFirst || {});
14143
+ }
14144
+ else {
14145
+ params = {
14146
+ pipelineId: paramsOrFirst,
14147
+ versionId: rest[0],
14148
+ expectedRevision: rest[1],
14149
+ makeDefault: rest[2]
14150
+ };
14151
+ }
14152
+ const pipelineId = params.pipelineId;
14153
+ const versionId = params.versionId;
14154
+ const expectedRevision = params.expectedRevision;
14155
+ const makeDefault = params.makeDefault;
14156
+ if (typeof pipelineId === 'undefined') {
14157
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
14158
+ }
14159
+ if (typeof versionId === 'undefined') {
14160
+ throw new AgentbaseException('Missing required parameter: "versionId"');
14161
+ }
14162
+ if (typeof expectedRevision === 'undefined') {
14163
+ throw new AgentbaseException('Missing required parameter: "expectedRevision"');
14164
+ }
14165
+ const apiPath = '/memory/pipelines/{pipelineId}/publish'.replace('{pipelineId}', pipelineId);
14166
+ const payload = {};
14167
+ if (typeof versionId !== 'undefined') {
14168
+ payload['versionId'] = versionId;
14169
+ }
14170
+ if (typeof expectedRevision !== 'undefined') {
14171
+ payload['expectedRevision'] = expectedRevision;
14172
+ }
14173
+ if (typeof makeDefault !== 'undefined') {
14174
+ payload['makeDefault'] = makeDefault;
14175
+ }
14176
+ const uri = new URL(this.client.config.endpoint + apiPath);
14177
+ const apiHeaders = {
14178
+ 'X-Appwrite-Project': this.client.config.project,
14179
+ 'content-type': 'application/json',
14180
+ };
14181
+ return this.client.call('post', uri, apiHeaders, payload);
14182
+ }
14183
+ rollbackPipeline(paramsOrFirst, ...rest) {
14184
+ let params;
14185
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14186
+ params = (paramsOrFirst || {});
14187
+ }
14188
+ else {
14189
+ params = {
14190
+ pipelineId: paramsOrFirst,
14191
+ versionId: rest[0],
14192
+ expectedRevision: rest[1]
14193
+ };
14194
+ }
14195
+ const pipelineId = params.pipelineId;
14196
+ const versionId = params.versionId;
14197
+ const expectedRevision = params.expectedRevision;
14198
+ if (typeof pipelineId === 'undefined') {
14199
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
14200
+ }
14201
+ if (typeof versionId === 'undefined') {
14202
+ throw new AgentbaseException('Missing required parameter: "versionId"');
14203
+ }
14204
+ if (typeof expectedRevision === 'undefined') {
14205
+ throw new AgentbaseException('Missing required parameter: "expectedRevision"');
14206
+ }
14207
+ const apiPath = '/memory/pipelines/{pipelineId}/rollback'.replace('{pipelineId}', pipelineId);
14208
+ const payload = {};
14209
+ if (typeof versionId !== 'undefined') {
14210
+ payload['versionId'] = versionId;
14211
+ }
14212
+ if (typeof expectedRevision !== 'undefined') {
14213
+ payload['expectedRevision'] = expectedRevision;
14214
+ }
14215
+ const uri = new URL(this.client.config.endpoint + apiPath);
14216
+ const apiHeaders = {
14217
+ 'X-Appwrite-Project': this.client.config.project,
14218
+ 'content-type': 'application/json',
14219
+ };
14220
+ return this.client.call('post', uri, apiHeaders, payload);
14221
+ }
14222
+ validatePipeline(paramsOrFirst, ...rest) {
14223
+ let params;
14224
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14225
+ params = (paramsOrFirst || {});
14226
+ }
14227
+ else {
14228
+ params = {
14229
+ pipelineId: paramsOrFirst,
14230
+ versionId: rest[0],
14231
+ data: rest[1]
14232
+ };
14233
+ }
14234
+ const pipelineId = params.pipelineId;
14235
+ const versionId = params.versionId;
14236
+ const data = params.data;
14237
+ if (typeof pipelineId === 'undefined') {
14238
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
14239
+ }
14240
+ if (typeof versionId === 'undefined') {
14241
+ throw new AgentbaseException('Missing required parameter: "versionId"');
14242
+ }
14243
+ if (typeof data === 'undefined') {
14244
+ throw new AgentbaseException('Missing required parameter: "data"');
14245
+ }
14246
+ const apiPath = '/memory/pipelines/{pipelineId}/validate'.replace('{pipelineId}', pipelineId);
14247
+ const payload = {};
14248
+ if (typeof versionId !== 'undefined') {
14249
+ payload['versionId'] = versionId;
14250
+ }
14251
+ if (typeof data !== 'undefined') {
14252
+ payload['data'] = data;
14253
+ }
14254
+ const uri = new URL(this.client.config.endpoint + apiPath);
14255
+ const apiHeaders = {
14256
+ 'X-Appwrite-Project': this.client.config.project,
14257
+ 'content-type': 'application/json',
14258
+ };
14259
+ return this.client.call('post', uri, apiHeaders, payload);
14260
+ }
14261
+ listPipelineVersions(paramsOrFirst, ...rest) {
14262
+ let params;
14263
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14264
+ params = (paramsOrFirst || {});
14265
+ }
14266
+ else {
14267
+ params = {
14268
+ pipelineId: paramsOrFirst,
14269
+ versionId: rest[0],
14270
+ beforeRevision: rest[1]
14271
+ };
14272
+ }
14273
+ const pipelineId = params.pipelineId;
14274
+ const versionId = params.versionId;
14275
+ const beforeRevision = params.beforeRevision;
14276
+ if (typeof pipelineId === 'undefined') {
14277
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
14278
+ }
14279
+ const apiPath = '/memory/pipelines/{pipelineId}/versions'.replace('{pipelineId}', pipelineId);
14280
+ const payload = {};
14281
+ if (typeof versionId !== 'undefined') {
14282
+ payload['versionId'] = versionId;
14283
+ }
14284
+ if (typeof beforeRevision !== 'undefined') {
14285
+ payload['beforeRevision'] = beforeRevision;
14286
+ }
14287
+ const uri = new URL(this.client.config.endpoint + apiPath);
14288
+ const apiHeaders = {
14289
+ 'X-Appwrite-Project': this.client.config.project,
14290
+ };
14291
+ return this.client.call('get', uri, apiHeaders, payload);
14292
+ }
13502
14293
  }
13503
14294
 
13504
14295
  class Messaging {
@@ -17214,6 +18005,10 @@
17214
18005
  Status["PartialFailed"] = "partial_failed";
17215
18006
  Status["Failed"] = "failed";
17216
18007
  Status["Dead"] = "dead";
18008
+ Status["Pending"] = "pending";
18009
+ Status["Approved"] = "approved";
18010
+ Status["Rejected"] = "rejected";
18011
+ Status["Superseded"] = "superseded";
17217
18012
  })(exports.Status || (exports.Status = {}));
17218
18013
 
17219
18014
  exports.Browser = void 0;
@@ -17918,6 +18713,23 @@
17918
18713
  ImageFormat["Gif"] = "gif";
17919
18714
  })(exports.ImageFormat || (exports.ImageFormat = {}));
17920
18715
 
18716
+ exports.PathMatch = void 0;
18717
+ (function (PathMatch) {
18718
+ PathMatch["Exact"] = "exact";
18719
+ PathMatch["Regex"] = "regex";
18720
+ })(exports.PathMatch || (exports.PathMatch = {}));
18721
+
18722
+ exports.Method = void 0;
18723
+ (function (Method) {
18724
+ Method["GET"] = "GET";
18725
+ Method["POST"] = "POST";
18726
+ Method["PUT"] = "PUT";
18727
+ Method["PATCH"] = "PATCH";
18728
+ Method["DELETE"] = "DELETE";
18729
+ Method["OPTIONS"] = "OPTIONS";
18730
+ Method["HEAD"] = "HEAD";
18731
+ })(exports.Method || (exports.Method = {}));
18732
+
17921
18733
  exports.ExecutionMethod = void 0;
17922
18734
  (function (ExecutionMethod) {
17923
18735
  ExecutionMethod["GET"] = "GET";
@@ -18073,6 +18885,14 @@
18073
18885
  MemoryShareSubjectType["Group"] = "group";
18074
18886
  })(exports.MemoryShareSubjectType || (exports.MemoryShareSubjectType = {}));
18075
18887
 
18888
+ exports.Scenario = void 0;
18889
+ (function (Scenario) {
18890
+ Scenario["AddMemory"] = "add_memory";
18891
+ Scenario["Profile"] = "profile";
18892
+ Scenario["Distillation"] = "distillation";
18893
+ Scenario["Forgetting"] = "forgetting";
18894
+ })(exports.Scenario || (exports.Scenario = {}));
18895
+
18076
18896
  exports.OrganizationRole = void 0;
18077
18897
  (function (OrganizationRole) {
18078
18898
  OrganizationRole["Owner"] = "owner";