Skip to content

Commit 1d506e7

Browse files
authored
chore: remove queryBuilder (#445)
1 parent 4c70ac5 commit 1d506e7

File tree

20 files changed

+1285
-1567
lines changed

20 files changed

+1285
-1567
lines changed

examples/example-node-worker/src/typescript/models.gen.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,76 +8,76 @@ import {
88
} from "starknet";
99

1010
// Type definition for `dojo_starter::models::DirectionsAvailable` struct
11-
export interface DirectionsAvailable {
11+
export type DirectionsAvailable = {
1212
player: string;
1313
directions: Array<DirectionEnum>;
14-
}
14+
};
1515

1616
// Type definition for `dojo_starter::models::DirectionsAvailableValue` struct
17-
export interface DirectionsAvailableValue {
17+
export type DirectionsAvailableValue = {
1818
directions: Array<DirectionEnum>;
19-
}
19+
};
2020

2121
// Type definition for `dojo_starter::models::Moves` struct
22-
export interface Moves {
22+
export type Moves = {
2323
player: string;
2424
remaining: BigNumberish;
2525
last_direction: CairoOption<DirectionEnum>;
2626
can_move: boolean;
27-
}
27+
};
2828

2929
// Type definition for `dojo_starter::models::MovesValue` struct
30-
export interface MovesValue {
30+
export type MovesValue = {
3131
remaining: BigNumberish;
3232
last_direction: CairoOption<DirectionEnum>;
3333
can_move: boolean;
34-
}
34+
};
3535

3636
// Type definition for `dojo_starter::models::Position` struct
37-
export interface Position {
37+
export type Position = {
3838
player: string;
3939
vec: Vec2;
40-
}
40+
};
4141

4242
// Type definition for `dojo_starter::models::PositionCount` struct
43-
export interface PositionCount {
43+
export type PositionCount = {
4444
identity: string;
4545
positition: Array<[BigNumberish, BigNumberish]>;
46-
}
46+
};
4747

4848
// Type definition for `dojo_starter::models::PositionCountValue` struct
49-
export interface PositionCountValue {
49+
export type PositionCountValue = {
5050
positition: Array<[BigNumberish, BigNumberish]>;
51-
}
51+
};
5252

5353
// Type definition for `dojo_starter::models::PositionValue` struct
54-
export interface PositionValue {
54+
export type PositionValue = {
5555
vec: Vec2;
56-
}
56+
};
5757

5858
// Type definition for `dojo_starter::models::Vec2` struct
59-
export interface Vec2 {
59+
export type Vec2 = {
6060
x: BigNumberish;
6161
y: BigNumberish;
62-
}
62+
};
6363

6464
// Type definition for `dojo_starter::systems::actions::actions::Moved` struct
65-
export interface Moved {
65+
export type Moved = {
6666
player: string;
6767
direction: DirectionEnum;
68-
}
68+
};
6969

7070
// Type definition for `dojo_starter::systems::actions::actions::MovedValue` struct
71-
export interface MovedValue {
71+
export type MovedValue = {
7272
direction: DirectionEnum;
73-
}
73+
};
7474

7575
// Type definition for `dojo_starter::models::Direction` enum
7676
export const direction = ["Left", "Right", "Up", "Down"] as const;
7777
export type Direction = { [key in (typeof direction)[number]]: string };
7878
export type DirectionEnum = CairoCustomEnum;
7979

80-
export interface SchemaType extends ISchemaType {
80+
export type SchemaType = ISchemaType & {
8181
dojo_starter: {
8282
DirectionsAvailable: DirectionsAvailable;
8383
DirectionsAvailableValue: DirectionsAvailableValue;

examples/example-predeployed-connector/src/typescript/models.gen.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,58 +8,58 @@ import {
88
} from "starknet";
99

1010
// Type definition for `dojo_starter::models::DirectionsAvailable` struct
11-
export interface DirectionsAvailable {
11+
export type DirectionsAvailable = {
1212
player: string;
1313
directions: Array<DirectionEnum>;
14-
}
14+
};
1515

1616
// Type definition for `dojo_starter::models::DirectionsAvailableValue` struct
17-
export interface DirectionsAvailableValue {
17+
export type DirectionsAvailableValue = {
1818
directions: Array<DirectionEnum>;
19-
}
19+
};
2020

2121
// Type definition for `dojo_starter::models::Moves` struct
22-
export interface Moves {
22+
export type Moves = {
2323
player: string;
2424
remaining: BigNumberish;
2525
last_direction: CairoOption<DirectionEnum>;
2626
can_move: boolean;
27-
}
27+
};
2828

2929
// Type definition for `dojo_starter::models::MovesValue` struct
30-
export interface MovesValue {
30+
export type MovesValue = {
3131
remaining: BigNumberish;
3232
last_direction: CairoOption<DirectionEnum>;
3333
can_move: boolean;
34-
}
34+
};
3535

3636
// Type definition for `dojo_starter::models::Position` struct
37-
export interface Position {
37+
export type Position = {
3838
player: string;
3939
vec: Vec2;
40-
}
40+
};
4141

4242
// Type definition for `dojo_starter::models::PositionValue` struct
43-
export interface PositionValue {
43+
export type PositionValue = {
4444
vec: Vec2;
45-
}
45+
};
4646

4747
// Type definition for `dojo_starter::models::Vec2` struct
48-
export interface Vec2 {
48+
export type Vec2 = {
4949
x: BigNumberish;
5050
y: BigNumberish;
51-
}
51+
};
5252

5353
// Type definition for `dojo_starter::systems::actions::actions::Moved` struct
54-
export interface Moved {
54+
export type Moved = {
5555
player: string;
5656
direction: DirectionEnum;
57-
}
57+
};
5858

5959
// Type definition for `dojo_starter::systems::actions::actions::MovedValue` struct
60-
export interface MovedValue {
60+
export type MovedValue = {
6161
direction: DirectionEnum;
62-
}
62+
};
6363

6464
// Type definition for `dojo_starter::models::Direction` enum
6565
export type Direction = {
@@ -70,7 +70,7 @@ export type Direction = {
7070
};
7171
export type DirectionEnum = CairoCustomEnum;
7272

73-
export interface SchemaType extends ISchemaType {
73+
export type SchemaType = ISchemaType & {
7474
dojo_starter: {
7575
DirectionsAvailable: DirectionsAvailable;
7676
DirectionsAvailableValue: DirectionsAvailableValue;
@@ -82,7 +82,7 @@ export interface SchemaType extends ISchemaType {
8282
Moved: Moved;
8383
MovedValue: MovedValue;
8484
};
85-
}
85+
};
8686
export const schema: SchemaType = {
8787
dojo_starter: {
8888
DirectionsAvailable: {

examples/example-vite-experimental-sdk/src/typescript/models.gen.ts

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,61 +7,59 @@ import {
77
BigNumberish,
88
} from "starknet";
99

10-
type WithFieldOrder<T> = T & { fieldOrder: string[] };
11-
1210
// Type definition for `dojo_starter::models::DirectionsAvailable` struct
13-
export interface DirectionsAvailable {
11+
export type DirectionsAvailable = {
1412
player: string;
1513
directions: Array<DirectionEnum>;
16-
}
14+
};
1715

1816
// Type definition for `dojo_starter::models::DirectionsAvailableValue` struct
19-
export interface DirectionsAvailableValue {
17+
export type DirectionsAvailableValue = {
2018
directions: Array<DirectionEnum>;
21-
}
19+
};
2220

2321
// Type definition for `dojo_starter::models::Moves` struct
24-
export interface Moves {
22+
export type Moves = {
2523
player: string;
2624
remaining: BigNumberish;
2725
last_direction: CairoOption<DirectionEnum>;
2826
can_move: boolean;
29-
}
27+
};
3028

3129
// Type definition for `dojo_starter::models::MovesValue` struct
32-
export interface MovesValue {
30+
export type MovesValue = {
3331
remaining: BigNumberish;
3432
last_direction: CairoOption<DirectionEnum>;
3533
can_move: boolean;
36-
}
34+
};
3735

3836
// Type definition for `dojo_starter::models::Position` struct
39-
export interface Position {
37+
export type Position = {
4038
player: string;
4139
vec: Vec2;
42-
}
40+
};
4341

4442
// Type definition for `dojo_starter::models::PositionValue` struct
45-
export interface PositionValue {
43+
export type PositionValue = {
4644
vec: Vec2;
47-
}
45+
};
4846

4947
// Type definition for `dojo_starter::models::Vec2` struct
50-
export interface Vec2 {
48+
export type Vec2 = {
5149
x: BigNumberish;
5250
y: BigNumberish;
53-
}
51+
};
5452

5553
// Type definition for `dojo_starter::systems::actions::actions::Moved` struct
56-
export interface Moved {
54+
export type Moved = {
5755
player: string;
5856
direction: DirectionEnum;
59-
}
57+
};
6058

6159
// Type definition for `dojo_starter::systems::actions::actions::MovedValue` struct
62-
export interface MovedValue {
60+
export type MovedValue = {
6361
direction: DirectionEnum;
64-
}
62+
};
6563

6664
// Type definition for `dojo_starter::models::Direction` enum
6765
export type Direction = {
@@ -72,23 +70,22 @@ export type Direction = {
7270
};
7371
export type DirectionEnum = CairoCustomEnum;
7472

75-
export interface SchemaType extends ISchemaType {
73+
export type SchemaType = ISchemaType & {
7674
dojo_starter: {
77-
DirectionsAvailable: WithFieldOrder<DirectionsAvailable>;
78-
DirectionsAvailableValue: WithFieldOrder<DirectionsAvailableValue>;
79-
Moves: WithFieldOrder<Moves>;
80-
MovesValue: WithFieldOrder<MovesValue>;
81-
Position: WithFieldOrder<Position>;
82-
PositionValue: WithFieldOrder<PositionValue>;
83-
Vec2: WithFieldOrder<Vec2>;
84-
Moved: WithFieldOrder<Moved>;
85-
MovedValue: WithFieldOrder<MovedValue>;
75+
DirectionsAvailable: DirectionsAvailable;
76+
DirectionsAvailableValue: DirectionsAvailableValue;
77+
Moves: Moves;
78+
MovesValue: MovesValue;
79+
Position: Position;
80+
PositionValue: PositionValue;
81+
Vec2: Vec2;
82+
Moved: Moved;
83+
MovedValue: MovedValue;
8684
};
87-
}
85+
};
8886
export const schema: SchemaType = {
8987
dojo_starter: {
9088
DirectionsAvailable: {
91-
fieldOrder: ["player", "directions"],
9289
player: "",
9390
directions: [
9491
new CairoCustomEnum({
@@ -100,7 +97,6 @@ export const schema: SchemaType = {
10097
],
10198
},
10299
DirectionsAvailableValue: {
103-
fieldOrder: ["directions"],
104100
directions: [
105101
new CairoCustomEnum({
106102
Left: "",
@@ -111,34 +107,28 @@ export const schema: SchemaType = {
111107
],
112108
},
113109
Moves: {
114-
fieldOrder: ["player", "remaining", "last_direction", "can_move"],
115110
player: "",
116111
remaining: 0,
117112
last_direction: new CairoOption(CairoOptionVariant.None),
118113
can_move: false,
119114
},
120115
MovesValue: {
121-
fieldOrder: ["remaining", "last_direction", "can_move"],
122116
remaining: 0,
123117
last_direction: new CairoOption(CairoOptionVariant.None),
124118
can_move: false,
125119
},
126120
Position: {
127-
fieldOrder: ["player", "vec"],
128121
player: "",
129122
vec: { x: 0, y: 0 },
130123
},
131124
PositionValue: {
132-
fieldOrder: ["vec"],
133125
vec: { x: 0, y: 0 },
134126
},
135127
Vec2: {
136-
fieldOrder: ["x", "y"],
137128
x: 0,
138129
y: 0,
139130
},
140131
Moved: {
141-
fieldOrder: ["player", "direction"],
142132
player: "",
143133
direction: new CairoCustomEnum({
144134
Left: "",
@@ -148,7 +138,6 @@ export const schema: SchemaType = {
148138
}),
149139
},
150140
MovedValue: {
151-
fieldOrder: ["direction"],
152141
direction: new CairoCustomEnum({
153142
Left: "",
154143
Right: undefined,

0 commit comments

Comments
 (0)