@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.
- package/CHANGELOG.md +14 -0
- package/esm/commands/container-registry/container-registry.create.d.ts +39 -0
- package/esm/commands/container-registry/container-registry.create.d.ts.map +1 -0
- package/esm/commands/container-registry/container-registry.create.js +29 -0
- package/esm/commands/container-registry/container-registry.delete.d.ts +22 -0
- package/esm/commands/container-registry/container-registry.delete.d.ts.map +1 -0
- package/esm/commands/container-registry/container-registry.delete.js +26 -0
- package/esm/commands/container-registry/container-registry.fetch.d.ts +22 -0
- package/esm/commands/container-registry/container-registry.fetch.d.ts.map +1 -0
- package/esm/commands/container-registry/container-registry.fetch.js +25 -0
- package/esm/commands/container-registry/container-registry.list.d.ts +22 -0
- package/esm/commands/container-registry/container-registry.list.d.ts.map +1 -0
- package/esm/commands/container-registry/container-registry.list.js +25 -0
- package/esm/commands/container-registry/container-registry.update.d.ts +33 -0
- package/esm/commands/container-registry/container-registry.update.d.ts.map +1 -0
- package/esm/commands/container-registry/container-registry.update.js +27 -0
- package/esm/commands/index.d.ts +5 -0
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +6 -0
- package/esm/commands/tenant/tenant.fetch.d.ts +15 -6
- package/esm/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/esm/commands/tenant/tenant.fetch.js +32 -63
- package/esm/commands/tenant/tenant.list.d.ts +11 -3
- package/esm/commands/tenant/tenant.list.d.ts.map +1 -1
- package/esm/commands/tenant/tenant.list.js +12 -3
- package/esm/contracts/container.d.ts +23 -0
- package/esm/contracts/container.d.ts.map +1 -0
- package/esm/contracts/container.js +16 -0
- package/esm/contracts/tenant.d.ts +19 -26
- package/esm/contracts/tenant.d.ts.map +1 -1
- package/esm/contracts/tenant.js +19 -24
- package/package.json +1 -1
- package/script/commands/container-registry/container-registry.create.d.ts +39 -0
- package/script/commands/container-registry/container-registry.create.d.ts.map +1 -0
- package/script/commands/container-registry/container-registry.create.js +33 -0
- package/script/commands/container-registry/container-registry.delete.d.ts +22 -0
- package/script/commands/container-registry/container-registry.delete.d.ts.map +1 -0
- package/script/commands/container-registry/container-registry.delete.js +30 -0
- package/script/commands/container-registry/container-registry.fetch.d.ts +22 -0
- package/script/commands/container-registry/container-registry.fetch.d.ts.map +1 -0
- package/script/commands/container-registry/container-registry.fetch.js +29 -0
- package/script/commands/container-registry/container-registry.list.d.ts +22 -0
- package/script/commands/container-registry/container-registry.list.d.ts.map +1 -0
- package/script/commands/container-registry/container-registry.list.js +29 -0
- package/script/commands/container-registry/container-registry.update.d.ts +33 -0
- package/script/commands/container-registry/container-registry.update.d.ts.map +1 -0
- package/script/commands/container-registry/container-registry.update.js +31 -0
- package/script/commands/index.d.ts +5 -0
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +6 -0
- package/script/commands/tenant/tenant.fetch.d.ts +15 -6
- package/script/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/script/commands/tenant/tenant.fetch.js +31 -62
- package/script/commands/tenant/tenant.list.d.ts +11 -3
- package/script/commands/tenant/tenant.list.d.ts.map +1 -1
- package/script/commands/tenant/tenant.list.js +12 -3
- package/script/contracts/container.d.ts +23 -0
- package/script/contracts/container.d.ts.map +1 -0
- package/script/contracts/container.js +19 -0
- package/script/contracts/tenant.d.ts +19 -26
- package/script/contracts/tenant.d.ts.map +1 -1
- package/script/contracts/tenant.js +19 -25
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
-
|
|
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,
|
|
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):
|
|
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;
|
|
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"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TenantListCommand = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
5
|
const command_js_1 = require("../../common/command.js");
|
|
6
|
-
const tenant_js_1 = require("../../contracts/tenant.js");
|
|
7
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
8
7
|
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
9
8
|
const graphQlQueryById = `
|
|
@@ -28,7 +27,13 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
28
27
|
me: typebox_1.Type.Object({
|
|
29
28
|
organizations: typebox_1.Type.Array(typebox_1.Type.Object({
|
|
30
29
|
linkType: typebox_1.Type.Union([typebox_1.Type.Literal("OWNER"), typebox_1.Type.Literal("COLLABORATOR")]),
|
|
31
|
-
organization:
|
|
30
|
+
organization: typebox_1.Type.Object({
|
|
31
|
+
id: typebox_1.Type.String(),
|
|
32
|
+
org: typebox_1.Type.String(),
|
|
33
|
+
displayName: typebox_1.Type.String(),
|
|
34
|
+
description: typebox_1.Type.String(),
|
|
35
|
+
website: typebox_1.Type.String(),
|
|
36
|
+
}),
|
|
32
37
|
})),
|
|
33
38
|
}),
|
|
34
39
|
}),
|
|
@@ -67,7 +72,11 @@ class TenantListCommand extends command_js_1.GraphQlCommand {
|
|
|
67
72
|
throw new command_error_js_1.CommandError(this.constructor.name, "No data returned from the command");
|
|
68
73
|
}
|
|
69
74
|
return response.data.me.organizations.flatMap((organization) => ({
|
|
70
|
-
|
|
75
|
+
id: organization.organization.id,
|
|
76
|
+
name: organization.organization.org,
|
|
77
|
+
displayName: organization.organization.displayName,
|
|
78
|
+
description: organization.organization.description,
|
|
79
|
+
websiteUrl: organization.organization.website,
|
|
71
80
|
linkType: organization.linkType,
|
|
72
81
|
}));
|
|
73
82
|
}
|
|
@@ -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,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContainerRegistryListSchema = exports.ContainerRegistryDeleteSchema = exports.ContainerRegistryCreateSchema = exports.ContainerRegistrySchema = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
/**
|
|
6
|
+
* the schema for a container
|
|
7
|
+
*/
|
|
8
|
+
exports.ContainerRegistrySchema = typebox_1.Type.Object({
|
|
9
|
+
tenantId: typebox_1.Type.String(),
|
|
10
|
+
name: typebox_1.Type.String(),
|
|
11
|
+
description: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
12
|
+
username: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
13
|
+
id: typebox_1.Type.String(),
|
|
14
|
+
});
|
|
15
|
+
exports.ContainerRegistryCreateSchema = typebox_1.Type.Object({
|
|
16
|
+
id: typebox_1.Type.String(),
|
|
17
|
+
});
|
|
18
|
+
exports.ContainerRegistryDeleteSchema = exports.ContainerRegistryCreateSchema;
|
|
19
|
+
exports.ContainerRegistryListSchema = typebox_1.Type.Array(exports.ContainerRegistrySchema);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Static, type TObject, type TString } from "@sinclair/typebox";
|
|
1
|
+
import { type Static, type TBoolean, type TLiteral, type TNull, type TObject, type TString, type TUnion } from "@sinclair/typebox";
|
|
2
2
|
interface TenantById {
|
|
3
3
|
tenantId: string;
|
|
4
4
|
tenant?: never;
|
|
@@ -16,35 +16,28 @@ export declare const TenantSchema: TObject<{
|
|
|
16
16
|
name: TString;
|
|
17
17
|
displayName: TString;
|
|
18
18
|
description: TString;
|
|
19
|
-
|
|
19
|
+
websiteUrl: TString;
|
|
20
|
+
isDedicated: TBoolean;
|
|
21
|
+
dedicated: TUnion<[
|
|
22
|
+
TNull,
|
|
23
|
+
TObject<{
|
|
24
|
+
status: TUnion<[
|
|
25
|
+
TLiteral<"ready">,
|
|
26
|
+
TLiteral<"degraded">,
|
|
27
|
+
TLiteral<"offline">
|
|
28
|
+
]>;
|
|
29
|
+
configuration: TObject<{
|
|
30
|
+
webhookUrl: TString;
|
|
31
|
+
eventSourceUrl: TString;
|
|
32
|
+
deleteManagerUrl: TString;
|
|
33
|
+
configurationRepoUrl: TString;
|
|
34
|
+
}>;
|
|
35
|
+
}>
|
|
36
|
+
]>;
|
|
20
37
|
}>;
|
|
21
38
|
/**
|
|
22
39
|
* The type for a tenant
|
|
23
40
|
*/
|
|
24
41
|
export type Tenant = Static<typeof TenantSchema>;
|
|
25
|
-
/**
|
|
26
|
-
* The type for a tenant with a link type
|
|
27
|
-
*/
|
|
28
|
-
export type TenantWithLinkType = Tenant & {
|
|
29
|
-
linkType: "OWNER" | "COLLABORATOR";
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* The schema for a tenant v0
|
|
33
|
-
*/
|
|
34
|
-
export declare const TenantV0Schema: TObject<{
|
|
35
|
-
id: TString;
|
|
36
|
-
org: TString;
|
|
37
|
-
displayName: TString;
|
|
38
|
-
description: TString;
|
|
39
|
-
website: TString;
|
|
40
|
-
}>;
|
|
41
|
-
/**
|
|
42
|
-
* The type for a tenant v0
|
|
43
|
-
*/
|
|
44
|
-
export type TenantV0 = Static<typeof TenantV0Schema>;
|
|
45
|
-
/**
|
|
46
|
-
* Convert a data core v0 to a data core
|
|
47
|
-
*/
|
|
48
|
-
export declare const tenantV0ToTenant: (tenantV0: TenantV0) => Tenant;
|
|
49
42
|
export {};
|
|
50
43
|
//# sourceMappingURL=tenant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../src/contracts/tenant.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../src/contracts/tenant.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAA;AAE1B,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,YAAY,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC;IACjC,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,QAAQ,CAAA;IACrB,SAAS,EAAE,MAAM,CAAC;QAChB,KAAK;QACL,OAAO,CAAC;YACN,MAAM,EAAE,MAAM,CAAC;gBACb,QAAQ,CAAC,OAAO,CAAC;gBACjB,QAAQ,CAAC,UAAU,CAAC;gBACpB,QAAQ,CAAC,SAAS,CAAC;aACpB,CAAC,CAAA;YACF,aAAa,EAAE,OAAO,CAAC;gBACrB,UAAU,EAAE,OAAO,CAAA;gBACnB,cAAc,EAAE,OAAO,CAAA;gBACvB,gBAAgB,EAAE,OAAO,CAAA;gBACzB,oBAAoB,EAAE,OAAO,CAAA;aAC9B,CAAC,CAAA;SACH,CAAC;KACH,CAAC,CAAA;CACH,CAuBC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TenantSchema = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
5
|
/**
|
|
6
6
|
* The schema for a tenant
|
|
@@ -10,28 +10,22 @@ exports.TenantSchema = typebox_1.Type.Object({
|
|
|
10
10
|
name: typebox_1.Type.String(),
|
|
11
11
|
displayName: typebox_1.Type.String(),
|
|
12
12
|
description: typebox_1.Type.String(),
|
|
13
|
-
|
|
13
|
+
websiteUrl: typebox_1.Type.String(),
|
|
14
|
+
isDedicated: typebox_1.Type.Boolean(),
|
|
15
|
+
dedicated: typebox_1.Type.Union([
|
|
16
|
+
typebox_1.Type.Null(),
|
|
17
|
+
typebox_1.Type.Object({
|
|
18
|
+
status: typebox_1.Type.Union([
|
|
19
|
+
typebox_1.Type.Literal("ready"),
|
|
20
|
+
typebox_1.Type.Literal("degraded"),
|
|
21
|
+
typebox_1.Type.Literal("offline"),
|
|
22
|
+
]),
|
|
23
|
+
configuration: typebox_1.Type.Object({
|
|
24
|
+
webhookUrl: typebox_1.Type.String(),
|
|
25
|
+
eventSourceUrl: typebox_1.Type.String(),
|
|
26
|
+
deleteManagerUrl: typebox_1.Type.String(),
|
|
27
|
+
configurationRepoUrl: typebox_1.Type.String(),
|
|
28
|
+
}),
|
|
29
|
+
}),
|
|
30
|
+
]),
|
|
14
31
|
});
|
|
15
|
-
/**
|
|
16
|
-
* The schema for a tenant v0
|
|
17
|
-
*/
|
|
18
|
-
exports.TenantV0Schema = typebox_1.Type.Object({
|
|
19
|
-
id: typebox_1.Type.String(),
|
|
20
|
-
org: typebox_1.Type.String(),
|
|
21
|
-
displayName: typebox_1.Type.String(),
|
|
22
|
-
description: typebox_1.Type.String(),
|
|
23
|
-
website: typebox_1.Type.String(),
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Convert a data core v0 to a data core
|
|
27
|
-
*/
|
|
28
|
-
const tenantV0ToTenant = (tenantV0) => {
|
|
29
|
-
return {
|
|
30
|
-
id: tenantV0.id,
|
|
31
|
-
name: tenantV0.org,
|
|
32
|
-
displayName: tenantV0.displayName,
|
|
33
|
-
description: tenantV0.description,
|
|
34
|
-
website: tenantV0.website,
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
exports.tenantV0ToTenant = tenantV0ToTenant;
|