@prismatic-io/prism 4.2.1 → 4.2.2
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/lib/commands/alerts/events/list.js +4 -1
- package/lib/commands/alerts/groups/list.js +23 -10
- package/lib/commands/alerts/monitors/list.js +41 -11
- package/lib/commands/alerts/webhooks/list.js +26 -13
- package/lib/commands/components/actions/list.js +60 -19
- package/lib/commands/components/list.js +42 -19
- package/lib/commands/components/triggers/list.js +61 -20
- package/lib/commands/customers/list.js +29 -11
- package/lib/commands/customers/users/list.js +34 -15
- package/lib/commands/instances/config-vars/list.js +44 -19
- package/lib/commands/instances/flow-configs/list.js +29 -16
- package/lib/commands/instances/list.js +44 -22
- package/lib/commands/integrations/flows/list.js +29 -16
- package/lib/commands/integrations/list.js +32 -15
- package/lib/commands/organization/users/list.js +37 -12
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -5,27 +5,40 @@ const graphql_1 = require("../../../graphql");
|
|
|
5
5
|
class ListCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
7
|
const { args: { instance }, flags, } = await this.parse(ListCommand);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
flowConfigs {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
let flowConfigs = [];
|
|
9
|
+
let hasNextPage = true;
|
|
10
|
+
let cursor = "";
|
|
11
|
+
while (hasNextPage) {
|
|
12
|
+
const { instance: { flowConfigs: { nodes, pageInfo }, }, } = await (0, graphql_1.gqlRequest)({
|
|
13
|
+
document: (0, graphql_1.gql) `
|
|
14
|
+
query listInstanceFlowConfigs($id: ID!, $after: String) {
|
|
15
|
+
instance(id: $id) {
|
|
16
|
+
flowConfigs(after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
flow {
|
|
20
|
+
name
|
|
21
|
+
}
|
|
22
|
+
webhookUrl
|
|
23
|
+
}
|
|
24
|
+
pageInfo {
|
|
25
|
+
hasNextPage
|
|
26
|
+
endCursor
|
|
17
27
|
}
|
|
18
|
-
webhookUrl
|
|
19
28
|
}
|
|
20
29
|
}
|
|
21
30
|
}
|
|
31
|
+
`,
|
|
32
|
+
variables: {
|
|
33
|
+
id: instance,
|
|
34
|
+
after: cursor,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
flowConfigs = [...flowConfigs, ...nodes];
|
|
38
|
+
cursor = pageInfo.endCursor;
|
|
39
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
22
40
|
}
|
|
23
|
-
|
|
24
|
-
variables: {
|
|
25
|
-
id: instance,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
core_1.CliUx.ux.table(result.instance.flowConfigs.nodes, {
|
|
41
|
+
core_1.CliUx.ux.table(flowConfigs, {
|
|
29
42
|
id: {
|
|
30
43
|
minWidth: 8,
|
|
31
44
|
extended: true,
|
|
@@ -6,40 +6,62 @@ class ListCommand extends core_1.Command {
|
|
|
6
6
|
async run() {
|
|
7
7
|
const { flags } = await this.parse(ListCommand);
|
|
8
8
|
const { customer, integration } = flags;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
let instances = [];
|
|
10
|
+
let hasNextPage = true;
|
|
11
|
+
let cursor = "";
|
|
12
|
+
while (hasNextPage) {
|
|
13
|
+
const { instances: { nodes, pageInfo }, } = await (0, graphql_1.gqlRequest)({
|
|
14
|
+
document: (0, graphql_1.gql) `
|
|
15
|
+
query listInstances($customer: ID, $integration: ID, $after: String) {
|
|
16
|
+
instances(
|
|
17
|
+
customer: $customer
|
|
18
|
+
integration: $integration
|
|
19
|
+
isSystem: false
|
|
20
|
+
after: $after
|
|
21
|
+
) {
|
|
22
|
+
nodes {
|
|
23
23
|
id
|
|
24
24
|
name
|
|
25
|
+
description
|
|
26
|
+
enabled
|
|
27
|
+
customer {
|
|
28
|
+
id
|
|
29
|
+
name
|
|
30
|
+
externalId
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
pageInfo {
|
|
34
|
+
hasNextPage
|
|
35
|
+
endCursor
|
|
25
36
|
}
|
|
26
37
|
}
|
|
27
38
|
}
|
|
39
|
+
`,
|
|
40
|
+
variables: {
|
|
41
|
+
customer,
|
|
42
|
+
integration,
|
|
43
|
+
after: cursor,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
instances = [...instances, ...nodes];
|
|
47
|
+
cursor = pageInfo.endCursor;
|
|
48
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
28
49
|
}
|
|
29
|
-
|
|
30
|
-
variables: {
|
|
31
|
-
customer,
|
|
32
|
-
integration,
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
core_1.CliUx.ux.table(result.instances.nodes, {
|
|
50
|
+
core_1.CliUx.ux.table(instances, {
|
|
36
51
|
id: {
|
|
37
52
|
minWidth: 8,
|
|
38
53
|
extended: true,
|
|
39
54
|
},
|
|
40
55
|
name: {},
|
|
41
56
|
customer: {
|
|
42
|
-
get: (
|
|
57
|
+
get: ({ customer }) => customer.name,
|
|
58
|
+
},
|
|
59
|
+
customerid: {
|
|
60
|
+
get: ({ customer }) => customer.id,
|
|
61
|
+
extended: true,
|
|
62
|
+
},
|
|
63
|
+
customerExternalId: {
|
|
64
|
+
get: ({ customer }) => customer.externalId || "",
|
|
43
65
|
extended: true,
|
|
44
66
|
},
|
|
45
67
|
description: {},
|
|
@@ -5,26 +5,39 @@ const graphql_1 = require("../../../graphql");
|
|
|
5
5
|
class ListCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
7
|
const { args: { integration }, flags, } = await this.parse(ListCommand);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
flows {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
let flows = [];
|
|
9
|
+
let hasNextPage = true;
|
|
10
|
+
let cursor = "";
|
|
11
|
+
while (hasNextPage) {
|
|
12
|
+
const { integration: { flows: { nodes, pageInfo }, }, } = await (0, graphql_1.gqlRequest)({
|
|
13
|
+
document: (0, graphql_1.gql) `
|
|
14
|
+
query listIntegrationFlows($id: ID!, $after: String) {
|
|
15
|
+
integration(id: $id) {
|
|
16
|
+
flows(after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
name
|
|
20
|
+
description
|
|
21
|
+
testUrl
|
|
22
|
+
}
|
|
23
|
+
pageInfo {
|
|
24
|
+
hasNextPage
|
|
25
|
+
endCursor
|
|
26
|
+
}
|
|
18
27
|
}
|
|
19
28
|
}
|
|
20
29
|
}
|
|
30
|
+
`,
|
|
31
|
+
variables: {
|
|
32
|
+
id: integration,
|
|
33
|
+
after: cursor,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
flows = [...flows, ...nodes];
|
|
37
|
+
cursor = pageInfo.endCursor;
|
|
38
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
21
39
|
}
|
|
22
|
-
|
|
23
|
-
variables: {
|
|
24
|
-
id: integration,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
core_1.CliUx.ux.table(result.integration.flows.nodes, {
|
|
40
|
+
core_1.CliUx.ux.table(flows, {
|
|
28
41
|
id: {
|
|
29
42
|
minWidth: 8,
|
|
30
43
|
extended: true,
|
|
@@ -6,24 +6,39 @@ class ListCommand extends core_1.Command {
|
|
|
6
6
|
async run() {
|
|
7
7
|
const { flags } = await this.parse(ListCommand);
|
|
8
8
|
const { showAllVersions } = flags;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
nodes {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
let integrations = [];
|
|
10
|
+
let hasNextPage = true;
|
|
11
|
+
let cursor = "";
|
|
12
|
+
while (hasNextPage) {
|
|
13
|
+
const { integrations: { nodes, pageInfo }, } = await (0, graphql_1.gqlRequest)({
|
|
14
|
+
document: (0, graphql_1.gql) `
|
|
15
|
+
query listIntegrations($showAllVersions: Boolean, $after: String) {
|
|
16
|
+
integrations(allVersions: $showAllVersions, after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
name
|
|
20
|
+
description
|
|
21
|
+
versionNumber
|
|
22
|
+
labels
|
|
23
|
+
category
|
|
24
|
+
}
|
|
25
|
+
pageInfo {
|
|
26
|
+
hasNextPage
|
|
27
|
+
endCursor
|
|
28
|
+
}
|
|
18
29
|
}
|
|
19
30
|
}
|
|
31
|
+
`,
|
|
32
|
+
variables: {
|
|
33
|
+
showAllVersions,
|
|
34
|
+
after: cursor,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
integrations = [...integrations, ...nodes];
|
|
38
|
+
cursor = pageInfo.endCursor;
|
|
39
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
20
40
|
}
|
|
21
|
-
|
|
22
|
-
variables: {
|
|
23
|
-
showAllVersions,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
core_1.CliUx.ux.table(result.integrations.nodes, {
|
|
41
|
+
core_1.CliUx.ux.table(integrations, {
|
|
27
42
|
id: {
|
|
28
43
|
minWidth: 8,
|
|
29
44
|
extended: true,
|
|
@@ -31,6 +46,8 @@ class ListCommand extends core_1.Command {
|
|
|
31
46
|
name: {},
|
|
32
47
|
description: {},
|
|
33
48
|
versionNumber: { header: "Version" },
|
|
49
|
+
labels: { extended: true },
|
|
50
|
+
category: { extended: true },
|
|
34
51
|
}, { ...flags });
|
|
35
52
|
}
|
|
36
53
|
}
|
|
@@ -5,28 +5,53 @@ const graphql_1 = require("../../../graphql");
|
|
|
5
5
|
class ListCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
7
|
const { flags } = await this.parse(ListCommand);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
users {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
let customerUsers = [];
|
|
9
|
+
let hasNextPage = true;
|
|
10
|
+
let cursor = "";
|
|
11
|
+
while (hasNextPage) {
|
|
12
|
+
const { organization: { users: { nodes, pageInfo }, }, } = await (0, graphql_1.gqlRequest)({
|
|
13
|
+
document: (0, graphql_1.gql) `
|
|
14
|
+
query listUsers($after: String) {
|
|
15
|
+
organization {
|
|
16
|
+
users(after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
name
|
|
20
|
+
email
|
|
21
|
+
externalId
|
|
22
|
+
phone
|
|
23
|
+
role {
|
|
24
|
+
name
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
pageInfo {
|
|
28
|
+
hasNextPage
|
|
29
|
+
endCursor
|
|
30
|
+
}
|
|
17
31
|
}
|
|
18
32
|
}
|
|
19
33
|
}
|
|
34
|
+
`,
|
|
35
|
+
variables: { after: cursor },
|
|
36
|
+
});
|
|
37
|
+
customerUsers = [...customerUsers, ...nodes];
|
|
38
|
+
cursor = pageInfo.endCursor;
|
|
39
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
20
40
|
}
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
core_1.CliUx.ux.table(result.organization.users.nodes, {
|
|
41
|
+
core_1.CliUx.ux.table(customerUsers, {
|
|
24
42
|
id: {
|
|
25
43
|
minWidth: 8,
|
|
26
44
|
extended: true,
|
|
27
45
|
},
|
|
28
46
|
name: {},
|
|
29
47
|
email: {},
|
|
48
|
+
phone: {},
|
|
49
|
+
role: {
|
|
50
|
+
get: ({ role }) => role.name,
|
|
51
|
+
},
|
|
52
|
+
externalId: {
|
|
53
|
+
get: ({ externalId }) => externalId || "",
|
|
54
|
+
},
|
|
30
55
|
}, { ...flags });
|
|
31
56
|
}
|
|
32
57
|
}
|