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/LICENSE +21 -21
- package/README.md +842 -6
- package/dist/index.cjs +72 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6550 -6079
- package/dist/index.d.ts +6550 -6079
- package/dist/index.js +67 -23
- package/dist/index.js.map +1 -1
- package/package.json +38 -43
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,
|
|
@@ -523,7 +524,7 @@ var BackendAgentMessageTag = class extends import_sdkgen_client8.TagAbstract {
|
|
|
523
524
|
* @throws {CommonMessageException}
|
|
524
525
|
* @throws {ClientException}
|
|
525
526
|
*/
|
|
526
|
-
async getAll(agentId, chatId) {
|
|
527
|
+
async getAll(agentId, refId, chatId) {
|
|
527
528
|
const url = this.parser.url("/backend/agent/$agent_id<[0-9]+|^~>/message", {
|
|
528
529
|
"agent_id": agentId
|
|
529
530
|
});
|
|
@@ -532,6 +533,7 @@ var BackendAgentMessageTag = class extends import_sdkgen_client8.TagAbstract {
|
|
|
532
533
|
method: "GET",
|
|
533
534
|
headers: {},
|
|
534
535
|
params: this.parser.query({
|
|
536
|
+
"ref_id": refId,
|
|
535
537
|
"chat_id": chatId
|
|
536
538
|
}, [])
|
|
537
539
|
};
|
|
@@ -552,7 +554,7 @@ var BackendAgentMessageTag = class extends import_sdkgen_client8.TagAbstract {
|
|
|
552
554
|
* @throws {CommonMessageException}
|
|
553
555
|
* @throws {ClientException}
|
|
554
556
|
*/
|
|
555
|
-
async submit(agentId, payload) {
|
|
557
|
+
async submit(agentId, payload, refId) {
|
|
556
558
|
const url = this.parser.url("/backend/agent/$agent_id<[0-9]+|^~>/message", {
|
|
557
559
|
"agent_id": agentId
|
|
558
560
|
});
|
|
@@ -562,7 +564,9 @@ var BackendAgentMessageTag = class extends import_sdkgen_client8.TagAbstract {
|
|
|
562
564
|
headers: {
|
|
563
565
|
"Content-Type": "application/json"
|
|
564
566
|
},
|
|
565
|
-
params: this.parser.query({
|
|
567
|
+
params: this.parser.query({
|
|
568
|
+
"ref_id": refId
|
|
569
|
+
}, []),
|
|
566
570
|
data: payload
|
|
567
571
|
};
|
|
568
572
|
const response = await this.httpClient.request(request);
|
|
@@ -7013,8 +7017,8 @@ var BackendTag = class extends import_sdkgen_client97.TagAbstract {
|
|
|
7013
7017
|
};
|
|
7014
7018
|
|
|
7015
7019
|
// src/Client.ts
|
|
7016
|
-
var
|
|
7017
|
-
var
|
|
7020
|
+
var import_sdkgen_client140 = require("sdkgen-client");
|
|
7021
|
+
var import_sdkgen_client141 = require("sdkgen-client");
|
|
7018
7022
|
|
|
7019
7023
|
// src/ConsumerTag.ts
|
|
7020
7024
|
var import_sdkgen_client130 = require("sdkgen-client");
|
|
@@ -7345,7 +7349,7 @@ var ConsumerAgentMessageTag = class extends import_sdkgen_client100.TagAbstract
|
|
|
7345
7349
|
* @throws {CommonMessageException}
|
|
7346
7350
|
* @throws {ClientException}
|
|
7347
7351
|
*/
|
|
7348
|
-
async getAll(agentId, chatId) {
|
|
7352
|
+
async getAll(agentId, refId, chatId) {
|
|
7349
7353
|
const url = this.parser.url("/consumer/agent/$agent_id<[0-9]+|^~>/message", {
|
|
7350
7354
|
"agent_id": agentId
|
|
7351
7355
|
});
|
|
@@ -7354,6 +7358,7 @@ var ConsumerAgentMessageTag = class extends import_sdkgen_client100.TagAbstract
|
|
|
7354
7358
|
method: "GET",
|
|
7355
7359
|
headers: {},
|
|
7356
7360
|
params: this.parser.query({
|
|
7361
|
+
"ref_id": refId,
|
|
7357
7362
|
"chat_id": chatId
|
|
7358
7363
|
}, [])
|
|
7359
7364
|
};
|
|
@@ -7374,7 +7379,7 @@ var ConsumerAgentMessageTag = class extends import_sdkgen_client100.TagAbstract
|
|
|
7374
7379
|
* @throws {CommonMessageException}
|
|
7375
7380
|
* @throws {ClientException}
|
|
7376
7381
|
*/
|
|
7377
|
-
async submit(agentId, payload) {
|
|
7382
|
+
async submit(agentId, payload, refId) {
|
|
7378
7383
|
const url = this.parser.url("/consumer/agent/$agent_id<[0-9]+|^~>/message", {
|
|
7379
7384
|
"agent_id": agentId
|
|
7380
7385
|
});
|
|
@@ -7384,7 +7389,9 @@ var ConsumerAgentMessageTag = class extends import_sdkgen_client100.TagAbstract
|
|
|
7384
7389
|
headers: {
|
|
7385
7390
|
"Content-Type": "application/json"
|
|
7386
7391
|
},
|
|
7387
|
-
params: this.parser.query({
|
|
7392
|
+
params: this.parser.query({
|
|
7393
|
+
"ref_id": refId
|
|
7394
|
+
}, []),
|
|
7388
7395
|
data: payload
|
|
7389
7396
|
};
|
|
7390
7397
|
const response = await this.httpClient.request(request);
|
|
@@ -8649,12 +8656,43 @@ var ConsumerTag = class extends import_sdkgen_client130.TagAbstract {
|
|
|
8649
8656
|
};
|
|
8650
8657
|
|
|
8651
8658
|
// src/SystemTag.ts
|
|
8652
|
-
var
|
|
8659
|
+
var import_sdkgen_client139 = require("sdkgen-client");
|
|
8653
8660
|
|
|
8654
|
-
// src/
|
|
8661
|
+
// src/SystemCaptchaTag.ts
|
|
8655
8662
|
var import_sdkgen_client131 = require("sdkgen-client");
|
|
8656
8663
|
var import_sdkgen_client132 = require("sdkgen-client");
|
|
8657
|
-
var
|
|
8664
|
+
var SystemCaptchaTag = class extends import_sdkgen_client131.TagAbstract {
|
|
8665
|
+
/**
|
|
8666
|
+
* Endpoint to generate a captcha challenge
|
|
8667
|
+
*
|
|
8668
|
+
* @returns {Promise<SystemCaptchaChallenge>}
|
|
8669
|
+
* @throws {CommonMessageException}
|
|
8670
|
+
* @throws {ClientException}
|
|
8671
|
+
*/
|
|
8672
|
+
async challenge() {
|
|
8673
|
+
const url = this.parser.url("/system/captcha/challenge", {});
|
|
8674
|
+
let request = {
|
|
8675
|
+
url,
|
|
8676
|
+
method: "GET",
|
|
8677
|
+
headers: {},
|
|
8678
|
+
params: this.parser.query({}, [])
|
|
8679
|
+
};
|
|
8680
|
+
const response = await this.httpClient.request(request);
|
|
8681
|
+
if (response.ok) {
|
|
8682
|
+
return await response.json();
|
|
8683
|
+
}
|
|
8684
|
+
const statusCode = response.status;
|
|
8685
|
+
if (statusCode >= 0 && statusCode <= 999) {
|
|
8686
|
+
throw new CommonMessageException(await response.json());
|
|
8687
|
+
}
|
|
8688
|
+
throw new import_sdkgen_client132.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
8689
|
+
}
|
|
8690
|
+
};
|
|
8691
|
+
|
|
8692
|
+
// src/SystemConnectionTag.ts
|
|
8693
|
+
var import_sdkgen_client133 = require("sdkgen-client");
|
|
8694
|
+
var import_sdkgen_client134 = require("sdkgen-client");
|
|
8695
|
+
var SystemConnectionTag = class extends import_sdkgen_client133.TagAbstract {
|
|
8658
8696
|
/**
|
|
8659
8697
|
* Connection OAuth2 callback to authorize a connection
|
|
8660
8698
|
*
|
|
@@ -8680,14 +8718,14 @@ var SystemConnectionTag = class extends import_sdkgen_client131.TagAbstract {
|
|
|
8680
8718
|
if (statusCode >= 0 && statusCode <= 999) {
|
|
8681
8719
|
throw new CommonMessageException(await response.json());
|
|
8682
8720
|
}
|
|
8683
|
-
throw new
|
|
8721
|
+
throw new import_sdkgen_client134.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
8684
8722
|
}
|
|
8685
8723
|
};
|
|
8686
8724
|
|
|
8687
8725
|
// src/SystemMetaTag.ts
|
|
8688
|
-
var
|
|
8689
|
-
var
|
|
8690
|
-
var SystemMetaTag = class extends
|
|
8726
|
+
var import_sdkgen_client135 = require("sdkgen-client");
|
|
8727
|
+
var import_sdkgen_client136 = require("sdkgen-client");
|
|
8728
|
+
var SystemMetaTag = class extends import_sdkgen_client135.TagAbstract {
|
|
8691
8729
|
/**
|
|
8692
8730
|
* Returns meta information and links about the current installed Fusio version
|
|
8693
8731
|
*
|
|
@@ -8711,7 +8749,7 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
|
|
|
8711
8749
|
if (statusCode >= 0 && statusCode <= 999) {
|
|
8712
8750
|
throw new CommonMessageException(await response.json());
|
|
8713
8751
|
}
|
|
8714
|
-
throw new
|
|
8752
|
+
throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
8715
8753
|
}
|
|
8716
8754
|
/**
|
|
8717
8755
|
* Debug endpoint which returns the provided data
|
|
@@ -8739,7 +8777,7 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
|
|
|
8739
8777
|
if (statusCode >= 0 && statusCode <= 999) {
|
|
8740
8778
|
throw new CommonMessageException(await response.json());
|
|
8741
8779
|
}
|
|
8742
|
-
throw new
|
|
8780
|
+
throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
8743
8781
|
}
|
|
8744
8782
|
/**
|
|
8745
8783
|
* Health check endpoint which returns information about the health status of the system
|
|
@@ -8764,7 +8802,7 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
|
|
|
8764
8802
|
if (statusCode >= 0 && statusCode <= 999) {
|
|
8765
8803
|
throw new CommonMessageException(await response.json());
|
|
8766
8804
|
}
|
|
8767
|
-
throw new
|
|
8805
|
+
throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
8768
8806
|
}
|
|
8769
8807
|
/**
|
|
8770
8808
|
* Returns all available routes
|
|
@@ -8789,7 +8827,7 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
|
|
|
8789
8827
|
if (statusCode >= 0 && statusCode <= 999) {
|
|
8790
8828
|
throw new CommonMessageException(await response.json());
|
|
8791
8829
|
}
|
|
8792
|
-
throw new
|
|
8830
|
+
throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
8793
8831
|
}
|
|
8794
8832
|
/**
|
|
8795
8833
|
* Returns details of a specific schema
|
|
@@ -8816,14 +8854,14 @@ var SystemMetaTag = class extends import_sdkgen_client133.TagAbstract {
|
|
|
8816
8854
|
if (statusCode >= 0 && statusCode <= 999) {
|
|
8817
8855
|
throw new CommonMessageException(await response.json());
|
|
8818
8856
|
}
|
|
8819
|
-
throw new
|
|
8857
|
+
throw new import_sdkgen_client136.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
8820
8858
|
}
|
|
8821
8859
|
};
|
|
8822
8860
|
|
|
8823
8861
|
// src/SystemPaymentTag.ts
|
|
8824
|
-
var
|
|
8825
|
-
var
|
|
8826
|
-
var SystemPaymentTag = class extends
|
|
8862
|
+
var import_sdkgen_client137 = require("sdkgen-client");
|
|
8863
|
+
var import_sdkgen_client138 = require("sdkgen-client");
|
|
8864
|
+
var SystemPaymentTag = class extends import_sdkgen_client137.TagAbstract {
|
|
8827
8865
|
/**
|
|
8828
8866
|
* Payment webhook endpoint after successful purchase of a plan
|
|
8829
8867
|
*
|
|
@@ -8849,12 +8887,18 @@ var SystemPaymentTag = class extends import_sdkgen_client135.TagAbstract {
|
|
|
8849
8887
|
if (statusCode >= 0 && statusCode <= 999) {
|
|
8850
8888
|
throw new CommonMessageException(await response.json());
|
|
8851
8889
|
}
|
|
8852
|
-
throw new
|
|
8890
|
+
throw new import_sdkgen_client138.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
8853
8891
|
}
|
|
8854
8892
|
};
|
|
8855
8893
|
|
|
8856
8894
|
// src/SystemTag.ts
|
|
8857
|
-
var SystemTag = class extends
|
|
8895
|
+
var SystemTag = class extends import_sdkgen_client139.TagAbstract {
|
|
8896
|
+
captcha() {
|
|
8897
|
+
return new SystemCaptchaTag(
|
|
8898
|
+
this.httpClient,
|
|
8899
|
+
this.parser
|
|
8900
|
+
);
|
|
8901
|
+
}
|
|
8858
8902
|
connection() {
|
|
8859
8903
|
return new SystemConnectionTag(
|
|
8860
8904
|
this.httpClient,
|
|
@@ -8876,7 +8920,7 @@ var SystemTag = class extends import_sdkgen_client137.TagAbstract {
|
|
|
8876
8920
|
};
|
|
8877
8921
|
|
|
8878
8922
|
// src/Client.ts
|
|
8879
|
-
var Client = class _Client extends
|
|
8923
|
+
var Client = class _Client extends import_sdkgen_client140.ClientAbstract {
|
|
8880
8924
|
authorization() {
|
|
8881
8925
|
return new AuthorizationTag(
|
|
8882
8926
|
this.httpClient,
|
|
@@ -8902,7 +8946,7 @@ var Client = class _Client extends import_sdkgen_client138.ClientAbstract {
|
|
|
8902
8946
|
);
|
|
8903
8947
|
}
|
|
8904
8948
|
static buildAnonymous(baseUrl) {
|
|
8905
|
-
return new _Client(baseUrl, new
|
|
8949
|
+
return new _Client(baseUrl, new import_sdkgen_client141.Anonymous());
|
|
8906
8950
|
}
|
|
8907
8951
|
};
|
|
8908
8952
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -8975,6 +9019,7 @@ var Client = class _Client extends import_sdkgen_client138.ClientAbstract {
|
|
|
8975
9019
|
ConsumerTokenTag,
|
|
8976
9020
|
ConsumerTransactionTag,
|
|
8977
9021
|
ConsumerWebhookTag,
|
|
9022
|
+
SystemCaptchaTag,
|
|
8978
9023
|
SystemConnectionTag,
|
|
8979
9024
|
SystemMetaTag,
|
|
8980
9025
|
SystemPaymentTag,
|