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/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.9.0',
4415
+ 'x-sdk-version': '2.10.0',
4416
4416
  'X-AppBase-SDK': 'true',
4417
- 'X-Appwrite-Response-Format': '2.9.0',
4417
+ 'X-Appwrite-Response-Format': '2.10.0',
4418
4418
  };
4419
4419
  this.realtime = {
4420
4420
  socket: undefined,
@@ -10115,13 +10115,19 @@
10115
10115
  functionId: paramsOrFirst,
10116
10116
  limit: rest[0],
10117
10117
  offset: rest[1],
10118
- total: rest[2]
10118
+ total: rest[2],
10119
+ xpath: rest[3],
10120
+ pathMatch: rest[4],
10121
+ method: rest[5]
10119
10122
  };
10120
10123
  }
10121
10124
  const functionId = params.functionId;
10122
10125
  const limit = params.limit;
10123
10126
  const offset = params.offset;
10124
10127
  const total = params.total;
10128
+ const xpath = params.xpath;
10129
+ const pathMatch = params.pathMatch;
10130
+ const method = params.method;
10125
10131
  if (typeof functionId === 'undefined') {
10126
10132
  throw new AgentbaseException('Missing required parameter: "functionId"');
10127
10133
  }
@@ -10136,6 +10142,15 @@
10136
10142
  if (typeof total !== 'undefined') {
10137
10143
  payload['total'] = total;
10138
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
+ }
10139
10154
  const uri = new URL(this.client.config.endpoint + apiPath);
10140
10155
  const apiHeaders = {
10141
10156
  'X-Appwrite-Project': this.client.config.project,
@@ -10152,13 +10167,17 @@
10152
10167
  functionId: paramsOrFirst,
10153
10168
  xpath: rest[0],
10154
10169
  queries: rest[1],
10155
- total: rest[2]
10170
+ total: rest[2],
10171
+ pathMatch: rest[3],
10172
+ method: rest[4]
10156
10173
  };
10157
10174
  }
10158
10175
  const functionId = params.functionId;
10159
10176
  const xpath = params.xpath;
10160
10177
  const queries = params.queries;
10161
10178
  const total = params.total;
10179
+ const pathMatch = params.pathMatch;
10180
+ const method = params.method;
10162
10181
  if (typeof functionId === 'undefined') {
10163
10182
  throw new AgentbaseException('Missing required parameter: "functionId"');
10164
10183
  }
@@ -10176,6 +10195,12 @@
10176
10195
  if (typeof total !== 'undefined') {
10177
10196
  payload['total'] = total;
10178
10197
  }
10198
+ if (typeof pathMatch !== 'undefined') {
10199
+ payload['pathMatch'] = pathMatch;
10200
+ }
10201
+ if (typeof method !== 'undefined') {
10202
+ payload['method'] = method;
10203
+ }
10179
10204
  const uri = new URL(this.client.config.endpoint + apiPath);
10180
10205
  const apiHeaders = {
10181
10206
  'X-Appwrite-Project': this.client.config.project,
@@ -10191,12 +10216,18 @@
10191
10216
  params = {
10192
10217
  functionId: paramsOrFirst,
10193
10218
  queries: rest[0],
10194
- total: rest[1]
10219
+ total: rest[1],
10220
+ xpath: rest[2],
10221
+ pathMatch: rest[3],
10222
+ method: rest[4]
10195
10223
  };
10196
10224
  }
10197
10225
  const functionId = params.functionId;
10198
10226
  const queries = params.queries;
10199
10227
  const total = params.total;
10228
+ const xpath = params.xpath;
10229
+ const pathMatch = params.pathMatch;
10230
+ const method = params.method;
10200
10231
  if (typeof functionId === 'undefined') {
10201
10232
  throw new AgentbaseException('Missing required parameter: "functionId"');
10202
10233
  }
@@ -10208,6 +10239,15 @@
10208
10239
  if (typeof total !== 'undefined') {
10209
10240
  payload['total'] = total;
10210
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
+ }
10211
10251
  const uri = new URL(this.client.config.endpoint + apiPath);
10212
10252
  const apiHeaders = {
10213
10253
  'X-Appwrite-Project': this.client.config.project,
@@ -11073,25 +11113,29 @@
11073
11113
  scope: rest[0],
11074
11114
  memoryType: rest[1],
11075
11115
  recordKind: rest[2],
11076
- content: rest[3],
11077
- messages: rest[4],
11078
- agentId: rest[5],
11079
- runId: rest[6],
11080
- sessionId: rest[7],
11081
- sensitivity: rest[8],
11082
- handlingPolicy: rest[9],
11083
- metadata: rest[10],
11084
- infer: rest[11],
11085
- reRemember: rest[12],
11086
- 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]
11087
11129
  };
11088
11130
  }
11089
11131
  const userId = params.userId;
11090
11132
  const scope = params.scope;
11091
11133
  const memoryType = params.memoryType;
11092
11134
  const recordKind = params.recordKind;
11135
+ const pipelineId = params.pipelineId;
11093
11136
  const content = params.content;
11094
11137
  const messages = params.messages;
11138
+ const media = params.media;
11095
11139
  const agentId = params.agentId;
11096
11140
  const runId = params.runId;
11097
11141
  const sessionId = params.sessionId;
@@ -11115,12 +11159,18 @@
11115
11159
  }
11116
11160
  const apiPath = '/memory/memories';
11117
11161
  const payload = {};
11162
+ if (typeof pipelineId !== 'undefined') {
11163
+ payload['pipelineId'] = pipelineId;
11164
+ }
11118
11165
  if (typeof content !== 'undefined') {
11119
11166
  payload['content'] = content;
11120
11167
  }
11121
11168
  if (typeof messages !== 'undefined') {
11122
11169
  payload['messages'] = messages;
11123
11170
  }
11171
+ if (typeof media !== 'undefined') {
11172
+ payload['media'] = media;
11173
+ }
11124
11174
  if (typeof userId !== 'undefined') {
11125
11175
  payload['userId'] = userId;
11126
11176
  }
@@ -11175,12 +11225,14 @@
11175
11225
  else {
11176
11226
  params = {
11177
11227
  userId: paramsOrFirst,
11178
- limit: rest[0],
11179
- reason: rest[1],
11180
- source: rest[2]
11228
+ memorySubStoreId: rest[0],
11229
+ limit: rest[1],
11230
+ reason: rest[2],
11231
+ source: rest[3]
11181
11232
  };
11182
11233
  }
11183
11234
  const userId = params.userId;
11235
+ const memorySubStoreId = params.memorySubStoreId;
11184
11236
  const limit = params.limit;
11185
11237
  const reason = params.reason;
11186
11238
  const source = params.source;
@@ -11189,6 +11241,9 @@
11189
11241
  if (typeof userId !== 'undefined') {
11190
11242
  payload['userId'] = userId;
11191
11243
  }
11244
+ if (typeof memorySubStoreId !== 'undefined') {
11245
+ payload['memorySubStoreId'] = memorySubStoreId;
11246
+ }
11192
11247
  if (typeof limit !== 'undefined') {
11193
11248
  payload['limit'] = limit;
11194
11249
  }
@@ -11716,7 +11771,7 @@
11716
11771
  }
11717
11772
  submitDistillation(paramsOrFirst, ...rest) {
11718
11773
  let params;
11719
- 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))) {
11720
11775
  params = (paramsOrFirst || {});
11721
11776
  }
11722
11777
  else {
@@ -11727,12 +11782,13 @@
11727
11782
  sessionId: rest[2],
11728
11783
  runId: rest[3],
11729
11784
  memorySubStoreId: rest[4],
11730
- sourceId: rest[5],
11731
- sourceType: rest[6],
11732
- messages: rest[7],
11733
- toolEvents: rest[8],
11734
- mode: rest[9],
11735
- 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]
11736
11792
  };
11737
11793
  }
11738
11794
  const scope = params.scope;
@@ -11741,6 +11797,7 @@
11741
11797
  const sessionId = params.sessionId;
11742
11798
  const runId = params.runId;
11743
11799
  const memorySubStoreId = params.memorySubStoreId;
11800
+ const pipelineId = params.pipelineId;
11744
11801
  const sourceId = params.sourceId;
11745
11802
  const sourceType = params.sourceType;
11746
11803
  const messages = params.messages;
@@ -11767,6 +11824,9 @@
11767
11824
  if (typeof memorySubStoreId !== 'undefined') {
11768
11825
  payload['memorySubStoreId'] = memorySubStoreId;
11769
11826
  }
11827
+ if (typeof pipelineId !== 'undefined') {
11828
+ payload['pipelineId'] = pipelineId;
11829
+ }
11770
11830
  if (typeof sourceId !== 'undefined') {
11771
11831
  payload['sourceId'] = sourceId;
11772
11832
  }
@@ -12360,13 +12420,15 @@
12360
12420
  else {
12361
12421
  params = {
12362
12422
  userId: paramsOrFirst,
12363
- format: rest[0],
12364
- data: rest[1],
12365
- records: rest[2],
12366
- dryRun: rest[3]
12423
+ pipelineId: rest[0],
12424
+ format: rest[1],
12425
+ data: rest[2],
12426
+ records: rest[3],
12427
+ dryRun: rest[4]
12367
12428
  };
12368
12429
  }
12369
12430
  const userId = params.userId;
12431
+ const pipelineId = params.pipelineId;
12370
12432
  const format = params.format;
12371
12433
  const data = params.data;
12372
12434
  const records = params.records;
@@ -12376,6 +12438,9 @@
12376
12438
  }
12377
12439
  const apiPath = '/memory/memories/imports';
12378
12440
  const payload = {};
12441
+ if (typeof pipelineId !== 'undefined') {
12442
+ payload['pipelineId'] = pipelineId;
12443
+ }
12379
12444
  if (typeof userId !== 'undefined') {
12380
12445
  payload['userId'] = userId;
12381
12446
  }
@@ -12420,6 +12485,125 @@
12420
12485
  };
12421
12486
  return this.client.call('get', uri, apiHeaders, payload);
12422
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
+ }
12423
12607
  updateKnowledge(paramsOrFirst, ...rest) {
12424
12608
  let params;
12425
12609
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -12523,10 +12707,193 @@
12523
12707
  if (typeof knowledgeId === 'undefined') {
12524
12708
  throw new AgentbaseException('Missing required parameter: "knowledgeId"');
12525
12709
  }
12526
- if (typeof expectedVersion === 'undefined') {
12527
- throw new AgentbaseException('Missing required parameter: "expectedVersion"');
12528
- }
12529
- 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);
12530
12897
  const payload = {};
12531
12898
  if (typeof scope !== 'undefined') {
12532
12899
  payload['scope'] = scope;
@@ -12546,21 +12913,17 @@
12546
12913
  if (typeof memorySubStoreId !== 'undefined') {
12547
12914
  payload['memorySubStoreId'] = memorySubStoreId;
12548
12915
  }
12549
- if (typeof expectedVersion !== 'undefined') {
12550
- payload['expectedVersion'] = expectedVersion;
12551
- }
12552
- if (typeof reason !== 'undefined') {
12553
- payload['reason'] = reason;
12916
+ if (typeof limit !== 'undefined') {
12917
+ payload['limit'] = limit;
12554
12918
  }
12555
- if (typeof source !== 'undefined') {
12556
- payload['source'] = source;
12919
+ if (typeof offset !== 'undefined') {
12920
+ payload['offset'] = offset;
12557
12921
  }
12558
12922
  const uri = new URL(this.client.config.endpoint + apiPath);
12559
12923
  const apiHeaders = {
12560
12924
  'X-Appwrite-Project': this.client.config.project,
12561
- 'content-type': 'application/json',
12562
12925
  };
12563
- return this.client.call('delete', uri, apiHeaders, payload);
12926
+ return this.client.call('get', uri, apiHeaders, payload);
12564
12927
  }
12565
12928
  createKnowledgeObservation(paramsOrFirst, ...rest) {
12566
12929
  let params;
@@ -12790,7 +13153,7 @@
12790
13153
  }
12791
13154
  search(paramsOrFirst, ...rest) {
12792
13155
  let params;
12793
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13156
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
12794
13157
  params = (paramsOrFirst || {});
12795
13158
  }
12796
13159
  else {
@@ -12798,25 +13161,27 @@
12798
13161
  query: paramsOrFirst,
12799
13162
  searchMode: rest[0],
12800
13163
  retrieval: rest[1],
12801
- userId: rest[2],
12802
- agentId: rest[3],
12803
- runId: rest[4],
12804
- scope: rest[5],
12805
- memoryType: rest[6],
12806
- recordKind: rest[7],
12807
- filter: rest[8],
12808
- limit: rest[9],
12809
- cursor: rest[10],
12810
- sort: rest[11],
12811
- memorySubStoreId: rest[12],
12812
- sessionId: rest[13],
12813
- groupId: rest[14],
12814
- 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]
12815
13179
  };
12816
13180
  }
12817
13181
  const query = params.query;
12818
13182
  const searchMode = params.searchMode;
12819
13183
  const retrieval = params.retrieval;
13184
+ const media = params.media;
12820
13185
  const userId = params.userId;
12821
13186
  const agentId = params.agentId;
12822
13187
  const runId = params.runId;
@@ -12831,9 +13196,6 @@
12831
13196
  const sessionId = params.sessionId;
12832
13197
  const groupId = params.groupId;
12833
13198
  const accessMode = params.accessMode;
12834
- if (typeof query === 'undefined') {
12835
- throw new AgentbaseException('Missing required parameter: "query"');
12836
- }
12837
13199
  const apiPath = '/memory/memories/search';
12838
13200
  const payload = {};
12839
13201
  if (typeof query !== 'undefined') {
@@ -12845,6 +13207,9 @@
12845
13207
  if (typeof retrieval !== 'undefined') {
12846
13208
  payload['retrieval'] = retrieval;
12847
13209
  }
13210
+ if (typeof media !== 'undefined') {
13211
+ payload['media'] = media;
13212
+ }
12848
13213
  if (typeof userId !== 'undefined') {
12849
13214
  payload['userId'] = userId;
12850
13215
  }
@@ -13254,14 +13619,16 @@
13254
13619
  else {
13255
13620
  params = {
13256
13621
  userId: paramsOrFirst,
13257
- profileType: rest[0],
13258
- messages: rest[1],
13259
- sourceMemoryIds: rest[2],
13260
- sessionId: rest[3],
13261
- 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]
13262
13628
  };
13263
13629
  }
13264
13630
  const userId = params.userId;
13631
+ const pipelineId = params.pipelineId;
13265
13632
  const profileType = params.profileType;
13266
13633
  const messages = params.messages;
13267
13634
  const sourceMemoryIds = params.sourceMemoryIds;
@@ -13272,6 +13639,9 @@
13272
13639
  }
13273
13640
  const apiPath = '/memory/memories/users/{userId}/profile/extractions'.replace('{userId}', userId);
13274
13641
  const payload = {};
13642
+ if (typeof pipelineId !== 'undefined') {
13643
+ payload['pipelineId'] = pipelineId;
13644
+ }
13275
13645
  if (typeof profileType !== 'undefined') {
13276
13646
  payload['profileType'] = profileType;
13277
13647
  }
@@ -13302,16 +13672,21 @@
13302
13672
  else {
13303
13673
  params = {
13304
13674
  userId: paramsOrFirst,
13305
- profileType: rest[0]
13675
+ pipelineId: rest[0],
13676
+ profileType: rest[1]
13306
13677
  };
13307
13678
  }
13308
13679
  const userId = params.userId;
13680
+ const pipelineId = params.pipelineId;
13309
13681
  const profileType = params.profileType;
13310
13682
  if (typeof userId === 'undefined') {
13311
13683
  throw new AgentbaseException('Missing required parameter: "userId"');
13312
13684
  }
13313
13685
  const apiPath = '/memory/memories/users/{userId}/profile/rebuild'.replace('{userId}', userId);
13314
13686
  const payload = {};
13687
+ if (typeof pipelineId !== 'undefined') {
13688
+ payload['pipelineId'] = pipelineId;
13689
+ }
13315
13690
  if (typeof profileType !== 'undefined') {
13316
13691
  payload['profileType'] = profileType;
13317
13692
  }
@@ -13425,11 +13800,13 @@
13425
13800
  else {
13426
13801
  params = {
13427
13802
  memoryId: paramsOrFirst,
13428
- reason: rest[0],
13429
- source: rest[1]
13803
+ memorySubStoreId: rest[0],
13804
+ reason: rest[1],
13805
+ source: rest[2]
13430
13806
  };
13431
13807
  }
13432
13808
  const memoryId = params.memoryId;
13809
+ const memorySubStoreId = params.memorySubStoreId;
13433
13810
  const reason = params.reason;
13434
13811
  const source = params.source;
13435
13812
  if (typeof memoryId === 'undefined') {
@@ -13437,6 +13814,9 @@
13437
13814
  }
13438
13815
  const apiPath = '/memory/memories/{memoryId}'.replace('{memoryId}', memoryId);
13439
13816
  const payload = {};
13817
+ if (typeof memorySubStoreId !== 'undefined') {
13818
+ payload['memorySubStoreId'] = memorySubStoreId;
13819
+ }
13440
13820
  if (typeof reason !== 'undefined') {
13441
13821
  payload['reason'] = reason;
13442
13822
  }
@@ -13576,6 +13956,340 @@
13576
13956
  };
13577
13957
  return this.client.call('get', uri, apiHeaders, payload);
13578
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
+ }
13579
14293
  }
13580
14294
 
13581
14295
  class Messaging {
@@ -17291,6 +18005,10 @@
17291
18005
  Status["PartialFailed"] = "partial_failed";
17292
18006
  Status["Failed"] = "failed";
17293
18007
  Status["Dead"] = "dead";
18008
+ Status["Pending"] = "pending";
18009
+ Status["Approved"] = "approved";
18010
+ Status["Rejected"] = "rejected";
18011
+ Status["Superseded"] = "superseded";
17294
18012
  })(exports.Status || (exports.Status = {}));
17295
18013
 
17296
18014
  exports.Browser = void 0;
@@ -17995,6 +18713,23 @@
17995
18713
  ImageFormat["Gif"] = "gif";
17996
18714
  })(exports.ImageFormat || (exports.ImageFormat = {}));
17997
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
+
17998
18733
  exports.ExecutionMethod = void 0;
17999
18734
  (function (ExecutionMethod) {
18000
18735
  ExecutionMethod["GET"] = "GET";
@@ -18150,6 +18885,14 @@
18150
18885
  MemoryShareSubjectType["Group"] = "group";
18151
18886
  })(exports.MemoryShareSubjectType || (exports.MemoryShareSubjectType = {}));
18152
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
+
18153
18896
  exports.OrganizationRole = void 0;
18154
18897
  (function (OrganizationRole) {
18155
18898
  OrganizationRole["Owner"] = "owner";