@orchestrator-ui/orchestrator-ui-components 1.3.1 → 1.5.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/.turbo/turbo-build.log +5 -5
- package/.turbo/turbo-lint.log +7 -1
- package/.turbo/turbo-test.log +7 -7
- package/CHANGELOG.md +31 -2
- package/LICENSE.txt +202 -0
- package/README.md +22 -0
- package/dist/index.d.ts +531 -314
- package/dist/index.js +5120 -7384
- package/package.json +21 -4
- package/src/api/index.ts +4 -3
- package/src/api/types.ts +53 -0
- package/src/components/WfoDropdownButton/WfoDropdownButton.tsx +2 -0
- package/src/components/WfoForms/AutoFieldLoader.tsx +6 -6
- package/src/components/WfoForms/formFields/AcceptField.tsx +2 -1
- package/src/components/WfoForms/formFields/BoolField.tsx +2 -1
- package/src/components/WfoForms/formFields/DividerField.tsx +1 -1
- package/src/components/WfoForms/formFields/ErrorField.tsx +1 -1
- package/src/components/WfoForms/formFields/LabelField.tsx +1 -1
- package/src/components/WfoForms/formFields/ListAddField.tsx +2 -1
- package/src/components/WfoForms/formFields/ListDelField.tsx +2 -1
- package/src/components/WfoForms/formFields/LongTextField.tsx +1 -1
- package/src/components/WfoForms/formFields/NumField.tsx +1 -1
- package/src/components/WfoForms/formFields/ProductField.tsx +8 -7
- package/src/components/WfoForms/formFields/RadioField.tsx +1 -1
- package/src/components/WfoForms/formFields/SelectField.tsx +4 -2
- package/src/components/WfoForms/formFields/SubmitField.tsx +1 -1
- package/src/components/WfoForms/formFields/SubscriptionField.tsx +5 -4
- package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +11 -15
- package/src/components/WfoForms/formFields/TextField.tsx +1 -1
- package/src/components/WfoForms/formFields/{ContactPersonAutocomplete.tsx → deprecated/ContactPersonAutocomplete.tsx} +4 -3
- package/src/components/WfoForms/formFields/{ContactPersonNameField.tsx → deprecated/ContactPersonNameField.tsx} +3 -2
- package/src/components/WfoForms/formFields/{ImsNodeIdField.tsx → deprecated/ImsNodeIdField.tsx} +4 -3
- package/src/components/WfoForms/formFields/{ImsPortIdField.tsx → deprecated/ImsPortIdField.tsx} +7 -4
- package/src/components/WfoForms/formFields/{IpNetworkField.tsx → deprecated/IpNetworkField.tsx} +4 -3
- package/src/components/WfoForms/formFields/{IpPrefixTableField.tsx → deprecated/IpPrefixTableField.tsx} +5 -4
- package/src/components/WfoForms/formFields/{SplitPrefix.tsx → deprecated/SplitPrefix.tsx} +3 -2
- package/src/components/WfoForms/formFields/{TimestampField.tsx → deprecated/TimestampField.tsx} +1 -1
- package/src/components/WfoForms/formFields/{VlanField.tsx → deprecated/VlanField.tsx} +5 -4
- package/src/components/WfoForms/formFields/deprecated/index.ts +13 -0
- package/src/components/WfoForms/formFields/{surf → deprecated}/types.ts +1 -1
- package/src/components/WfoForms/formFields/index.ts +1 -6
- package/src/components/WfoForms/formFields/utils.spec.ts +1 -1
- package/src/components/WfoForms/formFields/utils.ts +3 -2
- package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +2 -2
- package/src/components/WfoProcessList/WfoProcessesList.tsx +16 -9
- package/src/components/WfoProcessList/processListObjectMappers.ts +6 -10
- package/src/components/WfoSettings/WfoModifySettings.tsx +29 -13
- package/src/components/WfoSettings/WfoResetTextSearchIndexButton.tsx +22 -0
- package/src/components/WfoSettings/index.ts +1 -0
- package/src/components/{WfoButtonComboBox/WfoButtonComboBox.tsx → WfoStartButton/WfoStartButtonComboBox.tsx} +11 -17
- package/src/components/WfoStartButton/WfoStartTaskComboBox.tsx +47 -0
- package/src/components/WfoStartButton/WfoStartWorkflowComboBox.tsx +49 -0
- package/src/components/WfoStartButton/index.ts +2 -0
- package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +30 -36
- package/src/components/WfoSubscription/WfoSubscription.tsx +17 -20
- package/src/components/WfoSubscription/index.ts +6 -4
- package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +12 -16
- package/src/components/WfoSubscriptionsList/subscriptionResultMappers.ts +10 -12
- package/src/components/index.ts +2 -1
- package/src/configuration/constants.ts +3 -0
- package/src/hooks/{surf → deprecated}/useGetSubscriptionDropdownOptions.ts +6 -13
- package/src/hooks/{surf → deprecated}/useIsTaggedPort.ts +6 -9
- package/src/hooks/index.ts +0 -1
- package/src/index.ts +0 -1
- package/src/messages/en-GB.json +3 -1
- package/src/messages/nl-NL.json +3 -1
- package/src/pages/metadata/WfoProductBlocksPage.tsx +27 -37
- package/src/pages/metadata/WfoProductsPage.tsx +11 -16
- package/src/pages/metadata/WfoResourceTypesPage.tsx +33 -35
- package/src/pages/metadata/WfoWorkflowsPage.tsx +42 -40
- package/src/pages/metadata/workflowListObjectMapper.ts +4 -7
- package/src/pages/processes/WfoStartProcessPage.tsx +0 -6
- package/src/pages/startPage/WfoStartPage.tsx +56 -68
- package/src/pages/subscriptions/WfoSubscriptionsListPage.tsx +6 -7
- package/src/rtk/api.ts +11 -3
- package/src/rtk/endpoints/index.ts +11 -2
- package/src/rtk/endpoints/metadata/index.ts +3 -0
- package/src/rtk/endpoints/metadata/productBlocks.ts +88 -0
- package/src/rtk/endpoints/metadata/resourceTypes.ts +78 -0
- package/src/rtk/endpoints/metadata/workflows.ts +73 -0
- package/src/rtk/endpoints/processList.ts +2 -1
- package/src/rtk/endpoints/processListSummary.ts +70 -0
- package/src/rtk/endpoints/products.ts +76 -0
- package/src/rtk/endpoints/productsSummary.ts +62 -0
- package/src/rtk/endpoints/relatedSubscriptions.ts +99 -0
- package/src/rtk/endpoints/settings.ts +10 -0
- package/src/rtk/endpoints/startOptions.ts +99 -0
- package/src/{graphqlQueries/subscriptionDetailQuery.ts → rtk/endpoints/subscriptionDetail.ts} +45 -11
- package/src/rtk/endpoints/subscriptionList.ts +86 -0
- package/src/rtk/endpoints/subscriptionListSummary.ts +70 -0
- package/src/rtk/endpoints/subscriptionsDropdownOptions.ts +72 -0
- package/src/types/types.ts +20 -0
- package/src/utils/index.ts +1 -0
- package/src/components/WfoPageTemplate/WfoSidebar/WfoStartCreateWorkflowButtonComboBox.tsx +0 -61
- package/src/components/WfoStartTaskButtonComboBox/WfoStartTaskButtonComboBox.tsx +0 -54
- package/src/components/WfoStartTaskButtonComboBox/index.ts +0 -1
- package/src/graphqlQueries/index.ts +0 -7
- package/src/graphqlQueries/processListQuery.ts +0 -101
- package/src/graphqlQueries/productBlocksQuery.ts +0 -59
- package/src/graphqlQueries/productsQuery.ts +0 -85
- package/src/graphqlQueries/relatedSubscriptionsQuery.ts +0 -65
- package/src/graphqlQueries/resourceTypesQuery.ts +0 -52
- package/src/graphqlQueries/subscriptionsDropdownOptionsQuery.ts +0 -48
- package/src/graphqlQueries/subscriptionsListQuery.ts +0 -101
- package/src/graphqlQueries/workflows/workflowsQuery.ts +0 -48
- package/src/graphqlQueries/workflows/workflowsQueryForDropdownList.ts +0 -38
- package/src/hooks/useQueryWithGraphql.ts +0 -72
- /package/src/components/WfoForms/formFields/{ContactPersonAutocompleteStyles.ts → deprecated/ContactPersonAutocompleteStyles.ts} +0 -0
- /package/src/components/WfoForms/formFields/{ImsPortIdFieldStyling.ts → deprecated/ImsPortIdFieldStyling.ts} +0 -0
- /package/src/components/WfoForms/formFields/{IpPrefixTableFieldStyling.ts → deprecated/IpPrefixTableFieldStyling.ts} +0 -0
- /package/src/components/WfoForms/formFields/{SplitPrefixStyling.ts → deprecated/SplitPrefixStyling.ts} +0 -0
- /package/src/components/WfoForms/formFields/{surf → deprecated}/utils.ts +0 -0
- /package/src/components/{WfoButtonComboBox → WfoStartButton}/styles.ts +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { useTranslations } from 'next-intl';
|
|
4
|
-
import { useRouter } from 'next/router';
|
|
5
|
-
|
|
6
|
-
import { PATH_START_NEW_TASK } from '@/components';
|
|
7
|
-
import { GET_WORKFLOWS_FOR_DROPDOWN_LIST_GRAPHQL_QUERY } from '@/graphqlQueries/workflows/workflowsQueryForDropdownList';
|
|
8
|
-
import { useCheckEngineStatus, useQueryWithGraphql } from '@/hooks';
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
WfoButtonComboBox,
|
|
12
|
-
WorkflowComboBoxOption,
|
|
13
|
-
} from '../WfoButtonComboBox/WfoButtonComboBox';
|
|
14
|
-
|
|
15
|
-
export const WfoStartTaskButtonComboBox = () => {
|
|
16
|
-
const router = useRouter();
|
|
17
|
-
const t = useTranslations('common');
|
|
18
|
-
const { isEngineRunningNow } = useCheckEngineStatus();
|
|
19
|
-
|
|
20
|
-
const { data } = useQueryWithGraphql(
|
|
21
|
-
GET_WORKFLOWS_FOR_DROPDOWN_LIST_GRAPHQL_QUERY,
|
|
22
|
-
{
|
|
23
|
-
filterBy: [{ field: 'target', value: 'SYSTEM' }],
|
|
24
|
-
},
|
|
25
|
-
'taskWorkflows',
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const taskList: WorkflowComboBoxOption[] = (data?.workflows.page || [])
|
|
29
|
-
.map(({ name, description }) => ({
|
|
30
|
-
label: description ?? '',
|
|
31
|
-
data: { workflowName: name },
|
|
32
|
-
}))
|
|
33
|
-
.sort((a, b) => a.label.localeCompare(b.label));
|
|
34
|
-
|
|
35
|
-
const handleOptionChange = async (
|
|
36
|
-
selectedProduct: WorkflowComboBoxOption,
|
|
37
|
-
) => {
|
|
38
|
-
if (await isEngineRunningNow()) {
|
|
39
|
-
const { workflowName } = selectedProduct.data;
|
|
40
|
-
router.push({
|
|
41
|
-
pathname: `${PATH_START_NEW_TASK}/${workflowName}`,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<WfoButtonComboBox
|
|
48
|
-
buttonText={t('newTask')}
|
|
49
|
-
options={taskList}
|
|
50
|
-
onOptionChange={handleOptionChange}
|
|
51
|
-
isProcess={false}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './WfoStartTaskButtonComboBox';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './subscriptionsListQuery';
|
|
2
|
-
export * from './productBlocksQuery';
|
|
3
|
-
export * from './productsQuery';
|
|
4
|
-
export * from './resourceTypesQuery';
|
|
5
|
-
export * from './subscriptionDetailQuery';
|
|
6
|
-
export * from './subscriptionsDropdownOptionsQuery';
|
|
7
|
-
export * from './processListQuery';
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import { GraphqlQueryVariables, Process, ProcessListResult } from '@/types';
|
|
7
|
-
|
|
8
|
-
export const GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY = parse(gql`
|
|
9
|
-
query ProcessListSummary(
|
|
10
|
-
$first: Int!
|
|
11
|
-
$after: Int!
|
|
12
|
-
$sortBy: [GraphqlSort!]
|
|
13
|
-
$filterBy: [GraphqlFilter!]
|
|
14
|
-
$query: String
|
|
15
|
-
) {
|
|
16
|
-
processes(
|
|
17
|
-
first: $first
|
|
18
|
-
after: $after
|
|
19
|
-
sortBy: $sortBy
|
|
20
|
-
filterBy: $filterBy
|
|
21
|
-
query: $query
|
|
22
|
-
) {
|
|
23
|
-
page {
|
|
24
|
-
processId
|
|
25
|
-
workflowName
|
|
26
|
-
startedAt
|
|
27
|
-
}
|
|
28
|
-
pageInfo {
|
|
29
|
-
totalItems
|
|
30
|
-
startCursor
|
|
31
|
-
endCursor
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`);
|
|
36
|
-
|
|
37
|
-
export const GET_PROCESS_LIST_GRAPHQL_QUERY = parse(gql`
|
|
38
|
-
query ProcessList(
|
|
39
|
-
$first: Int!
|
|
40
|
-
$after: Int!
|
|
41
|
-
$sortBy: [GraphqlSort!]
|
|
42
|
-
$filterBy: [GraphqlFilter!]
|
|
43
|
-
$query: String
|
|
44
|
-
) {
|
|
45
|
-
processes(
|
|
46
|
-
first: $first
|
|
47
|
-
after: $after
|
|
48
|
-
sortBy: $sortBy
|
|
49
|
-
filterBy: $filterBy
|
|
50
|
-
query: $query
|
|
51
|
-
) {
|
|
52
|
-
page {
|
|
53
|
-
workflowName
|
|
54
|
-
lastStep
|
|
55
|
-
lastStatus
|
|
56
|
-
workflowTarget
|
|
57
|
-
product {
|
|
58
|
-
name
|
|
59
|
-
tag
|
|
60
|
-
}
|
|
61
|
-
customer {
|
|
62
|
-
fullname
|
|
63
|
-
shortcode
|
|
64
|
-
}
|
|
65
|
-
createdBy
|
|
66
|
-
assignee
|
|
67
|
-
processId
|
|
68
|
-
startedAt
|
|
69
|
-
lastModifiedAt
|
|
70
|
-
isTask
|
|
71
|
-
subscriptions {
|
|
72
|
-
page {
|
|
73
|
-
subscriptionId
|
|
74
|
-
description
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
pageInfo {
|
|
79
|
-
hasNextPage
|
|
80
|
-
hasPreviousPage
|
|
81
|
-
startCursor
|
|
82
|
-
totalItems
|
|
83
|
-
endCursor
|
|
84
|
-
sortFields
|
|
85
|
-
filterFields
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
`);
|
|
90
|
-
|
|
91
|
-
export const getProcessListGraphQlQuery = (): TypedDocumentNode<
|
|
92
|
-
ProcessListResult,
|
|
93
|
-
GraphqlQueryVariables<Process>
|
|
94
|
-
> => GET_PROCESS_LIST_GRAPHQL_QUERY;
|
|
95
|
-
|
|
96
|
-
export const getProcessListSummaryGraphQlQuery = (): TypedDocumentNode<
|
|
97
|
-
ProcessListResult<
|
|
98
|
-
Pick<Process, 'processId' | 'workflowName' | 'startedAt'>
|
|
99
|
-
>,
|
|
100
|
-
GraphqlQueryVariables<Process>
|
|
101
|
-
> => GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import type { ProductBlockDefinition } from '@/types';
|
|
7
|
-
import { GraphqlQueryVariables, ProductBlockDefinitionsResult } from '@/types';
|
|
8
|
-
|
|
9
|
-
export const GET_PRODUCTS_BLOCKS_GRAPHQL_QUERY: TypedDocumentNode<
|
|
10
|
-
ProductBlockDefinitionsResult,
|
|
11
|
-
GraphqlQueryVariables<ProductBlockDefinition>
|
|
12
|
-
> = parse(gql`
|
|
13
|
-
query MetadataProductBlocks(
|
|
14
|
-
$first: Int!
|
|
15
|
-
$after: Int!
|
|
16
|
-
$sortBy: [GraphqlSort!]
|
|
17
|
-
$query: String
|
|
18
|
-
) {
|
|
19
|
-
productBlocks(
|
|
20
|
-
first: $first
|
|
21
|
-
after: $after
|
|
22
|
-
sortBy: $sortBy
|
|
23
|
-
query: $query
|
|
24
|
-
) {
|
|
25
|
-
page {
|
|
26
|
-
productBlockId
|
|
27
|
-
name
|
|
28
|
-
tag
|
|
29
|
-
description
|
|
30
|
-
status
|
|
31
|
-
createdAt
|
|
32
|
-
endDate
|
|
33
|
-
resourceTypes {
|
|
34
|
-
description
|
|
35
|
-
resourceType
|
|
36
|
-
resourceTypeId
|
|
37
|
-
}
|
|
38
|
-
dependsOn {
|
|
39
|
-
productBlockId
|
|
40
|
-
name
|
|
41
|
-
tag
|
|
42
|
-
description
|
|
43
|
-
status
|
|
44
|
-
createdAt
|
|
45
|
-
endDate
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
pageInfo {
|
|
49
|
-
endCursor
|
|
50
|
-
hasNextPage
|
|
51
|
-
hasPreviousPage
|
|
52
|
-
startCursor
|
|
53
|
-
totalItems
|
|
54
|
-
sortFields
|
|
55
|
-
filterFields
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`);
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
GraphqlQueryVariables,
|
|
8
|
-
ProductDefinition,
|
|
9
|
-
ProductDefinitionsResult,
|
|
10
|
-
SubscriptionsResult,
|
|
11
|
-
} from '../types';
|
|
12
|
-
|
|
13
|
-
export const GET_PRODUCTS_GRAPHQL_QUERY = parse(gql`
|
|
14
|
-
query MetadataProducts(
|
|
15
|
-
$first: Int!
|
|
16
|
-
$after: Int!
|
|
17
|
-
$sortBy: [GraphqlSort!]
|
|
18
|
-
$query: String
|
|
19
|
-
) {
|
|
20
|
-
products(first: $first, after: $after, sortBy: $sortBy, query: $query) {
|
|
21
|
-
page {
|
|
22
|
-
productId
|
|
23
|
-
name
|
|
24
|
-
description
|
|
25
|
-
tag
|
|
26
|
-
createdAt
|
|
27
|
-
productType
|
|
28
|
-
status
|
|
29
|
-
productBlocks {
|
|
30
|
-
name
|
|
31
|
-
}
|
|
32
|
-
fixedInputs {
|
|
33
|
-
name
|
|
34
|
-
value
|
|
35
|
-
}
|
|
36
|
-
endDate
|
|
37
|
-
}
|
|
38
|
-
pageInfo {
|
|
39
|
-
endCursor
|
|
40
|
-
hasNextPage
|
|
41
|
-
hasPreviousPage
|
|
42
|
-
startCursor
|
|
43
|
-
totalItems
|
|
44
|
-
sortFields
|
|
45
|
-
filterFields
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
`);
|
|
50
|
-
|
|
51
|
-
export const GET_PRODUCTS_SUMMARY_GRAPHQL_QUERY = parse(gql`
|
|
52
|
-
query MetadataProducts(
|
|
53
|
-
$first: Int!
|
|
54
|
-
$after: Int!
|
|
55
|
-
$sortBy: [GraphqlSort!]
|
|
56
|
-
) {
|
|
57
|
-
products(first: $first, after: $after, sortBy: $sortBy) {
|
|
58
|
-
page {
|
|
59
|
-
name
|
|
60
|
-
subscriptions {
|
|
61
|
-
pageInfo {
|
|
62
|
-
totalItems
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
pageInfo {
|
|
67
|
-
totalItems
|
|
68
|
-
startCursor
|
|
69
|
-
endCursor
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
`);
|
|
74
|
-
|
|
75
|
-
export const getProductsSummaryQuery = (): TypedDocumentNode<
|
|
76
|
-
ProductDefinitionsResult<
|
|
77
|
-
Pick<ProductDefinition, 'name'> & SubscriptionsResult<never>
|
|
78
|
-
>,
|
|
79
|
-
GraphqlQueryVariables<ProductDefinition>
|
|
80
|
-
> => GET_PRODUCTS_SUMMARY_GRAPHQL_QUERY;
|
|
81
|
-
|
|
82
|
-
export const getProductsQuery = (): TypedDocumentNode<
|
|
83
|
-
ProductDefinitionsResult,
|
|
84
|
-
GraphqlQueryVariables<ProductDefinition>
|
|
85
|
-
> => GET_PRODUCTS_GRAPHQL_QUERY;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
GraphqlFilter,
|
|
8
|
-
GraphqlQueryVariables,
|
|
9
|
-
RelatedSubscription,
|
|
10
|
-
RelatedSubscriptionsResult,
|
|
11
|
-
Subscription,
|
|
12
|
-
} from '../types';
|
|
13
|
-
|
|
14
|
-
export const GET_RELATED_SUBSCRIPTIONS_GRAPHQL_QUERY: TypedDocumentNode<
|
|
15
|
-
RelatedSubscriptionsResult,
|
|
16
|
-
GraphqlQueryVariables<RelatedSubscription> &
|
|
17
|
-
Pick<Subscription, 'subscriptionId'> & {
|
|
18
|
-
terminatedSubscriptionFilter?: GraphqlFilter<RelatedSubscription>;
|
|
19
|
-
}
|
|
20
|
-
> = parse(gql`
|
|
21
|
-
query RelatedSubscriptions(
|
|
22
|
-
$subscriptionId: String!
|
|
23
|
-
$first: Int!
|
|
24
|
-
$after: Int!
|
|
25
|
-
$sortBy: [GraphqlSort!]
|
|
26
|
-
$terminatedSubscriptionFilter: [GraphqlFilter!]
|
|
27
|
-
) {
|
|
28
|
-
subscriptions(
|
|
29
|
-
filterBy: { value: $subscriptionId, field: "subscriptionId" }
|
|
30
|
-
) {
|
|
31
|
-
page {
|
|
32
|
-
subscriptionId
|
|
33
|
-
inUseBySubscriptions(
|
|
34
|
-
first: $first
|
|
35
|
-
after: $after
|
|
36
|
-
sortBy: $sortBy
|
|
37
|
-
filterBy: $terminatedSubscriptionFilter
|
|
38
|
-
) {
|
|
39
|
-
page {
|
|
40
|
-
subscriptionId
|
|
41
|
-
customer {
|
|
42
|
-
fullname
|
|
43
|
-
}
|
|
44
|
-
description
|
|
45
|
-
insync
|
|
46
|
-
startDate
|
|
47
|
-
status
|
|
48
|
-
product {
|
|
49
|
-
tag
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
pageInfo {
|
|
53
|
-
endCursor
|
|
54
|
-
hasNextPage
|
|
55
|
-
hasPreviousPage
|
|
56
|
-
startCursor
|
|
57
|
-
totalItems
|
|
58
|
-
sortFields
|
|
59
|
-
filterFields
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
`);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import type {
|
|
7
|
-
GraphqlQueryVariables,
|
|
8
|
-
ResourceTypeDefinition,
|
|
9
|
-
ResourceTypeDefinitionsResult,
|
|
10
|
-
} from '@/types';
|
|
11
|
-
|
|
12
|
-
export const GET_RESOURCE_TYPES_GRAPHQL_QUERY: TypedDocumentNode<
|
|
13
|
-
ResourceTypeDefinitionsResult,
|
|
14
|
-
GraphqlQueryVariables<ResourceTypeDefinition>
|
|
15
|
-
> = parse(gql`
|
|
16
|
-
query MetadataResourceTypes(
|
|
17
|
-
$first: Int!
|
|
18
|
-
$after: Int!
|
|
19
|
-
$sortBy: [GraphqlSort!]
|
|
20
|
-
$query: String
|
|
21
|
-
) {
|
|
22
|
-
resourceTypes(
|
|
23
|
-
first: $first
|
|
24
|
-
after: $after
|
|
25
|
-
sortBy: $sortBy
|
|
26
|
-
query: $query
|
|
27
|
-
) {
|
|
28
|
-
page {
|
|
29
|
-
resourceTypeId
|
|
30
|
-
resourceType
|
|
31
|
-
description
|
|
32
|
-
productBlocks {
|
|
33
|
-
description
|
|
34
|
-
name
|
|
35
|
-
productBlockId
|
|
36
|
-
status
|
|
37
|
-
createdAt
|
|
38
|
-
endDate
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
pageInfo {
|
|
42
|
-
endCursor
|
|
43
|
-
hasNextPage
|
|
44
|
-
hasPreviousPage
|
|
45
|
-
startCursor
|
|
46
|
-
totalItems
|
|
47
|
-
sortFields
|
|
48
|
-
filterFields
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
`);
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
GraphqlQueryVariables,
|
|
8
|
-
SubscriptionDropdownOption,
|
|
9
|
-
SubscriptionDropdownOptionsResult,
|
|
10
|
-
} from '../types';
|
|
11
|
-
|
|
12
|
-
// Avoiding pagination by passing a large number to first. TODO: Fix this better
|
|
13
|
-
export const GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY = parse(gql`
|
|
14
|
-
query SubscriptionDropdownOptions($filterBy: [GraphqlFilter!]) {
|
|
15
|
-
subscriptions(filterBy: $filterBy, first: 1000000, after: 0) {
|
|
16
|
-
page {
|
|
17
|
-
description
|
|
18
|
-
subscriptionId
|
|
19
|
-
product {
|
|
20
|
-
tag
|
|
21
|
-
productId
|
|
22
|
-
}
|
|
23
|
-
customer {
|
|
24
|
-
fullname
|
|
25
|
-
customerId
|
|
26
|
-
}
|
|
27
|
-
productBlockInstances {
|
|
28
|
-
id
|
|
29
|
-
ownerSubscriptionId
|
|
30
|
-
parent
|
|
31
|
-
productBlockInstanceValues
|
|
32
|
-
subscriptionInstanceId
|
|
33
|
-
inUseByRelations
|
|
34
|
-
}
|
|
35
|
-
fixedInputs
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`);
|
|
40
|
-
|
|
41
|
-
export function getSubscriptionDropdownOptionsGraphQlQuery<
|
|
42
|
-
QueryVariablesType = SubscriptionDropdownOption,
|
|
43
|
-
>(): TypedDocumentNode<
|
|
44
|
-
SubscriptionDropdownOptionsResult,
|
|
45
|
-
GraphqlQueryVariables<QueryVariablesType>
|
|
46
|
-
> {
|
|
47
|
-
return GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY;
|
|
48
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
GraphqlQueryVariables,
|
|
8
|
-
Subscription,
|
|
9
|
-
SubscriptionsResult,
|
|
10
|
-
} from '@/types';
|
|
11
|
-
|
|
12
|
-
export const GET_SUBSCRIPTIONS_LIST_GRAPHQL_QUERY = parse(gql`
|
|
13
|
-
query SubscriptionsList(
|
|
14
|
-
$first: Int!
|
|
15
|
-
$after: Int!
|
|
16
|
-
$sortBy: [GraphqlSort!]
|
|
17
|
-
$filterBy: [GraphqlFilter!]
|
|
18
|
-
$query: String
|
|
19
|
-
) {
|
|
20
|
-
subscriptions(
|
|
21
|
-
first: $first
|
|
22
|
-
after: $after
|
|
23
|
-
sortBy: $sortBy
|
|
24
|
-
filterBy: $filterBy
|
|
25
|
-
query: $query
|
|
26
|
-
) {
|
|
27
|
-
page {
|
|
28
|
-
note
|
|
29
|
-
startDate
|
|
30
|
-
endDate
|
|
31
|
-
description
|
|
32
|
-
insync
|
|
33
|
-
status
|
|
34
|
-
subscriptionId
|
|
35
|
-
product {
|
|
36
|
-
name
|
|
37
|
-
tag
|
|
38
|
-
productType
|
|
39
|
-
}
|
|
40
|
-
customer {
|
|
41
|
-
fullname
|
|
42
|
-
shortcode
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
pageInfo {
|
|
46
|
-
totalItems
|
|
47
|
-
startCursor
|
|
48
|
-
hasPreviousPage
|
|
49
|
-
hasNextPage
|
|
50
|
-
endCursor
|
|
51
|
-
sortFields
|
|
52
|
-
filterFields
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
`);
|
|
57
|
-
|
|
58
|
-
export const GET_SUBSCRIPTIONS_LIST_SUMMARY_GRAPHQL_QUERY = parse(gql`
|
|
59
|
-
query SubscriptionsList(
|
|
60
|
-
$first: Int!
|
|
61
|
-
$after: Int!
|
|
62
|
-
$sortBy: [GraphqlSort!]
|
|
63
|
-
$filterBy: [GraphqlFilter!]
|
|
64
|
-
$query: String
|
|
65
|
-
) {
|
|
66
|
-
subscriptions(
|
|
67
|
-
first: $first
|
|
68
|
-
after: $after
|
|
69
|
-
sortBy: $sortBy
|
|
70
|
-
filterBy: $filterBy
|
|
71
|
-
query: $query
|
|
72
|
-
) {
|
|
73
|
-
page {
|
|
74
|
-
startDate
|
|
75
|
-
description
|
|
76
|
-
subscriptionId
|
|
77
|
-
}
|
|
78
|
-
pageInfo {
|
|
79
|
-
totalItems
|
|
80
|
-
startCursor
|
|
81
|
-
endCursor
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
`);
|
|
86
|
-
|
|
87
|
-
export const getSubscriptionsListGraphQlQuery = <
|
|
88
|
-
QueryVariablesType = Subscription,
|
|
89
|
-
>(): TypedDocumentNode<
|
|
90
|
-
SubscriptionsResult,
|
|
91
|
-
GraphqlQueryVariables<QueryVariablesType>
|
|
92
|
-
> => GET_SUBSCRIPTIONS_LIST_GRAPHQL_QUERY;
|
|
93
|
-
|
|
94
|
-
export const getSubscriptionsListSummaryGraphQlQuery = <
|
|
95
|
-
QueryVariablesType = Subscription,
|
|
96
|
-
>(): TypedDocumentNode<
|
|
97
|
-
SubscriptionsResult<
|
|
98
|
-
Pick<Subscription, 'subscriptionId' | 'description' | 'startDate'>
|
|
99
|
-
>,
|
|
100
|
-
GraphqlQueryVariables<QueryVariablesType>
|
|
101
|
-
> => GET_SUBSCRIPTIONS_LIST_SUMMARY_GRAPHQL_QUERY;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
GraphqlQueryVariables,
|
|
8
|
-
WorkflowDefinition,
|
|
9
|
-
WorkflowDefinitionsResult,
|
|
10
|
-
} from '@/types';
|
|
11
|
-
|
|
12
|
-
export const GET_WORKFLOWS_GRAPHQL_QUERY: TypedDocumentNode<
|
|
13
|
-
WorkflowDefinitionsResult,
|
|
14
|
-
GraphqlQueryVariables<WorkflowDefinition>
|
|
15
|
-
> = parse(gql`
|
|
16
|
-
query MetadataWorkflows(
|
|
17
|
-
$first: Int!
|
|
18
|
-
$after: Int!
|
|
19
|
-
$sortBy: [GraphqlSort!]
|
|
20
|
-
$query: String
|
|
21
|
-
) {
|
|
22
|
-
workflows(
|
|
23
|
-
first: $first
|
|
24
|
-
after: $after
|
|
25
|
-
sortBy: $sortBy
|
|
26
|
-
query: $query
|
|
27
|
-
) {
|
|
28
|
-
page {
|
|
29
|
-
name
|
|
30
|
-
description
|
|
31
|
-
target
|
|
32
|
-
products {
|
|
33
|
-
tag
|
|
34
|
-
}
|
|
35
|
-
createdAt
|
|
36
|
-
}
|
|
37
|
-
pageInfo {
|
|
38
|
-
endCursor
|
|
39
|
-
hasNextPage
|
|
40
|
-
hasPreviousPage
|
|
41
|
-
startCursor
|
|
42
|
-
totalItems
|
|
43
|
-
sortFields
|
|
44
|
-
filterFields
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`);
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { parse } from 'graphql';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
|
|
4
|
-
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
GraphqlQueryVariables,
|
|
8
|
-
WorkflowDefinition,
|
|
9
|
-
WorkflowDefinitionsResult,
|
|
10
|
-
} from '../../types';
|
|
11
|
-
|
|
12
|
-
// Avoiding pagination by passing a large number to first. TODO: Fix this better
|
|
13
|
-
export const GET_WORKFLOWS_FOR_DROPDOWN_LIST_GRAPHQL_QUERY: TypedDocumentNode<
|
|
14
|
-
WorkflowDefinitionsResult<WorkflowDefinition>,
|
|
15
|
-
GraphqlQueryVariables<WorkflowDefinition>
|
|
16
|
-
> = parse(gql`
|
|
17
|
-
query StartWorkflows($filterBy: [GraphqlFilter!]) {
|
|
18
|
-
workflows(first: 1000000, after: 0, filterBy: $filterBy) {
|
|
19
|
-
page {
|
|
20
|
-
name
|
|
21
|
-
description
|
|
22
|
-
products {
|
|
23
|
-
productId
|
|
24
|
-
name
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
pageInfo {
|
|
28
|
-
endCursor
|
|
29
|
-
hasNextPage
|
|
30
|
-
hasPreviousPage
|
|
31
|
-
startCursor
|
|
32
|
-
totalItems
|
|
33
|
-
sortFields
|
|
34
|
-
filterFields
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
`);
|