Skip to content

Commit ccd65e6

Browse files
committed
checkpoint
1 parent 60cabb1 commit ccd65e6

67 files changed

Lines changed: 1087 additions & 247 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

arc/go/graph/pb/graph.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ syntax = "proto3";
44

55
package arc.graph.pb;
66

7-
import "arc/go/ir/pb/ir.proto";
87
import "google/protobuf/struct.proto";
98
import "x/go/spatial/pb/spatial.proto";
9+
import "arc/go/ir/pb/ir.proto";
1010

1111
option go_package = "github.com/synnaxlabs/arc/graph/pb";
1212

client/py/synnax/user/types_gen.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@ def __hash__(self) -> int:
3939
return hash(self.key)
4040

4141

42-
class New(User):
43-
"""New contains parameters for creating a new user."""
44-
45-
# key is an optional key for the user. If not provided, one will be automatically assigned.
46-
key: Key | None = None
47-
# password is the password for the new user account.
48-
password: str = Field(min_length=1)
49-
# first_name is an optional first name.
50-
first_name: str | None = None
51-
# last_name is an optional last name.
52-
last_name: str | None = None
53-
root_user: bool = Field(exclude=True)
54-
55-
5642
ONTOLOGY_TYPE = ID(type="user")
5743

5844

client/ts/src/arc/graph/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const nodeZ = z.object({
2121
/** type is the function type being instantiated. */
2222
type: z.string(),
2323
/** config contains configuration parameter values as a JSON object. */
24-
config: record.nullishToEmpty,
24+
config: record.nullishToEmpty(),
2525
/** position is the canvas position (x, y) for visual layout. */
2626
position: spatial.xyZ,
2727
});

client/ts/src/channel/types.gen.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const payloadZ = z.object({
8989
export interface Payload extends z.infer<typeof payloadZ> {}
9090

9191
export const newZ = payloadZ
92-
.omit({ leaseholder: true, operations: true, concurrency: true })
92+
.omit({ leaseholder: true })
9393
.partial({
9494
key: true,
9595
index: true,
@@ -100,8 +100,6 @@ export const newZ = payloadZ
100100
})
101101
.extend({
102102
leaseholder: zod.uint12.optional(),
103-
operations: zod.nullToUndefined(operationZ.array()),
104-
concurrency: control.concurrencyZ.optional(),
105103
});
106104
export interface New extends z.input<typeof newZ> {}
107105

client/ts/src/device/types.gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// Code generated by Oracle. DO NOT EDIT.
1111

12-
import { type optional, record, status } from "@synnaxlabs/x";
12+
import { caseconv, type optional, record, status } from "@synnaxlabs/x";
1313
import { z } from "zod";
1414

1515
import { ontology } from "@/ontology";
@@ -53,7 +53,7 @@ export const deviceZ = <
5353
model: model ?? z.string().min(1, "Model is required"),
5454
name: z.string().min(1, "Name is required"),
5555
configured: z.boolean().default(false),
56-
properties: properties ?? record.nullishToEmpty,
56+
properties: caseconv.preserveCase(properties ?? record.nullishToEmpty()),
5757
status: statusZ.optional(),
5858
});
5959
export interface Device<
@@ -91,7 +91,7 @@ export const newZ = <
9191
.omit({ properties: true })
9292
.partial({ key: true, configured: true })
9393
.extend({
94-
properties: properties ?? record.nullishToEmpty,
94+
properties: properties ?? record.nullishToEmpty(),
9595
});
9696
export type New<
9797
Properties extends z.ZodType = z.ZodType,

client/ts/src/ontology/payload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const resourceZ = z
101101
.object({
102102
id: idZ,
103103
name: z.string(),
104-
data: record.unknownZ.optional().nullable(),
104+
data: record.unknownZ().optional().nullable(),
105105
})
106106
.transform((resource) => ({ key: idToString(resource.id), ...resource }));
107107
export interface Resource<T extends record.Unknown = record.Unknown> extends Omit<

client/ts/src/task/types.gen.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// Code generated by Oracle. DO NOT EDIT.
1111

12-
import { type optional, record, status, zod } from "@synnaxlabs/x";
12+
import { caseconv, type optional, record, status, zod } from "@synnaxlabs/x";
1313
import { z } from "zod";
1414

1515
import { ontology } from "@/ontology";
@@ -24,7 +24,7 @@ export const statusDetailsZ = <Data extends z.ZodType = z.ZodType>(data?: Data)
2424
task: keyZ,
2525
running: z.boolean(),
2626
cmd: z.string().optional(),
27-
data: data ?? record.nullishToEmpty.optional(),
27+
data: data ?? record.nullishToEmpty().optional(),
2828
});
2929
export interface StatusDetails<Data extends z.ZodType = z.ZodType> {
3030
task: Key;
@@ -38,7 +38,7 @@ export const newStatusDetailsZ = <Data extends z.ZodType = z.ZodType>(data?: Dat
3838
task: keyZ.optional(),
3939
running: z.boolean(),
4040
cmd: z.string().optional(),
41-
data: data ?? record.nullishToEmpty,
41+
data: data ?? record.nullishToEmpty(),
4242
});
4343
export type NewStatusDetails<Data extends z.ZodType = z.ZodType> = z.infer<
4444
ReturnType<typeof newStatusDetailsZ<Data>>
@@ -53,7 +53,7 @@ export const commandZ = z.object({
5353
/** key is a unique identifier for this command instance. */
5454
key: z.string(),
5555
/** args contains optional arguments for the command. */
56-
args: zod.nullToUndefined(record.unknownZ),
56+
args: zod.nullToUndefined(record.unknownZ()),
5757
});
5858
export interface Command extends z.infer<typeof commandZ> {}
5959

@@ -88,7 +88,7 @@ export const payloadZ = <
8888
key: keyZ,
8989
name: z.string(),
9090
type: type ?? z.string(),
91-
config: config ?? record.nullishToEmpty,
91+
config: caseconv.preserveCase(config ?? record.nullishToEmpty()),
9292
internal: z.boolean().optional(),
9393
snapshot: z.boolean().optional(),
9494
status: status.statusZ({ details: statusDetailsZ(statusData) }).optional(),
@@ -123,11 +123,11 @@ export const newZ = <
123123
StatusData extends z.ZodType = z.ZodType,
124124
>({ type, config, statusData }: NewSchemas<Type, Config, StatusData> = {}) =>
125125
payloadZ({ type, config, statusData })
126-
.omit({ internal: true, snapshot: true, config: true, status: true })
126+
.omit({ internal: true, snapshot: true, status: true, config: true })
127127
.partial({ key: true })
128128
.extend({
129-
config: config ?? record.nullishToEmpty,
130129
status: status.newZ({ details: newStatusDetailsZ(statusData) }).optional(),
130+
config: config ?? record.nullishToEmpty(),
131131
});
132132
export type New<
133133
Type extends z.ZodType<string> = z.ZodString,
@@ -136,12 +136,12 @@ export type New<
136136
> = optional.Optional<
137137
Omit<
138138
Payload<Type, Config, StatusData>,
139-
"internal" | "snapshot" | "config" | "status"
139+
"internal" | "snapshot" | "status" | "config"
140140
>,
141141
"key"
142142
> & {
143-
config: z.infer<Config>;
144143
status?: NewStatus<StatusData>;
144+
config: z.infer<Config>;
145145
};
146146

147147
export const ontologyID = ontology.createIDFactory<Key>("task");

client/ts/src/util/decodeJSONString.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
import { binary, record } from "@synnaxlabs/x";
1111

1212
export const decodeJSONString = (s: string): record.Unknown =>
13-
s ? binary.JSON_CODEC.decodeString(s, record.unknownZ) : {};
13+
s ? binary.JSON_CODEC.decodeString(s, record.unknownZ()) : {};

client/ts/src/view/types.gen.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ export const viewZ = z.object({
2626
/** type is the view type identifier (e.g., 'lineplot', 'table', 'schematic'). */
2727
type: z.string(),
2828
/** query is a type-agnostic JSON object containing view-specific configuration and query parameters. */
29-
query: record.nullishToEmpty,
29+
query: record.nullishToEmpty(),
3030
});
3131
export interface View extends z.infer<typeof viewZ> {}
3232

33-
export const newZ = viewZ.omit({ query: true }).partial({ key: true }).extend({
34-
query: record.nullishToEmpty,
35-
});
33+
export const newZ = viewZ.partial({ key: true });
3634
export interface New extends z.input<typeof newZ> {}
3735

3836
export const ontologyID = ontology.createIDFactory<Key>("view");

client/ts/src/workspace/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const createReqZ = z.object({ workspaces: newZ.array() });
3737
const renameReqZ = z.object({ key: keyZ, name: z.string() });
3838
const setLayoutReqZ = z.object({
3939
key: keyZ,
40-
layout: record.unknownZ,
40+
layout: record.unknownZ(),
4141
});
4242
const deleteReqZ = z.object({ keys: keyZ.array() });
4343

0 commit comments

Comments
 (0)