@flowcore/sdk 1.14.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.
Files changed (166) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/esm/commands/api-key/api-key.create.d.ts +1 -1
  3. package/esm/commands/api-key/api-key.create.d.ts.map +1 -1
  4. package/esm/commands/api-key/api-key.create.js +1 -1
  5. package/esm/commands/api-key/api-key.delete.d.ts +1 -1
  6. package/esm/commands/api-key/api-key.delete.d.ts.map +1 -1
  7. package/esm/commands/api-key/api-key.delete.js +1 -1
  8. package/esm/commands/api-key/api-key.list.d.ts +1 -1
  9. package/esm/commands/api-key/api-key.list.d.ts.map +1 -1
  10. package/esm/commands/api-key/api-key.list.js +1 -1
  11. package/esm/commands/container-registry/container-registry.delete.d.ts +1 -1
  12. package/esm/commands/container-registry/container-registry.delete.d.ts.map +1 -1
  13. package/esm/commands/container-registry/container-registry.delete.js +2 -1
  14. package/esm/commands/container-registry/container-registry.fetch.d.ts +1 -1
  15. package/esm/commands/container-registry/container-registry.fetch.d.ts.map +1 -1
  16. package/esm/commands/container-registry/container-registry.fetch.js +2 -1
  17. package/esm/commands/container-registry/container-registry.list.d.ts +1 -1
  18. package/esm/commands/container-registry/container-registry.list.d.ts.map +1 -1
  19. package/esm/commands/container-registry/container-registry.list.js +2 -1
  20. package/esm/commands/data-core/data-core.delete-request.d.ts +1 -1
  21. package/esm/commands/data-core/data-core.delete-request.d.ts.map +1 -1
  22. package/esm/commands/data-core/data-core.delete-request.js +1 -1
  23. package/esm/commands/event-type/event-type.delete-request.d.ts +1 -1
  24. package/esm/commands/event-type/event-type.delete-request.d.ts.map +1 -1
  25. package/esm/commands/event-type/event-type.delete-request.js +1 -1
  26. package/esm/commands/event-type/event-type.info.d.ts +35 -0
  27. package/esm/commands/event-type/event-type.info.d.ts.map +1 -0
  28. package/esm/commands/event-type/event-type.info.js +58 -0
  29. package/esm/commands/event-type/event-type.truncate-request.d.ts +1 -1
  30. package/esm/commands/event-type/event-type.truncate-request.d.ts.map +1 -1
  31. package/esm/commands/event-type/event-type.truncate-request.js +1 -1
  32. package/esm/commands/events/event.list.d.ts +62 -0
  33. package/esm/commands/events/event.list.d.ts.map +1 -0
  34. package/esm/commands/events/event.list.js +53 -0
  35. package/esm/commands/events/time-bucket.list.d.ts +49 -0
  36. package/esm/commands/events/time-bucket.list.d.ts.map +1 -0
  37. package/esm/commands/events/time-bucket.list.js +50 -0
  38. package/esm/commands/flow-type/flow-type.delete-request.d.ts +1 -1
  39. package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
  40. package/esm/commands/flow-type/flow-type.delete-request.js +1 -1
  41. package/esm/commands/index.d.ts +3 -0
  42. package/esm/commands/index.d.ts.map +1 -1
  43. package/esm/commands/index.js +4 -1
  44. package/esm/commands/secret/secret.create.d.ts +1 -1
  45. package/esm/commands/secret/secret.create.d.ts.map +1 -1
  46. package/esm/commands/secret/secret.create.js +1 -1
  47. package/esm/commands/secret/secret.delete.d.ts +1 -1
  48. package/esm/commands/secret/secret.delete.d.ts.map +1 -1
  49. package/esm/commands/secret/secret.delete.js +1 -1
  50. package/esm/commands/secret/secret.list.d.ts +1 -1
  51. package/esm/commands/secret/secret.list.d.ts.map +1 -1
  52. package/esm/commands/secret/secret.list.js +1 -1
  53. package/esm/commands/tenant/tenant.list.d.ts +1 -1
  54. package/esm/commands/tenant/tenant.list.d.ts.map +1 -1
  55. package/esm/commands/tenant/tenant.list.js +1 -1
  56. package/esm/commands/variable/variable.create.d.ts +1 -1
  57. package/esm/commands/variable/variable.create.d.ts.map +1 -1
  58. package/esm/commands/variable/variable.create.js +1 -1
  59. package/esm/commands/variable/variable.delete.d.ts +1 -1
  60. package/esm/commands/variable/variable.delete.d.ts.map +1 -1
  61. package/esm/commands/variable/variable.delete.js +1 -1
  62. package/esm/commands/variable/variable.list.d.ts +1 -1
  63. package/esm/commands/variable/variable.list.d.ts.map +1 -1
  64. package/esm/commands/variable/variable.list.js +1 -1
  65. package/esm/common/command-custom.d.ts +36 -0
  66. package/esm/common/command-custom.d.ts.map +1 -0
  67. package/esm/common/command-custom.js +28 -0
  68. package/esm/common/command-graphql.d.ts +19 -0
  69. package/esm/common/command-graphql.d.ts.map +1 -0
  70. package/esm/common/command-graphql.js +30 -0
  71. package/esm/common/command.d.ts +1 -17
  72. package/esm/common/command.d.ts.map +1 -1
  73. package/esm/common/command.js +0 -29
  74. package/esm/common/flowcore-client.d.ts.map +1 -1
  75. package/esm/common/flowcore-client.js +5 -2
  76. package/esm/common/notification-client.d.ts.map +1 -1
  77. package/esm/common/notification-client.js +4 -1
  78. package/esm/exceptions/client-error.d.ts +2 -1
  79. package/esm/exceptions/client-error.d.ts.map +1 -1
  80. package/esm/exceptions/client-error.js +8 -2
  81. package/esm/mod.d.ts +2 -0
  82. package/esm/mod.d.ts.map +1 -1
  83. package/esm/mod.js +2 -0
  84. package/package.json +1 -1
  85. package/script/commands/api-key/api-key.create.d.ts +1 -1
  86. package/script/commands/api-key/api-key.create.d.ts.map +1 -1
  87. package/script/commands/api-key/api-key.create.js +2 -2
  88. package/script/commands/api-key/api-key.delete.d.ts +1 -1
  89. package/script/commands/api-key/api-key.delete.d.ts.map +1 -1
  90. package/script/commands/api-key/api-key.delete.js +2 -2
  91. package/script/commands/api-key/api-key.list.d.ts +1 -1
  92. package/script/commands/api-key/api-key.list.d.ts.map +1 -1
  93. package/script/commands/api-key/api-key.list.js +2 -2
  94. package/script/commands/container-registry/container-registry.delete.d.ts +1 -1
  95. package/script/commands/container-registry/container-registry.delete.d.ts.map +1 -1
  96. package/script/commands/container-registry/container-registry.delete.js +4 -3
  97. package/script/commands/container-registry/container-registry.fetch.d.ts +1 -1
  98. package/script/commands/container-registry/container-registry.fetch.d.ts.map +1 -1
  99. package/script/commands/container-registry/container-registry.fetch.js +4 -3
  100. package/script/commands/container-registry/container-registry.list.d.ts +1 -1
  101. package/script/commands/container-registry/container-registry.list.d.ts.map +1 -1
  102. package/script/commands/container-registry/container-registry.list.js +4 -3
  103. package/script/commands/data-core/data-core.delete-request.d.ts +1 -1
  104. package/script/commands/data-core/data-core.delete-request.d.ts.map +1 -1
  105. package/script/commands/data-core/data-core.delete-request.js +2 -2
  106. package/script/commands/event-type/event-type.delete-request.d.ts +1 -1
  107. package/script/commands/event-type/event-type.delete-request.d.ts.map +1 -1
  108. package/script/commands/event-type/event-type.delete-request.js +2 -2
  109. package/script/commands/event-type/event-type.info.d.ts +35 -0
  110. package/script/commands/event-type/event-type.info.d.ts.map +1 -0
  111. package/script/commands/event-type/event-type.info.js +62 -0
  112. package/script/commands/event-type/event-type.truncate-request.d.ts +1 -1
  113. package/script/commands/event-type/event-type.truncate-request.d.ts.map +1 -1
  114. package/script/commands/event-type/event-type.truncate-request.js +2 -2
  115. package/script/commands/events/event.list.d.ts +62 -0
  116. package/script/commands/events/event.list.d.ts.map +1 -0
  117. package/script/commands/events/event.list.js +57 -0
  118. package/script/commands/events/time-bucket.list.d.ts +49 -0
  119. package/script/commands/events/time-bucket.list.d.ts.map +1 -0
  120. package/script/commands/events/time-bucket.list.js +54 -0
  121. package/script/commands/flow-type/flow-type.delete-request.d.ts +1 -1
  122. package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
  123. package/script/commands/flow-type/flow-type.delete-request.js +2 -2
  124. package/script/commands/index.d.ts +3 -0
  125. package/script/commands/index.d.ts.map +1 -1
  126. package/script/commands/index.js +4 -1
  127. package/script/commands/secret/secret.create.d.ts +1 -1
  128. package/script/commands/secret/secret.create.d.ts.map +1 -1
  129. package/script/commands/secret/secret.create.js +2 -2
  130. package/script/commands/secret/secret.delete.d.ts +1 -1
  131. package/script/commands/secret/secret.delete.d.ts.map +1 -1
  132. package/script/commands/secret/secret.delete.js +2 -2
  133. package/script/commands/secret/secret.list.d.ts +1 -1
  134. package/script/commands/secret/secret.list.d.ts.map +1 -1
  135. package/script/commands/secret/secret.list.js +2 -2
  136. package/script/commands/tenant/tenant.list.d.ts +1 -1
  137. package/script/commands/tenant/tenant.list.d.ts.map +1 -1
  138. package/script/commands/tenant/tenant.list.js +2 -2
  139. package/script/commands/variable/variable.create.d.ts +1 -1
  140. package/script/commands/variable/variable.create.d.ts.map +1 -1
  141. package/script/commands/variable/variable.create.js +2 -2
  142. package/script/commands/variable/variable.delete.d.ts +1 -1
  143. package/script/commands/variable/variable.delete.d.ts.map +1 -1
  144. package/script/commands/variable/variable.delete.js +2 -2
  145. package/script/commands/variable/variable.list.d.ts +1 -1
  146. package/script/commands/variable/variable.list.d.ts.map +1 -1
  147. package/script/commands/variable/variable.list.js +2 -2
  148. package/script/common/command-custom.d.ts +36 -0
  149. package/script/common/command-custom.d.ts.map +1 -0
  150. package/script/common/command-custom.js +32 -0
  151. package/script/common/command-graphql.d.ts +19 -0
  152. package/script/common/command-graphql.d.ts.map +1 -0
  153. package/script/common/command-graphql.js +34 -0
  154. package/script/common/command.d.ts +1 -17
  155. package/script/common/command.d.ts.map +1 -1
  156. package/script/common/command.js +1 -31
  157. package/script/common/flowcore-client.d.ts.map +1 -1
  158. package/script/common/flowcore-client.js +5 -2
  159. package/script/common/notification-client.d.ts.map +1 -1
  160. package/script/common/notification-client.js +8 -5
  161. package/script/exceptions/client-error.d.ts +2 -1
  162. package/script/exceptions/client-error.d.ts.map +1 -1
  163. package/script/exceptions/client-error.js +8 -2
  164. package/script/mod.d.ts +2 -0
  165. package/script/mod.d.ts.map +1 -1
  166. package/script/mod.js +2 -0
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ContainerRegistryDeleteCommand = void 0;
4
+ const command_js_1 = require("../../common/command.js");
4
5
  const container_js_1 = require("../../contracts/container.js");
5
- const mod_js_1 = require("../../mod.js");
6
- class ContainerRegistryDeleteCommand extends mod_js_1.Command {
6
+ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
7
+ class ContainerRegistryDeleteCommand extends command_js_1.Command {
7
8
  getMethod() {
8
9
  return "DELETE";
9
10
  }
@@ -23,7 +24,7 @@ class ContainerRegistryDeleteCommand extends mod_js_1.Command {
23
24
  * Parse the response
24
25
  */
25
26
  parseResponse(response) {
26
- return (0, mod_js_1.parseResponseHelper)(container_js_1.ContainerRegistryDeleteSchema, response);
27
+ return (0, parse_response_helper_js_1.parseResponseHelper)(container_js_1.ContainerRegistryDeleteSchema, response);
27
28
  }
28
29
  }
29
30
  exports.ContainerRegistryDeleteCommand = ContainerRegistryDeleteCommand;
@@ -1,5 +1,5 @@
1
1
  import { type ContainerRegistry } from "../../contracts/container.js";
2
- import { Command } from "../../mod.js";
2
+ import { Command } from "../../common/command.js";
3
3
  export interface ContainerRegistryFetchInput {
4
4
  /** The id of container */
5
5
  containerId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"container-registry.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/container-registry/container-registry.fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,8BAA8B,CAAA;AAC9F,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAA;AAE3D,MAAM,WAAW,2BAA2B;IAC1C,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,qBAAa,6BAA8B,SAAQ,OAAO,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;cACrF,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,iBAAiB;CAGvE"}
1
+ {"version":3,"file":"container-registry.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/container-registry/container-registry.fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,8BAA8B,CAAA;AAC9F,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,MAAM,WAAW,2BAA2B;IAC1C,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,qBAAa,6BAA8B,SAAQ,OAAO,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;cACrF,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,iBAAiB;CAGvE"}
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ContainerRegistryFetchCommand = void 0;
4
4
  const container_js_1 = require("../../contracts/container.js");
5
- const mod_js_1 = require("../../mod.js");
6
- class ContainerRegistryFetchCommand extends mod_js_1.Command {
5
+ const command_js_1 = require("../../common/command.js");
6
+ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
7
+ class ContainerRegistryFetchCommand extends command_js_1.Command {
7
8
  getMethod() {
8
9
  return "GET";
9
10
  }
@@ -23,7 +24,7 @@ class ContainerRegistryFetchCommand extends mod_js_1.Command {
23
24
  * Parse the response
24
25
  */
25
26
  parseResponse(response) {
26
- return (0, mod_js_1.parseResponseHelper)(container_js_1.ContainerRegistrySchema, response);
27
+ return (0, parse_response_helper_js_1.parseResponseHelper)(container_js_1.ContainerRegistrySchema, response);
27
28
  }
28
29
  }
29
30
  exports.ContainerRegistryFetchCommand = ContainerRegistryFetchCommand;
@@ -1,5 +1,5 @@
1
+ import { Command } from "../../common/command.js";
1
2
  import { type ContainerRegistryList } from "../../contracts/container.js";
2
- import { Command } from "../../mod.js";
3
3
  export interface ContainerRegistryFetchTenantInput {
4
4
  /** The tenant id */
5
5
  tenantId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"container-registry.list.d.ts","sourceRoot":"","sources":["../../../src/commands/container-registry/container-registry.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAA+B,MAAM,8BAA8B,CAAA;AACtG,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAA;AAE3D,MAAM,WAAW,iCAAiC;IAChD,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,iCAAiC,EAAE,qBAAqB,CAAC;cAC5F,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,qBAAqB;CAG3E"}
1
+ {"version":3,"file":"container-registry.list.d.ts","sourceRoot":"","sources":["../../../src/commands/container-registry/container-registry.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,qBAAqB,EAA+B,MAAM,8BAA8B,CAAA;AAGtG,MAAM,WAAW,iCAAiC;IAChD,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,iCAAiC,EAAE,qBAAqB,CAAC;cAC5F,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,qBAAqB;CAG3E"}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ContainerRegistListCommand = void 0;
4
+ const command_js_1 = require("../../common/command.js");
4
5
  const container_js_1 = require("../../contracts/container.js");
5
- const mod_js_1 = require("../../mod.js");
6
- class ContainerRegistListCommand extends mod_js_1.Command {
6
+ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
7
+ class ContainerRegistListCommand extends command_js_1.Command {
7
8
  getMethod() {
8
9
  return "GET";
9
10
  }
@@ -23,7 +24,7 @@ class ContainerRegistListCommand extends mod_js_1.Command {
23
24
  * Parse the response
24
25
  */
25
26
  parseResponse(response) {
26
- return (0, mod_js_1.parseResponseHelper)(container_js_1.ContainerRegistryListSchema, response);
27
+ return (0, parse_response_helper_js_1.parseResponseHelper)(container_js_1.ContainerRegistryListSchema, response);
27
28
  }
28
29
  }
29
30
  exports.ContainerRegistListCommand = ContainerRegistListCommand;
@@ -1,4 +1,4 @@
1
- import { GraphQlCommand } from "../../common/command.js";
1
+ import { GraphQlCommand } from "../../common/command-graphql.js";
2
2
  import type { FlowcoreClient } from "../../common/flowcore-client.js";
3
3
  /**
4
4
  * The input for the data core delete request command
@@ -1 +1 @@
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,yBAAyB,CAAA;AAKxD,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
+ {"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"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataCoreDeleteRequestCommand = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
- const command_js_1 = require("../../common/command.js");
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 not_found_js_1 = require("../../exceptions/not-found.js");
@@ -35,7 +35,7 @@ const responseSchema = typebox_1.Type.Object({
35
35
  * Request to delete a data core
36
36
  * @deprecated Use `DataCoreRequestDeleteCommand` instead
37
37
  */
38
- class DataCoreDeleteRequestCommand extends command_js_1.GraphQlCommand {
38
+ class DataCoreDeleteRequestCommand extends command_graphql_js_1.GraphQlCommand {
39
39
  /**
40
40
  * Create a new data core delete request command
41
41
  */
@@ -1,4 +1,4 @@
1
- import { GraphQlCommand } from "../../common/command.js";
1
+ import { GraphQlCommand } from "../../common/command-graphql.js";
2
2
  import type { FlowcoreClient } from "../../common/flowcore-client.js";
3
3
  /**
4
4
  * The input for the event type delete request command
@@ -1 +1 @@
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,yBAAyB,CAAA;AAIxD,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"}
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"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventTypeDeleteRequestCommand = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
- const command_js_1 = require("../../common/command.js");
5
+ const command_graphql_js_1 = require("../../common/command-graphql.js");
6
6
  const command_error_js_1 = require("../../exceptions/command-error.js");
7
7
  const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
8
8
  const not_found_js_1 = require("../../exceptions/not-found.js");
@@ -38,7 +38,7 @@ const responseSchema = typebox_1.Type.Object({
38
38
  * Request to delete a event type
39
39
  * @deprecated Use `EventTypeRequestDeleteCommand` instead
40
40
  */
41
- class EventTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
41
+ class EventTypeDeleteRequestCommand extends command_graphql_js_1.GraphQlCommand {
42
42
  /**
43
43
  * Create a new event type delete request command
44
44
  */
@@ -0,0 +1,35 @@
1
+ import { CustomCommand } from "../../common/command-custom.js";
2
+ import type { FlowcoreClient } from "../../common/flowcore-client.js";
3
+ import type { FlowcoreEvent } from "../../contracts/event.js";
4
+ /**
5
+ * The input for the events fetch info command
6
+ */
7
+ export interface EventTypeInfoInput {
8
+ /** the event type id or ids */
9
+ eventTypeId: [string, ...string[]] | string;
10
+ /** the limit for the number of last events to fetch (default is 5) */
11
+ limit?: number;
12
+ }
13
+ /**
14
+ * The output for the events fetch info command
15
+ */
16
+ export interface EventTypeInfoOutput {
17
+ /** the first time bucket */
18
+ firstTimeBucket?: string;
19
+ /** the last time bucket */
20
+ lastTimeBucket?: string;
21
+ /** the last events */
22
+ lastEvents: FlowcoreEvent[];
23
+ }
24
+ /**
25
+ * Fetch information about an event type
26
+ *
27
+ * contains the first and last time bucket and the last {limit} events
28
+ */
29
+ export declare class EventTypeInfoCommand extends CustomCommand<EventTypeInfoInput, EventTypeInfoOutput> {
30
+ /**
31
+ * Custom execute method
32
+ */
33
+ protected customExecute(client: FlowcoreClient): Promise<EventTypeInfoOutput>;
34
+ }
35
+ //# sourceMappingURL=event-type.info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-type.info.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAI7D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAA;IAC3C,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sBAAsB;IACtB,UAAU,EAAE,aAAa,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,aAAa,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;IAC9F;;OAEG;cACsB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAmD7F"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventTypeInfoCommand = void 0;
4
+ const command_custom_js_1 = require("../../common/command-custom.js");
5
+ const event_list_js_1 = require("../events/event.list.js");
6
+ const time_bucket_list_js_1 = require("../events/time-bucket.list.js");
7
+ /**
8
+ * Fetch information about an event type
9
+ *
10
+ * contains the first and last time bucket and the last {limit} events
11
+ */
12
+ class EventTypeInfoCommand extends command_custom_js_1.CustomCommand {
13
+ /**
14
+ * Custom execute method
15
+ */
16
+ async customExecute(client) {
17
+ const lastEventsLimit = this.input.limit ?? 5;
18
+ const firstTimeBucketCommand = new time_bucket_list_js_1.TimeBucketListCommand({
19
+ eventTypeId: this.input.eventTypeId,
20
+ order: "asc",
21
+ pageSize: 1,
22
+ });
23
+ const lastTimeBucketCommand = new time_bucket_list_js_1.TimeBucketListCommand({
24
+ eventTypeId: this.input.eventTypeId,
25
+ order: "desc",
26
+ pageSize: lastEventsLimit,
27
+ });
28
+ const [firstTimeBucketResponse, lastTimeBucketResponse] = await Promise.all([
29
+ client.execute(firstTimeBucketCommand),
30
+ client.execute(lastTimeBucketCommand),
31
+ ]);
32
+ const firstTimeBucket = firstTimeBucketResponse.timeBuckets[0];
33
+ const lastTimeBucket = lastTimeBucketResponse.timeBuckets[0];
34
+ if (!firstTimeBucket || !lastTimeBucket) {
35
+ return {
36
+ firstTimeBucket: undefined,
37
+ lastTimeBucket: undefined,
38
+ lastEvents: [],
39
+ };
40
+ }
41
+ const lastEvents = [];
42
+ for (const timeBucket of lastTimeBucketResponse.timeBuckets) {
43
+ const eventListCommand = new event_list_js_1.EventListCommand({
44
+ eventTypeId: this.input.eventTypeId,
45
+ timeBucket,
46
+ pageSize: lastEventsLimit - lastEvents.length,
47
+ order: "desc",
48
+ });
49
+ const eventListResponse = await client.execute(eventListCommand);
50
+ lastEvents.push(...eventListResponse.events);
51
+ if (lastEvents.length >= lastEventsLimit) {
52
+ break;
53
+ }
54
+ }
55
+ return {
56
+ firstTimeBucket,
57
+ lastTimeBucket,
58
+ lastEvents,
59
+ };
60
+ }
61
+ }
62
+ exports.EventTypeInfoCommand = EventTypeInfoCommand;
@@ -1,4 +1,4 @@
1
- import { GraphQlCommand } from "../../common/command.js";
1
+ import { GraphQlCommand } from "../../common/command-graphql.js";
2
2
  import type { FlowcoreClient } from "../../common/flowcore-client.js";
3
3
  /**
4
4
  * The input for the event type truncate request command
@@ -1 +1 @@
1
- {"version":3,"file":"event-type.truncate-request.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.truncate-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAGrE;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,8DAA8D;IAC9D,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AA+BD;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,cAAc,CAAC,6BAA6B,EAAE,OAAO,CAAC;IACzG;;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,6BAA6B;IAOhD;;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"}
1
+ {"version":3,"file":"event-type.truncate-request.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.truncate-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,6BAA6B;IAC5C,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,8DAA8D;IAC9D,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AA+BD;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,cAAc,CAAC,6BAA6B,EAAE,OAAO,CAAC;IACzG;;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,6BAA6B;IAOhD;;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"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventTypeTruncateRequestCommand = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
- const command_js_1 = require("../../common/command.js");
5
+ const command_graphql_js_1 = require("../../common/command-graphql.js");
6
6
  const command_error_js_1 = require("../../exceptions/command-error.js");
7
7
  const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
8
8
  const not_found_js_1 = require("../../exceptions/not-found.js");
@@ -38,7 +38,7 @@ const responseSchema = typebox_1.Type.Object({
38
38
  * Request to truncate a event type
39
39
  * @deprecated Use `EventTypeRequestTruncateCommand` instead
40
40
  */
41
- class EventTypeTruncateRequestCommand extends command_js_1.GraphQlCommand {
41
+ class EventTypeTruncateRequestCommand extends command_graphql_js_1.GraphQlCommand {
42
42
  /**
43
43
  * Create a new event type truncate request command
44
44
  */
@@ -0,0 +1,62 @@
1
+ import { Command } from "../../common/command.js";
2
+ import { type FlowcoreEvent } from "../../contracts/event.js";
3
+ /**
4
+ * The input for the events fetch indexes command
5
+ */
6
+ export interface EventListInput {
7
+ /** the event type id or ids */
8
+ eventTypeId: [string, ...string[]] | string;
9
+ /** the time bucket */
10
+ timeBucket: string;
11
+ /** the paging cursor */
12
+ cursor?: string;
13
+ /** the page size (default is 10.000) */
14
+ pageSize?: number;
15
+ /** start from this event id */
16
+ fromEventId?: string;
17
+ /**
18
+ * after this event id
19
+ *
20
+ * ⚠️ Not applicable if `fromEventId` is also defined
21
+ */
22
+ afterEventId?: string;
23
+ /** end at this event id */
24
+ toEventId?: string;
25
+ /**
26
+ * the order (default is asc)
27
+ *
28
+ * ⚠️ When using `desc` order, pagination and filters are not possible.
29
+ */
30
+ order?: "asc" | "desc";
31
+ }
32
+ /**
33
+ * The output for the events fetch indexes command
34
+ */
35
+ export interface EventListOutput {
36
+ /** the events */
37
+ events: FlowcoreEvent[];
38
+ /** the next page cursor */
39
+ nextCursor?: string;
40
+ }
41
+ /**
42
+ * Fetch time buckets for an event type
43
+ */
44
+ export declare class EventListCommand extends Command<EventListInput, EventListOutput> {
45
+ /**
46
+ * Get the method for the request
47
+ */
48
+ protected getMethod(): string;
49
+ /**
50
+ * Get the base url for the request
51
+ */
52
+ protected getBaseUrl(): string;
53
+ /**
54
+ * Get the path for the request
55
+ */
56
+ protected getPath(): string;
57
+ /**
58
+ * Parse the response
59
+ */
60
+ protected parseResponse(rawResponse: unknown): EventListOutput;
61
+ }
62
+ //# sourceMappingURL=event.list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.list.d.ts","sourceRoot":"","sources":["../../../src/commands/events/event.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,0BAA0B,CAAA;AAElF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAA;IAC3C,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iBAAiB;IACjB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC;IAC5E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAgBpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,eAAe;CAIxE"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventListCommand = void 0;
4
+ const typebox_1 = require("@sinclair/typebox");
5
+ const command_js_1 = require("../../common/command.js");
6
+ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
7
+ const event_js_1 = require("../../contracts/event.js");
8
+ /**
9
+ * The response schema for the events fetch command
10
+ */
11
+ const responseSchema = typebox_1.Type.Object({
12
+ events: typebox_1.Type.Array(event_js_1.FlowcoreEventSchema),
13
+ nextCursor: typebox_1.Type.Optional(typebox_1.Type.String()),
14
+ });
15
+ /**
16
+ * Fetch time buckets for an event type
17
+ */
18
+ class EventListCommand extends command_js_1.Command {
19
+ /**
20
+ * Get the method for the request
21
+ */
22
+ getMethod() {
23
+ return "GET";
24
+ }
25
+ /**
26
+ * Get the base url for the request
27
+ */
28
+ getBaseUrl() {
29
+ return "https://event-source.api.flowcore.io";
30
+ }
31
+ /**
32
+ * Get the path for the request
33
+ */
34
+ getPath() {
35
+ const query = new URLSearchParams();
36
+ const eventTypeIds = Array.isArray(this.input.eventTypeId) ? this.input.eventTypeId : [this.input.eventTypeId];
37
+ for (const eventTypeId of eventTypeIds) {
38
+ query.append("eventTypeId", eventTypeId);
39
+ }
40
+ query.set("timeBucket", this.input.timeBucket);
41
+ this.input.cursor && query.set("cursor", this.input.cursor.toString());
42
+ this.input.pageSize && query.set("pageSize", this.input.pageSize.toString());
43
+ this.input.fromEventId && query.set("fromEventId", this.input.fromEventId);
44
+ this.input.afterEventId && query.set("afterEventId", this.input.afterEventId);
45
+ this.input.toEventId && query.set("toEventId", this.input.toEventId);
46
+ this.input.order && query.set("order", this.input.order);
47
+ return `/api/v1/events?${query.toString()}`;
48
+ }
49
+ /**
50
+ * Parse the response
51
+ */
52
+ parseResponse(rawResponse) {
53
+ const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
54
+ return response;
55
+ }
56
+ }
57
+ exports.EventListCommand = EventListCommand;
@@ -0,0 +1,49 @@
1
+ import { Command } from "../../common/command.js";
2
+ /**
3
+ * The input for the events fetch indexes command
4
+ */
5
+ export interface TimeBucketListInput {
6
+ /** the event type ids */
7
+ eventTypeId: [string, ...string[]] | string;
8
+ /** the start time */
9
+ fromTimeBucket?: string;
10
+ /** the end time */
11
+ toTimeBucket?: string;
12
+ /** the page size */
13
+ pageSize?: number;
14
+ /** the cursor */
15
+ cursor?: number;
16
+ /** the order */
17
+ order?: "asc" | "desc";
18
+ }
19
+ /**
20
+ * The output for the events fetch indexes command
21
+ */
22
+ export interface TimeBucketListOutput {
23
+ /** the time buckets */
24
+ timeBuckets: string[];
25
+ /** the next cursor */
26
+ nextCursor?: number;
27
+ }
28
+ /**
29
+ * Fetch time buckets for an event type
30
+ */
31
+ export declare class TimeBucketListCommand extends Command<TimeBucketListInput, TimeBucketListOutput> {
32
+ /**
33
+ * Get the method for the request
34
+ */
35
+ protected getMethod(): string;
36
+ /**
37
+ * Get the base url for the request
38
+ */
39
+ protected getBaseUrl(): string;
40
+ /**
41
+ * Get the path for the request
42
+ */
43
+ protected getPath(): string;
44
+ /**
45
+ * Parse the response
46
+ */
47
+ protected parseResponse(rawResponse: unknown): TimeBucketListOutput;
48
+ }
49
+ //# sourceMappingURL=time-bucket.list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-bucket.list.d.ts","sourceRoot":"","sources":["../../../src/commands/events/time-bucket.list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,yBAAyB;IACzB,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAA;IAC3C,qBAAqB;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gBAAgB;IAChB,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAChD,mBAAmB,EACnB,oBAAoB,CACrB;IACC;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAepC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,oBAAoB;CAI7E"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimeBucketListCommand = void 0;
4
+ const typebox_1 = require("@sinclair/typebox");
5
+ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
6
+ const command_js_1 = require("../../common/command.js");
7
+ /**
8
+ * The response schema for the events fetch time buckets by names command
9
+ */
10
+ const responseSchema = typebox_1.Type.Object({
11
+ timeBuckets: typebox_1.Type.Array(typebox_1.Type.String()),
12
+ nextCursor: typebox_1.Type.Optional(typebox_1.Type.Number()),
13
+ });
14
+ /**
15
+ * Fetch time buckets for an event type
16
+ */
17
+ class TimeBucketListCommand extends command_js_1.Command {
18
+ /**
19
+ * Get the method for the request
20
+ */
21
+ getMethod() {
22
+ return "GET";
23
+ }
24
+ /**
25
+ * Get the base url for the request
26
+ */
27
+ getBaseUrl() {
28
+ return "https://event-source.api.flowcore.io";
29
+ }
30
+ /**
31
+ * Get the path for the request
32
+ */
33
+ getPath() {
34
+ const queryParams = new URLSearchParams();
35
+ const eventTypeIds = Array.isArray(this.input.eventTypeId) ? this.input.eventTypeId : [this.input.eventTypeId];
36
+ for (const eventTypeId of eventTypeIds) {
37
+ queryParams.append("eventTypeId", eventTypeId);
38
+ }
39
+ this.input.fromTimeBucket && queryParams.set("fromTimeBucket", this.input.fromTimeBucket);
40
+ this.input.toTimeBucket && queryParams.set("toTimeBucket", this.input.toTimeBucket);
41
+ this.input.order && queryParams.set("order", this.input.order);
42
+ this.input.pageSize && queryParams.set("pageSize", this.input.pageSize.toString());
43
+ this.input.cursor && queryParams.set("cursor", this.input.cursor.toString());
44
+ return `/api/v1/time-buckets?${queryParams.toString()}`;
45
+ }
46
+ /**
47
+ * Parse the response
48
+ */
49
+ parseResponse(rawResponse) {
50
+ const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
51
+ return response;
52
+ }
53
+ }
54
+ exports.TimeBucketListCommand = TimeBucketListCommand;
@@ -1,4 +1,4 @@
1
- import { GraphQlCommand } from "../../common/command.js";
1
+ import { GraphQlCommand } from "../../common/command-graphql.js";
2
2
  import type { FlowcoreClient } from "../../common/flowcore-client.js";
3
3
  import type { ClientError } from "../../exceptions/client-error.js";
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"flow-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAmCD;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B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M,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FlowTypeDeleteRequestCommand = void 0;
4
4
  const typebox_1 = require("@sinclair/typebox");
5
- const command_js_1 = require("../../common/command.js");
5
+ const command_graphql_js_1 = require("../../common/command-graphql.js");
6
6
  const flow_type_fetch_js_1 = require("./flow-type.fetch.js");
7
7
  const command_error_js_1 = require("../../exceptions/command-error.js");
8
8
  const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
@@ -43,7 +43,7 @@ const responseSchema = typebox_1.Type.Object({
43
43
  * Request to delete a flow type
44
44
  * @deprecated Use `FlowTypeRequestDeleteCommand` instead
45
45
  */
46
- class FlowTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
46
+ class FlowTypeDeleteRequestCommand extends command_graphql_js_1.GraphQlCommand {
47
47
  /**
48
48
  * Create a new flow type delete request command
49
49
  */
@@ -33,8 +33,11 @@ export * from "./event-type/event-type.request-delete.js";
33
33
  export * from "./event-type/event-type.request-truncate.js";
34
34
  export * from "./event-type/event-type.truncate-request.js";
35
35
  export * from "./event-type/event-type.update.js";
36
+ export * from "./event-type/event-type.info.js";
36
37
  export * from "./events/events.fetch-time-buckets-by-names.js";
37
38
  export * from "./events/events.fetch.js";
39
+ export * from "./events/event.list.js";
40
+ export * from "./events/time-bucket.list.js";
38
41
  export * from "./container-registry/container-registry.create.js";
39
42
  export * from "./container-registry/container-registry.delete.js";
40
43
  export * from "./container-registry/container-registry.fetch.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,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;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AAGzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,2CAA2C,CAAA;AACzD,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mCAAmC,CAAA;AACjD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,gDAAgD,CAAA;AAC9D,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAG5C,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,kDAAkD,CAAA;AAChE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,mDAAmD,CAAA"}
@@ -56,10 +56,13 @@ __exportStar(require("./event-type/event-type.request-delete.js"), exports);
56
56
  __exportStar(require("./event-type/event-type.request-truncate.js"), exports);
57
57
  __exportStar(require("./event-type/event-type.truncate-request.js"), exports);
58
58
  __exportStar(require("./event-type/event-type.update.js"), exports);
59
+ __exportStar(require("./event-type/event-type.info.js"), exports);
59
60
  // Events
60
61
  __exportStar(require("./events/events.fetch-time-buckets-by-names.js"), exports);
61
62
  __exportStar(require("./events/events.fetch.js"), exports);
62
- //Container
63
+ __exportStar(require("./events/event.list.js"), exports);
64
+ __exportStar(require("./events/time-bucket.list.js"), exports);
65
+ // Container
63
66
  __exportStar(require("./container-registry/container-registry.create.js"), exports);
64
67
  __exportStar(require("./container-registry/container-registry.delete.js"), exports);
65
68
  __exportStar(require("./container-registry/container-registry.fetch.js"), exports);
@@ -1,4 +1,4 @@
1
- import { GraphQlCommand } from "../../common/command.js";
1
+ import { GraphQlCommand } from "../../common/command-graphql.js";
2
2
  /**
3
3
  * The input for the secret create command
4
4
  */
@@ -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,yBAAyB,CAAA;AAIxD;;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
+ {"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"}