@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret.create.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"secret.create.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.create.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;IACX,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAA;CACd;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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command-graphql.js";
|
|
3
3
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
4
|
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
5
|
const graphQlQueryById = `
|
|
@@ -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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command-graphql.js";
|
|
3
3
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
4
|
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
5
|
const graphQlQueryById = `
|
|
@@ -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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command-graphql.js";
|
|
3
3
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
4
|
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
5
|
const graphQlQueryById = `
|
|
@@ -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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command-graphql.js";
|
|
3
3
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
4
|
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
5
|
const graphQlQueryById = `
|
|
@@ -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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command-graphql.js";
|
|
3
3
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
4
|
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
5
|
const graphQlQueryById = `
|
|
@@ -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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command-graphql.js";
|
|
3
3
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
4
|
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
5
|
const graphQlQueryById = `
|
|
@@ -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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command-graphql.js";
|
|
3
3
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
4
|
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
5
|
const graphQlQueryById = `
|
|
@@ -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,28 @@
|
|
|
1
|
+
import { Command } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* Abstract command for executing custom requests
|
|
4
|
+
*/
|
|
5
|
+
export class CustomCommand extends Command {
|
|
6
|
+
/**
|
|
7
|
+
* Get the base URL for the request
|
|
8
|
+
*/
|
|
9
|
+
getBaseUrl() {
|
|
10
|
+
return "NONE";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get the request object
|
|
14
|
+
*/
|
|
15
|
+
// deno-lint-ignore require-await
|
|
16
|
+
async getRequest(_client) {
|
|
17
|
+
return {
|
|
18
|
+
...super.getRequest(_client),
|
|
19
|
+
customExecute: this.customExecute.bind(this),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Parse the response
|
|
24
|
+
*/
|
|
25
|
+
parseResponse(response) {
|
|
26
|
+
return response;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -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,30 @@
|
|
|
1
|
+
import { Command } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* Abstract command for executing GraphQL requests
|
|
4
|
+
*/
|
|
5
|
+
export class GraphQlCommand extends Command {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
/**
|
|
9
|
+
* The allowed modes for the command
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(this, "allowedModes", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: ["bearer"]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get the base URL for the request
|
|
20
|
+
*/
|
|
21
|
+
getBaseUrl() {
|
|
22
|
+
return "https://graph.api.flowcore.io";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the path for the request
|
|
26
|
+
*/
|
|
27
|
+
getPath() {
|
|
28
|
+
return "/graphql";
|
|
29
|
+
}
|
|
30
|
+
}
|
package/esm/common/command.d.ts
CHANGED
|
@@ -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":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;GAEG;AACH,8BAAsB,OAAO,CAAC,KAAK,EAAE,MAAM;IACzC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAO;IAEjD;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,C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,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;QACvB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;KAC7D,CAAC;IAeF;;OAEG;cAEa,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5F"}
|
package/esm/common/command.js
CHANGED
|
@@ -98,32 +98,3 @@ export class Command {
|
|
|
98
98
|
return response;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
/**
|
|
102
|
-
* Abstract command for executing GraphQL requests
|
|
103
|
-
*/
|
|
104
|
-
export class GraphQlCommand extends Command {
|
|
105
|
-
constructor() {
|
|
106
|
-
super(...arguments);
|
|
107
|
-
/**
|
|
108
|
-
* The allowed modes for the command
|
|
109
|
-
*/
|
|
110
|
-
Object.defineProperty(this, "allowedModes", {
|
|
111
|
-
enumerable: true,
|
|
112
|
-
configurable: true,
|
|
113
|
-
writable: true,
|
|
114
|
-
value: ["bearer"]
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Get the base URL for the request
|
|
119
|
-
*/
|
|
120
|
-
getBaseUrl() {
|
|
121
|
-
return "https://graph.api.flowcore.io";
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Get the path for the request
|
|
125
|
-
*/
|
|
126
|
-
getPath() {
|
|
127
|
-
return "/graphql";
|
|
128
|
-
}
|
|
129
|
-
}
|
|
@@ -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;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,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;
|
|
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;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,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"}
|
|
@@ -61,6 +61,9 @@ export class FlowcoreClient {
|
|
|
61
61
|
*/
|
|
62
62
|
async innerExecute(command, retryCount = 0) {
|
|
63
63
|
const request = await command.getRequest(this);
|
|
64
|
+
if (request.customExecute) {
|
|
65
|
+
return request.customExecute(this);
|
|
66
|
+
}
|
|
64
67
|
if (!request.allowedModes.includes(this.mode)) {
|
|
65
68
|
throw new CommandError(command.constructor.name, `Not allowed in "${this.mode}" mode`);
|
|
66
69
|
}
|
|
@@ -89,7 +92,7 @@ export class FlowcoreClient {
|
|
|
89
92
|
return this.innerExecute(command, retryCount + 1);
|
|
90
93
|
}
|
|
91
94
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
92
|
-
throw new ClientError(`Failed to execute command: ${message}`, 0, {
|
|
95
|
+
throw new ClientError(`Failed to execute command: ${message}`, 0, command.constructor.name, {
|
|
93
96
|
command: command.constructor.name,
|
|
94
97
|
error: error,
|
|
95
98
|
});
|
|
@@ -104,7 +107,7 @@ export class FlowcoreClient {
|
|
|
104
107
|
}
|
|
105
108
|
const body = await response.json().catch(() => undefined);
|
|
106
109
|
const commandName = command.constructor.name;
|
|
107
|
-
const error = new ClientError(`${commandName} failed with ${response.status}: ${response.statusText}`, response.status, body);
|
|
110
|
+
const error = new ClientError(`${commandName} failed with ${response.status}: ${response.statusText}`, response.status, command.constructor.name, body);
|
|
108
111
|
request.handleClientError(error);
|
|
109
112
|
}
|
|
110
113
|
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,oBAA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,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,aAAa,CAAiB;IAEtC;;;;;;OAMG;gBAEgB,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,EACpC,WAAW,EAAE,6BAA6B,EAC1C,gBAAgB,EAAE;QACjC,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,EACD,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAU9C;;OAEG;IACH,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED;;OAEG;IACG,OAAO;IA+Ib;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;OAEG;IACH,UAAU;IAMV;;;OAGG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM;CAGnC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as dntShim from "../_dnt.shims.js";
|
|
2
|
-
import { DataCoreFetchCommand, EventTypeFetchCommand, FlowTypeFetchCommand, TenantFetchCommand, } from "../mod.js";
|
|
3
2
|
import { defaultLogger } from "../utils/logger.js";
|
|
4
3
|
import { FlowcoreClient } from "./flowcore-client.js";
|
|
5
4
|
import { Buffer } from "node:buffer";
|
|
5
|
+
import { TenantFetchCommand } from "../commands/tenant/tenant.fetch.js";
|
|
6
|
+
import { DataCoreFetchCommand } from "../commands/data-core/data-core.fetch.js";
|
|
7
|
+
import { FlowTypeFetchCommand } from "../commands/flow-type/flow-type.fetch.js";
|
|
8
|
+
import { EventTypeFetchCommand } from "../commands/event-type/event-type.fetch.js";
|
|
6
9
|
// Maximum reconnection interval in milliseconds
|
|
7
10
|
const MAX_RECONNECT_INTERVAL = 30_000;
|
|
8
11
|
/**
|
|
@@ -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"}
|
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
* An error thrown when the client request fails
|
|
3
3
|
*/
|
|
4
4
|
export class ClientError extends Error {
|
|
5
|
-
constructor(message, status, body) {
|
|
6
|
-
super(
|
|
5
|
+
constructor(message, status, command, body) {
|
|
6
|
+
super(`${command} failed with ${status}: ${body ? JSON.stringify(body) : message}`);
|
|
7
7
|
Object.defineProperty(this, "status", {
|
|
8
8
|
enumerable: true,
|
|
9
9
|
configurable: true,
|
|
10
10
|
writable: true,
|
|
11
11
|
value: status
|
|
12
12
|
});
|
|
13
|
+
Object.defineProperty(this, "command", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: command
|
|
18
|
+
});
|
|
13
19
|
Object.defineProperty(this, "body", {
|
|
14
20
|
enumerable: true,
|
|
15
21
|
configurable: true,
|
package/esm/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/esm/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/esm/mod.js
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key.create.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"api-key.create.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIrE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;CACb;AA4BD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;IACpG;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAC9B,WAAW,EAAE,OAAO,GACnB,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAiB7B;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACsB,eAAe,CACtC,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GACnC,OAAO,CAAC,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAevC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ApiKeyCreateCommand = 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 api_key_list_js_1 = require("./api-key.list.js");
|
|
8
8
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
@@ -29,7 +29,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
29
29
|
/**
|
|
30
30
|
* Create an API key
|
|
31
31
|
*/
|
|
32
|
-
class ApiKeyCreateCommand extends
|
|
32
|
+
class ApiKeyCreateCommand extends command_graphql_js_1.GraphQlCommand {
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"api-key.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAA;CACjB;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.ApiKeyDeleteCommand = 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
|
* Delete an API key
|
|
27
27
|
*/
|
|
28
|
-
class ApiKeyDeleteCommand extends
|
|
28
|
+
class ApiKeyDeleteCommand extends command_graphql_js_1.GraphQlCommand {
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key.list.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"api-key.list.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AA0BD;;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;IAKhE;;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.ApiKeyListCommand = 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 graphQlQueryById = `
|
|
8
8
|
query FLOWCORE_SDK_API_KEY_LIST($tenantId: ID!) {
|
|
@@ -29,7 +29,7 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
29
29
|
/**
|
|
30
30
|
* List api keys
|
|
31
31
|
*/
|
|
32
|
-
class ApiKeyListCommand extends
|
|
32
|
+
class ApiKeyListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
35
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
1
2
|
import { type ContainerRegistryDelete } from "../../contracts/container.js";
|
|
2
|
-
import { Command } from "../../mod.js";
|
|
3
3
|
export interface ContainerRegistryDeleteInput {
|
|
4
4
|
/** The id of the new container-registry */
|
|
5
5
|
containerId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-registry.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/container-registry/container-registry.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"container-registry.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/container-registry/container-registry.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,uBAAuB,EAAiC,MAAM,8BAA8B,CAAA;AAG1G,MAAM,WAAW,4BAA4B;IAC3C,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,qBAAa,8BAA+B,SAAQ,OAAO,CAAC,4BAA4B,EAAE,uBAAuB,CAAC;cAC7F,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,uBAAuB;CAG7E"}
|