fusio-sdk 7.0.11 → 7.0.12

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.cjs CHANGED
@@ -88,6 +88,7 @@ __export(index_exports, {
88
88
  ConsumerTokenTag: () => ConsumerTokenTag,
89
89
  ConsumerTransactionTag: () => ConsumerTransactionTag,
90
90
  ConsumerWebhookTag: () => ConsumerWebhookTag,
91
+ SystemCaptchaTag: () => SystemCaptchaTag,
91
92
  SystemConnectionTag: () => SystemConnectionTag,
92
93
  SystemMetaTag: () => SystemMetaTag,
93
94
  SystemPaymentTag: () => SystemPaymentTag,
@@ -7013,8 +7014,8 @@ var BackendTag = class extends import_sdkgen_client97.TagAbstract {
7013
7014
  };
7014
7015
 
7015
7016
  // src/Client.ts
7016
- var import_sdkgen_client138 = require("sdkgen-client");
7017
- var import_sdkgen_client139 = require("sdkgen-client");
7017
+ var import_sdkgen_client140 = require("sdkgen-client");
7018
+ var import_sdkgen_client141 = require("sdkgen-client");
7018
7019
 
7019
7020
  // src/ConsumerTag.ts
7020
7021
  var import_sdkgen_client130 = require("sdkgen-client");
@@ -8649,12 +8650,43 @@ var ConsumerTag = class extends import_sdkgen_client130.TagAbstract {
8649
8650
  };
8650
8651
 
8651
8652
  // src/SystemTag.ts
8652
- var import_sdkgen_client137 = require("sdkgen-client");
8653
+ var import_sdkgen_client139 = require("sdkgen-client");
8653
8654
 
8654
- // src/SystemConnectionTag.ts
8655
+ // src/SystemCaptchaTag.ts
8655
8656
  var import_sdkgen_client131 = require("sdkgen-client");
8656
8657
  var import_sdkgen_client132 = require("sdkgen-client");
8657
- var SystemConnectionTag = class extends import_sdkgen_client131.TagAbstract {
8658
+ var SystemCaptchaTag = class extends import_sdkgen_client131.TagAbstract {
8659
+ /**
8660
+ * Endpoint to generate a captcha challenge
8661
+ *
8662
+ * @returns {Promise<SystemCaptchaChallenge>}
8663
+ * @throws {CommonMessageException}
8664
+ * @throws {ClientException}
8665
+ */
8666
+ async challenge() {
8667
+ const url = this.parser.url("/system/captcha/challenge", {});
8668
+ let request = {
8669
+ url,
8670
+ method: "GET",
8671
+ headers: {},
8672
+ params: this.parser.query({}, [])
8673
+ };
8674
+ const response = await this.httpClient.request(request);
8675
+ if (response.ok) {
8676
+ return await response.json();
8677
+ }
8678
+ const statusCode = response.status;
8679
+ if (statusCode >= 0 && statusCode <= 999) {
8680
+ throw new CommonMessageException(await response.json());
8681
+ }
8682
+ throw new import_sdkgen_client132.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8683
+ }
8684
+ };
8685
+
8686
+ // src/SystemConnectionTag.ts
8687
+ var import_sdkgen_client133 = require("sdkgen-client");
8688
+ var import_sdkgen_client134 = require("sdkgen-client");
8689
+ var SystemConnectionTag = class extends import_sdkgen_client133.TagAbstract {
8658
8690
  /**
8659
8691
  * Connection OAuth2 callback to authorize a connection
8660
8692
  *
@@ -8680,14 +8712,14 @@ var SystemConnectionTag = class extends import_sdkgen_client131.TagAbstract {
8680
8712
  if (statusCode >= 0 && statusCode <= 999) {
8681
8713
  throw new CommonMessageException(await response.json());
8682
8714
  }
8683
- throw new import_sdkgen_client132.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8715
+ throw new import_sdkgen_client134.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8684
8716
  }
8685
8717
  };
8686
8718
 
8687
8719
  // src/SystemMetaTag.ts
8688
- var import_sdkgen_client133 = require("sdkgen-client");
8689
- var import_sdkgen_client134 = require("sdkgen-client");
8690
- var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
8720
+ var import_sdkgen_client135 = require("sdkgen-client");
8721
+ var import_sdkgen_client136 = require("sdkgen-client");
8722
+ var SystemMetaTag = class extends import_sdkgen_client135.TagAbstract {
8691
8723
  /**
8692
8724
  * Returns meta information and links about the current installed Fusio version
8693
8725
  *
@@ -8711,7 +8743,7 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
8711
8743
  if (statusCode >= 0 && statusCode <= 999) {
8712
8744
  throw new CommonMessageException(await response.json());
8713
8745
  }
8714
- throw new import_sdkgen_client134.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8746
+ throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8715
8747
  }
8716
8748
  /**
8717
8749
  * Debug endpoint which returns the provided data
@@ -8739,7 +8771,7 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
8739
8771
  if (statusCode >= 0 && statusCode <= 999) {
8740
8772
  throw new CommonMessageException(await response.json());
8741
8773
  }
8742
- throw new import_sdkgen_client134.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8774
+ throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8743
8775
  }
8744
8776
  /**
8745
8777
  * Health check endpoint which returns information about the health status of the system
@@ -8764,7 +8796,7 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
8764
8796
  if (statusCode >= 0 && statusCode <= 999) {
8765
8797
  throw new CommonMessageException(await response.json());
8766
8798
  }
8767
- throw new import_sdkgen_client134.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8799
+ throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8768
8800
  }
8769
8801
  /**
8770
8802
  * Returns all available routes
@@ -8789,7 +8821,7 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
8789
8821
  if (statusCode >= 0 && statusCode <= 999) {
8790
8822
  throw new CommonMessageException(await response.json());
8791
8823
  }
8792
- throw new import_sdkgen_client134.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8824
+ throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8793
8825
  }
8794
8826
  /**
8795
8827
  * Returns details of a specific schema
@@ -8816,14 +8848,14 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
8816
8848
  if (statusCode >= 0 && statusCode <= 999) {
8817
8849
  throw new CommonMessageException(await response.json());
8818
8850
  }
8819
- throw new import_sdkgen_client134.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8851
+ throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8820
8852
  }
8821
8853
  };
8822
8854
 
8823
8855
  // src/SystemPaymentTag.ts
8824
- var import_sdkgen_client135 = require("sdkgen-client");
8825
- var import_sdkgen_client136 = require("sdkgen-client");
8826
- var SystemPaymentTag = class extends import_sdkgen_client135.TagAbstract {
8856
+ var import_sdkgen_client137 = require("sdkgen-client");
8857
+ var import_sdkgen_client138 = require("sdkgen-client");
8858
+ var SystemPaymentTag = class extends import_sdkgen_client137.TagAbstract {
8827
8859
  /**
8828
8860
  * Payment webhook endpoint after successful purchase of a plan
8829
8861
  *
@@ -8849,12 +8881,18 @@ var SystemPaymentTag = class extends import_sdkgen_client135.TagAbstract {
8849
8881
  if (statusCode >= 0 && statusCode <= 999) {
8850
8882
  throw new CommonMessageException(await response.json());
8851
8883
  }
8852
- throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8884
+ throw new import_sdkgen_client138.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
8853
8885
  }
8854
8886
  };
8855
8887
 
8856
8888
  // src/SystemTag.ts
8857
- var SystemTag = class extends import_sdkgen_client137.TagAbstract {
8889
+ var SystemTag = class extends import_sdkgen_client139.TagAbstract {
8890
+ captcha() {
8891
+ return new SystemCaptchaTag(
8892
+ this.httpClient,
8893
+ this.parser
8894
+ );
8895
+ }
8858
8896
  connection() {
8859
8897
  return new SystemConnectionTag(
8860
8898
  this.httpClient,
@@ -8876,7 +8914,7 @@ var SystemTag = class extends import_sdkgen_client137.TagAbstract {
8876
8914
  };
8877
8915
 
8878
8916
  // src/Client.ts
8879
- var Client = class _Client extends import_sdkgen_client138.ClientAbstract {
8917
+ var Client = class _Client extends import_sdkgen_client140.ClientAbstract {
8880
8918
  authorization() {
8881
8919
  return new AuthorizationTag(
8882
8920
  this.httpClient,
@@ -8902,7 +8940,7 @@ var Client = class _Client extends import_sdkgen_client138.ClientAbstract {
8902
8940
  );
8903
8941
  }
8904
8942
  static buildAnonymous(baseUrl) {
8905
- return new _Client(baseUrl, new import_sdkgen_client139.Anonymous());
8943
+ return new _Client(baseUrl, new import_sdkgen_client141.Anonymous());
8906
8944
  }
8907
8945
  };
8908
8946
  // Annotate the CommonJS export names for ESM import in node:
@@ -8975,6 +9013,7 @@ var Client = class _Client extends import_sdkgen_client138.ClientAbstract {
8975
9013
  ConsumerTokenTag,
8976
9014
  ConsumerTransactionTag,
8977
9015
  ConsumerWebhookTag,
9016
+ SystemCaptchaTag,
8978
9017
  SystemConnectionTag,
8979
9018
  SystemMetaTag,
8980
9019
  SystemPaymentTag,