@flowcore/sdk 1.11.10 → 1.12.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 (62) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/esm/commands/container-registry/container-registry.create.d.ts +39 -0
  3. package/esm/commands/container-registry/container-registry.create.d.ts.map +1 -0
  4. package/esm/commands/container-registry/container-registry.create.js +29 -0
  5. package/esm/commands/container-registry/container-registry.delete.d.ts +22 -0
  6. package/esm/commands/container-registry/container-registry.delete.d.ts.map +1 -0
  7. package/esm/commands/container-registry/container-registry.delete.js +26 -0
  8. package/esm/commands/container-registry/container-registry.fetch.d.ts +22 -0
  9. package/esm/commands/container-registry/container-registry.fetch.d.ts.map +1 -0
  10. package/esm/commands/container-registry/container-registry.fetch.js +25 -0
  11. package/esm/commands/container-registry/container-registry.list.d.ts +22 -0
  12. package/esm/commands/container-registry/container-registry.list.d.ts.map +1 -0
  13. package/esm/commands/container-registry/container-registry.list.js +25 -0
  14. package/esm/commands/container-registry/container-registry.update.d.ts +33 -0
  15. package/esm/commands/container-registry/container-registry.update.d.ts.map +1 -0
  16. package/esm/commands/container-registry/container-registry.update.js +27 -0
  17. package/esm/commands/index.d.ts +5 -0
  18. package/esm/commands/index.d.ts.map +1 -1
  19. package/esm/commands/index.js +6 -0
  20. package/esm/commands/tenant/tenant.fetch.d.ts +15 -6
  21. package/esm/commands/tenant/tenant.fetch.d.ts.map +1 -1
  22. package/esm/commands/tenant/tenant.fetch.js +32 -63
  23. package/esm/commands/tenant/tenant.list.d.ts +11 -3
  24. package/esm/commands/tenant/tenant.list.d.ts.map +1 -1
  25. package/esm/commands/tenant/tenant.list.js +12 -3
  26. package/esm/contracts/container.d.ts +23 -0
  27. package/esm/contracts/container.d.ts.map +1 -0
  28. package/esm/contracts/container.js +16 -0
  29. package/esm/contracts/tenant.d.ts +19 -26
  30. package/esm/contracts/tenant.d.ts.map +1 -1
  31. package/esm/contracts/tenant.js +19 -24
  32. package/package.json +1 -1
  33. package/script/commands/container-registry/container-registry.create.d.ts +39 -0
  34. package/script/commands/container-registry/container-registry.create.d.ts.map +1 -0
  35. package/script/commands/container-registry/container-registry.create.js +33 -0
  36. package/script/commands/container-registry/container-registry.delete.d.ts +22 -0
  37. package/script/commands/container-registry/container-registry.delete.d.ts.map +1 -0
  38. package/script/commands/container-registry/container-registry.delete.js +30 -0
  39. package/script/commands/container-registry/container-registry.fetch.d.ts +22 -0
  40. package/script/commands/container-registry/container-registry.fetch.d.ts.map +1 -0
  41. package/script/commands/container-registry/container-registry.fetch.js +29 -0
  42. package/script/commands/container-registry/container-registry.list.d.ts +22 -0
  43. package/script/commands/container-registry/container-registry.list.d.ts.map +1 -0
  44. package/script/commands/container-registry/container-registry.list.js +29 -0
  45. package/script/commands/container-registry/container-registry.update.d.ts +33 -0
  46. package/script/commands/container-registry/container-registry.update.d.ts.map +1 -0
  47. package/script/commands/container-registry/container-registry.update.js +31 -0
  48. package/script/commands/index.d.ts +5 -0
  49. package/script/commands/index.d.ts.map +1 -1
  50. package/script/commands/index.js +6 -0
  51. package/script/commands/tenant/tenant.fetch.d.ts +15 -6
  52. package/script/commands/tenant/tenant.fetch.d.ts.map +1 -1
  53. package/script/commands/tenant/tenant.fetch.js +31 -62
  54. package/script/commands/tenant/tenant.list.d.ts +11 -3
  55. package/script/commands/tenant/tenant.list.d.ts.map +1 -1
  56. package/script/commands/tenant/tenant.list.js +12 -3
  57. package/script/contracts/container.d.ts +23 -0
  58. package/script/contracts/container.d.ts.map +1 -0
  59. package/script/contracts/container.js +19 -0
  60. package/script/contracts/tenant.d.ts +19 -26
  61. package/script/contracts/tenant.d.ts.map +1 -1
  62. package/script/contracts/tenant.js +19 -25
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.12.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.11.10...v1.12.0) (2025-02-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * change tenant fetch command to use rest api ([81bb088](https://github.com/flowcore-io/flowcore-sdk/commit/81bb08869313ddb2b91ad7820a901d481f82f83c))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix import ([e78844d](https://github.com/flowcore-io/flowcore-sdk/commit/e78844db2acb969d3800d319627ce2833502f606))
14
+ * fix typos in comments ([551e257](https://github.com/flowcore-io/flowcore-sdk/commit/551e25720926cb2b2b4f028f5a1b717c54eb8fdf))
15
+ * remove none from tenant dedicated status ([38a970a](https://github.com/flowcore-io/flowcore-sdk/commit/38a970ab10aa89d405eb71471330e358f0086b41))
16
+
3
17
  ## [1.11.10](https://github.com/flowcore-io/flowcore-sdk/compare/v1.11.9...v1.11.10) (2025-02-14)
4
18
 
5
19
 
@@ -0,0 +1,39 @@
1
+ import { Command } from "../../common/command.js";
2
+ import type { ContainerRegistryCreate } from "../../contracts/container.js";
3
+ export interface ContainerRegistryCreateInput {
4
+ /** The tenant id to add the container registry to*/
5
+ tenantId: string;
6
+ /** The name of the container registry */
7
+ name: string;
8
+ /**A description of the container registry */
9
+ description?: string;
10
+ /** The URL of the container registry */
11
+ registryUrl: string;
12
+ /** The username to authenticate with the container registry */
13
+ username?: string;
14
+ /** The password to authenticate with the container registry */
15
+ password?: string;
16
+ }
17
+ export interface ContainerRegistryCreateOutput {
18
+ /** The id of the new container-registry */
19
+ id: string;
20
+ }
21
+ export declare class ContainerRegistryCreateCommand extends Command<ContainerRegistryCreateInput, ContainerRegistryCreate> {
22
+ /**
23
+ * GET the method
24
+ */
25
+ protected getMethod(): string;
26
+ /**
27
+ * Get the base url
28
+ */
29
+ protected getBaseUrl(): string;
30
+ /**
31
+ * Get the path
32
+ */
33
+ protected getPath(): string;
34
+ /**
35
+ * Parse the response
36
+ */
37
+ protected parseResponse(response: unknown): ContainerRegistryCreate;
38
+ }
39
+ //# sourceMappingURL=container-registry.create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-registry.create.d.ts","sourceRoot":"","sources":["../../../src/commands/container-registry/container-registry.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAG3E,MAAM,WAAW,4BAA4B;IAC3C,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAA;IAChB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAA;IACnB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,6BAA6B;IAC5C,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAA;CACX;AAED,qBAAa,8BAA+B,SAAQ,OAAO,CAAC,4BAA4B,EAAE,uBAAuB,CAAC;IAChH;;OAEG;cACgB,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"}
@@ -0,0 +1,29 @@
1
+ import { Command } from "../../common/command.js";
2
+ import { ContainerRegistryCreateSchema } from "../../contracts/container.js";
3
+ import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
+ export class ContainerRegistryCreateCommand extends Command {
5
+ /**
6
+ * GET the method
7
+ */
8
+ getMethod() {
9
+ return "POST";
10
+ }
11
+ /**
12
+ * Get the base url
13
+ */
14
+ getBaseUrl() {
15
+ return "https://registry.api.flowcore.io";
16
+ }
17
+ /**
18
+ * Get the path
19
+ */
20
+ getPath() {
21
+ return `/api/v1/container`;
22
+ }
23
+ /**
24
+ * Parse the response
25
+ */
26
+ parseResponse(response) {
27
+ return parseResponseHelper(ContainerRegistryCreateSchema, response);
28
+ }
29
+ }
@@ -0,0 +1,22 @@
1
+ import { type ContainerRegistryDelete } from "../../contracts/container.js";
2
+ import { Command } from "../../mod.js";
3
+ export interface ContainerRegistryDeleteInput {
4
+ /** The id of the new container-registry */
5
+ containerId: string;
6
+ }
7
+ export declare class ContainerRegistryDeleteCommand extends Command<ContainerRegistryDeleteInput, ContainerRegistryDelete> {
8
+ protected getMethod(): string;
9
+ /**
10
+ * Get the base url
11
+ */
12
+ protected getBaseUrl(): string;
13
+ /**
14
+ * Get the path
15
+ */
16
+ protected getPath(): string;
17
+ /**
18
+ * Parse the response
19
+ */
20
+ protected parseResponse(response: unknown): ContainerRegistryDelete;
21
+ }
22
+ //# sourceMappingURL=container-registry.delete.d.ts.map
@@ -0,0 +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,KAAK,uBAAuB,EAAiC,MAAM,8BAA8B,CAAA;AAC1G,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAA;AAE3D,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;CAI7E"}
@@ -0,0 +1,26 @@
1
+ import { ContainerRegistryDeleteSchema } from "../../contracts/container.js";
2
+ import { Command, parseResponseHelper } from "../../mod.js";
3
+ export class ContainerRegistryDeleteCommand extends Command {
4
+ getMethod() {
5
+ return "DELETE";
6
+ }
7
+ /**
8
+ * Get the base url
9
+ */
10
+ getBaseUrl() {
11
+ return "https://registry.api.flowcore.io";
12
+ }
13
+ /**
14
+ * Get the path
15
+ */
16
+ getPath() {
17
+ return `/api/v1/container/${this.input.containerId}`;
18
+ }
19
+ /**
20
+ * Parse the response
21
+ */
22
+ parseResponse(response) {
23
+ console.log(response);
24
+ return parseResponseHelper(ContainerRegistryDeleteSchema, response);
25
+ }
26
+ }
@@ -0,0 +1,22 @@
1
+ import { type ContainerRegistry } from "../../contracts/container.js";
2
+ import { Command } from "../../mod.js";
3
+ export interface ContainerRegistryFetchInput {
4
+ /** The id of container */
5
+ containerId: string;
6
+ }
7
+ export declare class ContainerRegistryFetchCommand extends Command<ContainerRegistryFetchInput, ContainerRegistry> {
8
+ protected getMethod(): string;
9
+ /**
10
+ * Get the base url
11
+ */
12
+ protected getBaseUrl(): string;
13
+ /**
14
+ * Get the path
15
+ */
16
+ protected getPath(): string;
17
+ /**
18
+ * Parse the response
19
+ */
20
+ protected parseResponse(response: unknown): ContainerRegistry;
21
+ }
22
+ //# sourceMappingURL=container-registry.fetch.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,25 @@
1
+ import { ContainerRegistrySchema } from "../../contracts/container.js";
2
+ import { Command, parseResponseHelper } from "../../mod.js";
3
+ export class ContainerRegistryFetchCommand extends Command {
4
+ getMethod() {
5
+ return "GET";
6
+ }
7
+ /**
8
+ * Get the base url
9
+ */
10
+ getBaseUrl() {
11
+ return "https://registry.api.flowcore.io";
12
+ }
13
+ /**
14
+ * Get the path
15
+ */
16
+ getPath() {
17
+ return `/api/v1/container/${this.input.containerId}`;
18
+ }
19
+ /**
20
+ * Parse the response
21
+ */
22
+ parseResponse(response) {
23
+ return parseResponseHelper(ContainerRegistrySchema, response);
24
+ }
25
+ }
@@ -0,0 +1,22 @@
1
+ import { type ContainerRegistryList } from "../../contracts/container.js";
2
+ import { Command } from "../../mod.js";
3
+ export interface ContainerRegistryFetchTenantInput {
4
+ /** The tenant id */
5
+ tenantId: string;
6
+ }
7
+ export declare class ContainerRegistListCommand extends Command<ContainerRegistryFetchTenantInput, ContainerRegistryList> {
8
+ protected getMethod(): string;
9
+ /**
10
+ * Get the base url
11
+ */
12
+ protected getBaseUrl(): string;
13
+ /**
14
+ * Get the path
15
+ */
16
+ protected getPath(): string;
17
+ /**
18
+ * Parse the response
19
+ */
20
+ protected parseResponse(response: unknown): ContainerRegistryList;
21
+ }
22
+ //# sourceMappingURL=container-registry.list.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,25 @@
1
+ import { ContainerRegistryListSchema } from "../../contracts/container.js";
2
+ import { Command, parseResponseHelper } from "../../mod.js";
3
+ export class ContainerRegistListCommand extends Command {
4
+ getMethod() {
5
+ return "GET";
6
+ }
7
+ /**
8
+ * Get the base url
9
+ */
10
+ getBaseUrl() {
11
+ return "https://registry.api.flowcore.io";
12
+ }
13
+ /**
14
+ * Get the path
15
+ */
16
+ getPath() {
17
+ return `/api/v1/container/tenants/${this.input.tenantId}`;
18
+ }
19
+ /**
20
+ * Parse the response
21
+ */
22
+ parseResponse(response) {
23
+ return parseResponseHelper(ContainerRegistryListSchema, response);
24
+ }
25
+ }
@@ -0,0 +1,33 @@
1
+ import { Command } from "../../common/command.js";
2
+ import { type ContainerRegistry } from "../../contracts/container.js";
3
+ interface ContainerRegustryUpdateInput {
4
+ /** The id of the container-registry */
5
+ containerId: string;
6
+ /** The name of the container-registry */
7
+ name?: string;
8
+ /** The description */
9
+ description?: string;
10
+ /** The registry url for the container */
11
+ registryUrl?: string;
12
+ /** The username for authentication */
13
+ username?: string;
14
+ /** The password for authentication */
15
+ password?: string;
16
+ }
17
+ export declare class ContainerRegistryUpdateCommand extends Command<ContainerRegustryUpdateInput, ContainerRegistry> {
18
+ protected getMethod(): string;
19
+ /**
20
+ * Get the base url
21
+ */
22
+ protected getBaseUrl(): string;
23
+ /**
24
+ * Get the path
25
+ */
26
+ protected getPath(): string;
27
+ /**
28
+ * Parse the response
29
+ */
30
+ protected parseResponse(response: unknown): ContainerRegistry;
31
+ }
32
+ export {};
33
+ //# sourceMappingURL=container-registry.update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-registry.update.d.ts","sourceRoot":"","sources":["../../../src/commands/container-registry/container-registry.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,8BAA8B,CAAA;AAG9F,UAAU,4BAA4B;IACpC,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sBAAsB;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,qBAAa,8BAA+B,SAAQ,OAAO,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;cACvF,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;CAIvE"}
@@ -0,0 +1,27 @@
1
+ import { Command } from "../../common/command.js";
2
+ import { ContainerRegistrySchema } from "../../contracts/container.js";
3
+ import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
+ export class ContainerRegistryUpdateCommand extends Command {
5
+ getMethod() {
6
+ return "PATCH";
7
+ }
8
+ /**
9
+ * Get the base url
10
+ */
11
+ getBaseUrl() {
12
+ return "https://registry.api.flowcore.io";
13
+ }
14
+ /**
15
+ * Get the path
16
+ */
17
+ getPath() {
18
+ return `/api/v1/container/${this.input.containerId}`;
19
+ }
20
+ /**
21
+ * Parse the response
22
+ */
23
+ parseResponse(response) {
24
+ //console.log(response)
25
+ return parseResponseHelper(ContainerRegistrySchema, response);
26
+ }
27
+ }
@@ -30,4 +30,9 @@ export * from "./event-type/event-type.delete-request.js";
30
30
  export * from "./event-type/event-type.truncate-request.js";
31
31
  export * from "./events/events.fetch.js";
32
32
  export * from "./events/events.fetch-time-buckets-by-names.js";
33
+ export * from "./container-registry/container-registry.create.js";
34
+ export * from "./container-registry/container-registry.fetch.js";
35
+ export * from "./container-registry/container-registry.list.js";
36
+ export * from "./container-registry/container-registry.update.js";
37
+ export * from "./container-registry/container-registry.delete.js";
33
38
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAGvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AAGzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAG7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AAGvD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AAGvD,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAG3D,cAAc,0BAA0B,CAAA;AACxC,cAAc,gDAAgD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AAGzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAG7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AAGvD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AAGvD,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAG3D,cAAc,0BAA0B,CAAA;AACxC,cAAc,gDAAgD,CAAA;AAG9D,cAAc,mDAAmD,CAAA;AACjE,cAAc,kDAAkD,CAAA;AAChE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA"}
@@ -38,3 +38,9 @@ export * from "./event-type/event-type.truncate-request.js";
38
38
  // Events
39
39
  export * from "./events/events.fetch.js";
40
40
  export * from "./events/events.fetch-time-buckets-by-names.js";
41
+ //Container
42
+ export * from "./container-registry/container-registry.create.js";
43
+ export * from "./container-registry/container-registry.fetch.js";
44
+ export * from "./container-registry/container-registry.list.js";
45
+ export * from "./container-registry/container-registry.update.js";
46
+ export * from "./container-registry/container-registry.delete.js";
@@ -1,4 +1,5 @@
1
- import { GraphQlCommand } from "../../common/command.js";
1
+ import { Command } from "../../common/command.js";
2
+ import type { ClientError } from "../../exceptions/client-error.js";
2
3
  import { type Tenant } from "../../contracts/tenant.js";
3
4
  /**
4
5
  * The input for the tenant fetch by id command
@@ -25,18 +26,26 @@ export type TenantFetchInput = TenantFetchByIdInput | TenantFetchByNameInput;
25
26
  /**
26
27
  * Fetch a tenant
27
28
  */
28
- export declare class TenantFetchCommand extends GraphQlCommand<TenantFetchInput, Tenant> {
29
+ export declare class TenantFetchCommand extends Command<TenantFetchInput, Tenant> {
29
30
  /**
30
- * The allowed modes for the command
31
+ * Get the method
31
32
  */
32
- protected allowedModes: ("apiKey" | "bearer")[];
33
+ protected getMethod(): string;
34
+ /**
35
+ * Get the base url
36
+ */
37
+ protected getBaseUrl(): string;
38
+ /**
39
+ * Get the path
40
+ */
41
+ protected getPath(): string;
33
42
  /**
34
43
  * Parse the response
35
44
  */
36
45
  protected parseResponse(rawResponse: unknown): Tenant;
37
46
  /**
38
- * Get the body for the request
47
+ * Handle the client error
39
48
  */
40
- protected getBody(): Record<string, unknown>;
49
+ protected handleClientError(error: ClientError): void;
41
50
  }
42
51
  //# sourceMappingURL=tenant.fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tenant.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,KAAK,MAAM,EAAoC,MAAM,2BAA2B,CAAA;AAIzF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,sBAAsB,CAAA;AAmC5E;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAC9E;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM;IAU9D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAYtD"}
1
+ {"version":3,"file":"tenant.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,2BAA2B,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,sBAAsB,CAAA;AAE5E;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC;IACvE;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAOpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM;IAK9D;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
@@ -1,79 +1,48 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { GraphQlCommand } from "../../common/command.js";
3
- import { TenantV0Schema, tenantV0ToTenant } from "../../contracts/tenant.js";
1
+ import { Command } from "../../common/command.js";
4
2
  import { parseResponseHelper } from "../../utils/parse-response-helper.js";
5
3
  import { NotFoundException } from "../../exceptions/not-found.js";
6
- const graphQlQueryById = `
7
- query FLOWCORE_SDK_TENANT_FETCH($tenantId: ID!) {
8
- organization(search: {id: $tenantId}) {
9
- id
10
- org
11
- displayName
12
- description
13
- website
14
- }
15
- }
16
- `;
17
- const graphQlQueryByName = `
18
- query FLOWCORE_SDK_TENANT_FETCH($tenant: String) {
19
- organization(search: {org: $tenant}) {
20
- id
21
- org
22
- displayName
23
- description
24
- website
25
- }
26
- }
27
- `;
28
- const responseSchema = Type.Object({
29
- data: Type.Object({
30
- organization: Type.Union([
31
- TenantV0Schema,
32
- Type.Null(),
33
- ]),
34
- }),
35
- });
4
+ import { TenantSchema } from "../../contracts/tenant.js";
36
5
  /**
37
6
  * Fetch a tenant
38
7
  */
39
- export class TenantFetchCommand extends GraphQlCommand {
40
- constructor() {
41
- super(...arguments);
42
- /**
43
- * The allowed modes for the command
44
- */
45
- Object.defineProperty(this, "allowedModes", {
46
- enumerable: true,
47
- configurable: true,
48
- writable: true,
49
- value: ["bearer"]
50
- });
8
+ export class TenantFetchCommand extends Command {
9
+ /**
10
+ * Get the method
11
+ */
12
+ getMethod() {
13
+ return "GET";
14
+ }
15
+ /**
16
+ * Get the base url
17
+ */
18
+ getBaseUrl() {
19
+ return "https://tenant.api.flowcore.io";
20
+ }
21
+ /**
22
+ * Get the path
23
+ */
24
+ getPath() {
25
+ if ("tenantId" in this.input) {
26
+ return `/api/v1/tenants/by-id/${this.input.tenantId}`;
27
+ }
28
+ return `/api/v1/tenants/by-name/${this.input.tenant}`;
51
29
  }
52
30
  /**
53
31
  * Parse the response
54
32
  */
55
33
  parseResponse(rawResponse) {
56
- const response = parseResponseHelper(responseSchema, rawResponse);
57
- if (!response.data.organization) {
58
- throw new NotFoundException("Tenant", {
59
- [this.input.tenantId ? "id" : "name"]: this.input.tenantId ?? this.input.tenant,
60
- });
61
- }
62
- return tenantV0ToTenant(response.data.organization);
34
+ const response = parseResponseHelper(TenantSchema, rawResponse);
35
+ return response;
63
36
  }
64
37
  /**
65
- * Get the body for the request
38
+ * Handle the client error
66
39
  */
67
- getBody() {
68
- if ("tenantId" in this.input) {
69
- return {
70
- query: graphQlQueryById,
71
- variables: this.input,
72
- };
40
+ handleClientError(error) {
41
+ if (error.status === 404) {
42
+ throw new NotFoundException("Tenant", {
43
+ [this.input.tenantId ? "id" : "name"]: this.input.tenantId ?? this.input.tenant,
44
+ });
73
45
  }
74
- return {
75
- query: graphQlQueryByName,
76
- variables: this.input,
77
- };
46
+ throw error;
78
47
  }
79
48
  }
@@ -1,9 +1,16 @@
1
1
  import { GraphQlCommand } from "../../common/command.js";
2
- import { type TenantWithLinkType } from "../../contracts/tenant.js";
2
+ interface TenantListItem {
3
+ id: string;
4
+ name: string;
5
+ displayName: string;
6
+ description: string;
7
+ websiteUrl: string;
8
+ linkType: "OWNER" | "COLLABORATOR";
9
+ }
3
10
  /**
4
11
  * List tenants
5
12
  */
6
- export declare class TenantListCommand extends GraphQlCommand<void, TenantWithLinkType[]> {
13
+ export declare class TenantListCommand extends GraphQlCommand<void, TenantListItem[]> {
7
14
  /**
8
15
  * The allowed modes for the command
9
16
  */
@@ -11,10 +18,11 @@ export declare class TenantListCommand extends GraphQlCommand<void, TenantWithLi
11
18
  /**
12
19
  * Parse the response
13
20
  */
14
- protected parseResponse(rawResponse: unknown): TenantWithLinkType[];
21
+ protected parseResponse(rawResponse: unknown): TenantListItem[];
15
22
  /**
16
23
  * Get the body for the request
17
24
  */
18
25
  protected getBody(): Record<string, unknown>;
19
26
  }
27
+ export {};
20
28
  //# sourceMappingURL=tenant.list.d.ts.map
@@ -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,yBAAyB,CAAA;AACxD,OAAO,EAAoC,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAyCrG;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC/E;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,kBAAkB,EAAE;IAa5E;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAKtD"}
1
+ {"version":3,"file":"tenant.list.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,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,6 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
2
  import { GraphQlCommand } from "../../common/command.js";
3
- import { TenantV0Schema, tenantV0ToTenant } from "../../contracts/tenant.js";
4
3
  import { parseResponseHelper } from "../../utils/parse-response-helper.js";
5
4
  import { CommandError } from "../../exceptions/command-error.js";
6
5
  const graphQlQueryById = `
@@ -25,7 +24,13 @@ const responseSchema = Type.Object({
25
24
  me: Type.Object({
26
25
  organizations: Type.Array(Type.Object({
27
26
  linkType: Type.Union([Type.Literal("OWNER"), Type.Literal("COLLABORATOR")]),
28
- organization: TenantV0Schema,
27
+ organization: Type.Object({
28
+ id: Type.String(),
29
+ org: Type.String(),
30
+ displayName: Type.String(),
31
+ description: Type.String(),
32
+ website: Type.String(),
33
+ }),
29
34
  })),
30
35
  }),
31
36
  }),
@@ -64,7 +69,11 @@ export class TenantListCommand extends GraphQlCommand {
64
69
  throw new CommandError(this.constructor.name, "No data returned from the command");
65
70
  }
66
71
  return response.data.me.organizations.flatMap((organization) => ({
67
- ...tenantV0ToTenant(organization.organization),
72
+ id: organization.organization.id,
73
+ name: organization.organization.org,
74
+ displayName: organization.organization.displayName,
75
+ description: organization.organization.description,
76
+ websiteUrl: organization.organization.website,
68
77
  linkType: organization.linkType,
69
78
  }));
70
79
  }
@@ -0,0 +1,23 @@
1
+ import { type Static, type TArray, type TObject, type TOptional, type TString } from "@sinclair/typebox";
2
+ /**
3
+ * the schema for a container
4
+ */
5
+ export declare const ContainerRegistrySchema: TObject<{
6
+ tenantId: TString;
7
+ name: TString;
8
+ description: TOptional<TString>;
9
+ username: TOptional<TString>;
10
+ id: TString;
11
+ }>;
12
+ export declare const ContainerRegistryCreateSchema: TObject<{
13
+ id: TString;
14
+ }>;
15
+ export declare const ContainerRegistryDeleteSchema: TObject<{
16
+ id: TString;
17
+ }>;
18
+ export declare const ContainerRegistryListSchema: TArray;
19
+ export type ContainerRegistry = Static<typeof ContainerRegistrySchema>;
20
+ export type ContainerRegistryList = Static<typeof ContainerRegistryListSchema>;
21
+ export type ContainerRegistryCreate = Static<typeof ContainerRegistryCreateSchema>;
22
+ export type ContainerRegistryDelete = Static<typeof ContainerRegistryDeleteSchema>;
23
+ //# sourceMappingURL=container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/contracts/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AAE9G;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,OAAO,CAAC;IAC5C,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC5B,EAAE,EAAE,OAAO,CAAA;CACZ,CAMC,CAAA;AAEF,eAAO,MAAM,6BAA6B,EAAE,OAAO,CAAC;IAClD,EAAE,EAAE,OAAO,CAAA;CACZ,CAEC,CAAA;AAEF,eAAO,MAAM,6BAA6B;QALpC,OAAO;EAK6D,CAAA;AAE1E,eAAO,MAAM,2BAA2B,EAAE,MAA4C,CAAA;AAEtF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAA;AACtE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAC9E,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAClF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ /**
3
+ * the schema for a container
4
+ */
5
+ export const ContainerRegistrySchema = Type.Object({
6
+ tenantId: Type.String(),
7
+ name: Type.String(),
8
+ description: Type.Optional(Type.String()),
9
+ username: Type.Optional(Type.String()),
10
+ id: Type.String(),
11
+ });
12
+ export const ContainerRegistryCreateSchema = Type.Object({
13
+ id: Type.String(),
14
+ });
15
+ export const ContainerRegistryDeleteSchema = ContainerRegistryCreateSchema;
16
+ export const ContainerRegistryListSchema = Type.Array(ContainerRegistrySchema);