public DocsDraftsPostRequest(DraftDocumentType type = DraftDocumentType.WYSIWYG, string?title = null, string?text = null, long?textVersion = null, string?folder = null, PublicationDetails?publicationDetails2 = null)
 {
     Title               = title;
     Text                = text;
     TextVersion         = textVersion;
     Type                = type;
     Folder              = folder;
     PublicationDetails2 = publicationDetails2;
 }
 public TextDocument(string id, long resetCounter, DraftDocumentType type, string text, long?version = null, string?model = null)
 {
     Id           = id;
     ResetCounter = resetCounter;
     Version      = version;
     Type         = type;
     Text         = text;
     Model        = model;
 }
 public TextDocument(string id, long resetCounter, DraftDocumentType type, string text, long?version = null, string?model = null, List <AttachmentInfo>?attachments = null)
 {
     Id           = id;
     ResetCounter = resetCounter;
     Version      = version;
     Type         = type;
     Text         = text;
     Model        = model;
     Attachments  = attachments;
 }
            public async Task <DRDraft> CreateDraftAsync(DraftDocumentType type = DraftDocumentType.WYSIWYG, string?title = null, string?text = null, long?textVersion = null, string?folder = null, PublicationDetails?publicationDetails2 = null, Func <Partial <DRDraft>, Partial <DRDraft> >?partial = null, CancellationToken cancellationToken = default)
            {
                var queryParameters = new NameValueCollection();

                queryParameters.Append("$fields", (partial != null ? partial(new Partial <DRDraft>()) : Partial <DRDraft> .Default()).ToString());

                return(await _connection.RequestResourceAsync <DocsDraftsPostRequest, DRDraft>("POST", $"api/http/docs/drafts{queryParameters.ToQueryString()}",
                                                                                               new DocsDraftsPostRequest
                {
                    Title = title,
                    Text = text,
                    TextVersion = textVersion,
                    Type = type,
                    Folder = folder,
                    PublicationDetails2 = publicationDetails2,
                }, cancellationToken));
            }
Exemple #5
0
 public DocumentPublicationItem(string documentId, DraftDocumentType documentType)
 {
     DocumentId   = documentId;
     DocumentType = documentType;
 }