Skip to content

Commit

Permalink
merge: #4048
Browse files Browse the repository at this point in the history
4048: Chainsaw the asset store for schema variants. New SDF endpoints r=vbustamante a=jobelenus

<img src="https://media1.giphy.com/media/3o7aTuy3b4TwuUSUzm/giphy.gif"/>

Co-authored-by: Victor Bustamante <victor@systeminit.com>
  • Loading branch information
si-bors-ng[bot] and vbustamante authored Jun 28, 2024
2 parents 99fd846 + f5f901a commit 874540e
Show file tree
Hide file tree
Showing 114 changed files with 5,062 additions and 1,288 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ members = [
"lib/si-data-nats",
"lib/si-data-pg",
"lib/si-events-rs",
"lib/si-firecracker",
"lib/si-frontend-types-rs",
"lib/si-hash",
"lib/si-layer-cache",
"lib/si-firecracker",
"lib/si-pkg",
"lib/si-pool-noodle",
"lib/si-posthog-rs",
Expand Down
2 changes: 1 addition & 1 deletion app/web/src/api/sdf/dal/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { StandardModel } from "@/api/sdf/dal/standard_model";
import { CodeView } from "@/api/sdf/dal/code_view";
import { ActorView } from "@/api/sdf/dal/history_actor";
import { ChangeStatus } from "@/api/sdf/dal/change_set";
import { ComponentType } from "@/api/sdf/dal/diagram";
import { ComponentType } from "@/api/sdf/dal/schema";
import {
DiagramSocketDef,
GridPoint,
Expand Down
47 changes: 0 additions & 47 deletions app/web/src/api/sdf/dal/diagram.ts
Original file line number Diff line number Diff line change
@@ -1,54 +1,7 @@
import * as _ from "lodash-es";

export enum ComponentType {
Component = "component",
ConfigurationFrameDown = "configurationFrameDown",
ConfigurationFrameUp = "configurationFrameUp",
AggregationFrame = "aggregationFrame",
}

export type DiagramKind = "configuration";

export type OutputSocketId = string;

export interface DiagramOutputSocket {
id: OutputSocketId;
name: string;
}

export type InputSocketId = string;

export interface DiagramInputSocket {
id: InputSocketId;
name: string;
}

export interface DiagramSchemaVariant {
id: string;
name: string;
builtin: boolean;
isDefault: boolean;
componentType: ComponentType;

color: string;
category: string;
inputSockets: DiagramInputSocket[];
outputSockets: DiagramOutputSocket[];
created_at: IsoDateString;
updated_at: IsoDateString;
displayName: string | null;
description: string | null;
}

export interface DiagramSchema {
id: string;
name: string; // schema name
displayName: string; // variant display name
builtin: boolean;

variants: DiagramSchemaVariant[];
}

export interface DiagramNodeKindComponent {
kind: DiagramKind;
componentId: string;
Expand Down
3 changes: 3 additions & 0 deletions app/web/src/api/sdf/dal/func.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export type FuncArgumentId = string;
export type FuncId = string;

export enum FuncKind {
Action = "Action",
Attribute = "Attribute",
Expand Down
47 changes: 47 additions & 0 deletions app/web/src/api/sdf/dal/schema.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { StandardModel } from "@/api/sdf/dal/standard_model";
import { FuncId } from "@/api/sdf/dal/func";

export enum SchemaKind {
Concept = "concept",
Expand All @@ -15,3 +16,49 @@ export interface Schema extends StandardModel {
}

export type SchemaVariantId = string;
export type SchemaId = string;

export enum ComponentType {
Component = "component",
ConfigurationFrameDown = "configurationFrameDown",
ConfigurationFrameUp = "configurationFrameUp",
AggregationFrame = "aggregationFrame",
}

export type OutputSocketId = string;

export interface OutputSocket {
id: OutputSocketId;
name: string;
}

export type InputSocketId = string;

export interface InputSocket {
id: InputSocketId;
name: string;
}

export interface SchemaVariant {
schemaVariantId: string;
schemaName: string;
displayName: string | null;
category: string;
color: string;
componentType: ComponentType;
link: string | null;
description: string | null;

created_at: IsoDateString;
updated_at: IsoDateString;

version: string;
assetFuncId: FuncId;
funcIds: FuncId[];
isLocked: boolean;

schemaId: SchemaId;

inputSockets: InputSocket[];
outputSockets: OutputSocket[];
}
Loading

0 comments on commit 874540e

Please sign in to comment.