TypeScript API / laikacms/storage / toPublicLock
Function: toPublicLock()
ts
function toPublicLock(lock): object;Strip the bearer token from an owned lock before handing it to a reader.
Parameters
| Parameter | Type |
|---|---|
lock | { acquiredAt: Utc; expiresAt: Utc; key: string; owner: { id: string; name: string; }; token: string & Brand<"LockToken">; } |
lock.acquiredAt | Utc |
lock.expiresAt | Utc |
lock.key | string |
lock.owner | { id: string; name: string; } |
lock.owner.id | string |
lock.owner.name | string |
lock.token | string & Brand<"LockToken"> |
Returns
acquiredAt
ts
readonly acquiredAt: Utc = S.DateTimeUtcFromString;expiresAt
ts
readonly expiresAt: Utc = S.DateTimeUtcFromString;key
ts
readonly key: string = S.String;The document key the lock covers (collection/slug).
owner
ts
readonly owner: object;owner.id
ts
readonly id: string = S.String;owner.name
ts
readonly name: string = S.String;