@flowcore/sdk 1.22.1 → 1.23.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/esm/commands/data-core/data-core.list.d.ts +5 -3
  3. package/esm/commands/data-core/data-core.list.d.ts.map +1 -1
  4. package/esm/commands/data-core/data-core.list.js +9 -2
  5. package/esm/commands/index.d.ts +0 -5
  6. package/esm/commands/index.d.ts.map +1 -1
  7. package/esm/commands/index.js +0 -5
  8. package/package.json +1 -1
  9. package/script/commands/data-core/data-core.list.d.ts +5 -3
  10. package/script/commands/data-core/data-core.list.d.ts.map +1 -1
  11. package/script/commands/data-core/data-core.list.js +8 -1
  12. package/script/commands/index.d.ts +0 -5
  13. package/script/commands/index.d.ts.map +1 -1
  14. package/script/commands/index.js +0 -5
  15. package/esm/commands/data-core/data-core.delete-request.d.ts +0 -38
  16. package/esm/commands/data-core/data-core.delete-request.d.ts.map +0 -1
  17. package/esm/commands/data-core/data-core.delete-request.js +0 -95
  18. package/esm/commands/data-core/data-core.list-new.d.ts +0 -35
  19. package/esm/commands/data-core/data-core.list-new.d.ts.map +0 -1
  20. package/esm/commands/data-core/data-core.list-new.js +0 -47
  21. package/esm/commands/event-type/event-type.delete-request.d.ts +0 -42
  22. package/esm/commands/event-type/event-type.delete-request.d.ts.map +0 -1
  23. package/esm/commands/event-type/event-type.delete-request.js +0 -108
  24. package/esm/commands/event-type/event-type.truncate-request.d.ts +0 -42
  25. package/esm/commands/event-type/event-type.truncate-request.d.ts.map +0 -1
  26. package/esm/commands/event-type/event-type.truncate-request.js +0 -108
  27. package/esm/commands/flow-type/flow-type.delete-request.d.ts +0 -55
  28. package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +0 -1
  29. package/esm/commands/flow-type/flow-type.delete-request.js +0 -128
  30. package/script/commands/data-core/data-core.delete-request.d.ts +0 -38
  31. package/script/commands/data-core/data-core.delete-request.d.ts.map +0 -1
  32. package/script/commands/data-core/data-core.delete-request.js +0 -99
  33. package/script/commands/data-core/data-core.list-new.d.ts +0 -35
  34. package/script/commands/data-core/data-core.list-new.d.ts.map +0 -1
  35. package/script/commands/data-core/data-core.list-new.js +0 -51
  36. package/script/commands/event-type/event-type.delete-request.d.ts +0 -42
  37. package/script/commands/event-type/event-type.delete-request.d.ts.map +0 -1
  38. package/script/commands/event-type/event-type.delete-request.js +0 -112
  39. package/script/commands/event-type/event-type.truncate-request.d.ts +0 -42
  40. package/script/commands/event-type/event-type.truncate-request.d.ts.map +0 -1
  41. package/script/commands/event-type/event-type.truncate-request.js +0 -112
  42. package/script/commands/flow-type/flow-type.delete-request.d.ts +0 -55
  43. package/script/commands/flow-type/flow-type.delete-request.d.ts.map +0 -1
  44. package/script/commands/flow-type/flow-type.delete-request.js +0 -132
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.23.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.22.2...v1.23.0) (2025-03-27)
4
+
5
+
6
+ ### Features
7
+
8
+ * remove deprecated commands ([4b49c13](https://github.com/flowcore-io/flowcore-sdk/commit/4b49c13737ff49cb9a384c15fe292a3efdb0c2b8))
9
+ * remove deprecated commands ([4b78d07](https://github.com/flowcore-io/flowcore-sdk/commit/4b78d078ff4d0587f3bbdc2100485b93595b76aa))
10
+
11
+ ## [1.22.2](https://github.com/flowcore-io/flowcore-sdk/compare/v1.22.1...v1.22.2) (2025-03-27)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * change datacore list command ([5b75ed9](https://github.com/flowcore-io/flowcore-sdk/commit/5b75ed9a11410404e585800d782951c3a96451f6))
17
+
3
18
  ## [1.22.1](https://github.com/flowcore-io/flowcore-sdk/compare/v1.22.0...v1.22.1) (2025-03-27)
4
19
 
5
20
 
@@ -1,5 +1,5 @@
1
1
  import { Command } from "../../common/command.js";
2
- import { type DataCore } from "../../contracts/data-core.js";
2
+ import { type DataCoreWithAccess } from "../../contracts/data-core.js";
3
3
  /**
4
4
  * The input for the data core fetch by name command
5
5
  */
@@ -8,11 +8,13 @@ export interface DataCoreListInput {
8
8
  tenantId?: string;
9
9
  /** The tenant name */
10
10
  tenant?: string;
11
+ /** The data core name */
12
+ name?: string;
11
13
  }
12
14
  /**
13
15
  * Fetch all data cores for a tenant
14
16
  */
15
- export declare class DataCoreListCommand extends Command<DataCoreListInput, DataCore[]> {
17
+ export declare class DataCoreListCommand extends Command<DataCoreListInput, DataCoreWithAccess[]> {
16
18
  /**
17
19
  * Get the method
18
20
  */
@@ -28,6 +30,6 @@ export declare class DataCoreListCommand extends Command<DataCoreListInput, Data
28
30
  /**
29
31
  * Parse the response
30
32
  */
31
- protected parseResponse(rawResponse: unknown): DataCore[];
33
+ protected parseResponse(rawResponse: unknown): DataCoreWithAccess[];
32
34
  }
33
35
  //# sourceMappingURL=data-core.list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-core.list.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAWpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,EAAE;CAGnE"}
1
+ {"version":3,"file":"data-core.list.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,8BAA8B,CAAA;AAGhG;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAOD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,CAAC;IACvF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAcpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,kBAAkB,EAAE;CAG7E"}
@@ -1,7 +1,11 @@
1
1
  import { Type } from "@sinclair/typebox";
2
2
  import { Command } from "../../common/command.js";
3
- import { DataCoreSchema } from "../../contracts/data-core.js";
3
+ import { DataCoreWithAccessSchema } from "../../contracts/data-core.js";
4
4
  import { parseResponseHelper } from "../../utils/parse-response-helper.js";
5
+ const responseSchema = Type.Object({
6
+ ...DataCoreWithAccessSchema.properties,
7
+ access: Type.Array(Type.String()),
8
+ });
5
9
  /**
6
10
  * Fetch all data cores for a tenant
7
11
  */
@@ -29,12 +33,15 @@ export class DataCoreListCommand extends Command {
29
33
  if (this.input.tenant) {
30
34
  queryParams.set("tenant", this.input.tenant);
31
35
  }
36
+ if (this.input.name) {
37
+ queryParams.set("name", this.input.name);
38
+ }
32
39
  return `/api/v1/data-cores?${queryParams.toString()}`;
33
40
  }
34
41
  /**
35
42
  * Parse the response
36
43
  */
37
44
  parseResponse(rawResponse) {
38
- return parseResponseHelper(Type.Array(DataCoreSchema), rawResponse);
45
+ return parseResponseHelper(Type.Array(responseSchema), rawResponse);
39
46
  }
40
47
  }
@@ -11,28 +11,23 @@ export * from "./variable/variable.create.js";
11
11
  export * from "./variable/variable.delete.js";
12
12
  export * from "./variable/variable.list.js";
13
13
  export * from "./data-core/data-core.create.js";
14
- export * from "./data-core/data-core.delete-request.js";
15
14
  export * from "./data-core/data-core.exists.js";
16
15
  export * from "./data-core/data-core.fetch.js";
17
16
  export * from "./data-core/data-core.list.js";
18
- export * from "./data-core/data-core.list-new.js";
19
17
  export * from "./data-core/data-core.request-delete.js";
20
18
  export * from "./data-core/data-core.update.js";
21
19
  export * from "./flow-type/flow-type.create.js";
22
- export * from "./flow-type/flow-type.delete-request.js";
23
20
  export * from "./flow-type/flow-type.exists.js";
24
21
  export * from "./flow-type/flow-type.fetch.js";
25
22
  export * from "./flow-type/flow-type.list.js";
26
23
  export * from "./flow-type/flow-type.request-delete.js";
27
24
  export * from "./flow-type/flow-type.update.js";
28
25
  export * from "./event-type/event-type.create.js";
29
- export * from "./event-type/event-type.delete-request.js";
30
26
  export * from "./event-type/event-type.exists.js";
31
27
  export * from "./event-type/event-type.fetch.js";
32
28
  export * from "./event-type/event-type.list.js";
33
29
  export * from "./event-type/event-type.request-delete.js";
34
30
  export * from "./event-type/event-type.request-truncate.js";
35
- export * from "./event-type/event-type.truncate-request.js";
36
31
  export * from "./event-type/event-type.update.js";
37
32
  export * from "./event-type/event-type.info.js";
38
33
  export * from "./events/events.fetch-time-buckets-by-names.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yCAAyC,CAAA;AAGvD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AAGzC,cAAc,2BAA2B,CAAA;AACzC,cA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AA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA"}
@@ -16,16 +16,13 @@ export * from "./variable/variable.delete.js";
16
16
  export * from "./variable/variable.list.js";
17
17
  // Data Core
18
18
  export * from "./data-core/data-core.create.js";
19
- export * from "./data-core/data-core.delete-request.js";
20
19
  export * from "./data-core/data-core.exists.js";
21
20
  export * from "./data-core/data-core.fetch.js";
22
21
  export * from "./data-core/data-core.list.js";
23
- export * from "./data-core/data-core.list-new.js";
24
22
  export * from "./data-core/data-core.request-delete.js";
25
23
  export * from "./data-core/data-core.update.js";
26
24
  // Flow Types
27
25
  export * from "./flow-type/flow-type.create.js";
28
- export * from "./flow-type/flow-type.delete-request.js";
29
26
  export * from "./flow-type/flow-type.exists.js";
30
27
  export * from "./flow-type/flow-type.fetch.js";
31
28
  export * from "./flow-type/flow-type.list.js";
@@ -33,13 +30,11 @@ export * from "./flow-type/flow-type.request-delete.js";
33
30
  export * from "./flow-type/flow-type.update.js";
34
31
  // Event Types
35
32
  export * from "./event-type/event-type.create.js";
36
- export * from "./event-type/event-type.delete-request.js";
37
33
  export * from "./event-type/event-type.exists.js";
38
34
  export * from "./event-type/event-type.fetch.js";
39
35
  export * from "./event-type/event-type.list.js";
40
36
  export * from "./event-type/event-type.request-delete.js";
41
37
  export * from "./event-type/event-type.request-truncate.js";
42
- export * from "./event-type/event-type.truncate-request.js";
43
38
  export * from "./event-type/event-type.update.js";
44
39
  export * from "./event-type/event-type.info.js";
45
40
  // Events
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowcore/sdk",
3
- "version": "1.22.1",
3
+ "version": "1.23.0",
4
4
  "description": "Flowcore SDK",
5
5
  "homepage": "https://github.com/flowcore-io/flowcore-sdk#readme",
6
6
  "repository": {
@@ -1,5 +1,5 @@
1
1
  import { Command } from "../../common/command.js";
2
- import { type DataCore } from "../../contracts/data-core.js";
2
+ import { type DataCoreWithAccess } from "../../contracts/data-core.js";
3
3
  /**
4
4
  * The input for the data core fetch by name command
5
5
  */
@@ -8,11 +8,13 @@ export interface DataCoreListInput {
8
8
  tenantId?: string;
9
9
  /** The tenant name */
10
10
  tenant?: string;
11
+ /** The data core name */
12
+ name?: string;
11
13
  }
12
14
  /**
13
15
  * Fetch all data cores for a tenant
14
16
  */
15
- export declare class DataCoreListCommand extends Command<DataCoreListInput, DataCore[]> {
17
+ export declare class DataCoreListCommand extends Command<DataCoreListInput, DataCoreWithAccess[]> {
16
18
  /**
17
19
  * Get the method
18
20
  */
@@ -28,6 +30,6 @@ export declare class DataCoreListCommand extends Command<DataCoreListInput, Data
28
30
  /**
29
31
  * Parse the response
30
32
  */
31
- protected parseResponse(rawResponse: unknown): DataCore[];
33
+ protected parseResponse(rawResponse: unknown): DataCoreWithAccess[];
32
34
  }
33
35
  //# sourceMappingURL=data-core.list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-core.list.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAWpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,EAAE;CAGnE"}
1
+ {"version":3,"file":"data-core.list.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,8BAA8B,CAAA;AAGhG;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAOD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,CAAC;IACvF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAcpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,kBAAkB,EAAE;CAG7E"}
@@ -5,6 +5,10 @@ const typebox_1 = require("@sinclair/typebox");
5
5
  const command_js_1 = require("../../common/command.js");
6
6
  const data_core_js_1 = require("../../contracts/data-core.js");
7
7
  const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
8
+ const responseSchema = typebox_1.Type.Object({
9
+ ...data_core_js_1.DataCoreWithAccessSchema.properties,
10
+ access: typebox_1.Type.Array(typebox_1.Type.String()),
11
+ });
8
12
  /**
9
13
  * Fetch all data cores for a tenant
10
14
  */
@@ -32,13 +36,16 @@ class DataCoreListCommand extends command_js_1.Command {
32
36
  if (this.input.tenant) {
33
37
  queryParams.set("tenant", this.input.tenant);
34
38
  }
39
+ if (this.input.name) {
40
+ queryParams.set("name", this.input.name);
41
+ }
35
42
  return `/api/v1/data-cores?${queryParams.toString()}`;
36
43
  }
37
44
  /**
38
45
  * Parse the response
39
46
  */
40
47
  parseResponse(rawResponse) {
41
- return (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(data_core_js_1.DataCoreSchema), rawResponse);
48
+ return (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(responseSchema), rawResponse);
42
49
  }
43
50
  }
44
51
  exports.DataCoreListCommand = DataCoreListCommand;
@@ -11,28 +11,23 @@ export * from "./variable/variable.create.js";
11
11
  export * from "./variable/variable.delete.js";
12
12
  export * from "./variable/variable.list.js";
13
13
  export * from "./data-core/data-core.create.js";
14
- export * from "./data-core/data-core.delete-request.js";
15
14
  export * from "./data-core/data-core.exists.js";
16
15
  export * from "./data-core/data-core.fetch.js";
17
16
  export * from "./data-core/data-core.list.js";
18
- export * from "./data-core/data-core.list-new.js";
19
17
  export * from "./data-core/data-core.request-delete.js";
20
18
  export * from "./data-core/data-core.update.js";
21
19
  export * from "./flow-type/flow-type.create.js";
22
- export * from "./flow-type/flow-type.delete-request.js";
23
20
  export * from "./flow-type/flow-type.exists.js";
24
21
  export * from "./flow-type/flow-type.fetch.js";
25
22
  export * from "./flow-type/flow-type.list.js";
26
23
  export * from "./flow-type/flow-type.request-delete.js";
27
24
  export * from "./flow-type/flow-type.update.js";
28
25
  export * from "./event-type/event-type.create.js";
29
- export * from "./event-type/event-type.delete-request.js";
30
26
  export * from "./event-type/event-type.exists.js";
31
27
  export * from "./event-type/event-type.fetch.js";
32
28
  export * from "./event-type/event-type.list.js";
33
29
  export * from "./event-type/event-type.request-delete.js";
34
30
  export * from "./event-type/event-type.request-truncate.js";
35
- export * from "./event-type/event-type.truncate-request.js";
36
31
  export * from "./event-type/event-type.update.js";
37
32
  export * from "./event-type/event-type.info.js";
38
33
  export * from "./events/events.fetch-time-buckets-by-names.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yCAAyC,CAAA;AAGvD,cAAc,6BAA6B,CAAA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/D,cAAc,mDAAmD,CAAA;AAGjE,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA"}
@@ -32,16 +32,13 @@ __exportStar(require("./variable/variable.delete.js"), exports);
32
32
  __exportStar(require("./variable/variable.list.js"), exports);
33
33
  // Data Core
34
34
  __exportStar(require("./data-core/data-core.create.js"), exports);
35
- __exportStar(require("./data-core/data-core.delete-request.js"), exports);
36
35
  __exportStar(require("./data-core/data-core.exists.js"), exports);
37
36
  __exportStar(require("./data-core/data-core.fetch.js"), exports);
38
37
  __exportStar(require("./data-core/data-core.list.js"), exports);
39
- __exportStar(require("./data-core/data-core.list-new.js"), exports);
40
38
  __exportStar(require("./data-core/data-core.request-delete.js"), exports);
41
39
  __exportStar(require("./data-core/data-core.update.js"), exports);
42
40
  // Flow Types
43
41
  __exportStar(require("./flow-type/flow-type.create.js"), exports);
44
- __exportStar(require("./flow-type/flow-type.delete-request.js"), exports);
45
42
  __exportStar(require("./flow-type/flow-type.exists.js"), exports);
46
43
  __exportStar(require("./flow-type/flow-type.fetch.js"), exports);
47
44
  __exportStar(require("./flow-type/flow-type.list.js"), exports);
@@ -49,13 +46,11 @@ __exportStar(require("./flow-type/flow-type.request-delete.js"), exports);
49
46
  __exportStar(require("./flow-type/flow-type.update.js"), exports);
50
47
  // Event Types
51
48
  __exportStar(require("./event-type/event-type.create.js"), exports);
52
- __exportStar(require("./event-type/event-type.delete-request.js"), exports);
53
49
  __exportStar(require("./event-type/event-type.exists.js"), exports);
54
50
  __exportStar(require("./event-type/event-type.fetch.js"), exports);
55
51
  __exportStar(require("./event-type/event-type.list.js"), exports);
56
52
  __exportStar(require("./event-type/event-type.request-delete.js"), exports);
57
53
  __exportStar(require("./event-type/event-type.request-truncate.js"), exports);
58
- __exportStar(require("./event-type/event-type.truncate-request.js"), exports);
59
54
  __exportStar(require("./event-type/event-type.update.js"), exports);
60
55
  __exportStar(require("./event-type/event-type.info.js"), exports);
61
56
  // Events
@@ -1,38 +0,0 @@
1
- import { GraphQlCommand } from "../../common/command-graphql.js";
2
- import type { FlowcoreClient } from "../../common/flowcore-client.js";
3
- /**
4
- * The input for the data core delete request command
5
- */
6
- export interface DataCoreDeleteRequestInput {
7
- /** The id of the data core */
8
- dataCoreId: string;
9
- /** Wait for the data core to be deleted (default: true) */
10
- waitForDelete?: boolean;
11
- }
12
- /**
13
- * Request to delete a data core
14
- * @deprecated Use `DataCoreRequestDeleteCommand` instead
15
- */
16
- export declare class DataCoreDeleteRequestCommand extends GraphQlCommand<DataCoreDeleteRequestInput, boolean> {
17
- /**
18
- * Whether the command should retry on failure
19
- */
20
- protected retryOnFailure: boolean;
21
- /**
22
- * Create a new data core delete request command
23
- */
24
- constructor(input: DataCoreDeleteRequestInput);
25
- /**
26
- * Parse the response
27
- */
28
- protected parseResponse(response: unknown): boolean;
29
- /**
30
- * Get the body for the request
31
- */
32
- protected getBody(): Record<string, unknown>;
33
- /**
34
- * Wait for the response (timeout: 25 seconds)
35
- */
36
- protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
37
- }
38
- //# sourceMappingURL=data-core.delete-request.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-core.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAKhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AA4BD;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;gBACS,KAAK,EAAE,0BAA0B;IAO7C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAW5D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
@@ -1,95 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { GraphQlCommand } from "../../common/command-graphql.js";
3
- import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
- import { CommandError } from "../../exceptions/command-error.js";
5
- import { NotFoundException } from "../../exceptions/not-found.js";
6
- import { DataCoreExistsCommand } from "./data-core.exists.js";
7
- const graphQlQuery = `
8
- mutation FLOWCORE_SDK_DATA_CORE_DELETE_REQUEST($dataCoreId: ID!) {
9
- datacore(id: $dataCoreId) {
10
- requestDelete {
11
- deleting
12
- }
13
- }
14
- }
15
- `;
16
- const responseSchema = Type.Object({
17
- errors: Type.Optional(Type.Array(Type.Object({
18
- message: Type.String(),
19
- }))),
20
- data: Type.Object({
21
- datacore: Type.Object({
22
- requestDelete: Type.Union([
23
- Type.Object({
24
- deleting: Type.Boolean(),
25
- }),
26
- Type.Null(),
27
- ]),
28
- }),
29
- }),
30
- });
31
- /**
32
- * Request to delete a data core
33
- * @deprecated Use `DataCoreRequestDeleteCommand` instead
34
- */
35
- export class DataCoreDeleteRequestCommand extends GraphQlCommand {
36
- /**
37
- * Create a new data core delete request command
38
- */
39
- constructor(input) {
40
- super({
41
- ...input,
42
- waitForDelete: input.waitForDelete ?? true,
43
- });
44
- /**
45
- * Whether the command should retry on failure
46
- */
47
- Object.defineProperty(this, "retryOnFailure", {
48
- enumerable: true,
49
- configurable: true,
50
- writable: true,
51
- value: false
52
- });
53
- }
54
- /**
55
- * Parse the response
56
- */
57
- parseResponse(response) {
58
- const parsedResponse = parseResponseHelper(responseSchema, response);
59
- if (parsedResponse.errors) {
60
- throw new CommandError(this.constructor.name, parsedResponse.errors[0].message);
61
- }
62
- if (!parsedResponse.data.datacore?.requestDelete) {
63
- throw new NotFoundException("DataCore", { id: this.input.dataCoreId });
64
- }
65
- return parsedResponse.data.datacore.requestDelete.deleting;
66
- }
67
- /**
68
- * Get the body for the request
69
- */
70
- getBody() {
71
- return {
72
- query: graphQlQuery,
73
- variables: this.input,
74
- };
75
- }
76
- /**
77
- * Wait for the response (timeout: 25 seconds)
78
- */
79
- async processResponse(client, response) {
80
- if (!this.input.waitForDelete) {
81
- return response;
82
- }
83
- const start = Date.now();
84
- while (Date.now() - start < 25_000) {
85
- const response = await client.execute(new DataCoreExistsCommand({
86
- dataCoreId: this.input.dataCoreId,
87
- }));
88
- if (!response.exists) {
89
- break;
90
- }
91
- await new Promise((resolve) => setTimeout(resolve, 100));
92
- }
93
- return response;
94
- }
95
- }
@@ -1,35 +0,0 @@
1
- import { Command } from "../../common/command.js";
2
- import { type DataCoreWithAccess } from "../../contracts/data-core.js";
3
- /**
4
- * The input for the data core fetch by name command
5
- */
6
- export interface DataCoreListNewInput {
7
- /** The tenant id */
8
- tenantId?: string;
9
- /** The tenant name */
10
- tenant?: string;
11
- /** The data core name */
12
- name?: string;
13
- }
14
- /**
15
- * Fetch all data cores for a tenant
16
- */
17
- export declare class DataCoreListNewCommand extends Command<DataCoreListNewInput, DataCoreWithAccess[]> {
18
- /**
19
- * Get the method
20
- */
21
- protected getMethod(): string;
22
- /**
23
- * Get the base url
24
- */
25
- protected getBaseUrl(): string;
26
- /**
27
- * Get the path
28
- */
29
- protected getPath(): string;
30
- /**
31
- * Parse the response
32
- */
33
- protected parseResponse(rawResponse: unknown): DataCoreWithAccess[];
34
- }
35
- //# sourceMappingURL=data-core.list-new.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-core.list-new.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.list-new.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,8BAA8B,CAAA;AAGhG;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAOD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAC7F;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAcpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,kBAAkB,EAAE;CAG7E"}
@@ -1,47 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { Command } from "../../common/command.js";
3
- import { DataCoreWithAccessSchema } from "../../contracts/data-core.js";
4
- import { parseResponseHelper } from "../../utils/parse-response-helper.js";
5
- const responseSchema = Type.Object({
6
- ...DataCoreWithAccessSchema.properties,
7
- access: Type.Array(Type.String()),
8
- });
9
- /**
10
- * Fetch all data cores for a tenant
11
- */
12
- export class DataCoreListNewCommand extends Command {
13
- /**
14
- * Get the method
15
- */
16
- getMethod() {
17
- return "GET";
18
- }
19
- /**
20
- * Get the base url
21
- */
22
- getBaseUrl() {
23
- return "https://data-core-2.api.flowcore.io";
24
- }
25
- /**
26
- * Get the path
27
- */
28
- getPath() {
29
- const queryParams = new URLSearchParams();
30
- if (this.input.tenantId) {
31
- queryParams.set("tenantId", this.input.tenantId);
32
- }
33
- if (this.input.tenant) {
34
- queryParams.set("tenant", this.input.tenant);
35
- }
36
- if (this.input.name) {
37
- queryParams.set("name", this.input.name);
38
- }
39
- return `/api/v1/data-cores/new?${queryParams.toString()}`;
40
- }
41
- /**
42
- * Parse the response
43
- */
44
- parseResponse(rawResponse) {
45
- return parseResponseHelper(Type.Array(responseSchema), rawResponse);
46
- }
47
- }
@@ -1,42 +0,0 @@
1
- import { GraphQlCommand } from "../../common/command-graphql.js";
2
- import type { FlowcoreClient } from "../../common/flowcore-client.js";
3
- /**
4
- * The input for the event type delete request command
5
- */
6
- export interface EventTypeDeleteRequestInput {
7
- /** The id of the event type */
8
- eventTypeId: string;
9
- /** Wait for the event type to be deleted (default: true) */
10
- waitForDelete?: boolean;
11
- }
12
- /**
13
- * Request to delete a event type
14
- * @deprecated Use `EventTypeRequestDeleteCommand` instead
15
- */
16
- export declare class EventTypeDeleteRequestCommand extends GraphQlCommand<EventTypeDeleteRequestInput, boolean> {
17
- /**
18
- * Whether the command should retry on failure
19
- */
20
- protected retryOnFailure: boolean;
21
- /**
22
- * The allowed modes for the command
23
- */
24
- protected allowedModes: ("apiKey" | "bearer")[];
25
- /**
26
- * Create a new event type delete request command
27
- */
28
- constructor(input: EventTypeDeleteRequestInput);
29
- /**
30
- * Parse the response
31
- */
32
- protected parseResponse(response: unknown): boolean;
33
- /**
34
- * Get the body for the request
35
- */
36
- protected getBody(): Record<string, unknown>;
37
- /**
38
- * Wait for the response (timeout: 25 seconds)
39
- */
40
- protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
41
- }
42
- //# sourceMappingURL=event-type.delete-request.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAGrE;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AA+BD;;;GAGG;AACH,qBAAa,6BAA8B,SAAQ,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC;IACrG;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;gBACS,KAAK,EAAE,2BAA2B;IAO9C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAW5D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQrD;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}