Current version : 0.30.0
Made in 🇫🇷 ◌ GitHubNPM

Data Types

Referential of all the data types provided out of the box by libmodulor

If none of them fit what you're building, you can create your own.

Base

Base data types are "generic". Except in some cases, it's not recommended to use them directly in use cases, as they lack semantic meaning. Instead, you should extend them to create "final" data types.

#NameHTML Input TypeRN Input ModeJSON SchemaExampleFormattedSource
0Booleancheckboxtext{"type":"boolean"}trueYSource
1Intnumbernumeric{"type":"integer"}11Source
2Numbernumberdecimal{"type":"number"}11Source
3Objecttexttext{"additionalProperties":false,"properties":{},"type":"object"}{}{}Source
4Stringtexttext{"type":"string"}MiamiMiamiSource
5UIntnumbernumeric{"type":"integer"}11Source

Final

Final data types represent real life concepts. They extend directly or indirectly base data types.

This list is naturally not exhaustive and data types are regularly created to fit new use cases.

#NameHTML Input TypeRN Input ModeJSON SchemaExampleFormattedSource
0Addresstexttext{"type":"string"}55 Rue du Faubourg Saint-Honoré, 75008 Paris55 Rue du Faubourg Saint-Honoré, 75008 ParisSource
1Amountnumberdecimal{"type":"number"}999.99€999.99Source
2ApiKeypasswordtext{"format":"password","type":"string"}pk_bxa2HCdsT7CKwVSdem8fjS8rWpk_bxa2HCdsT7CKwVSdem8fjS8rWSource
3BarCodetexttext{"type":"string"}30469200297593046920029759Source
4CSStexttext{"type":"string"}body { font-size: 30px; }body { font-size: 30px; }Source
5Colorcolortext{"type":"string"}#000000#000000Source
6ColorRGBAcolortext{"type":"string"}#000000ff#000000ffSource
7CompanyNametexttext{"type":"string"}GoogleGoogleSource
8CountryISO3166Alpha2texttext{"type":"string"}FRFRSource
9CurrencyISO4217texttext{"type":"string"}EUREURSource
10DateISO8601datetext{"format":"date","type":"string"}2022-07-147/14/2022Source
11DateTimeFormattexttext{"type":"string"}ccc LLL ddccc LLL ddSource
12DirPathtexttext{"type":"string"}/Users/dexter/Desktop/Users/dexter/DesktopSource
13DomainNameurlurl{"format":"hostname","type":"string"}myservice.toto.commyservice.toto.comSource
14Emailemailemail{"format":"email","type":"string"}dexter@caramail.comdexter@caramail.comSource
15EmbeddedObjecttexttext{"additionalProperties":false,"properties":{},"type":"object"}{}{}Source
16Emojitexttext{"type":"string"}🚀🚀Source
17EncryptionKeypasswordtext{"format":"password","type":"string"}39b65c8b58140bed54c8b9a170f378644f128744a9711ef268ce561a360eb2eee6dbd2fd1ce7a743167e0cff5d7ca13cbdd2bded2b72c58d30caed990c3e04b639b65c8b58140bed54c8b9a170f378644f128744a9711ef268ce561a360eb2eee6dbd2fd1ce7a743167e0cff5d7ca13cbdd2bded2b72c58d30caed990c3e04b6Source
18ErrorCodetexttext{"type":"string"}err_forbiddenerr_forbiddenSource
19ErrorMessagetexttext{"type":"string"}You are not allowed to access this resourceYou are not allowed to access this resourceSource
20ExternalServiceIdtexttext{"type":"string"}ZNHD34AQW4CV7ZNHD34AQW4CV7Source
21Filefiletext{"format":"binary","type":"string"}{"name":"picture.png","size":32,"type":"image/png","uri":"/Users/dexter/Desktop/picture.png"}{"name":"picture.png","size":32,"type":"image/png","uri":"/Users/dexter/Desktop/picture.png"}Source
22FileExtensiontexttext{"type":"string"}pngpngSource
23FileMimeTypetexttext{"type":"string"}image/pngimage/pngSource
24FileNametexttext{"type":"string"}picture.pngpicture.pngSource
25FilePathtexttext{"type":"string"}/Users/dexter/Desktop/picture.png/Users/dexter/Desktop/picture.pngSource
26FreeTextLongtexttext{"type":"string"}On est jeunes et ambitieux. Parfois vicieux. Faut qu'tu te dises que. Tu peux être le prince de la ville si tu veux (si tu veux). Où tu veux (où tu veux) quand tu veux (quand tu veux).On est jeunes et ambitieux. Parfois vicieux. Faut qu'tu te dises que. Tu peux être le prince de la ville si tu veux (si tu veux). Où tu veux (où tu veux) quand tu veux (quand tu veux).Source
27FreeTextShorttexttext{"type":"string"}PapillonPapillonSource
28Geolocationtexttext{"additionalProperties":false,"properties":{"lat":{"type":"number"},"lng":{"type":"number"}},"type":"object"}{"lat":0,"lng":0}{"lat":0,"lng":0}Source
29GitSSHURLtexttext{"type":"string"}git@github.com:nodejs/node.gitgit@github.com:nodejs/node.gitSource
30HTMLtexttext{"type":"string"}<p>This is a paragraph</p><p>This is a paragraph</p>Source
31HTTPContentTypetexttext{"type":"string"}application/jsonapplication/jsonSource
32HTTPMethodtexttext{"type":"string"}GETGETSource
33HTTPStatusNumbernumbernumeric{"type":"integer"}201201Source
34HostAddresstexttext{"type":"string"}123.45.67.89123.45.67.89Source
35HostPortnumbernumeric{"type":"integer"}443443Source
36IPv4texttext{"format":"ipv4","type":"string"}255.255.255.255255.255.255.255Source
37IPv6texttext{"format":"ipv6","type":"string"}2001:0db8:85a3:0000:0000:8a2e:0370:73342001:0db8:85a3:0000:0000:8a2e:0370:7334Source
38JSONStringtexttext{"type":"string"}{"key": "value"}{"key": "value"}Source
39JWTpasswordtext{"format":"password","type":"string"}eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5ceyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cSource
40JavaScripttexttext{"type":"string"}(()=>{})();(()=>{})();Source
41JobTitletexttext{"type":"string"}Senior Software EngineerSenior Software EngineerSource
42Markdowntexttext{"type":"string"}**Some important stuff****Some important stuff**Source
43NumIndexnumbernumeric{"type":"integer"}00Source
44Passwordpasswordtext{"format":"password","type":"string"}fmUUNWXazWH4fmUUNWXazWH4Source
45Percentagenumberdecimal{"type":"number"}0.2626%Source
46PersonFirstnametexttext{"type":"string"}DexterDexterSource
47PersonFullnametexttext{"type":"string"}Dexter MorganDexter MorganSource
48PersonInitialstexttext{"type":"string"}DMDMSource
49PersonLastnametexttext{"type":"string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aje5ErF8ERvoioG1ZtcqRjuqBiu9CaqYlAVg+pNVMVwR2+iKoZ3OpiJg5k4mIkXX9abqIrhSm+iKgbVm3xTb6IqBtWbqIrhSm9ypWK40puoiuGJg5k4mImDmXjxZhWD6k1UxaB6kysVwzv1JlcqBtWbqIpB9SZPVAx3VAyqN3mng5k4mImDmXjxUG9ypWJQvckdvYmqGK5UDKo3URXDHRXDlYpB9SaqN1EVg+pNVMWgepNvOpiJg5k4mIkXb1YxqN5EVQyqN7lSMajeRFUMT/Qmd1QMVyqGK72JqhhUb6IqBtWbqIrhnQ5m4mAmDmbixYdVDE/0JqpiUL3JExWD6k2u9CZ3VAxXepMnehNVMTxxMBMHM3EwEy++rDdRFYPqTVTFoHoTVTFc6U2u9CZXKgbVm3xSxXClYlC9yTsdzMTBTBzMxIsP601UxaB6kyu9iaoYVG/yThWD6k2e6E2e6E1UxaAqhnc6mImDmTiYiR8/f+EP1pvcUTE80ZtcqRju6E2uVAzfdDATBzNxMBMvHupNvqliUBXDHb3JlYrhSsWgepMrvYmqGK5UDKo3uaNieOJgJg5m4mAmXrxZxfBOvcmV3kRVDHdUDFd6E1Ux3FEx3NGbqIrhmw5m4mAmDmbixYf1JndUDL+TikH1Jld6kycqBtWbqIpB9SaqYnjiYCYOZuJgJl785XoTVTGo3uSJikH1JlcqBtWbqN7kSm/ySQczcTATBzPx4i/Tm6iK4UrFoHqTKxWD6k1UxXBHxaB6kysVg+pN3ulgJg5m4mAmXnxYxfBJFcMTvcmVikH1Jld6k3eqGL7pYCYOZuJgJl68WW/yTb3JHRXDlYpB9SaqYrjSm6iKQfUmd/Qm33QwEwczcTATP37+gtm/DmbiYCYOZuJgJg5m4mAmDmbiYCYOZuJgJg5m4mAmDmbiYCYOZuIfrRmHZL9VL3gAAAAASUVORK5CYII=Source
51SQLQuerytexttext{"type":"string"}select id, name from users limit 10;select id, name from users limit 10;Source
52SSHPrivateKeypasswordtext{"format":"password","type":"string"}-----BEGIN RSA PRIVATE KEY-----\nfhdsjkdsFDSFDSfgjfkhdsjf\n-----END RSA PRIVATE KEY----------BEGIN RSA PRIVATE KEY-----\nfhdsjkdsFDSFDSfgjfkhdsjf\n-----END RSA PRIVATE KEY-----Source
53SSHPublicKeytexttext{"type":"string"}ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG1G1clVyaD6+RGzzPAbyHEiRZQ/+xkSXblmZIOHgY7Essh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG1G1clVyaD6+RGzzPAbyHEiRZQ/+xkSXblmZIOHgY7ESource
54SearchQuerysearchsearch{"type":"string"}Nike StreakflyNike StreakflySource
55SemVerVersiontexttext{"type":"string"}1.2.31.2.3Source
56ShellCommandtexttext{"type":"string"}sudo systemctl restart nginxsudo systemctl restart nginxSource
57Slugtexttext{"type":"string"}title-of-seo-friendly-articletitle-of-seo-friendly-articleSource
58Timetimenumeric{"format":"time","type":"string"}10:0010:00Source
59Timestampnumbernumeric{"type":"integer"}16283592091628359209Source
60TransportTypetexttext{"type":"string"}standardstandardSource
61UIntDurationnumbernumeric{"type":"integer"}36003,600Source
62UIntQuantitynumbernumeric{"type":"integer"}1010Source
63URLurlurl{"format":"uri","type":"string"}ExampleFormattedSource
64URLPathtexttext{"type":"string"}/posts/1/posts/1Source
65UUIDtexttext{"type":"string"}dd9670e7-1dd5-4155-85c2-335714799ff7dd9670e7-1dd5-4155-85c2-335714799ff7Source
66Usernametexttext{"type":"string"}dmorgandmorganSource
67Yearnumbernumeric{"type":"integer"}20252025Source
68YesNotexttext{"type":"string"}YYSource