Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 36b33f9

Browse files
committed
fix: capitalization of models module
1 parent 79c01b0 commit 36b33f9

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

polyproto/chat/models/errors.tsp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import "./main.tsp";
2+
3+
namespace polyproto.chat.models.errors;

polyproto/chat/models/main.tsp

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
namespace polyproto.chat.Models {
2-
namespace Channel {
1+
import "./errors.tsp";
2+
import "../main.tsp";
3+
4+
using Versioning;
5+
6+
namespace polyproto.chat.models {
7+
namespace channel {
8+
@added(Version.`v0.1.0-alpha.0`)
39
model Channel {
410
id: string;
511
data: ChannelData | Encrypted<ChannelData>;
612
}
13+
@added(Version.`v0.1.0-alpha.0`)
714
model ChannelData {
815
parent_id: string;
916
type: uint8;
@@ -13,12 +20,16 @@ namespace polyproto.chat.Models {
1320
permissions: string;
1421
}
1522

23+
@added(Version.`v0.1.0-alpha.0`)
1624
enum ChannelType {
1725
Regular: 1,
26+
Thread: 2,
27+
Forum: 3,
1828
}
1929
}
2030

21-
namespace Guild {
31+
namespace guild {
32+
@added(Version.`v0.1.0-alpha.0`)
2233
model Guild {
2334
id: string;
2435
display_name: string;
@@ -29,7 +40,8 @@ namespace polyproto.chat.Models {
2940
}
3041
}
3142

32-
namespace Message {
43+
namespace message {
44+
@added(Version.`v0.1.0-alpha.0`)
3345
model Message {
3446
version: uint64;
3547
uid: string;
@@ -42,11 +54,13 @@ namespace polyproto.chat.Models {
4254
signature: string;
4355
}
4456

57+
@added(Version.`v0.1.0-alpha.0`)
4558
model Reaction {
4659
emoji: string;
4760
fid: string;
4861
}
4962

63+
@added(Version.`v0.1.0-alpha.0`)
5064
model Embed {
5165
title: string;
5266
subtitle?: string;
@@ -56,7 +70,8 @@ namespace polyproto.chat.Models {
5670
}
5771
}
5872

59-
namespace Actor {
73+
namespace actor {
74+
@added(Version.`v0.1.0-alpha.0`)
6075
model Actor {
6176
fid: string;
6277
display_name?: string;
@@ -68,6 +83,7 @@ namespace polyproto.chat.Models {
6883
timezone?: string;
6984
}
7085

86+
@added(Version.`v0.1.0-alpha.0`)
7187
enum Availability {
7288
InvisibleOffline: 0,
7389
Online: 1,
@@ -76,6 +92,9 @@ namespace polyproto.chat.Models {
7692
}
7793
}
7894

95+
@added(Version.`v0.1.0-alpha.0`)
96+
// TODO: This is likely wrong? Encrypted data can only be parsed
97+
// when... it is unencrypted, so data: T likely makes no sense...
7998
model Encrypted<T> {
8099
data: T;
81100
mls_epoch_number: uint64;

0 commit comments

Comments
 (0)