Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22389513
session-id.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
748 B
Referenced Files
None
Subscribers
None
session-id.ts
View Options
import
{
Context
,
Field
}
from
"../../../main.js"
;
import
{
v4
as
uuid
}
from
"uuid"
;
import
{
OpenApiTypes
}
from
"../../../schemas/open-api-types.js"
;
export
default
class
SessionID
extends
Field
<
null
|
string
,
string
>
{
typeName
=
"session-id"
;
open_api_type
=
OpenApiTypes
.
NONE
;
async
isProperValue
()
{
return
Field
.
valid
();
}
async
encode
(
_
:
any
,
input
:
string
|
null
)
:
Promise
<
string
|
null
>
{
if
(
input
===
null
)
{
return
null
;
}
return
input
?
input
:
uuid
();
}
async
getDefaultValue
(
_
:
any
)
{
return
uuid
();
}
async
decode
(
_
:
Context
,
storage_value
:
string
|
null
)
:
Promise
<
string
|
null
>
{
return
storage_value
;
}
getPostgreSqlFieldDefinitions
()
:
string
[]
{
return
[
`"
${
this
.
name
}
" UUID`
];
}
}
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Fri, Nov 27, 15:16 (1 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1212080
Default Alt Text
session-id.ts (748 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline