mirror of
https://github.com/versia-pub/docs.git
synced 2026-03-13 19:09:16 +01:00
docs: 📝 Add documentation for entities
This commit is contained in:
parent
76d28e04a3
commit
0234304198
4 changed files with 136 additions and 12 deletions
45
app/types/page.mdx
Normal file
45
app/types/page.mdx
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
|
||||
## ISO8601
|
||||
|
||||
```typescript
|
||||
type Year = `${number}${number}${number}${number}`;
|
||||
type Month = `${"0" | "1"}${number}`;
|
||||
type Day = `${"0" | "1" | "2" | "3"}${number}`;
|
||||
|
||||
type DateString = `${Year}-${Month}-${Day}`;
|
||||
|
||||
type Hour = `${"0" | "1" | "2"}${number}`;
|
||||
type Minute = `${"0" | "1" | "2" | "3" | "4" | "5"}${number}`;
|
||||
type Second = `${"0" | "1" | "2" | "3" | "4" | "5"}${number}`;
|
||||
|
||||
type TimeString = `${Hour}:${Minute}:${Second}`;
|
||||
|
||||
type Offset = `${"Z" | "+" | "-"}${Hour}:${Minute}`;
|
||||
|
||||
type ISO8601 = `${DateString}T${TimeString}${Offset}`;
|
||||
```
|
||||
|
||||
## UUID
|
||||
|
||||
```typescript
|
||||
type UUID = `${number}-${number}-${number}-${number}-${number}`;
|
||||
```
|
||||
|
||||
## URI
|
||||
|
||||
```typescript
|
||||
type URI = string;
|
||||
```
|
||||
|
||||
## Extensions
|
||||
|
||||
```typescript
|
||||
type OrgNamespace = string;
|
||||
type ExtensionName = string;
|
||||
|
||||
type ExtensionsKey = `${OrgNamespace}:${ExtensionName}`;
|
||||
|
||||
type Extensions = {
|
||||
[key in ExtensionsKey]: any;
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue