fusio-sdk 7.0.11 → 7.0.13

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/index.js CHANGED
@@ -426,7 +426,7 @@ var BackendAgentMessageTag = class extends TagAbstract4 {
426
426
  * @throws {CommonMessageException}
427
427
  * @throws {ClientException}
428
428
  */
429
- async getAll(agentId, chatId) {
429
+ async getAll(agentId, refId, chatId) {
430
430
  const url = this.parser.url("/backend/agent/$agent_id<[0-9]+|^~>/message", {
431
431
  "agent_id": agentId
432
432
  });
@@ -435,6 +435,7 @@ var BackendAgentMessageTag = class extends TagAbstract4 {
435
435
  method: "GET",
436
436
  headers: {},
437
437
  params: this.parser.query({
438
+ "ref_id": refId,
438
439
  "chat_id": chatId
439
440
  }, [])
440
441
  };
@@ -455,7 +456,7 @@ var BackendAgentMessageTag = class extends TagAbstract4 {
455
456
  * @throws {CommonMessageException}
456
457
  * @throws {ClientException}
457
458
  */
458
- async submit(agentId, payload) {
459
+ async submit(agentId, payload, refId) {
459
460
  const url = this.parser.url("/backend/agent/$agent_id<[0-9]+|^~>/message", {
460
461
  "agent_id": agentId
461
462
  });
@@ -465,7 +466,9 @@ var BackendAgentMessageTag = class extends TagAbstract4 {
465
466
  headers: {
466
467
  "Content-Type": "application/json"
467
468
  },
468
- params: this.parser.query({}, []),
469
+ params: this.parser.query({
470
+ "ref_id": refId
471
+ }, []),
469
472
  data: payload
470
473
  };
471
474
  const response = await this.httpClient.request(request);
@@ -7248,7 +7251,7 @@ var ConsumerAgentMessageTag = class extends TagAbstract51 {
7248
7251
  * @throws {CommonMessageException}
7249
7252
  * @throws {ClientException}
7250
7253
  */
7251
- async getAll(agentId, chatId) {
7254
+ async getAll(agentId, refId, chatId) {
7252
7255
  const url = this.parser.url("/consumer/agent/$agent_id<[0-9]+|^~>/message", {
7253
7256
  "agent_id": agentId
7254
7257
  });
@@ -7257,6 +7260,7 @@ var ConsumerAgentMessageTag = class extends TagAbstract51 {
7257
7260
  method: "GET",
7258
7261
  headers: {},
7259
7262
  params: this.parser.query({
7263
+ "ref_id": refId,
7260
7264
  "chat_id": chatId
7261
7265
  }, [])
7262
7266
  };
@@ -7277,7 +7281,7 @@ var ConsumerAgentMessageTag = class extends TagAbstract51 {
7277
7281
  * @throws {CommonMessageException}
7278
7282
  * @throws {ClientException}
7279
7283
  */
7280
- async submit(agentId, payload) {
7284
+ async submit(agentId, payload, refId) {
7281
7285
  const url = this.parser.url("/consumer/agent/$agent_id<[0-9]+|^~>/message", {
7282
7286
  "agent_id": agentId
7283
7287
  });
@@ -7287,7 +7291,9 @@ var ConsumerAgentMessageTag = class extends TagAbstract51 {
7287
7291
  headers: {
7288
7292
  "Content-Type": "application/json"
7289
7293
  },
7290
- params: this.parser.query({}, []),
7294
+ params: this.parser.query({
7295
+ "ref_id": refId
7296
+ }, []),
7291
7297
  data: payload
7292
7298
  };
7293
7299
  const response = await this.httpClient.request(request);
@@ -8552,12 +8558,43 @@ var ConsumerTag = class extends TagAbstract66 {
8552
8558
  };
8553
8559
 
8554
8560
  // src/SystemTag.ts
8555
- import { TagAbstract as TagAbstract70 } from "sdkgen-client";
8561
+ import { TagAbstract as TagAbstract71 } from "sdkgen-client";
8556
8562
 
8557
- // src/SystemConnectionTag.ts
8563
+ // src/SystemCaptchaTag.ts
8558
8564
  import { TagAbstract as TagAbstract67 } from "sdkgen-client";
8559
8565
  import { UnknownStatusCodeException as UnknownStatusCodeException64 } from "sdkgen-client";
8560
- var SystemConnectionTag = class extends TagAbstract67 {
8566
+ var SystemCaptchaTag = class extends TagAbstract67 {
8567
+ /**
8568
+ * Endpoint to generate a captcha challenge
8569
+ *
8570
+ * @returns {Promise<SystemCaptchaChallenge>}
8571
+ * @throws {CommonMessageException}
8572
+ * @throws {ClientException}
8573
+ */
8574
+ async challenge() {
8575
+ const url = this.parser.url("/system/captcha/challenge", {});
8576
+ let request = {
8577
+ url,
8578
+ method: "GET",
8579
+ headers: {},
8580
+ params: this.parser.query({}, [])
8581
+ };
8582
+ const response = await this.httpClient.request(request);
8583
+ if (response.ok) {
8584
+ return await response.json();
8585
+ }
8586
+ const statusCode = response.status;
8587
+ if (statusCode >= 0 && statusCode <= 999) {
8588
+ throw new CommonMessageException(await response.json());
8589
+ }
8590
+ throw new UnknownStatusCodeException64("The server returned an unknown status code: " + statusCode);
8591
+ }
8592
+ };
8593
+
8594
+ // src/SystemConnectionTag.ts
8595
+ import { TagAbstract as TagAbstract68 } from "sdkgen-client";
8596
+ import { UnknownStatusCodeException as UnknownStatusCodeException65 } from "sdkgen-client";
8597
+ var SystemConnectionTag = class extends TagAbstract68 {
8561
8598
  /**
8562
8599
  * Connection OAuth2 callback to authorize a connection
8563
8600
  *
@@ -8583,14 +8620,14 @@ var SystemConnectionTag = class extends TagAbstract67 {
8583
8620
  if (statusCode >= 0 && statusCode <= 999) {
8584
8621
  throw new CommonMessageException(await response.json());
8585
8622
  }
8586
- throw new UnknownStatusCodeException64("The server returned an unknown status code: " + statusCode);
8623
+ throw new UnknownStatusCodeException65("The server returned an unknown status code: " + statusCode);
8587
8624
  }
8588
8625
  };
8589
8626
 
8590
8627
  // src/SystemMetaTag.ts
8591
- import { TagAbstract as TagAbstract68 } from "sdkgen-client";
8592
- import { UnknownStatusCodeException as UnknownStatusCodeException65 } from "sdkgen-client";
8593
- var SystemMetaTag = class extends TagAbstract68 {
8628
+ import { TagAbstract as TagAbstract69 } from "sdkgen-client";
8629
+ import { UnknownStatusCodeException as UnknownStatusCodeException66 } from "sdkgen-client";
8630
+ var SystemMetaTag = class extends TagAbstract69 {
8594
8631
  /**
8595
8632
  * Returns meta information and links about the current installed Fusio version
8596
8633
  *
@@ -8614,7 +8651,7 @@ var SystemMetaTag = class extends TagAbstract68 {
8614
8651
  if (statusCode >= 0 && statusCode <= 999) {
8615
8652
  throw new CommonMessageException(await response.json());
8616
8653
  }
8617
- throw new UnknownStatusCodeException65("The server returned an unknown status code: " + statusCode);
8654
+ throw new UnknownStatusCodeException66("The server returned an unknown status code: " + statusCode);
8618
8655
  }
8619
8656
  /**
8620
8657
  * Debug endpoint which returns the provided data
@@ -8642,7 +8679,7 @@ var SystemMetaTag = class extends TagAbstract68 {
8642
8679
  if (statusCode >= 0 && statusCode <= 999) {
8643
8680
  throw new CommonMessageException(await response.json());
8644
8681
  }
8645
- throw new UnknownStatusCodeException65("The server returned an unknown status code: " + statusCode);
8682
+ throw new UnknownStatusCodeException66("The server returned an unknown status code: " + statusCode);
8646
8683
  }
8647
8684
  /**
8648
8685
  * Health check endpoint which returns information about the health status of the system
@@ -8667,7 +8704,7 @@ var SystemMetaTag = class extends TagAbstract68 {
8667
8704
  if (statusCode >= 0 && statusCode <= 999) {
8668
8705
  throw new CommonMessageException(await response.json());
8669
8706
  }
8670
- throw new UnknownStatusCodeException65("The server returned an unknown status code: " + statusCode);
8707
+ throw new UnknownStatusCodeException66("The server returned an unknown status code: " + statusCode);
8671
8708
  }
8672
8709
  /**
8673
8710
  * Returns all available routes
@@ -8692,7 +8729,7 @@ var SystemMetaTag = class extends TagAbstract68 {
8692
8729
  if (statusCode >= 0 && statusCode <= 999) {
8693
8730
  throw new CommonMessageException(await response.json());
8694
8731
  }
8695
- throw new UnknownStatusCodeException65("The server returned an unknown status code: " + statusCode);
8732
+ throw new UnknownStatusCodeException66("The server returned an unknown status code: " + statusCode);
8696
8733
  }
8697
8734
  /**
8698
8735
  * Returns details of a specific schema
@@ -8719,14 +8756,14 @@ var SystemMetaTag = class extends TagAbstract68 {
8719
8756
  if (statusCode >= 0 && statusCode <= 999) {
8720
8757
  throw new CommonMessageException(await response.json());
8721
8758
  }
8722
- throw new UnknownStatusCodeException65("The server returned an unknown status code: " + statusCode);
8759
+ throw new UnknownStatusCodeException66("The server returned an unknown status code: " + statusCode);
8723
8760
  }
8724
8761
  };
8725
8762
 
8726
8763
  // src/SystemPaymentTag.ts
8727
- import { TagAbstract as TagAbstract69 } from "sdkgen-client";
8728
- import { UnknownStatusCodeException as UnknownStatusCodeException66 } from "sdkgen-client";
8729
- var SystemPaymentTag = class extends TagAbstract69 {
8764
+ import { TagAbstract as TagAbstract70 } from "sdkgen-client";
8765
+ import { UnknownStatusCodeException as UnknownStatusCodeException67 } from "sdkgen-client";
8766
+ var SystemPaymentTag = class extends TagAbstract70 {
8730
8767
  /**
8731
8768
  * Payment webhook endpoint after successful purchase of a plan
8732
8769
  *
@@ -8752,12 +8789,18 @@ var SystemPaymentTag = class extends TagAbstract69 {
8752
8789
  if (statusCode >= 0 && statusCode <= 999) {
8753
8790
  throw new CommonMessageException(await response.json());
8754
8791
  }
8755
- throw new UnknownStatusCodeException66("The server returned an unknown status code: " + statusCode);
8792
+ throw new UnknownStatusCodeException67("The server returned an unknown status code: " + statusCode);
8756
8793
  }
8757
8794
  };
8758
8795
 
8759
8796
  // src/SystemTag.ts
8760
- var SystemTag = class extends TagAbstract70 {
8797
+ var SystemTag = class extends TagAbstract71 {
8798
+ captcha() {
8799
+ return new SystemCaptchaTag(
8800
+ this.httpClient,
8801
+ this.parser
8802
+ );
8803
+ }
8761
8804
  connection() {
8762
8805
  return new SystemConnectionTag(
8763
8806
  this.httpClient,
@@ -8877,6 +8920,7 @@ export {
8877
8920
  ConsumerTokenTag,
8878
8921
  ConsumerTransactionTag,
8879
8922
  ConsumerWebhookTag,
8923
+ SystemCaptchaTag,
8880
8924
  SystemConnectionTag,
8881
8925
  SystemMetaTag,
8882
8926
  SystemPaymentTag,