Versions in this module Expand all Collapse all v0 v0.2.0 Aug 15, 2026 Changes in this version + func IsInvalidValues(err error) bool type Client + func (c *Client) ListSubmissions(ctx context.Context, params ListSubmissionsParams) (*SubmissionList, error) + func (c *Client) ListTemplateFields(ctx context.Context, templateID string) (*TemplateFields, error) type CreateFillLinkParams + Values []PrefillValue type Error + InvalidValues []InvalidValue type FillLink + Values []PrefillValue + type InvalidValue struct + FieldID string + Reason string + type ListSubmissionsParams struct + Cursor string + Limit int + SubmittedSince time.Time + type PrefillValue struct + FieldID string + Locked bool + Value string + type SubmissionList struct + NextCursor string + Submissions []SubmissionSummary + type SubmissionSummary struct + CompletedPDFStatus string + ExternalRef string + FillLinkID string + SubmissionID string + SubmittedAt time.Time + TemplateID string + type TemplateField struct + ChoiceLabel string + FieldID string + Kind string + Label string + Page int + Prefillable bool + Prompt string + QuestionID string + type TemplateFields struct + Fields []TemplateField + TemplateID string + Version int v0.1.0 Aug 12, 2026 Changes in this version + const DefaultBaseURL + const DefaultWebhookTolerance + const ErrCodePartnerAPINotEnabled + const ErrCodeScopeRequired + const Version + const WebhookSignatureHeader + var ErrMalformedSignature = errors.New("easydocforms: malformed webhook signature header") + var ErrSignatureExpired = errors.New("easydocforms: webhook timestamp outside tolerance") + var ErrSignatureMismatch = errors.New("easydocforms: webhook signature mismatch") + func IsNotFound(err error) bool + func IsPDFPending(err error) bool + func SignWebhookPayload(secret string, t time.Time, body []byte) string + type Client struct + func NewClient(apiKey string, opts ...Option) *Client + func (c *Client) CreateFillLink(ctx context.Context, params CreateFillLinkParams) (*FillLink, error) + func (c *Client) CreateImport(ctx context.Context, params CreateImportParams) (*CreateImportResult, error) + func (c *Client) CreateWebhook(ctx context.Context, params CreateWebhookParams) (*CreateWebhookResult, error) + func (c *Client) DeleteWebhook(ctx context.Context, webhookID string) error + func (c *Client) DownloadSubmissionPDF(ctx context.Context, submissionID string) ([]byte, error) + func (c *Client) GetImport(ctx context.Context, importID string) (*Import, error) + func (c *Client) GetSubmission(ctx context.Context, submissionID string) (*Submission, error) + func (c *Client) GetSubmissionPDFLink(ctx context.Context, submissionID string) (*SubmissionPDFLink, error) + func (c *Client) ListTemplates(ctx context.Context) ([]Template, error) + func (c *Client) ListWebhooks(ctx context.Context) ([]Webhook, error) + func (c *Client) Ping(ctx context.Context) (*Ping, error) + func (c *Client) TestWebhook(ctx context.Context, webhookID string) (*WebhookTestResult, error) + func (c *Client) WaitForImport(ctx context.Context, importID string, pollInterval time.Duration) (*Import, error) + type CreateFillLinkParams struct + ExpiresInDays int + ExternalRef string + MaxResponses int + TemplateID string + type CreateImportParams struct + BlankFormAttestation bool + Filename string + PDFBase64 string + PDFURL string + Title string + type CreateImportResult struct + ImportID string + Status string + type CreateWebhookParams struct + Events []EventType + URL string + type CreateWebhookResult struct + Secret string + Webhook Webhook + type Error struct + Code string + CompletedPDFStatus string + Hint string + Message string + StatusCode int + func (e *Error) Error() string + type Event struct + Data json.RawMessage + Event string + OrgID string + Timestamp time.Time + func (e *Event) DecodeData(v any) error + type EventType string + const EventImportCompleted + const EventImportFailed + const EventSubmissionCreated + const EventSubmissionPDFReady + const EventTest + type FillLink struct + CreatedAt time.Time + ExpiresAt *time.Time + ExternalRef string + FillLinkID string + MaxResponses int + ShortCode string + TemplateID string + URL string + type Import struct + CreatedAt time.Time + Detector string + ErrorMessage string + FieldCount int + Filename string + ImportID string + PageCount int + ReviewReasons []string + ReviewRequired bool + Status ImportStatus + TemplateID string + UpdatedAt time.Time + Warnings []string + type ImportCompletedData struct + FieldCount int + ImportID string + PageCount int + ReviewRequired bool + TemplateID string + type ImportFailedData struct + Error string + ImportID string + type ImportStatus string + const ImportFailed + const ImportProcessing + const ImportQueued + const ImportSucceeded + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(httpClient *http.Client) Option + func WithUserAgent(userAgent string) Option + type Ping struct + KeyName string + OrgID string + Scopes []Scope + type Scope string + const ScopeFillLinksWrite + const ScopeImportsWrite + const ScopeSubmissionsRead + const ScopeTemplatesRead + const ScopeWebhooksManage + type Submission struct + Answers map[string]any + CompletedPDFStatus string + ExternalRef string + FillLinkID string + SubmissionID string + SubmittedAt time.Time + TemplateID string + type SubmissionCreatedData struct + ExternalRef string + FillLinkID string + RetrieveURL string + SubmissionID string + TemplateID string + type SubmissionPDFLink struct + ExpiresAt time.Time + URL string + type SubmissionPDFReadyData struct + ExternalRef string + PDFURL string + SubmissionID string + TemplateID string + type Template struct + CreatedAt time.Time + Detector string + FieldCount int + PageCount int + SourceFilename string + TemplateID string + Title string + UpdatedAt time.Time + Version int + type TestData struct + WebhookID string + type Webhook struct + Active bool + CreatedAt time.Time + Events []EventType + OrganizationID string + URL string + UpdatedAt time.Time + WebhookID string + type WebhookTestResult struct + Delivered bool + Error string + StatusCode int + type WebhookVerifier struct + func NewWebhookVerifier(secret string, opts ...WebhookVerifierOption) *WebhookVerifier + func (v *WebhookVerifier) ParseEvent(body []byte, header string) (*Event, error) + func (v *WebhookVerifier) Verify(body []byte, header string) error + type WebhookVerifierOption func(*WebhookVerifier) + func WithTolerance(d time.Duration) WebhookVerifierOption