You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 24, 2020. It is now read-only.
-`<SDKGEN FILE>`: .sdkgen file containing the API contract, check the next section to see more details about the syntax;
21
+
-`<OUTPUT FILE>`: filename for the generated file;
22
+
-`<TARGET>`: the target platform for where you are generating the sdk. Options avaiable are:
23
+
-`java_android`
24
+
-`kt_android`
25
+
-`swift_ios`
26
+
-`typescript_nodeclient`
27
+
-`typescript_nodeserver`
28
+
-`typescript_servertest`
29
+
-`typescript_web`
30
+
31
+
## Syntax
32
+
33
+
The .sdkgen file is responsible for declaring the API contract and for that purpose it implements the following syntax:
34
+
35
+
```
36
+
type Message {
37
+
date: date
38
+
author: User
39
+
mentions: User[]
40
+
text: string?
41
+
}
42
+
43
+
// Sends a message, returns nothing
44
+
function sendMessage(target: string, message: Message): void
45
+
```
46
+
47
+
The primitive types available are:
48
+
49
+
-`bool`: Either `true` or `false`
50
+
-`int`: an integer from -2147483648 to 2147483647
51
+
-`uint`: a positive integer, from 0 to 4294967295
52
+
-`float`: a floating-point number, equivalent to a `double` or `float64` from other languages
53
+
-`string`: an UTF-8 encoded sequence of characters. This is not meant to store binary data, only printable/readable characters. There is a soft limit of 65535 chars in a string.
54
+
-`date`: A point in time with millisecond precision. Timezone information is not preserved and will be converted to the local timezone of the receiver always.
55
+
-`bytes`: Arbitrary binary data.
56
+
-`void`: Special type that means the lack of value. Can only be used as the return type of a `function` operation (more on that later)
57
+
58
+
You can check the complete description on [language.md](../blob/master/language.md).
0 commit comments