Files
outline/app/models/Share.ts
Apoorv Mishra 79829a3129 Ability to create share url slug (#4550)
* feat: share url slug

* feat: add col urlId

* feat: allow updating urlId

* fix: typo

* fix: migrations

* fix: urlId model validation

* fix: input label

* fix: debounce slug request

* feat: link preview

* fix: send slug variant in response if available

* fix: temporary redirect to slug variant if available

* fix: move up the custom link field

* fix: process and display backend err

* fix: reset custom link state on popover close and remove isCopied

* fix: document link preview

* fix: set urlId when available

* fix: keep unique(urlId, teamId)

* fix: codeql

* fix: get rid of preview type

* fix: width not needed for block elem

* fix: migrations

* fix: array not required

* fix: use val

* fix: validation on shareId and test

* fix: allow clearing urlId

* fix: do not escape

* fix: unique error text

* fix: keep team
2022-12-13 17:26:36 -08:00

39 lines
557 B
TypeScript

import { observable } from "mobx";
import BaseModel from "./BaseModel";
import User from "./User";
import Field from "./decorators/Field";
class Share extends BaseModel {
@Field
@observable
id: string;
@Field
@observable
published: boolean;
@Field
@observable
includeChildDocuments: boolean;
@Field
@observable
documentId: string;
@Field
@observable
urlId: string;
documentTitle: string;
documentUrl: string;
lastAccessedAt: string | null | undefined;
url: string;
createdBy: User;
}
export default Share;