Skip to content

Commit

Permalink
Merge branch 'development' into 'master'
Browse files Browse the repository at this point in the history
Development

See merge request b650/Deep-Lynx!152
  • Loading branch information
DnOberon committed Jan 20, 2022
2 parents bc63a2a + 4759383 commit d9f7aa5
Show file tree
Hide file tree
Showing 23 changed files with 977 additions and 101 deletions.
24 changes: 19 additions & 5 deletions API Documentation/Core.swagger_collection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,11 @@ paths:
in: query
name: metatypeID
description: Return only nodes for the selected metatype
- schema:
type: string
in: query
name: dataSourceID
description: Return only nodes for the selected datasource
responses:
'200':
description: ''
Expand Down Expand Up @@ -574,6 +579,14 @@ paths:
type: string
in: query
name: relationshipPairName
- schema:
type: string
in: query
name: dataSourceID
- schema:
type: string
in: query
name: loadRelationshipPairs
responses:
'200':
description: ''
Expand Down Expand Up @@ -3262,6 +3275,12 @@ paths:
tags:
- Events
operationId: CreateEventAction
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEventActionRequest'
required: true
responses:
'200':
description: ''
Expand All @@ -3270,11 +3289,6 @@ paths:
schema:
$ref: '#/components/schemas/CreateEventActionResponse'
description: Create an event action
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEventActionRequest'
'/event_actions/{action_id}':
parameters:
- schema:
Expand Down
46 changes: 23 additions & 23 deletions AdminWebApp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 75 additions & 1 deletion AdminWebApp/src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
MetatypeRelationshipT,
MetatypeRelationshipKeyT,
MetatypeRelationshipPairT,
NodeT,
EdgeT,
UserContainerInviteT,
TypeMappingTransformationPayloadT,
TypeMappingTransformationT,
Expand Down Expand Up @@ -159,7 +161,8 @@ export class Client {
sortBy,
sortDesc,
count,
}: {name?: string; description?: string; limit?: number; offset?: number; sortBy?: string; sortDesc?: boolean; count?: boolean},
loadKeys
}: {name?: string; description?: string; limit?: number; offset?: number; sortBy?: string; sortDesc?: boolean; count?: boolean; loadKeys?: string},
): Promise<MetatypeT[] | number> {
const query: {[key: string]: any} = {};

Expand All @@ -170,6 +173,7 @@ export class Client {
if (sortBy) query.sortBy = sortBy;
if (sortDesc) query.sortDesc = sortDesc;
if (count) query.count = 'true';
if (loadKeys) query.loadKeys = loadKeys;

return this.get<MetatypeT[] | number>(`/containers/${containerID}/metatypes`, query);
}
Expand Down Expand Up @@ -415,6 +419,76 @@ export class Client {
return this.delete(`/containers/${containerID}/import/datasources/${dataSourceID}/active`);
}

createNode(containerID: string, node: any): Promise<NodeT[]> {
return this.post<NodeT[]>(`/containers/${containerID}/graphs/nodes`, node);
}

deleteNode(containerID: string, nodeID: string): Promise<boolean> {
return this.delete(`/containers/${containerID}/graphs/nodes/${nodeID}`);
}

listNodes(
containerID: string,
{limit, offset, transformationID, metatypeID, dataSourceID, loadMetatypes}: {limit?: number; offset?: number; transformationID?: string; metatypeID?: string;
dataSourceID?: string; loadMetatypes?: string;},
): Promise<NodeT[]> {
const query: {[key: string]: any} = {};

if (dataSourceID) query.dataSourceID = dataSourceID;
if (limit) query.limit = limit;
if (offset) query.offset = offset;
if (transformationID) query.transformationID = transformationID;
if (metatypeID) query.metatypeID = metatypeID;
if (loadMetatypes) query.loadMetatypes = loadMetatypes;


return this.get<NodeT[]>(`/containers/${containerID}/graphs/nodes`, query);
}

countNodes(containerID: string, dataSourceID: string): Promise<number> {
const query: {[key: string]: any} = {};

query.dataSourceID = dataSourceID;
query.count = true;
return this.get<number>(`/containers/${containerID}/graphs/nodes`, query);
}

createEdge(containerID: string, edge: any): Promise<EdgeT[]> {
return this.post<EdgeT[]>(`/containers/${containerID}/graphs/edges`, edge);
}

deleteEdge(containerID: string, edgeID: string): Promise<boolean> {
return this.delete(`/containers/${containerID}/graphs/edges/${edgeID}`);
}

listEdges(
containerID: string,

{relationshipPairName, relationshipPairID, limit, offset, originID, destinationID, dataSourceID, loadRelationshipPairs}: {relationshipPairName?: string; relationshipPairID?: string;
limit?: number; offset?: number; originID?: string; destinationID?: string; dataSourceID?: string; loadRelationshipPairs?: string;},
): Promise<EdgeT[]> {
const query: {[key: string]: any} = {};

if (dataSourceID) query.dataSourceID = dataSourceID;
if (relationshipPairName) query.relationshipPairName = relationshipPairName;
if (relationshipPairID) query.relationshipPairID = relationshipPairID;
if (limit) query.limit = limit;
if (offset) query.offset = offset;
if (originID) query.originID = originID;
if (destinationID) query.destinationID = destinationID;
if (loadRelationshipPairs) query.loadRelationshipPairs = loadRelationshipPairs;

return this.get<EdgeT[]>(`/containers/${containerID}/graphs/edges`, query);
}

countEdges(containerID: string, dataSourceID: string): Promise<number> {
const query: {[key: string]: any} = {};

query.dataSourceID = dataSourceID;
query.count = true;
return this.get<number>(`/containers/${containerID}/graphs/edges`, query);
}

listImports(
containerID: string,
dataSourceID: string,
Expand Down
1 change: 1 addition & 0 deletions AdminWebApp/src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ export type TypeMappingTransformationKeyMapping = {
key: string;
metatype_key_id?: string;
metatype_relationship_key_id?: string;
data_conversion_format_string?: string;
};

export type TypeMappingTransformationSubexpression = {
Expand Down
Loading

0 comments on commit d9f7aa5

Please sign in to comment.