@flowcore/sdk 1.15.0 → 1.16.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/CHANGELOG.md +14 -0
- package/esm/commands/api-key/api-key.create.d.ts +1 -1
- package/esm/commands/api-key/api-key.create.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.create.js +1 -1
- package/esm/commands/api-key/api-key.delete.d.ts +1 -1
- package/esm/commands/api-key/api-key.delete.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.delete.js +1 -1
- package/esm/commands/api-key/api-key.list.d.ts +1 -1
- package/esm/commands/api-key/api-key.list.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.list.js +1 -1
- package/esm/commands/container-registry/container-registry.delete.d.ts +1 -1
- package/esm/commands/container-registry/container-registry.delete.d.ts.map +1 -1
- package/esm/commands/container-registry/container-registry.delete.js +2 -1
- package/esm/commands/container-registry/container-registry.fetch.d.ts +1 -1
- package/esm/commands/container-registry/container-registry.fetch.d.ts.map +1 -1
- package/esm/commands/container-registry/container-registry.fetch.js +2 -1
- package/esm/commands/container-registry/container-registry.list.d.ts +1 -1
- package/esm/commands/container-registry/container-registry.list.d.ts.map +1 -1
- package/esm/commands/container-registry/container-registry.list.js +2 -1
- package/esm/commands/data-core/data-core.delete-request.d.ts +1 -1
- package/esm/commands/data-core/data-core.delete-request.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.delete-request.js +1 -1
- package/esm/commands/event-type/event-type.delete-request.d.ts +1 -1
- package/esm/commands/event-type/event-type.delete-request.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.delete-request.js +1 -1
- package/esm/commands/event-type/event-type.info.d.ts +35 -0
- package/esm/commands/event-type/event-type.info.d.ts.map +1 -0
- package/esm/commands/event-type/event-type.info.js +58 -0
- package/esm/commands/event-type/event-type.truncate-request.d.ts +1 -1
- package/esm/commands/event-type/event-type.truncate-request.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.truncate-request.js +1 -1
- package/esm/commands/events/event.list.d.ts +62 -0
- package/esm/commands/events/event.list.d.ts.map +1 -0
- package/esm/commands/events/event.list.js +53 -0
- package/esm/commands/events/time-bucket.list.d.ts +49 -0
- package/esm/commands/events/time-bucket.list.d.ts.map +1 -0
- package/esm/commands/events/time-bucket.list.js +50 -0
- package/esm/commands/flow-type/flow-type.delete-request.d.ts +1 -1
- package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.delete-request.js +1 -1
- package/esm/commands/index.d.ts +3 -1
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +4 -2
- package/esm/commands/secret/secret.create.d.ts +1 -1
- package/esm/commands/secret/secret.create.d.ts.map +1 -1
- package/esm/commands/secret/secret.create.js +1 -1
- package/esm/commands/secret/secret.delete.d.ts +1 -1
- package/esm/commands/secret/secret.delete.d.ts.map +1 -1
- package/esm/commands/secret/secret.delete.js +1 -1
- package/esm/commands/secret/secret.list.d.ts +1 -1
- package/esm/commands/secret/secret.list.d.ts.map +1 -1
- package/esm/commands/secret/secret.list.js +1 -1
- package/esm/commands/tenant/tenant.list.d.ts +1 -1
- package/esm/commands/tenant/tenant.list.d.ts.map +1 -1
- package/esm/commands/tenant/tenant.list.js +1 -1
- package/esm/commands/variable/variable.create.d.ts +1 -1
- package/esm/commands/variable/variable.create.d.ts.map +1 -1
- package/esm/commands/variable/variable.create.js +1 -1
- package/esm/commands/variable/variable.delete.d.ts +1 -1
- package/esm/commands/variable/variable.delete.d.ts.map +1 -1
- package/esm/commands/variable/variable.delete.js +1 -1
- package/esm/commands/variable/variable.list.d.ts +1 -1
- package/esm/commands/variable/variable.list.d.ts.map +1 -1
- package/esm/commands/variable/variable.list.js +1 -1
- package/esm/common/command-custom.d.ts +36 -0
- package/esm/common/command-custom.d.ts.map +1 -0
- package/esm/common/command-custom.js +28 -0
- package/esm/common/command-graphql.d.ts +19 -0
- package/esm/common/command-graphql.d.ts.map +1 -0
- package/esm/common/command-graphql.js +30 -0
- package/esm/common/command.d.ts +1 -17
- package/esm/common/command.d.ts.map +1 -1
- package/esm/common/command.js +0 -29
- package/esm/common/flowcore-client.d.ts.map +1 -1
- package/esm/common/flowcore-client.js +5 -2
- package/esm/common/notification-client.d.ts.map +1 -1
- package/esm/common/notification-client.js +4 -1
- package/esm/exceptions/client-error.d.ts +2 -1
- package/esm/exceptions/client-error.d.ts.map +1 -1
- package/esm/exceptions/client-error.js +8 -2
- package/esm/mod.d.ts +2 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -0
- package/package.json +1 -1
- package/script/commands/api-key/api-key.create.d.ts +1 -1
- package/script/commands/api-key/api-key.create.d.ts.map +1 -1
- package/script/commands/api-key/api-key.create.js +2 -2
- package/script/commands/api-key/api-key.delete.d.ts +1 -1
- package/script/commands/api-key/api-key.delete.d.ts.map +1 -1
- package/script/commands/api-key/api-key.delete.js +2 -2
- package/script/commands/api-key/api-key.list.d.ts +1 -1
- package/script/commands/api-key/api-key.list.d.ts.map +1 -1
- package/script/commands/api-key/api-key.list.js +2 -2
- package/script/commands/container-registry/container-registry.delete.d.ts +1 -1
- package/script/commands/container-registry/container-registry.delete.d.ts.map +1 -1
- package/script/commands/container-registry/container-registry.delete.js +4 -3
- package/script/commands/container-registry/container-registry.fetch.d.ts +1 -1
- package/script/commands/container-registry/container-registry.fetch.d.ts.map +1 -1
- package/script/commands/container-registry/container-registry.fetch.js +4 -3
- package/script/commands/container-registry/container-registry.list.d.ts +1 -1
- package/script/commands/container-registry/container-registry.list.d.ts.map +1 -1
- package/script/commands/container-registry/container-registry.list.js +4 -3
- package/script/commands/data-core/data-core.delete-request.d.ts +1 -1
- package/script/commands/data-core/data-core.delete-request.d.ts.map +1 -1
- package/script/commands/data-core/data-core.delete-request.js +2 -2
- package/script/commands/event-type/event-type.delete-request.d.ts +1 -1
- package/script/commands/event-type/event-type.delete-request.d.ts.map +1 -1
- package/script/commands/event-type/event-type.delete-request.js +2 -2
- package/script/commands/event-type/event-type.info.d.ts +35 -0
- package/script/commands/event-type/event-type.info.d.ts.map +1 -0
- package/script/commands/event-type/event-type.info.js +62 -0
- package/script/commands/event-type/event-type.truncate-request.d.ts +1 -1
- package/script/commands/event-type/event-type.truncate-request.d.ts.map +1 -1
- package/script/commands/event-type/event-type.truncate-request.js +2 -2
- package/script/commands/events/event.list.d.ts +62 -0
- package/script/commands/events/event.list.d.ts.map +1 -0
- package/script/commands/events/event.list.js +57 -0
- package/script/commands/events/time-bucket.list.d.ts +49 -0
- package/script/commands/events/time-bucket.list.d.ts.map +1 -0
- package/script/commands/events/time-bucket.list.js +54 -0
- package/script/commands/flow-type/flow-type.delete-request.d.ts +1 -1
- package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.delete-request.js +2 -2
- package/script/commands/index.d.ts +3 -1
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +4 -2
- package/script/commands/secret/secret.create.d.ts +1 -1
- package/script/commands/secret/secret.create.d.ts.map +1 -1
- package/script/commands/secret/secret.create.js +2 -2
- package/script/commands/secret/secret.delete.d.ts +1 -1
- package/script/commands/secret/secret.delete.d.ts.map +1 -1
- package/script/commands/secret/secret.delete.js +2 -2
- package/script/commands/secret/secret.list.d.ts +1 -1
- package/script/commands/secret/secret.list.d.ts.map +1 -1
- package/script/commands/secret/secret.list.js +2 -2
- package/script/commands/tenant/tenant.list.d.ts +1 -1
- package/script/commands/tenant/tenant.list.d.ts.map +1 -1
- package/script/commands/tenant/tenant.list.js +2 -2
- package/script/commands/variable/variable.create.d.ts +1 -1
- package/script/commands/variable/variable.create.d.ts.map +1 -1
- package/script/commands/variable/variable.create.js +2 -2
- package/script/commands/variable/variable.delete.d.ts +1 -1
- package/script/commands/variable/variable.delete.d.ts.map +1 -1
- package/script/commands/variable/variable.delete.js +2 -2
- package/script/commands/variable/variable.list.d.ts +1 -1
- package/script/commands/variable/variable.list.d.ts.map +1 -1
- package/script/commands/variable/variable.list.js +2 -2
- package/script/common/command-custom.d.ts +36 -0
- package/script/common/command-custom.d.ts.map +1 -0
- package/script/common/command-custom.js +32 -0
- package/script/common/command-graphql.d.ts +19 -0
- package/script/common/command-graphql.d.ts.map +1 -0
- package/script/common/command-graphql.js +34 -0
- package/script/common/command.d.ts +1 -17
- package/script/common/command.d.ts.map +1 -1
- package/script/common/command.js +1 -31
- package/script/common/flowcore-client.d.ts.map +1 -1
- package/script/common/flowcore-client.js +5 -2
- package/script/common/notification-client.d.ts.map +1 -1
- package/script/common/notification-client.js +8 -5
- package/script/exceptions/client-error.d.ts +2 -1
- package/script/exceptions/client-error.d.ts.map +1 -1
- package/script/exceptions/client-error.js +8 -2
- package/script/mod.d.ts +2 -0
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +2 -0
- package/esm/commands/events/events.fetch-first-and-last-time-buckets.d.ts +0 -45
- package/esm/commands/events/events.fetch-first-and-last-time-buckets.d.ts.map +0 -1
- package/esm/commands/events/events.fetch-first-and-last-time-buckets.js +0 -40
- package/script/commands/events/events.fetch-first-and-last-time-buckets.d.ts +0 -45
- package/script/commands/events/events.fetch-first-and-last-time-buckets.d.ts.map +0 -1
- package/script/commands/events/events.fetch-first-and-last-time-buckets.js +0 -44
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SecretCreateCommand = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
-
const
|
|
5
|
+
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
7
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
8
|
const graphQlQueryById = `
|
|
@@ -25,7 +25,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
25
25
|
/**
|
|
26
26
|
* List secrets
|
|
27
27
|
*/
|
|
28
|
-
class SecretCreateCommand extends
|
|
28
|
+
class SecretCreateCommand extends command_graphql_js_1.GraphQlCommand {
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"secret.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAA;CACZ;AAyBD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACjF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO;IAW/D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SecretDeleteCommand = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
-
const
|
|
5
|
+
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
7
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
8
|
const graphQlQueryById = `
|
|
@@ -25,7 +25,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
25
25
|
/**
|
|
26
26
|
* List secrets
|
|
27
27
|
*/
|
|
28
|
-
class SecretDeleteCommand extends
|
|
28
|
+
class SecretDeleteCommand extends command_graphql_js_1.GraphQlCommand {
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret.list.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"secret.list.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AA4BD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC9E;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE;IAWhE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SecretListCommand = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
-
const
|
|
5
|
+
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
7
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
8
|
const graphQlQueryById = `
|
|
@@ -28,7 +28,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
28
28
|
/**
|
|
29
29
|
* List secrets
|
|
30
30
|
*/
|
|
31
|
-
class SecretListCommand extends
|
|
31
|
+
class SecretListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
32
32
|
constructor() {
|
|
33
33
|
super(...arguments);
|
|
34
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.list.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"tenant.list.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,OAAO,GAAG,cAAc,CAAA;CACnC;AA6CD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC;IAC3E;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,cAAc,EAAE;IAiBxE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAKtD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TenantListCommand = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
-
const
|
|
5
|
+
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
7
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
8
|
const graphQlQueryById = `
|
|
@@ -47,7 +47,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
47
47
|
/**
|
|
48
48
|
* List tenants
|
|
49
49
|
*/
|
|
50
|
-
class TenantListCommand extends
|
|
50
|
+
class TenantListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
51
51
|
constructor() {
|
|
52
52
|
super(...arguments);
|
|
53
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.create.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"variable.create.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAEhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAG3D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAA;CACd;AA4BD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IACtF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;IAchE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VariableCreateCommand = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
-
const
|
|
5
|
+
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
7
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
8
|
const graphQlQueryById = `
|
|
@@ -28,7 +28,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
28
28
|
/**
|
|
29
29
|
* Create a variable
|
|
30
30
|
*/
|
|
31
|
-
class VariableCreateCommand extends
|
|
31
|
+
class VariableCreateCommand extends command_graphql_js_1.GraphQlCommand {
|
|
32
32
|
constructor() {
|
|
33
33
|
super(...arguments);
|
|
34
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"variable.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;CACZ;AA4BD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACrF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO;IAW/D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VariableDeleteCommand = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
-
const
|
|
5
|
+
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
7
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
8
|
const graphQlQueryById = `
|
|
@@ -28,7 +28,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
28
28
|
/**
|
|
29
29
|
* Create a variable
|
|
30
30
|
*/
|
|
31
|
-
class VariableDeleteCommand extends
|
|
31
|
+
class VariableDeleteCommand extends command_graphql_js_1.GraphQlCommand {
|
|
32
32
|
constructor() {
|
|
33
33
|
super(...arguments);
|
|
34
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.list.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"variable.list.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAEhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAG3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAkCD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IACpF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,EAAE;IAWlE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VariableListCommand = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
-
const
|
|
5
|
+
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
7
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
8
|
const graphQlQueryById = `
|
|
@@ -34,7 +34,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
34
34
|
/**
|
|
35
35
|
* List variables
|
|
36
36
|
*/
|
|
37
|
-
class VariableListCommand extends
|
|
37
|
+
class VariableListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
38
38
|
constructor() {
|
|
39
39
|
super(...arguments);
|
|
40
40
|
/**
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { FlowcoreClient } from "./flowcore-client.js";
|
|
2
|
+
import { Command } from "./command.js";
|
|
3
|
+
import type { ClientError } from "../exceptions/client-error.js";
|
|
4
|
+
/**
|
|
5
|
+
* Abstract command for executing custom requests
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class CustomCommand<Input, Output> extends Command<Input, Output> {
|
|
8
|
+
/**
|
|
9
|
+
* Get the base URL for the request
|
|
10
|
+
*/
|
|
11
|
+
protected getBaseUrl(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom execute method
|
|
14
|
+
*/
|
|
15
|
+
protected abstract customExecute(client: FlowcoreClient): Promise<Output>;
|
|
16
|
+
/**
|
|
17
|
+
* Get the request object
|
|
18
|
+
*/
|
|
19
|
+
getRequest(_client: FlowcoreClient): Promise<{
|
|
20
|
+
allowedModes: ("apiKey" | "bearer")[];
|
|
21
|
+
body: string | Record<string, unknown> | Array<unknown> | undefined;
|
|
22
|
+
headers: Record<string, string>;
|
|
23
|
+
baseUrl: string;
|
|
24
|
+
path: string;
|
|
25
|
+
method: string;
|
|
26
|
+
parseResponse: (response: unknown) => Output | Promise<Output>;
|
|
27
|
+
processResponse: (client: FlowcoreClient, response: Output) => Promise<Output>;
|
|
28
|
+
handleClientError: (error: ClientError) => void;
|
|
29
|
+
retryOnFailure: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Parse the response
|
|
33
|
+
*/
|
|
34
|
+
protected parseResponse(response: unknown): Output;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=command-custom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-custom.d.ts","sourceRoot":"","sources":["../../src/common/command-custom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAEhE;;GAEG;AACH,8BAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAE,SAAQ,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;IAC/E;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAEzE;;OAEG;IAEmB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;QACjE,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAA;QACrC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;QACnE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC/B,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;QAC9D,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;QAC9E,iBAAiB,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;QAC/C,cAAc,EAAE,OAAO,CAAA;KACxB,CAAC;IAOF;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM;CAG5D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomCommand = void 0;
|
|
4
|
+
const command_js_1 = require("./command.js");
|
|
5
|
+
/**
|
|
6
|
+
* Abstract command for executing custom requests
|
|
7
|
+
*/
|
|
8
|
+
class CustomCommand extends command_js_1.Command {
|
|
9
|
+
/**
|
|
10
|
+
* Get the base URL for the request
|
|
11
|
+
*/
|
|
12
|
+
getBaseUrl() {
|
|
13
|
+
return "NONE";
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get the request object
|
|
17
|
+
*/
|
|
18
|
+
// deno-lint-ignore require-await
|
|
19
|
+
async getRequest(_client) {
|
|
20
|
+
return {
|
|
21
|
+
...super.getRequest(_client),
|
|
22
|
+
customExecute: this.customExecute.bind(this),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Parse the response
|
|
27
|
+
*/
|
|
28
|
+
parseResponse(response) {
|
|
29
|
+
return response;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.CustomCommand = CustomCommand;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* Abstract command for executing GraphQL requests
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class GraphQlCommand<Input, Output> extends Command<Input, Output> {
|
|
6
|
+
/**
|
|
7
|
+
* The allowed modes for the command
|
|
8
|
+
*/
|
|
9
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
10
|
+
/**
|
|
11
|
+
* Get the base URL for the request
|
|
12
|
+
*/
|
|
13
|
+
protected getBaseUrl(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Get the path for the request
|
|
16
|
+
*/
|
|
17
|
+
protected getPath(): string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=command-graphql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-graphql.d.ts","sourceRoot":"","sources":["../../src/common/command-graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;GAEG;AACH,8BAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAE,SAAQ,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;IAChF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;CAGrC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphQlCommand = void 0;
|
|
4
|
+
const command_js_1 = require("./command.js");
|
|
5
|
+
/**
|
|
6
|
+
* Abstract command for executing GraphQL requests
|
|
7
|
+
*/
|
|
8
|
+
class GraphQlCommand extends command_js_1.Command {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
/**
|
|
12
|
+
* The allowed modes for the command
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(this, "allowedModes", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: ["bearer"]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get the base URL for the request
|
|
23
|
+
*/
|
|
24
|
+
getBaseUrl() {
|
|
25
|
+
return "https://graph.api.flowcore.io";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the path for the request
|
|
29
|
+
*/
|
|
30
|
+
getPath() {
|
|
31
|
+
return "/graphql";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.GraphQlCommand = GraphQlCommand;
|
|
@@ -59,27 +59,11 @@ export declare abstract class Command<Input, Output> {
|
|
|
59
59
|
processResponse: (client: FlowcoreClient, response: Output) => Promise<Output>;
|
|
60
60
|
handleClientError: (error: ClientError) => void;
|
|
61
61
|
retryOnFailure: boolean;
|
|
62
|
+
customExecute?: (client: FlowcoreClient) => Promise<unknown>;
|
|
62
63
|
}>;
|
|
63
64
|
/**
|
|
64
65
|
* Wait for the response
|
|
65
66
|
*/
|
|
66
67
|
protected processResponse(_client: FlowcoreClient, response: Output): Promise<Output>;
|
|
67
68
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Abstract command for executing GraphQL requests
|
|
70
|
-
*/
|
|
71
|
-
export declare abstract class GraphQlCommand<Input, Output> extends Command<Input, Output> {
|
|
72
|
-
/**
|
|
73
|
-
* The allowed modes for the command
|
|
74
|
-
*/
|
|
75
|
-
protected allowedModes: ("apiKey" | "bearer")[];
|
|
76
|
-
/**
|
|
77
|
-
* Get the base URL for the request
|
|
78
|
-
*/
|
|
79
|
-
protected getBaseUrl(): string;
|
|
80
|
-
/**
|
|
81
|
-
* Get the path for the request
|
|
82
|
-
*/
|
|
83
|
-
protected getPath(): string;
|
|
84
|
-
}
|
|
85
69
|
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/common/command.ts"],"names":[],"mapp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
|
3
|
-
exports.
|
|
3
|
+
exports.Command = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Abstract command for executing requests
|
|
6
6
|
*/
|
|
@@ -102,33 +102,3 @@ class Command {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
exports.Command = Command;
|
|
105
|
-
/**
|
|
106
|
-
* Abstract command for executing GraphQL requests
|
|
107
|
-
*/
|
|
108
|
-
class GraphQlCommand extends Command {
|
|
109
|
-
constructor() {
|
|
110
|
-
super(...arguments);
|
|
111
|
-
/**
|
|
112
|
-
* The allowed modes for the command
|
|
113
|
-
*/
|
|
114
|
-
Object.defineProperty(this, "allowedModes", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
configurable: true,
|
|
117
|
-
writable: true,
|
|
118
|
-
value: ["bearer"]
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Get the base URL for the request
|
|
123
|
-
*/
|
|
124
|
-
getBaseUrl() {
|
|
125
|
-
return "https://graph.api.flowcore.io";
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Get the path for the request
|
|
129
|
-
*/
|
|
130
|
-
getPath() {
|
|
131
|
-
return "/graphql";
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
exports.GraphQlCommand = GraphQlCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowcore-client.d.ts","sourceRoot":"","sources":["../../src/common/flowcore-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C;;GAEG;AACH,UAAU,mBAAmB;IAC3B,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;Q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CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,CAAA;AAErE;;GAEG;AACH,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,OAAO,CAAoB;gBAEN,OAAO,EAAE,aAAa;IAiBnD;;OAEG;YACW,aAAa;IAc3B;;OAEG;YACW,YAAY;IAsE1B;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;CAGzE"}
|
|
@@ -64,6 +64,9 @@ class FlowcoreClient {
|
|
|
64
64
|
*/
|
|
65
65
|
async innerExecute(command, retryCount = 0) {
|
|
66
66
|
const request = await command.getRequest(this);
|
|
67
|
+
if (request.customExecute) {
|
|
68
|
+
return request.customExecute(this);
|
|
69
|
+
}
|
|
67
70
|
if (!request.allowedModes.includes(this.mode)) {
|
|
68
71
|
throw new command_error_js_1.CommandError(command.constructor.name, `Not allowed in "${this.mode}" mode`);
|
|
69
72
|
}
|
|
@@ -92,7 +95,7 @@ class FlowcoreClient {
|
|
|
92
95
|
return this.innerExecute(command, retryCount + 1);
|
|
93
96
|
}
|
|
94
97
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
95
|
-
throw new client_error_js_1.ClientError(`Failed to execute command: ${message}`, 0, {
|
|
98
|
+
throw new client_error_js_1.ClientError(`Failed to execute command: ${message}`, 0, command.constructor.name, {
|
|
96
99
|
command: command.constructor.name,
|
|
97
100
|
error: error,
|
|
98
101
|
});
|
|
@@ -107,7 +110,7 @@ class FlowcoreClient {
|
|
|
107
110
|
}
|
|
108
111
|
const body = await response.json().catch(() => undefined);
|
|
109
112
|
const commandName = command.constructor.name;
|
|
110
|
-
const error = new client_error_js_1.ClientError(`${commandName} failed with ${response.status}: ${response.statusText}`, response.status, body);
|
|
113
|
+
const error = new client_error_js_1.ClientError(`${commandName} failed with ${response.status}: ${response.statusText}`, response.status, command.constructor.name, body);
|
|
111
114
|
request.handleClientError(error);
|
|
112
115
|
}
|
|
113
116
|
const responseBody = response.status === 204 ? { status: response.status } : await response.json();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAY/D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,EAAE,MAAM,CAAA;QAClB,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,OAAO,CAAC;QACtB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH,CAAA;AAcD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB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ar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.NotificationClient = void 0;
|
|
27
27
|
const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
28
|
-
const mod_js_1 = require("../mod.js");
|
|
29
28
|
const logger_js_1 = require("../utils/logger.js");
|
|
30
29
|
const flowcore_client_js_1 = require("./flowcore-client.js");
|
|
31
30
|
const node_buffer_1 = require("node:buffer");
|
|
31
|
+
const tenant_fetch_js_1 = require("../commands/tenant/tenant.fetch.js");
|
|
32
|
+
const data_core_fetch_js_1 = require("../commands/data-core/data-core.fetch.js");
|
|
33
|
+
const flow_type_fetch_js_1 = require("../commands/flow-type/flow-type.fetch.js");
|
|
34
|
+
const event_type_fetch_js_1 = require("../commands/event-type/event-type.fetch.js");
|
|
32
35
|
// Maximum reconnection interval in milliseconds
|
|
33
36
|
const MAX_RECONNECT_INTERVAL = 30_000;
|
|
34
37
|
/**
|
|
@@ -161,22 +164,22 @@ class NotificationClient {
|
|
|
161
164
|
urlParams.set("api_key", this.authOptions.apiKey);
|
|
162
165
|
urlParams.set("api_key_id", this.authOptions.apiKeyId);
|
|
163
166
|
}
|
|
164
|
-
const tenant = await flowcoreClient.execute(new
|
|
167
|
+
const tenant = await flowcoreClient.execute(new tenant_fetch_js_1.TenantFetchCommand({
|
|
165
168
|
tenant: this.subscriptionSpec.tenant,
|
|
166
169
|
}));
|
|
167
|
-
const dataCore = await flowcoreClient.execute(new
|
|
170
|
+
const dataCore = await flowcoreClient.execute(new data_core_fetch_js_1.DataCoreFetchCommand({
|
|
168
171
|
tenantId: tenant.id,
|
|
169
172
|
dataCore: this.subscriptionSpec.dataCore,
|
|
170
173
|
}));
|
|
171
174
|
let flowType;
|
|
172
175
|
let eventType;
|
|
173
176
|
if (this.subscriptionSpec.flowType) {
|
|
174
|
-
flowType = await flowcoreClient.execute(new
|
|
177
|
+
flowType = await flowcoreClient.execute(new flow_type_fetch_js_1.FlowTypeFetchCommand({
|
|
175
178
|
dataCoreId: dataCore.id,
|
|
176
179
|
flowType: this.subscriptionSpec.flowType,
|
|
177
180
|
}));
|
|
178
181
|
if (this.subscriptionSpec.eventType) {
|
|
179
|
-
eventType = await flowcoreClient.execute(new
|
|
182
|
+
eventType = await flowcoreClient.execute(new event_type_fetch_js_1.EventTypeFetchCommand({
|
|
180
183
|
flowTypeId: flowType?.id,
|
|
181
184
|
eventType: this.subscriptionSpec.eventType,
|
|
182
185
|
}));
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare class ClientError extends Error {
|
|
5
5
|
readonly status: number;
|
|
6
|
+
readonly command: string;
|
|
6
7
|
readonly body?: unknown | undefined;
|
|
7
|
-
constructor(message: string, status: number, body?: unknown | undefined);
|
|
8
|
+
constructor(message: string, status: number, command: string, body?: unknown | undefined);
|
|
8
9
|
}
|
|
9
10
|
//# sourceMappingURL=client-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-error.d.ts","sourceRoot":"","sources":["../../src/exceptions/client-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"client-error.d.ts","sourceRoot":"","sources":["../../src/exceptions/client-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;aAGlB,MAAM,EAAE,MAAM;aACd,OAAO,EAAE,MAAM;aACf,IAAI,CAAC,EAAE,OAAO;gBAH9B,OAAO,EAAE,MAAM,EACC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,OAAO,YAAA;CAIjC"}
|
|
@@ -5,14 +5,20 @@ exports.ClientError = void 0;
|
|
|
5
5
|
* An error thrown when the client request fails
|
|
6
6
|
*/
|
|
7
7
|
class ClientError extends Error {
|
|
8
|
-
constructor(message, status, body) {
|
|
9
|
-
super(
|
|
8
|
+
constructor(message, status, command, body) {
|
|
9
|
+
super(`${command} failed with ${status}: ${body ? JSON.stringify(body) : message}`);
|
|
10
10
|
Object.defineProperty(this, "status", {
|
|
11
11
|
enumerable: true,
|
|
12
12
|
configurable: true,
|
|
13
13
|
writable: true,
|
|
14
14
|
value: status
|
|
15
15
|
});
|
|
16
|
+
Object.defineProperty(this, "command", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: command
|
|
21
|
+
});
|
|
16
22
|
Object.defineProperty(this, "body", {
|
|
17
23
|
enumerable: true,
|
|
18
24
|
configurable: true,
|
package/script/mod.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./commands/index.js";
|
|
2
2
|
export * from "./common/command.js";
|
|
3
|
+
export * from "./common/command-custom.js";
|
|
4
|
+
export * from "./common/command-graphql.js";
|
|
3
5
|
export * from "./common/flowcore-client.js";
|
|
4
6
|
export * from "./common/notification-client.js";
|
|
5
7
|
export * from "./contracts/index.js";
|
package/script/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kCAAkC,CAAA"}
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kCAAkC,CAAA"}
|
package/script/mod.js
CHANGED
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./commands/index.js"), exports);
|
|
18
18
|
__exportStar(require("./common/command.js"), exports);
|
|
19
|
+
__exportStar(require("./common/command-custom.js"), exports);
|
|
20
|
+
__exportStar(require("./common/command-graphql.js"), exports);
|
|
19
21
|
__exportStar(require("./common/flowcore-client.js"), exports);
|
|
20
22
|
__exportStar(require("./common/notification-client.js"), exports);
|
|
21
23
|
__exportStar(require("./contracts/index.js"), exports);
|