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/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.8.0',
617
+ 'x-sdk-version': '2.10.0',
618
618
  'X-AppBase-SDK': 'true',
619
- 'X-Appwrite-Response-Format': '2.8.0',
619
+ 'X-Appwrite-Response-Format': '2.10.0',
620
620
  };
621
621
  this.realtime = {
622
622
  socket: undefined,
@@ -6307,6 +6307,108 @@ 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
+ xpath: rest[3],
6322
+ pathMatch: rest[4],
6323
+ method: rest[5]
6324
+ };
6325
+ }
6326
+ const functionId = params.functionId;
6327
+ const limit = params.limit;
6328
+ const offset = params.offset;
6329
+ const total = params.total;
6330
+ const xpath = params.xpath;
6331
+ const pathMatch = params.pathMatch;
6332
+ const method = params.method;
6333
+ if (typeof functionId === 'undefined') {
6334
+ throw new AgentbaseException('Missing required parameter: "functionId"');
6335
+ }
6336
+ const apiPath = '/functions/{functionId}/execution-paths'.replace('{functionId}', functionId);
6337
+ const payload = {};
6338
+ if (typeof limit !== 'undefined') {
6339
+ payload['limit'] = limit;
6340
+ }
6341
+ if (typeof offset !== 'undefined') {
6342
+ payload['offset'] = offset;
6343
+ }
6344
+ if (typeof total !== 'undefined') {
6345
+ payload['total'] = total;
6346
+ }
6347
+ if (typeof xpath !== 'undefined') {
6348
+ payload['path'] = xpath;
6349
+ }
6350
+ if (typeof pathMatch !== 'undefined') {
6351
+ payload['pathMatch'] = pathMatch;
6352
+ }
6353
+ if (typeof method !== 'undefined') {
6354
+ payload['method'] = method;
6355
+ }
6356
+ const uri = new URL(this.client.config.endpoint + apiPath);
6357
+ const apiHeaders = {
6358
+ 'X-Appwrite-Project': this.client.config.project,
6359
+ };
6360
+ return this.client.call('get', uri, apiHeaders, payload);
6361
+ }
6362
+ listExecutionsByPath(paramsOrFirst, ...rest) {
6363
+ let params;
6364
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6365
+ params = (paramsOrFirst || {});
6366
+ }
6367
+ else {
6368
+ params = {
6369
+ functionId: paramsOrFirst,
6370
+ xpath: rest[0],
6371
+ queries: rest[1],
6372
+ total: rest[2],
6373
+ pathMatch: rest[3],
6374
+ method: rest[4]
6375
+ };
6376
+ }
6377
+ const functionId = params.functionId;
6378
+ const xpath = params.xpath;
6379
+ const queries = params.queries;
6380
+ const total = params.total;
6381
+ const pathMatch = params.pathMatch;
6382
+ const method = params.method;
6383
+ if (typeof functionId === 'undefined') {
6384
+ throw new AgentbaseException('Missing required parameter: "functionId"');
6385
+ }
6386
+ if (typeof xpath === 'undefined') {
6387
+ throw new AgentbaseException('Missing required parameter: "xpath"');
6388
+ }
6389
+ const apiPath = '/functions/{functionId}/execution-paths/executions'.replace('{functionId}', functionId);
6390
+ const payload = {};
6391
+ if (typeof xpath !== 'undefined') {
6392
+ payload['path'] = xpath;
6393
+ }
6394
+ if (typeof queries !== 'undefined') {
6395
+ payload['queries'] = queries;
6396
+ }
6397
+ if (typeof total !== 'undefined') {
6398
+ payload['total'] = total;
6399
+ }
6400
+ if (typeof pathMatch !== 'undefined') {
6401
+ payload['pathMatch'] = pathMatch;
6402
+ }
6403
+ if (typeof method !== 'undefined') {
6404
+ payload['method'] = method;
6405
+ }
6406
+ const uri = new URL(this.client.config.endpoint + apiPath);
6407
+ const apiHeaders = {
6408
+ 'X-Appwrite-Project': this.client.config.project,
6409
+ };
6410
+ return this.client.call('get', uri, apiHeaders, payload);
6411
+ }
6310
6412
  listExecutions(paramsOrFirst, ...rest) {
6311
6413
  let params;
6312
6414
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -6316,12 +6418,18 @@ class Functions {
6316
6418
  params = {
6317
6419
  functionId: paramsOrFirst,
6318
6420
  queries: rest[0],
6319
- total: rest[1]
6421
+ total: rest[1],
6422
+ xpath: rest[2],
6423
+ pathMatch: rest[3],
6424
+ method: rest[4]
6320
6425
  };
6321
6426
  }
6322
6427
  const functionId = params.functionId;
6323
6428
  const queries = params.queries;
6324
6429
  const total = params.total;
6430
+ const xpath = params.xpath;
6431
+ const pathMatch = params.pathMatch;
6432
+ const method = params.method;
6325
6433
  if (typeof functionId === 'undefined') {
6326
6434
  throw new AgentbaseException('Missing required parameter: "functionId"');
6327
6435
  }
@@ -6333,6 +6441,15 @@ class Functions {
6333
6441
  if (typeof total !== 'undefined') {
6334
6442
  payload['total'] = total;
6335
6443
  }
6444
+ if (typeof xpath !== 'undefined') {
6445
+ payload['path'] = xpath;
6446
+ }
6447
+ if (typeof pathMatch !== 'undefined') {
6448
+ payload['pathMatch'] = pathMatch;
6449
+ }
6450
+ if (typeof method !== 'undefined') {
6451
+ payload['method'] = method;
6452
+ }
6336
6453
  const uri = new URL(this.client.config.endpoint + apiPath);
6337
6454
  const apiHeaders = {
6338
6455
  'X-Appwrite-Project': this.client.config.project,
@@ -7198,25 +7315,29 @@ class Memory {
7198
7315
  scope: rest[0],
7199
7316
  memoryType: rest[1],
7200
7317
  recordKind: rest[2],
7201
- content: rest[3],
7202
- messages: rest[4],
7203
- agentId: rest[5],
7204
- runId: rest[6],
7205
- sessionId: rest[7],
7206
- sensitivity: rest[8],
7207
- handlingPolicy: rest[9],
7208
- metadata: rest[10],
7209
- infer: rest[11],
7210
- reRemember: rest[12],
7211
- async: rest[13]
7318
+ pipelineId: rest[3],
7319
+ content: rest[4],
7320
+ messages: rest[5],
7321
+ media: rest[6],
7322
+ agentId: rest[7],
7323
+ runId: rest[8],
7324
+ sessionId: rest[9],
7325
+ sensitivity: rest[10],
7326
+ handlingPolicy: rest[11],
7327
+ metadata: rest[12],
7328
+ infer: rest[13],
7329
+ reRemember: rest[14],
7330
+ async: rest[15]
7212
7331
  };
7213
7332
  }
7214
7333
  const userId = params.userId;
7215
7334
  const scope = params.scope;
7216
7335
  const memoryType = params.memoryType;
7217
7336
  const recordKind = params.recordKind;
7337
+ const pipelineId = params.pipelineId;
7218
7338
  const content = params.content;
7219
7339
  const messages = params.messages;
7340
+ const media = params.media;
7220
7341
  const agentId = params.agentId;
7221
7342
  const runId = params.runId;
7222
7343
  const sessionId = params.sessionId;
@@ -7240,12 +7361,18 @@ class Memory {
7240
7361
  }
7241
7362
  const apiPath = '/memory/memories';
7242
7363
  const payload = {};
7364
+ if (typeof pipelineId !== 'undefined') {
7365
+ payload['pipelineId'] = pipelineId;
7366
+ }
7243
7367
  if (typeof content !== 'undefined') {
7244
7368
  payload['content'] = content;
7245
7369
  }
7246
7370
  if (typeof messages !== 'undefined') {
7247
7371
  payload['messages'] = messages;
7248
7372
  }
7373
+ if (typeof media !== 'undefined') {
7374
+ payload['media'] = media;
7375
+ }
7249
7376
  if (typeof userId !== 'undefined') {
7250
7377
  payload['userId'] = userId;
7251
7378
  }
@@ -7300,12 +7427,14 @@ class Memory {
7300
7427
  else {
7301
7428
  params = {
7302
7429
  userId: paramsOrFirst,
7303
- limit: rest[0],
7304
- reason: rest[1],
7305
- source: rest[2]
7430
+ memorySubStoreId: rest[0],
7431
+ limit: rest[1],
7432
+ reason: rest[2],
7433
+ source: rest[3]
7306
7434
  };
7307
7435
  }
7308
7436
  const userId = params.userId;
7437
+ const memorySubStoreId = params.memorySubStoreId;
7309
7438
  const limit = params.limit;
7310
7439
  const reason = params.reason;
7311
7440
  const source = params.source;
@@ -7314,6 +7443,9 @@ class Memory {
7314
7443
  if (typeof userId !== 'undefined') {
7315
7444
  payload['userId'] = userId;
7316
7445
  }
7446
+ if (typeof memorySubStoreId !== 'undefined') {
7447
+ payload['memorySubStoreId'] = memorySubStoreId;
7448
+ }
7317
7449
  if (typeof limit !== 'undefined') {
7318
7450
  payload['limit'] = limit;
7319
7451
  }
@@ -7841,7 +7973,7 @@ class Memory {
7841
7973
  }
7842
7974
  submitDistillation(paramsOrFirst, ...rest) {
7843
7975
  let params;
7844
- 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))) {
7976
+ 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))) {
7845
7977
  params = (paramsOrFirst || {});
7846
7978
  }
7847
7979
  else {
@@ -7852,12 +7984,13 @@ class Memory {
7852
7984
  sessionId: rest[2],
7853
7985
  runId: rest[3],
7854
7986
  memorySubStoreId: rest[4],
7855
- sourceId: rest[5],
7856
- sourceType: rest[6],
7857
- messages: rest[7],
7858
- toolEvents: rest[8],
7859
- mode: rest[9],
7860
- idempotencyKey: rest[10]
7987
+ pipelineId: rest[5],
7988
+ sourceId: rest[6],
7989
+ sourceType: rest[7],
7990
+ messages: rest[8],
7991
+ toolEvents: rest[9],
7992
+ mode: rest[10],
7993
+ idempotencyKey: rest[11]
7861
7994
  };
7862
7995
  }
7863
7996
  const scope = params.scope;
@@ -7866,6 +7999,7 @@ class Memory {
7866
7999
  const sessionId = params.sessionId;
7867
8000
  const runId = params.runId;
7868
8001
  const memorySubStoreId = params.memorySubStoreId;
8002
+ const pipelineId = params.pipelineId;
7869
8003
  const sourceId = params.sourceId;
7870
8004
  const sourceType = params.sourceType;
7871
8005
  const messages = params.messages;
@@ -7892,6 +8026,9 @@ class Memory {
7892
8026
  if (typeof memorySubStoreId !== 'undefined') {
7893
8027
  payload['memorySubStoreId'] = memorySubStoreId;
7894
8028
  }
8029
+ if (typeof pipelineId !== 'undefined') {
8030
+ payload['pipelineId'] = pipelineId;
8031
+ }
7895
8032
  if (typeof sourceId !== 'undefined') {
7896
8033
  payload['sourceId'] = sourceId;
7897
8034
  }
@@ -8485,13 +8622,15 @@ class Memory {
8485
8622
  else {
8486
8623
  params = {
8487
8624
  userId: paramsOrFirst,
8488
- format: rest[0],
8489
- data: rest[1],
8490
- records: rest[2],
8491
- dryRun: rest[3]
8625
+ pipelineId: rest[0],
8626
+ format: rest[1],
8627
+ data: rest[2],
8628
+ records: rest[3],
8629
+ dryRun: rest[4]
8492
8630
  };
8493
8631
  }
8494
8632
  const userId = params.userId;
8633
+ const pipelineId = params.pipelineId;
8495
8634
  const format = params.format;
8496
8635
  const data = params.data;
8497
8636
  const records = params.records;
@@ -8501,6 +8640,9 @@ class Memory {
8501
8640
  }
8502
8641
  const apiPath = '/memory/memories/imports';
8503
8642
  const payload = {};
8643
+ if (typeof pipelineId !== 'undefined') {
8644
+ payload['pipelineId'] = pipelineId;
8645
+ }
8504
8646
  if (typeof userId !== 'undefined') {
8505
8647
  payload['userId'] = userId;
8506
8648
  }
@@ -8545,6 +8687,125 @@ class Memory {
8545
8687
  };
8546
8688
  return this.client.call('get', uri, apiHeaders, payload);
8547
8689
  }
8690
+ listKnowledgeReviews(paramsOrFirst, ...rest) {
8691
+ let params;
8692
+ 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))) {
8693
+ params = (paramsOrFirst || {});
8694
+ }
8695
+ else {
8696
+ params = {
8697
+ scope: paramsOrFirst,
8698
+ userId: rest[0],
8699
+ agentId: rest[1],
8700
+ sessionId: rest[2],
8701
+ runId: rest[3],
8702
+ memorySubStoreId: rest[4],
8703
+ limit: rest[5],
8704
+ offset: rest[6],
8705
+ status: rest[7],
8706
+ knowledgeId: rest[8]
8707
+ };
8708
+ }
8709
+ const scope = params.scope;
8710
+ const userId = params.userId;
8711
+ const agentId = params.agentId;
8712
+ const sessionId = params.sessionId;
8713
+ const runId = params.runId;
8714
+ const memorySubStoreId = params.memorySubStoreId;
8715
+ const limit = params.limit;
8716
+ const offset = params.offset;
8717
+ const status = params.status;
8718
+ const knowledgeId = params.knowledgeId;
8719
+ const apiPath = '/memory/memories/knowledge/reviews';
8720
+ const payload = {};
8721
+ if (typeof scope !== 'undefined') {
8722
+ payload['scope'] = scope;
8723
+ }
8724
+ if (typeof userId !== 'undefined') {
8725
+ payload['userId'] = userId;
8726
+ }
8727
+ if (typeof agentId !== 'undefined') {
8728
+ payload['agentId'] = agentId;
8729
+ }
8730
+ if (typeof sessionId !== 'undefined') {
8731
+ payload['sessionId'] = sessionId;
8732
+ }
8733
+ if (typeof runId !== 'undefined') {
8734
+ payload['runId'] = runId;
8735
+ }
8736
+ if (typeof memorySubStoreId !== 'undefined') {
8737
+ payload['memorySubStoreId'] = memorySubStoreId;
8738
+ }
8739
+ if (typeof limit !== 'undefined') {
8740
+ payload['limit'] = limit;
8741
+ }
8742
+ if (typeof offset !== 'undefined') {
8743
+ payload['offset'] = offset;
8744
+ }
8745
+ if (typeof status !== 'undefined') {
8746
+ payload['status'] = status;
8747
+ }
8748
+ if (typeof knowledgeId !== 'undefined') {
8749
+ payload['knowledgeId'] = knowledgeId;
8750
+ }
8751
+ const uri = new URL(this.client.config.endpoint + apiPath);
8752
+ const apiHeaders = {
8753
+ 'X-Appwrite-Project': this.client.config.project,
8754
+ };
8755
+ return this.client.call('get', uri, apiHeaders, payload);
8756
+ }
8757
+ getKnowledgeReview(paramsOrFirst, ...rest) {
8758
+ let params;
8759
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
8760
+ params = (paramsOrFirst || {});
8761
+ }
8762
+ else {
8763
+ params = {
8764
+ reviewId: paramsOrFirst,
8765
+ scope: rest[0],
8766
+ userId: rest[1],
8767
+ agentId: rest[2],
8768
+ sessionId: rest[3],
8769
+ runId: rest[4],
8770
+ memorySubStoreId: rest[5]
8771
+ };
8772
+ }
8773
+ const reviewId = params.reviewId;
8774
+ const scope = params.scope;
8775
+ const userId = params.userId;
8776
+ const agentId = params.agentId;
8777
+ const sessionId = params.sessionId;
8778
+ const runId = params.runId;
8779
+ const memorySubStoreId = params.memorySubStoreId;
8780
+ if (typeof reviewId === 'undefined') {
8781
+ throw new AgentbaseException('Missing required parameter: "reviewId"');
8782
+ }
8783
+ const apiPath = '/memory/memories/knowledge/reviews/{reviewId}'.replace('{reviewId}', reviewId);
8784
+ const payload = {};
8785
+ if (typeof scope !== 'undefined') {
8786
+ payload['scope'] = scope;
8787
+ }
8788
+ if (typeof userId !== 'undefined') {
8789
+ payload['userId'] = userId;
8790
+ }
8791
+ if (typeof agentId !== 'undefined') {
8792
+ payload['agentId'] = agentId;
8793
+ }
8794
+ if (typeof sessionId !== 'undefined') {
8795
+ payload['sessionId'] = sessionId;
8796
+ }
8797
+ if (typeof runId !== 'undefined') {
8798
+ payload['runId'] = runId;
8799
+ }
8800
+ if (typeof memorySubStoreId !== 'undefined') {
8801
+ payload['memorySubStoreId'] = memorySubStoreId;
8802
+ }
8803
+ const uri = new URL(this.client.config.endpoint + apiPath);
8804
+ const apiHeaders = {
8805
+ 'X-Appwrite-Project': this.client.config.project,
8806
+ };
8807
+ return this.client.call('get', uri, apiHeaders, payload);
8808
+ }
8548
8809
  updateKnowledge(paramsOrFirst, ...rest) {
8549
8810
  let params;
8550
8811
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -8648,10 +8909,193 @@ class Memory {
8648
8909
  if (typeof knowledgeId === 'undefined') {
8649
8910
  throw new AgentbaseException('Missing required parameter: "knowledgeId"');
8650
8911
  }
8651
- if (typeof expectedVersion === 'undefined') {
8652
- throw new AgentbaseException('Missing required parameter: "expectedVersion"');
8653
- }
8654
- const apiPath = '/memory/memories/knowledge/{knowledgeId}'.replace('{knowledgeId}', knowledgeId);
8912
+ if (typeof expectedVersion === 'undefined') {
8913
+ throw new AgentbaseException('Missing required parameter: "expectedVersion"');
8914
+ }
8915
+ const apiPath = '/memory/memories/knowledge/{knowledgeId}'.replace('{knowledgeId}', knowledgeId);
8916
+ const payload = {};
8917
+ if (typeof scope !== 'undefined') {
8918
+ payload['scope'] = scope;
8919
+ }
8920
+ if (typeof userId !== 'undefined') {
8921
+ payload['userId'] = userId;
8922
+ }
8923
+ if (typeof agentId !== 'undefined') {
8924
+ payload['agentId'] = agentId;
8925
+ }
8926
+ if (typeof sessionId !== 'undefined') {
8927
+ payload['sessionId'] = sessionId;
8928
+ }
8929
+ if (typeof runId !== 'undefined') {
8930
+ payload['runId'] = runId;
8931
+ }
8932
+ if (typeof memorySubStoreId !== 'undefined') {
8933
+ payload['memorySubStoreId'] = memorySubStoreId;
8934
+ }
8935
+ if (typeof expectedVersion !== 'undefined') {
8936
+ payload['expectedVersion'] = expectedVersion;
8937
+ }
8938
+ if (typeof reason !== 'undefined') {
8939
+ payload['reason'] = reason;
8940
+ }
8941
+ if (typeof source !== 'undefined') {
8942
+ payload['source'] = source;
8943
+ }
8944
+ const uri = new URL(this.client.config.endpoint + apiPath);
8945
+ const apiHeaders = {
8946
+ 'X-Appwrite-Project': this.client.config.project,
8947
+ 'content-type': 'application/json',
8948
+ };
8949
+ return this.client.call('delete', uri, apiHeaders, payload);
8950
+ }
8951
+ getKnowledgeDiff(paramsOrFirst, ...rest) {
8952
+ let params;
8953
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
8954
+ params = (paramsOrFirst || {});
8955
+ }
8956
+ else {
8957
+ params = {
8958
+ knowledgeId: paramsOrFirst,
8959
+ toRevisionId: rest[0],
8960
+ scope: rest[1],
8961
+ userId: rest[2],
8962
+ agentId: rest[3],
8963
+ sessionId: rest[4],
8964
+ runId: rest[5],
8965
+ memorySubStoreId: rest[6],
8966
+ fromRevisionId: rest[7]
8967
+ };
8968
+ }
8969
+ const knowledgeId = params.knowledgeId;
8970
+ const toRevisionId = params.toRevisionId;
8971
+ const scope = params.scope;
8972
+ const userId = params.userId;
8973
+ const agentId = params.agentId;
8974
+ const sessionId = params.sessionId;
8975
+ const runId = params.runId;
8976
+ const memorySubStoreId = params.memorySubStoreId;
8977
+ const fromRevisionId = params.fromRevisionId;
8978
+ if (typeof knowledgeId === 'undefined') {
8979
+ throw new AgentbaseException('Missing required parameter: "knowledgeId"');
8980
+ }
8981
+ if (typeof toRevisionId === 'undefined') {
8982
+ throw new AgentbaseException('Missing required parameter: "toRevisionId"');
8983
+ }
8984
+ const apiPath = '/memory/memories/knowledge/{knowledgeId}/diff'.replace('{knowledgeId}', knowledgeId);
8985
+ const payload = {};
8986
+ if (typeof scope !== 'undefined') {
8987
+ payload['scope'] = scope;
8988
+ }
8989
+ if (typeof userId !== 'undefined') {
8990
+ payload['userId'] = userId;
8991
+ }
8992
+ if (typeof agentId !== 'undefined') {
8993
+ payload['agentId'] = agentId;
8994
+ }
8995
+ if (typeof sessionId !== 'undefined') {
8996
+ payload['sessionId'] = sessionId;
8997
+ }
8998
+ if (typeof runId !== 'undefined') {
8999
+ payload['runId'] = runId;
9000
+ }
9001
+ if (typeof memorySubStoreId !== 'undefined') {
9002
+ payload['memorySubStoreId'] = memorySubStoreId;
9003
+ }
9004
+ if (typeof fromRevisionId !== 'undefined') {
9005
+ payload['fromRevisionId'] = fromRevisionId;
9006
+ }
9007
+ if (typeof toRevisionId !== 'undefined') {
9008
+ payload['toRevisionId'] = toRevisionId;
9009
+ }
9010
+ const uri = new URL(this.client.config.endpoint + apiPath);
9011
+ const apiHeaders = {
9012
+ 'X-Appwrite-Project': this.client.config.project,
9013
+ };
9014
+ return this.client.call('get', uri, apiHeaders, payload);
9015
+ }
9016
+ listKnowledgeEvents(paramsOrFirst, ...rest) {
9017
+ let params;
9018
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9019
+ params = (paramsOrFirst || {});
9020
+ }
9021
+ else {
9022
+ params = {
9023
+ knowledgeId: paramsOrFirst,
9024
+ scope: rest[0],
9025
+ userId: rest[1],
9026
+ agentId: rest[2],
9027
+ sessionId: rest[3],
9028
+ runId: rest[4],
9029
+ memorySubStoreId: rest[5]
9030
+ };
9031
+ }
9032
+ const knowledgeId = params.knowledgeId;
9033
+ const scope = params.scope;
9034
+ const userId = params.userId;
9035
+ const agentId = params.agentId;
9036
+ const sessionId = params.sessionId;
9037
+ const runId = params.runId;
9038
+ const memorySubStoreId = params.memorySubStoreId;
9039
+ if (typeof knowledgeId === 'undefined') {
9040
+ throw new AgentbaseException('Missing required parameter: "knowledgeId"');
9041
+ }
9042
+ const apiPath = '/memory/memories/knowledge/{knowledgeId}/events'.replace('{knowledgeId}', knowledgeId);
9043
+ const payload = {};
9044
+ if (typeof scope !== 'undefined') {
9045
+ payload['scope'] = scope;
9046
+ }
9047
+ if (typeof userId !== 'undefined') {
9048
+ payload['userId'] = userId;
9049
+ }
9050
+ if (typeof agentId !== 'undefined') {
9051
+ payload['agentId'] = agentId;
9052
+ }
9053
+ if (typeof sessionId !== 'undefined') {
9054
+ payload['sessionId'] = sessionId;
9055
+ }
9056
+ if (typeof runId !== 'undefined') {
9057
+ payload['runId'] = runId;
9058
+ }
9059
+ if (typeof memorySubStoreId !== 'undefined') {
9060
+ payload['memorySubStoreId'] = memorySubStoreId;
9061
+ }
9062
+ const uri = new URL(this.client.config.endpoint + apiPath);
9063
+ const apiHeaders = {
9064
+ 'X-Appwrite-Project': this.client.config.project,
9065
+ };
9066
+ return this.client.call('get', uri, apiHeaders, payload);
9067
+ }
9068
+ listKnowledgeRevisions(paramsOrFirst, ...rest) {
9069
+ let params;
9070
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9071
+ params = (paramsOrFirst || {});
9072
+ }
9073
+ else {
9074
+ params = {
9075
+ knowledgeId: paramsOrFirst,
9076
+ scope: rest[0],
9077
+ userId: rest[1],
9078
+ agentId: rest[2],
9079
+ sessionId: rest[3],
9080
+ runId: rest[4],
9081
+ memorySubStoreId: rest[5],
9082
+ limit: rest[6],
9083
+ offset: rest[7]
9084
+ };
9085
+ }
9086
+ const knowledgeId = params.knowledgeId;
9087
+ const scope = params.scope;
9088
+ const userId = params.userId;
9089
+ const agentId = params.agentId;
9090
+ const sessionId = params.sessionId;
9091
+ const runId = params.runId;
9092
+ const memorySubStoreId = params.memorySubStoreId;
9093
+ const limit = params.limit;
9094
+ const offset = params.offset;
9095
+ if (typeof knowledgeId === 'undefined') {
9096
+ throw new AgentbaseException('Missing required parameter: "knowledgeId"');
9097
+ }
9098
+ const apiPath = '/memory/memories/knowledge/{knowledgeId}/revisions'.replace('{knowledgeId}', knowledgeId);
8655
9099
  const payload = {};
8656
9100
  if (typeof scope !== 'undefined') {
8657
9101
  payload['scope'] = scope;
@@ -8671,21 +9115,17 @@ class Memory {
8671
9115
  if (typeof memorySubStoreId !== 'undefined') {
8672
9116
  payload['memorySubStoreId'] = memorySubStoreId;
8673
9117
  }
8674
- if (typeof expectedVersion !== 'undefined') {
8675
- payload['expectedVersion'] = expectedVersion;
8676
- }
8677
- if (typeof reason !== 'undefined') {
8678
- payload['reason'] = reason;
9118
+ if (typeof limit !== 'undefined') {
9119
+ payload['limit'] = limit;
8679
9120
  }
8680
- if (typeof source !== 'undefined') {
8681
- payload['source'] = source;
9121
+ if (typeof offset !== 'undefined') {
9122
+ payload['offset'] = offset;
8682
9123
  }
8683
9124
  const uri = new URL(this.client.config.endpoint + apiPath);
8684
9125
  const apiHeaders = {
8685
9126
  'X-Appwrite-Project': this.client.config.project,
8686
- 'content-type': 'application/json',
8687
9127
  };
8688
- return this.client.call('delete', uri, apiHeaders, payload);
9128
+ return this.client.call('get', uri, apiHeaders, payload);
8689
9129
  }
8690
9130
  createKnowledgeObservation(paramsOrFirst, ...rest) {
8691
9131
  let params;
@@ -8915,7 +9355,7 @@ class Memory {
8915
9355
  }
8916
9356
  search(paramsOrFirst, ...rest) {
8917
9357
  let params;
8918
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9358
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
8919
9359
  params = (paramsOrFirst || {});
8920
9360
  }
8921
9361
  else {
@@ -8923,25 +9363,27 @@ class Memory {
8923
9363
  query: paramsOrFirst,
8924
9364
  searchMode: rest[0],
8925
9365
  retrieval: rest[1],
8926
- userId: rest[2],
8927
- agentId: rest[3],
8928
- runId: rest[4],
8929
- scope: rest[5],
8930
- memoryType: rest[6],
8931
- recordKind: rest[7],
8932
- filter: rest[8],
8933
- limit: rest[9],
8934
- cursor: rest[10],
8935
- sort: rest[11],
8936
- memorySubStoreId: rest[12],
8937
- sessionId: rest[13],
8938
- groupId: rest[14],
8939
- accessMode: rest[15]
9366
+ media: rest[2],
9367
+ userId: rest[3],
9368
+ agentId: rest[4],
9369
+ runId: rest[5],
9370
+ scope: rest[6],
9371
+ memoryType: rest[7],
9372
+ recordKind: rest[8],
9373
+ filter: rest[9],
9374
+ limit: rest[10],
9375
+ cursor: rest[11],
9376
+ sort: rest[12],
9377
+ memorySubStoreId: rest[13],
9378
+ sessionId: rest[14],
9379
+ groupId: rest[15],
9380
+ accessMode: rest[16]
8940
9381
  };
8941
9382
  }
8942
9383
  const query = params.query;
8943
9384
  const searchMode = params.searchMode;
8944
9385
  const retrieval = params.retrieval;
9386
+ const media = params.media;
8945
9387
  const userId = params.userId;
8946
9388
  const agentId = params.agentId;
8947
9389
  const runId = params.runId;
@@ -8956,9 +9398,6 @@ class Memory {
8956
9398
  const sessionId = params.sessionId;
8957
9399
  const groupId = params.groupId;
8958
9400
  const accessMode = params.accessMode;
8959
- if (typeof query === 'undefined') {
8960
- throw new AgentbaseException('Missing required parameter: "query"');
8961
- }
8962
9401
  const apiPath = '/memory/memories/search';
8963
9402
  const payload = {};
8964
9403
  if (typeof query !== 'undefined') {
@@ -8970,6 +9409,9 @@ class Memory {
8970
9409
  if (typeof retrieval !== 'undefined') {
8971
9410
  payload['retrieval'] = retrieval;
8972
9411
  }
9412
+ if (typeof media !== 'undefined') {
9413
+ payload['media'] = media;
9414
+ }
8973
9415
  if (typeof userId !== 'undefined') {
8974
9416
  payload['userId'] = userId;
8975
9417
  }
@@ -9379,14 +9821,16 @@ class Memory {
9379
9821
  else {
9380
9822
  params = {
9381
9823
  userId: paramsOrFirst,
9382
- profileType: rest[0],
9383
- messages: rest[1],
9384
- sourceMemoryIds: rest[2],
9385
- sessionId: rest[3],
9386
- mode: rest[4]
9824
+ pipelineId: rest[0],
9825
+ profileType: rest[1],
9826
+ messages: rest[2],
9827
+ sourceMemoryIds: rest[3],
9828
+ sessionId: rest[4],
9829
+ mode: rest[5]
9387
9830
  };
9388
9831
  }
9389
9832
  const userId = params.userId;
9833
+ const pipelineId = params.pipelineId;
9390
9834
  const profileType = params.profileType;
9391
9835
  const messages = params.messages;
9392
9836
  const sourceMemoryIds = params.sourceMemoryIds;
@@ -9397,6 +9841,9 @@ class Memory {
9397
9841
  }
9398
9842
  const apiPath = '/memory/memories/users/{userId}/profile/extractions'.replace('{userId}', userId);
9399
9843
  const payload = {};
9844
+ if (typeof pipelineId !== 'undefined') {
9845
+ payload['pipelineId'] = pipelineId;
9846
+ }
9400
9847
  if (typeof profileType !== 'undefined') {
9401
9848
  payload['profileType'] = profileType;
9402
9849
  }
@@ -9427,16 +9874,21 @@ class Memory {
9427
9874
  else {
9428
9875
  params = {
9429
9876
  userId: paramsOrFirst,
9430
- profileType: rest[0]
9877
+ pipelineId: rest[0],
9878
+ profileType: rest[1]
9431
9879
  };
9432
9880
  }
9433
9881
  const userId = params.userId;
9882
+ const pipelineId = params.pipelineId;
9434
9883
  const profileType = params.profileType;
9435
9884
  if (typeof userId === 'undefined') {
9436
9885
  throw new AgentbaseException('Missing required parameter: "userId"');
9437
9886
  }
9438
9887
  const apiPath = '/memory/memories/users/{userId}/profile/rebuild'.replace('{userId}', userId);
9439
9888
  const payload = {};
9889
+ if (typeof pipelineId !== 'undefined') {
9890
+ payload['pipelineId'] = pipelineId;
9891
+ }
9440
9892
  if (typeof profileType !== 'undefined') {
9441
9893
  payload['profileType'] = profileType;
9442
9894
  }
@@ -9550,11 +10002,13 @@ class Memory {
9550
10002
  else {
9551
10003
  params = {
9552
10004
  memoryId: paramsOrFirst,
9553
- reason: rest[0],
9554
- source: rest[1]
10005
+ memorySubStoreId: rest[0],
10006
+ reason: rest[1],
10007
+ source: rest[2]
9555
10008
  };
9556
10009
  }
9557
10010
  const memoryId = params.memoryId;
10011
+ const memorySubStoreId = params.memorySubStoreId;
9558
10012
  const reason = params.reason;
9559
10013
  const source = params.source;
9560
10014
  if (typeof memoryId === 'undefined') {
@@ -9562,6 +10016,9 @@ class Memory {
9562
10016
  }
9563
10017
  const apiPath = '/memory/memories/{memoryId}'.replace('{memoryId}', memoryId);
9564
10018
  const payload = {};
10019
+ if (typeof memorySubStoreId !== 'undefined') {
10020
+ payload['memorySubStoreId'] = memorySubStoreId;
10021
+ }
9565
10022
  if (typeof reason !== 'undefined') {
9566
10023
  payload['reason'] = reason;
9567
10024
  }
@@ -9701,6 +10158,340 @@ class Memory {
9701
10158
  };
9702
10159
  return this.client.call('get', uri, apiHeaders, payload);
9703
10160
  }
10161
+ listPipelines(paramsOrFirst) {
10162
+ let params;
10163
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst))) {
10164
+ params = (paramsOrFirst || {});
10165
+ }
10166
+ else {
10167
+ params = {
10168
+ scenario: paramsOrFirst
10169
+ };
10170
+ }
10171
+ const scenario = params.scenario;
10172
+ const apiPath = '/memory/pipelines';
10173
+ const payload = {};
10174
+ if (typeof scenario !== 'undefined') {
10175
+ payload['scenario'] = scenario;
10176
+ }
10177
+ const uri = new URL(this.client.config.endpoint + apiPath);
10178
+ const apiHeaders = {
10179
+ 'X-Appwrite-Project': this.client.config.project,
10180
+ };
10181
+ return this.client.call('get', uri, apiHeaders, payload);
10182
+ }
10183
+ createPipeline(paramsOrFirst, ...rest) {
10184
+ let params;
10185
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst || 'fromDefaults' in paramsOrFirst || 'config' in paramsOrFirst))) {
10186
+ params = (paramsOrFirst || {});
10187
+ }
10188
+ else {
10189
+ params = {
10190
+ scenario: paramsOrFirst,
10191
+ fromDefaults: rest[0],
10192
+ config: rest[1]
10193
+ };
10194
+ }
10195
+ const scenario = params.scenario;
10196
+ const fromDefaults = params.fromDefaults;
10197
+ const config = params.config;
10198
+ const apiPath = '/memory/pipelines';
10199
+ const payload = {};
10200
+ if (typeof scenario !== 'undefined') {
10201
+ payload['scenario'] = scenario;
10202
+ }
10203
+ if (typeof fromDefaults !== 'undefined') {
10204
+ payload['fromDefaults'] = fromDefaults;
10205
+ }
10206
+ if (typeof config !== 'undefined') {
10207
+ payload['config'] = config;
10208
+ }
10209
+ const uri = new URL(this.client.config.endpoint + apiPath);
10210
+ const apiHeaders = {
10211
+ 'X-Appwrite-Project': this.client.config.project,
10212
+ 'content-type': 'application/json',
10213
+ };
10214
+ return this.client.call('post', uri, apiHeaders, payload);
10215
+ }
10216
+ setDefaultPipeline(paramsOrFirst, ...rest) {
10217
+ let params;
10218
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst || 'pipelineId' in paramsOrFirst || 'expectedRevision' in paramsOrFirst))) {
10219
+ params = (paramsOrFirst || {});
10220
+ }
10221
+ else {
10222
+ params = {
10223
+ scenario: paramsOrFirst,
10224
+ pipelineId: rest[0],
10225
+ expectedRevision: rest[1]
10226
+ };
10227
+ }
10228
+ const scenario = params.scenario;
10229
+ const pipelineId = params.pipelineId;
10230
+ const expectedRevision = params.expectedRevision;
10231
+ const apiPath = '/memory/pipelines/default';
10232
+ const payload = {};
10233
+ if (typeof scenario !== 'undefined') {
10234
+ payload['scenario'] = scenario;
10235
+ }
10236
+ if (typeof pipelineId !== 'undefined') {
10237
+ payload['pipelineId'] = pipelineId;
10238
+ }
10239
+ if (typeof expectedRevision !== 'undefined') {
10240
+ payload['expectedRevision'] = expectedRevision;
10241
+ }
10242
+ const uri = new URL(this.client.config.endpoint + apiPath);
10243
+ const apiHeaders = {
10244
+ 'X-Appwrite-Project': this.client.config.project,
10245
+ 'content-type': 'application/json',
10246
+ };
10247
+ return this.client.call('put', uri, apiHeaders, payload);
10248
+ }
10249
+ getPipeline(paramsOrFirst) {
10250
+ let params;
10251
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10252
+ params = (paramsOrFirst || {});
10253
+ }
10254
+ else {
10255
+ params = {
10256
+ pipelineId: paramsOrFirst
10257
+ };
10258
+ }
10259
+ const pipelineId = params.pipelineId;
10260
+ if (typeof pipelineId === 'undefined') {
10261
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
10262
+ }
10263
+ const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
10264
+ const payload = {};
10265
+ const uri = new URL(this.client.config.endpoint + apiPath);
10266
+ const apiHeaders = {
10267
+ 'X-Appwrite-Project': this.client.config.project,
10268
+ };
10269
+ return this.client.call('get', uri, apiHeaders, payload);
10270
+ }
10271
+ updatePipeline(paramsOrFirst, ...rest) {
10272
+ let params;
10273
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10274
+ params = (paramsOrFirst || {});
10275
+ }
10276
+ else {
10277
+ params = {
10278
+ pipelineId: paramsOrFirst,
10279
+ expectedRevision: rest[0],
10280
+ config: rest[1]
10281
+ };
10282
+ }
10283
+ const pipelineId = params.pipelineId;
10284
+ const expectedRevision = params.expectedRevision;
10285
+ const config = params.config;
10286
+ if (typeof pipelineId === 'undefined') {
10287
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
10288
+ }
10289
+ if (typeof expectedRevision === 'undefined') {
10290
+ throw new AgentbaseException('Missing required parameter: "expectedRevision"');
10291
+ }
10292
+ if (typeof config === 'undefined') {
10293
+ throw new AgentbaseException('Missing required parameter: "config"');
10294
+ }
10295
+ const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
10296
+ const payload = {};
10297
+ if (typeof expectedRevision !== 'undefined') {
10298
+ payload['expectedRevision'] = expectedRevision;
10299
+ }
10300
+ if (typeof config !== 'undefined') {
10301
+ payload['config'] = config;
10302
+ }
10303
+ const uri = new URL(this.client.config.endpoint + apiPath);
10304
+ const apiHeaders = {
10305
+ 'X-Appwrite-Project': this.client.config.project,
10306
+ 'content-type': 'application/json',
10307
+ };
10308
+ return this.client.call('patch', uri, apiHeaders, payload);
10309
+ }
10310
+ deletePipeline(paramsOrFirst, ...rest) {
10311
+ let params;
10312
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10313
+ params = (paramsOrFirst || {});
10314
+ }
10315
+ else {
10316
+ params = {
10317
+ pipelineId: paramsOrFirst,
10318
+ expectedRevision: rest[0]
10319
+ };
10320
+ }
10321
+ const pipelineId = params.pipelineId;
10322
+ const expectedRevision = params.expectedRevision;
10323
+ if (typeof pipelineId === 'undefined') {
10324
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
10325
+ }
10326
+ if (typeof expectedRevision === 'undefined') {
10327
+ throw new AgentbaseException('Missing required parameter: "expectedRevision"');
10328
+ }
10329
+ const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
10330
+ const payload = {};
10331
+ if (typeof expectedRevision !== 'undefined') {
10332
+ payload['expectedRevision'] = expectedRevision;
10333
+ }
10334
+ const uri = new URL(this.client.config.endpoint + apiPath);
10335
+ const apiHeaders = {
10336
+ 'X-Appwrite-Project': this.client.config.project,
10337
+ 'content-type': 'application/json',
10338
+ };
10339
+ return this.client.call('delete', uri, apiHeaders, payload);
10340
+ }
10341
+ publishPipeline(paramsOrFirst, ...rest) {
10342
+ let params;
10343
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10344
+ params = (paramsOrFirst || {});
10345
+ }
10346
+ else {
10347
+ params = {
10348
+ pipelineId: paramsOrFirst,
10349
+ versionId: rest[0],
10350
+ expectedRevision: rest[1],
10351
+ makeDefault: rest[2]
10352
+ };
10353
+ }
10354
+ const pipelineId = params.pipelineId;
10355
+ const versionId = params.versionId;
10356
+ const expectedRevision = params.expectedRevision;
10357
+ const makeDefault = params.makeDefault;
10358
+ if (typeof pipelineId === 'undefined') {
10359
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
10360
+ }
10361
+ if (typeof versionId === 'undefined') {
10362
+ throw new AgentbaseException('Missing required parameter: "versionId"');
10363
+ }
10364
+ if (typeof expectedRevision === 'undefined') {
10365
+ throw new AgentbaseException('Missing required parameter: "expectedRevision"');
10366
+ }
10367
+ const apiPath = '/memory/pipelines/{pipelineId}/publish'.replace('{pipelineId}', pipelineId);
10368
+ const payload = {};
10369
+ if (typeof versionId !== 'undefined') {
10370
+ payload['versionId'] = versionId;
10371
+ }
10372
+ if (typeof expectedRevision !== 'undefined') {
10373
+ payload['expectedRevision'] = expectedRevision;
10374
+ }
10375
+ if (typeof makeDefault !== 'undefined') {
10376
+ payload['makeDefault'] = makeDefault;
10377
+ }
10378
+ const uri = new URL(this.client.config.endpoint + apiPath);
10379
+ const apiHeaders = {
10380
+ 'X-Appwrite-Project': this.client.config.project,
10381
+ 'content-type': 'application/json',
10382
+ };
10383
+ return this.client.call('post', uri, apiHeaders, payload);
10384
+ }
10385
+ rollbackPipeline(paramsOrFirst, ...rest) {
10386
+ let params;
10387
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10388
+ params = (paramsOrFirst || {});
10389
+ }
10390
+ else {
10391
+ params = {
10392
+ pipelineId: paramsOrFirst,
10393
+ versionId: rest[0],
10394
+ expectedRevision: rest[1]
10395
+ };
10396
+ }
10397
+ const pipelineId = params.pipelineId;
10398
+ const versionId = params.versionId;
10399
+ const expectedRevision = params.expectedRevision;
10400
+ if (typeof pipelineId === 'undefined') {
10401
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
10402
+ }
10403
+ if (typeof versionId === 'undefined') {
10404
+ throw new AgentbaseException('Missing required parameter: "versionId"');
10405
+ }
10406
+ if (typeof expectedRevision === 'undefined') {
10407
+ throw new AgentbaseException('Missing required parameter: "expectedRevision"');
10408
+ }
10409
+ const apiPath = '/memory/pipelines/{pipelineId}/rollback'.replace('{pipelineId}', pipelineId);
10410
+ const payload = {};
10411
+ if (typeof versionId !== 'undefined') {
10412
+ payload['versionId'] = versionId;
10413
+ }
10414
+ if (typeof expectedRevision !== 'undefined') {
10415
+ payload['expectedRevision'] = expectedRevision;
10416
+ }
10417
+ const uri = new URL(this.client.config.endpoint + apiPath);
10418
+ const apiHeaders = {
10419
+ 'X-Appwrite-Project': this.client.config.project,
10420
+ 'content-type': 'application/json',
10421
+ };
10422
+ return this.client.call('post', uri, apiHeaders, payload);
10423
+ }
10424
+ validatePipeline(paramsOrFirst, ...rest) {
10425
+ let params;
10426
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10427
+ params = (paramsOrFirst || {});
10428
+ }
10429
+ else {
10430
+ params = {
10431
+ pipelineId: paramsOrFirst,
10432
+ versionId: rest[0],
10433
+ data: rest[1]
10434
+ };
10435
+ }
10436
+ const pipelineId = params.pipelineId;
10437
+ const versionId = params.versionId;
10438
+ const data = params.data;
10439
+ if (typeof pipelineId === 'undefined') {
10440
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
10441
+ }
10442
+ if (typeof versionId === 'undefined') {
10443
+ throw new AgentbaseException('Missing required parameter: "versionId"');
10444
+ }
10445
+ if (typeof data === 'undefined') {
10446
+ throw new AgentbaseException('Missing required parameter: "data"');
10447
+ }
10448
+ const apiPath = '/memory/pipelines/{pipelineId}/validate'.replace('{pipelineId}', pipelineId);
10449
+ const payload = {};
10450
+ if (typeof versionId !== 'undefined') {
10451
+ payload['versionId'] = versionId;
10452
+ }
10453
+ if (typeof data !== 'undefined') {
10454
+ payload['data'] = data;
10455
+ }
10456
+ const uri = new URL(this.client.config.endpoint + apiPath);
10457
+ const apiHeaders = {
10458
+ 'X-Appwrite-Project': this.client.config.project,
10459
+ 'content-type': 'application/json',
10460
+ };
10461
+ return this.client.call('post', uri, apiHeaders, payload);
10462
+ }
10463
+ listPipelineVersions(paramsOrFirst, ...rest) {
10464
+ let params;
10465
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10466
+ params = (paramsOrFirst || {});
10467
+ }
10468
+ else {
10469
+ params = {
10470
+ pipelineId: paramsOrFirst,
10471
+ versionId: rest[0],
10472
+ beforeRevision: rest[1]
10473
+ };
10474
+ }
10475
+ const pipelineId = params.pipelineId;
10476
+ const versionId = params.versionId;
10477
+ const beforeRevision = params.beforeRevision;
10478
+ if (typeof pipelineId === 'undefined') {
10479
+ throw new AgentbaseException('Missing required parameter: "pipelineId"');
10480
+ }
10481
+ const apiPath = '/memory/pipelines/{pipelineId}/versions'.replace('{pipelineId}', pipelineId);
10482
+ const payload = {};
10483
+ if (typeof versionId !== 'undefined') {
10484
+ payload['versionId'] = versionId;
10485
+ }
10486
+ if (typeof beforeRevision !== 'undefined') {
10487
+ payload['beforeRevision'] = beforeRevision;
10488
+ }
10489
+ const uri = new URL(this.client.config.endpoint + apiPath);
10490
+ const apiHeaders = {
10491
+ 'X-Appwrite-Project': this.client.config.project,
10492
+ };
10493
+ return this.client.call('get', uri, apiHeaders, payload);
10494
+ }
9704
10495
  }
9705
10496
 
9706
10497
  class Messaging {
@@ -13416,6 +14207,10 @@ exports.Status = void 0;
13416
14207
  Status["PartialFailed"] = "partial_failed";
13417
14208
  Status["Failed"] = "failed";
13418
14209
  Status["Dead"] = "dead";
14210
+ Status["Pending"] = "pending";
14211
+ Status["Approved"] = "approved";
14212
+ Status["Rejected"] = "rejected";
14213
+ Status["Superseded"] = "superseded";
13419
14214
  })(exports.Status || (exports.Status = {}));
13420
14215
 
13421
14216
  exports.Browser = void 0;
@@ -14120,6 +14915,23 @@ exports.ImageFormat = void 0;
14120
14915
  ImageFormat["Gif"] = "gif";
14121
14916
  })(exports.ImageFormat || (exports.ImageFormat = {}));
14122
14917
 
14918
+ exports.PathMatch = void 0;
14919
+ (function (PathMatch) {
14920
+ PathMatch["Exact"] = "exact";
14921
+ PathMatch["Regex"] = "regex";
14922
+ })(exports.PathMatch || (exports.PathMatch = {}));
14923
+
14924
+ exports.Method = void 0;
14925
+ (function (Method) {
14926
+ Method["GET"] = "GET";
14927
+ Method["POST"] = "POST";
14928
+ Method["PUT"] = "PUT";
14929
+ Method["PATCH"] = "PATCH";
14930
+ Method["DELETE"] = "DELETE";
14931
+ Method["OPTIONS"] = "OPTIONS";
14932
+ Method["HEAD"] = "HEAD";
14933
+ })(exports.Method || (exports.Method = {}));
14934
+
14123
14935
  exports.ExecutionMethod = void 0;
14124
14936
  (function (ExecutionMethod) {
14125
14937
  ExecutionMethod["GET"] = "GET";
@@ -14275,6 +15087,14 @@ exports.MemoryShareSubjectType = void 0;
14275
15087
  MemoryShareSubjectType["Group"] = "group";
14276
15088
  })(exports.MemoryShareSubjectType || (exports.MemoryShareSubjectType = {}));
14277
15089
 
15090
+ exports.Scenario = void 0;
15091
+ (function (Scenario) {
15092
+ Scenario["AddMemory"] = "add_memory";
15093
+ Scenario["Profile"] = "profile";
15094
+ Scenario["Distillation"] = "distillation";
15095
+ Scenario["Forgetting"] = "forgetting";
15096
+ })(exports.Scenario || (exports.Scenario = {}));
15097
+
14278
15098
  exports.OrganizationRole = void 0;
14279
15099
  (function (OrganizationRole) {
14280
15100
  OrganizationRole["Owner"] = "owner";