Documentation
¶
Overview ¶
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
Index ¶
- type AddExpectedSignerRequest
- type CSVPreviewResponse
- type CreateWebhookRequest
- type DocumentResponse
- type DocumentStatsResponse
- type DocumentStatusResponse
- type ExpectedSignerResponse
- type Handler
- func (h *Handler) HandleAddExpectedSigner(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleDeleteDocument(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleGetDocument(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleGetDocumentStatus(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleGetDocumentWithSigners(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleGetReminderHistory(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleImportSigners(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleListDocuments(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandlePreviewCSV(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleRemoveExpectedSigner(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleSendReminders(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleUpdateDocumentMetadata(w http.ResponseWriter, r *http.Request)
- type ImportSignerEntry
- type ImportSignersRequest
- type ImportSignersResponse
- type ReminderLogResponse
- type ReminderStatsResponse
- type SendRemindersRequest
- type UnexpectedSignatureResponse
- type UpdateDocumentMetadataRequest
- type WebhooksHandler
- func (h *WebhooksHandler) HandleCreateWebhook(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleDeleteWebhook(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleGetWebhook(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleListDeliveries(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleListWebhooks(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleToggleWebhook(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleUpdateWebhook(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddExpectedSignerRequest ¶
type AddExpectedSignerRequest struct {
Email string `json:"email"`
Name string `json:"name"`
Notes *string `json:"notes,omitempty"`
}
AddExpectedSignerRequest represents the request body for adding an expected signer
type CSVPreviewResponse ¶
type CSVPreviewResponse struct {
Signers []services.CSVSignerEntry `json:"signers"`
Errors []services.CSVParseError `json:"errors"`
TotalLines int `json:"totalLines"`
ValidCount int `json:"validCount"`
InvalidCount int `json:"invalidCount"`
HasHeader bool `json:"hasHeader"`
ExistingEmails []string `json:"existingEmails"`
MaxSigners int `json:"maxSigners"`
}
CSVPreviewResponse represents the response for CSV preview
type CreateWebhookRequest ¶
type DocumentResponse ¶
type DocumentResponse struct {
DocID string `json:"docId"`
Title string `json:"title"`
URL string `json:"url"`
Checksum string `json:"checksum,omitempty"`
ChecksumAlgorithm string `json:"checksumAlgorithm,omitempty"`
Description string `json:"description"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
CreatedBy string `json:"createdBy"`
}
DocumentResponse represents a document in API responses
type DocumentStatsResponse ¶
type DocumentStatsResponse struct {
DocID string `json:"docId"`
ExpectedCount int `json:"expectedCount"`
SignedCount int `json:"signedCount"`
PendingCount int `json:"pendingCount"`
CompletionRate float64 `json:"completionRate"`
}
DocumentStatsResponse represents document statistics
type DocumentStatusResponse ¶
type DocumentStatusResponse struct {
DocID string `json:"docId"`
Document *DocumentResponse `json:"document,omitempty"`
ExpectedSigners []*ExpectedSignerResponse `json:"expectedSigners"`
UnexpectedSignatures []*UnexpectedSignatureResponse `json:"unexpectedSignatures"`
Stats *DocumentStatsResponse `json:"stats"`
ReminderStats *ReminderStatsResponse `json:"reminderStats,omitempty"`
}
DocumentStatusResponse represents complete document status including everything
type ExpectedSignerResponse ¶
type ExpectedSignerResponse struct {
ID int64 `json:"id"`
DocID string `json:"docId"`
Email string `json:"email"`
Name string `json:"name"`
AddedAt string `json:"addedAt"`
AddedBy string `json:"addedBy"`
Notes *string `json:"notes,omitempty"`
HasSigned bool `json:"hasSigned"`
SignedAt *string `json:"signedAt,omitempty"`
UserName *string `json:"userName,omitempty"`
LastReminderSent *string `json:"lastReminderSent,omitempty"`
ReminderCount int `json:"reminderCount"`
DaysSinceAdded int `json:"daysSinceAdded"`
DaysSinceLastReminder *int `json:"daysSinceLastReminder,omitempty"`
}
ExpectedSignerResponse represents an expected signer in API responses
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles admin API requests
func NewHandler ¶
func NewHandler(adminService adminService, reminderService reminderService, signatureService signatureService, baseURL string, importMaxSigners int) *Handler
NewHandler creates a new admin handler
func (*Handler) HandleAddExpectedSigner ¶
func (h *Handler) HandleAddExpectedSigner(w http.ResponseWriter, r *http.Request)
HandleAddExpectedSigner handles POST /api/v1/admin/documents/{docId}/signers
func (*Handler) HandleDeleteDocument ¶
func (h *Handler) HandleDeleteDocument(w http.ResponseWriter, r *http.Request)
HandleDeleteDocument handles DELETE /api/v1/admin/documents/{docId}
func (*Handler) HandleGetDocument ¶
func (h *Handler) HandleGetDocument(w http.ResponseWriter, r *http.Request)
HandleGetDocument handles GET /api/v1/admin/documents/{docId}
func (*Handler) HandleGetDocumentStatus ¶
func (h *Handler) HandleGetDocumentStatus(w http.ResponseWriter, r *http.Request)
HandleGetDocumentStatus handles GET /api/v1/admin/documents/{docId}/status
func (*Handler) HandleGetDocumentWithSigners ¶
func (h *Handler) HandleGetDocumentWithSigners(w http.ResponseWriter, r *http.Request)
HandleGetDocumentWithSigners handles GET /api/v1/admin/documents/{docId}/signers
func (*Handler) HandleGetReminderHistory ¶
func (h *Handler) HandleGetReminderHistory(w http.ResponseWriter, r *http.Request)
HandleGetReminderHistory handles GET /api/v1/admin/documents/{docId}/reminders
func (*Handler) HandleImportSigners ¶
func (h *Handler) HandleImportSigners(w http.ResponseWriter, r *http.Request)
HandleImportSigners handles POST /api/v1/admin/documents/{docId}/signers/import
func (*Handler) HandleListDocuments ¶
func (h *Handler) HandleListDocuments(w http.ResponseWriter, r *http.Request)
HandleListDocuments handles GET /api/v1/admin/documents
func (*Handler) HandlePreviewCSV ¶
func (h *Handler) HandlePreviewCSV(w http.ResponseWriter, r *http.Request)
HandlePreviewCSV handles POST /api/v1/admin/documents/{docId}/signers/preview-csv
func (*Handler) HandleRemoveExpectedSigner ¶
func (h *Handler) HandleRemoveExpectedSigner(w http.ResponseWriter, r *http.Request)
HandleRemoveExpectedSigner handles DELETE /api/v1/admin/documents/{docId}/signers/{email}
func (*Handler) HandleSendReminders ¶
func (h *Handler) HandleSendReminders(w http.ResponseWriter, r *http.Request)
HandleSendReminders handles POST /api/v1/admin/documents/{docId}/reminders
func (*Handler) HandleUpdateDocumentMetadata ¶
func (h *Handler) HandleUpdateDocumentMetadata(w http.ResponseWriter, r *http.Request)
HandleUpdateDocumentMetadata handles PUT /api/v1/admin/documents/{docId}/metadata
type ImportSignerEntry ¶
ImportSignerEntry represents a single signer to import
type ImportSignersRequest ¶
type ImportSignersRequest struct {
Signers []ImportSignerEntry `json:"signers"`
}
ImportSignersRequest represents the request body for importing signers
type ImportSignersResponse ¶
type ImportSignersResponse struct {
Message string `json:"message"`
Imported int `json:"imported"`
Skipped int `json:"skipped"`
Total int `json:"total"`
}
ImportSignersResponse represents the response for signer import
type ReminderLogResponse ¶
type ReminderLogResponse struct {
ID int64 `json:"id"`
DocID string `json:"docId"`
RecipientEmail string `json:"recipientEmail"`
SentAt string `json:"sentAt"`
SentBy string `json:"sentBy"`
TemplateUsed string `json:"templateUsed"`
Status string `json:"status"`
ErrorMessage *string `json:"errorMessage,omitempty"`
}
ReminderLogResponse represents a reminder log entry in API responses
type ReminderStatsResponse ¶
type ReminderStatsResponse struct {
TotalSent int `json:"totalSent"`
PendingCount int `json:"pendingCount"`
LastSentAt *string `json:"lastSentAt,omitempty"`
}
ReminderStatsResponse represents reminder statistics
type SendRemindersRequest ¶
type SendRemindersRequest struct {
Emails []string `json:"emails,omitempty"` // If empty, send to all pending signers
}
SendRemindersRequest represents the request body for sending reminders
type UnexpectedSignatureResponse ¶
type UnexpectedSignatureResponse struct {
UserEmail string `json:"userEmail"`
UserName *string `json:"userName,omitempty"`
SignedAtUTC string `json:"signedAtUTC"`
}
UnexpectedSignatureResponse represents an unexpected signature
type UpdateDocumentMetadataRequest ¶
type UpdateDocumentMetadataRequest struct {
Title *string `json:"title,omitempty"`
URL *string `json:"url,omitempty"`
Checksum *string `json:"checksum,omitempty"`
ChecksumAlgorithm *string `json:"checksumAlgorithm,omitempty"`
Description *string `json:"description,omitempty"`
}
UpdateDocumentMetadataRequest represents the request body for updating document metadata
type WebhooksHandler ¶
type WebhooksHandler struct {
// contains filtered or unexported fields
}
WebhooksHandler groups operations on webhooks
func NewWebhooksHandler ¶
func NewWebhooksHandler(service webhookService) *WebhooksHandler
func (*WebhooksHandler) HandleCreateWebhook ¶
func (h *WebhooksHandler) HandleCreateWebhook(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleDeleteWebhook ¶
func (h *WebhooksHandler) HandleDeleteWebhook(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleGetWebhook ¶
func (h *WebhooksHandler) HandleGetWebhook(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleListDeliveries ¶
func (h *WebhooksHandler) HandleListDeliveries(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleListWebhooks ¶
func (h *WebhooksHandler) HandleListWebhooks(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleToggleWebhook ¶
func (h *WebhooksHandler) HandleToggleWebhook(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleUpdateWebhook ¶
func (h *WebhooksHandler) HandleUpdateWebhook(w http.ResponseWriter, r *http.Request)