scrive

package module
v0.0.0-...-b2c9886 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 15 Imported by: 0

README

goscrive

Scrive go api client

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) *bool

func ScriveErrorToError

func ScriveErrorToError(e *ScriveError) error

func String

func String(value string) *string

func UInt

func UInt(value uint64) *uint64

func UInt32

func UInt32(value uint32) *uint32

Types

type AccessRole

type AccessRole struct {
	ID             *string           `json:"id"`
	IsGenerated    bool              `json:"is_generated"`
	RoleType       string            `json:"role_type"`
	Source         AccessRoleSource  `json:"source"`
	AllowedActions AccessRoleActions `json:"allowed_actions"`
}

type AccessRoleActions

type AccessRoleActions struct {
	Document          []string `json:"document"`
	FolderPolicy      []string `json:"folder_policy"`
	User              []string `json:"user"`
	UserGroup         []string `json:"user_group"`
	UserGroupPolicy   []string `json:"user_group_policy"`
	UserPersonalToken []string `json:"user_personal_token"`
	UserPolicy        []string `json:"user_policy"`
}

type AccessRoleSource

type AccessRoleSource struct {
	Type string `json:"type"`
	ID   string `json:"id"`
}

type AccessRoleTarget

type AccessRoleTarget struct {
	Type string `json:"type"`
	ID   string `json:"id"`
}

type Address

type Address struct {
	CompanyNumber *string `json:"company_number,omitempty"`
	Address       *string `json:"address,omitempty"`
	Zip           *string `json:"zip,omitempty"`
	City          *string `json:"city,omitempty"`
	Country       *string `json:"country,omitempty"`
}

type Attachment

type Attachment struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Required    bool   `json:"required"`
	FileID      string `json:"file_id"`
	FileName    string `json:"file_name"`
}

type AttachmentListFilter

type AttachmentListFilter = map[string]string

type AuthenticationMethodToSign

type AuthenticationMethodToSign string
const (
	AuthenticationMethodToSignStandard AuthenticationMethodToSign = standard
	AuthenticationMethodToSignSmsPin   AuthenticationMethodToSign = smsPin
	AuthenticationMethodToSignSEBankID AuthenticationMethodToSign = seBankID
	AuthenticationMethodToSignNOBankID AuthenticationMethodToSign = noBankID
	AuthenticationMethodToSignDKNemID  AuthenticationMethodToSign = dkNemID
	AuthenticationMethodToSignDKMitID  AuthenticationMethodToSign = dkMitID
	AuthenticationMethodToSignFITupas  AuthenticationMethodToSign = fiTupas
	AuthenticationMethodToSignVerimi   AuthenticationMethodToSign = verimiQes
	AuthenticationMethodToSignSmartID  AuthenticationMethodToSign = smartIDQes
)

func (AuthenticationMethodToSign) Ptr

type AuthenticationMethodToView

type AuthenticationMethodToView string
const (
	AuthenticationMethodToViewStandard AuthenticationMethodToView = standard
	AuthenticationMethodToViewSmsPin   AuthenticationMethodToView = smsPin
	AuthenticationMethodToViewSEBankID AuthenticationMethodToView = seBankID
	AuthenticationMethodToViewNOBankID AuthenticationMethodToView = noBankID
	AuthenticationMethodToViewDKNemID  AuthenticationMethodToView = dkNemID
	AuthenticationMethodToViewDKMitID  AuthenticationMethodToView = dkMitID
	AuthenticationMethodToViewFITupas  AuthenticationMethodToView = fiTupas
	AuthenticationMethodToViewVerimi   AuthenticationMethodToView = verimi
)

func (AuthenticationMethodToView) Ptr

type AuthenticationMethodToViewArchived

type AuthenticationMethodToViewArchived string
const (
	AuthenticationMethodToViewArchivedStandard AuthenticationMethodToViewArchived = standard
	AuthenticationMethodToViewArchivedSmsPin   AuthenticationMethodToViewArchived = smsPin
	AuthenticationMethodToViewArchivedSEBankID AuthenticationMethodToViewArchived = seBankID
	AuthenticationMethodToViewArchivedNOBankID AuthenticationMethodToViewArchived = noBankID
	AuthenticationMethodToViewArchivedDKNemID  AuthenticationMethodToViewArchived = dkNemID
	AuthenticationMethodToViewArchivedDKMitID  AuthenticationMethodToViewArchived = dkMitID
	AuthenticationMethodToViewArchivedFITupas  AuthenticationMethodToViewArchived = fiTupas
	AuthenticationMethodToViewArchivedVerimi   AuthenticationMethodToViewArchived = verimi
)

func (AuthenticationMethodToViewArchived) Ptr

type AuthorAttachment

type AuthorAttachment struct {
	Name            string `json:"name"`
	Required        bool   `json:"required"`
	AddToSealedFile bool   `json:"add_to_sealed_file"`
	FileID          string `json:"file_id"`
}

type AutoReminderParams

type AutoReminderParams struct {
	DocumentID    string
	Days          *uint64
	ObjectVersion *uint64
}

type CancelDocumentParams

type CancelDocumentParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type ChangeSignatoryEmailAndMobileParams

type ChangeSignatoryEmailAndMobileParams struct {
	DocumentID    string
	SignatoryID   string
	Email         *string
	MobileNumber  *string
	ObjectVersion *uint64
}

type Client

type Client struct {
	Debug bool
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c Config) (*Client, error)

func (*Client) CancelDocument

func (c *Client) CancelDocument(p CancelDocumentParams) (*Document, *ScriveError)

func (*Client) ChangeSignatoryEmailAndMobile

func (c *Client) ChangeSignatoryEmailAndMobile(p ChangeSignatoryEmailAndMobileParams) (*Document, *ScriveError)

func (*Client) CloneDocument

func (c *Client) CloneDocument(p CloneDocumentParams) (*Document, *ScriveError)

func (*Client) Confirm2FA

func (c *Client) Confirm2FA(totp string) (*Confirm2FAResp, *ScriveError)

func (*Client) CreateAttachment

func (c *Client) CreateAttachment(p CreateAttachmentParams) *ScriveError

func (*Client) DeleteAttachments

func (c *Client) DeleteAttachments(attachmentIDs []string) *ScriveError

func (*Client) DeleteDocument

func (c *Client) DeleteDocument(p DeleteDocumentParams) (*Document, *ScriveError)

func (*Client) DeleteDocuments

func (c *Client) DeleteDocuments(documentIDs []string) (*DeleteDocumentsResponse, *ScriveError)

func (*Client) DeleteUser

func (c *Client) DeleteUser(email string) *ScriveError

func (*Client) Disable2FA

func (c *Client) Disable2FA() (*Disable2FAResp, *ScriveError)

func (*Client) DownloadAttachment

func (c *Client) DownloadAttachment(attachmentID string) ([]byte, string, *ScriveError)

func (*Client) ForwardDocument

func (c *Client) ForwardDocument(p ForwardDocumentParams) *ScriveError

func (*Client) GetAccessRole

func (c *Client) GetAccessRole(roleID string) (*AccessRole, *ScriveError)

func (*Client) GetDataRetentionPolicy

func (c *Client) GetDataRetentionPolicy() (*DataRetentionPolicy, *ScriveError)

func (*Client) GetDocument

func (c *Client) GetDocument(documentID string) (*Document, *ScriveError)

func (*Client) GetDocumentByShortID

func (c *Client) GetDocumentByShortID(documentID string) (*Document, *ScriveError)

func (*Client) GetDocumentHistory

func (c *Client) GetDocumentHistory(documentID string) (*DocumentHistory, *ScriveError)

func (*Client) GetDocumentList

func (*Client) GetMainFile

func (c *Client) GetMainFile(documentID string) (*FileResponse, *ScriveError)

func (*Client) GetMainFileBytes

func (c *Client) GetMainFileBytes(documentID string) ([]byte, *ScriveError)

func (*Client) GetRelatedFile

func (c *Client) GetRelatedFile(documentID, fileID string) ([]byte, string, *ScriveError)

func (*Client) GetSignLinkQR

func (c *Client) GetSignLinkQR(documentID, signatoryID string) ([]byte, string, *ScriveError)

func (*Client) GetTokenForPersonalCredentials

func (c *Client) GetTokenForPersonalCredentials(userID string, minutes *uint64) (*PersonalCredentialsToken, *ScriveError)

func (*Client) GetUserAccessRoles

func (c *Client) GetUserAccessRoles(userID string) (*[]*AccessRole, *ScriveError)

func (*Client) IsUserDeletable

func (c *Client) IsUserDeletable() (*IsUserDeletableResp, *ScriveError)

func (*Client) ListAttachments

func (c *Client) ListAttachments(p ListAttachmentsParams) (*[]*Attachment, *ScriveError)

func (*Client) LoginAndGetSession

func (c *Client) LoginAndGetSession(p OAuthAuthorization) (*Session, *ScriveError)

func (*Client) NewDocument

func (c *Client) NewDocument(p NewDocumentParams) (*Document, *ScriveError)

func (*Client) NewDocumentFromTemplate

func (c *Client) NewDocumentFromTemplate(p NewDocumentFromTemplateParams) (*Document, *ScriveError)

func (*Client) ProlongDocument

func (c *Client) ProlongDocument(p ProlongDocumentParams) (*Document, *ScriveError)

func (*Client) RemindSignatories

func (c *Client) RemindSignatories(p RemindSignatoriesParams) *ScriveError

func (*Client) RemovePages

func (c *Client) RemovePages(p RemovePagesParams) (*Document, *ScriveError)

func (*Client) RestartDocument

func (c *Client) RestartDocument(p RestartDocumentParams) (*Document, *ScriveError)

func (*Client) SetAttachments

func (c *Client) SetAttachments(p SetAttachmentsParams) (*Document, *ScriveError)

func (*Client) SetAttachmentsSharing

func (c *Client) SetAttachmentsSharing(attachmentIDs []string, shared bool) *ScriveError

func (*Client) SetDataRetentionPolicy

func (c *Client) SetDataRetentionPolicy(p DataRetentionPolicy) *ScriveError

func (*Client) SetDocumentAutoReminder

func (c *Client) SetDocumentAutoReminder(p AutoReminderParams) (*Document, *ScriveError)

func (*Client) SetSignatoryAuthenticationToSign

func (c *Client) SetSignatoryAuthenticationToSign(p SignatoryAuthenticationToSignParams) (*Document, *ScriveError)

func (*Client) SetSignatoryAuthenticationToView

func (c *Client) SetSignatoryAuthenticationToView(p SignatoryAuthenticationToViewParams) (*Document, *ScriveError)

func (*Client) SetTemplatesSharing

func (c *Client) SetTemplatesSharing(p ShareTemplatesParams) *ScriveError

func (*Client) Setup2FA

func (c *Client) Setup2FA() (*Setup2FAResponse, *ScriveError)

func (*Client) Start

func (c *Client) Start(p StartParams) (*Document, *ScriveError)

func (*Client) TrashDocument

func (c *Client) TrashDocument(p TrashDocumentParams) (*Document, *ScriveError)

func (*Client) TrashDocuments

func (c *Client) TrashDocuments(documentIDs []string) (*TrashDocumentsResponse, *ScriveError)

func (*Client) TriggerAPICallback

func (c *Client) TriggerAPICallback(p TriggerAPICallbackParams) *ScriveError

func (*Client) UpdateDocument

func (c *Client) UpdateDocument(p UpdateDocumentParams) (*Document, *ScriveError)

type CloneDocumentParams

type CloneDocumentParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type Config

type Config struct {
	APIRoot *string
	PAC     *PAC
}

type Confirm2FAResp

type Confirm2FAResp struct {
	TwofactorAlive bool `json:"twofactor_alive"`
	TotpValid      bool `json:"totp_valid"`
}

type ConfirmationDeliveryMethod

type ConfirmationDeliveryMethod string
const (
	ConfirmationDeliveryMethodEmail           ConfirmationDeliveryMethod = email
	ConfirmationDeliveryMethodMobile          ConfirmationDeliveryMethod = mobile
	ConfirmationDeliveryMethodEmailMobile     ConfirmationDeliveryMethod = emailMobile
	ConfirmationDeliveryMethodEmailLink       ConfirmationDeliveryMethod = emailLink
	ConfirmationDeliveryMethodEmailLinkMobile ConfirmationDeliveryMethod = emailLinkMobile
	ConfirmationDeliveryMethodNone            ConfirmationDeliveryMethod = none
)

func (ConfirmationDeliveryMethod) Ptr

type ConfirmationEmailDeliveryStatus

type ConfirmationEmailDeliveryStatus string
const (
	ConfirmationEmailDeliveryStatusUnknown      ConfirmationEmailDeliveryStatus = unknown
	ConfirmationEmailDeliveryStatusNotDelivered ConfirmationEmailDeliveryStatus = notDelivered
	ConfirmationEmailDeliveryStatusDelivered    ConfirmationEmailDeliveryStatus = delivered
	ConfirmationEmailDeliveryStatusDeferred     ConfirmationEmailDeliveryStatus = deferred
)

type ConsentModule

type ConsentModule struct {
	Title     string                   `json:"title"`
	Questions []*ConsentModuleQuestion `json:"questions"`
}

type ConsentModuleDetailedDescription

type ConsentModuleDetailedDescription struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type ConsentModuleQuestion

type ConsentModuleQuestion struct {
	Title               string                           `json:"title"`
	PositiveOption      string                           `json:"positive_option"`
	NegativeOption      string                           `json:"negative_option"`
	Response            bool                             `json:"response"`
	DetailedDescription ConsentModuleDetailedDescription `json:"detailed_description"`
}

type ContactDetails

type ContactDetails struct {
	InheritedFrom      *string         `json:"inherited_from"`
	Address            *Address        `json:"address"`
	InheritablePreview *ContactDetails `json:"inheritable_preview"`
}

type CreateAttachmentParams

type CreateAttachmentParams struct {
	Title    string
	FileName string
	File     []byte
}

type DataRetentionPolicy

type DataRetentionPolicy struct {
	IdleDocTimeoutPreparation *uint64 `json:"idle_doc_timeout_preparation,omitempty"`
	IdleDocTimeoutClosed      *uint64 `json:"idle_doc_timeout_closed,omitempty"`
	IdleDocTimeoutCanceled    *uint64 `json:"idle_doc_timeout_canceled,omitempty"`
	IdleDocTimeoutTimedout    *uint64 `json:"idle_doc_timeout_timedout,omitempty"`
	IdleDocTimeoutRejected    *uint64 `json:"idle_doc_timeout_rejected,omitempty"`
	IdleDocTimeoutError       *uint64 `json:"idle_doc_timeout_error,omitempty"`
	ImmediateTrash            *bool   `json:"immediate_trash,omitempty"`
}

type DeleteDocumentParams

type DeleteDocumentParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type DeleteDocumentsResponse

type DeleteDocumentsResponse struct {
	Deleted   uint64      `json:"deleted"`
	Documents []*Document `json:"documents"`
}

type DeliveryMethod

type DeliveryMethod string
const (
	DeliveryMethodEmail       DeliveryMethod = email
	DeliveryMethodMobile      DeliveryMethod = mobile
	DeliveryMethodEmailMobile DeliveryMethod = emailMobile
	DeliveryMethodPad         DeliveryMethod = pad
	DeliveryMethodAPI         DeliveryMethod = api
)

func (DeliveryMethod) Ptr

func (s DeliveryMethod) Ptr() *DeliveryMethod

type Disable2FAResp

type Disable2FAResp struct {
	TwofactorAlive bool `json:"twofactor_alive"`
}

type DisplayOptions

type DisplayOptions struct {
	ShowHeader        *bool `json:"show_header,omitempty"`
	ShowPDFDownload   *bool `json:"show_pdf_download,omitempty"`
	ShowRejectOption  *bool `json:"show_reject_option,omitempty"`
	AllowRejectReason *bool `json:"allow_reject_reason,omitempty"`
	ShowFooter        *bool `json:"show_footer,omitempty"`
	DocumentIsReceipt *bool `json:"document_is_receipt,omitempty"`
	ShowArrow         *bool `json:"show_arrow,omitempty"`
}

type Document

type Document struct {
	ID                  *string              `json:"id,omitempty"`
	Title               *string              `json:"title,omitempty"`
	Parties             *[]*Signatory        `json:"parties,omitempty"`
	File                *File                `json:"file,omitempty"`
	SealedFile          *File                `json:"sealed_file,omitempty"`
	AuthorAttachments   *[]*AuthorAttachment `json:"author_attachments,omitempty"`
	CTime               *string              `json:"ctime,omitempty"`
	MTime               *string              `json:"mtime,omitempty"`
	TimeoutTime         *string              `json:"timeout_time,omitempty"`
	AutoRemindTime      *string              `json:"auto_remind_time,omitempty"`
	Status              *Status              `json:"status,omitempty"`
	DaysToSign          *uint32              `json:"days_to_sign,omitempty"`
	DaysToRemind        *uint32              `json:"days_to_remind,omitempty"`
	DisplayOptions      *DisplayOptions      `json:"display_options,omitempty"`
	InvitationMessage   *string              `json:"invitation_message,omitempty"`
	ConfirmationMessage *string              `json:"confirmation_message,omitempty"`
	Lang                *Lang                `json:"lang,omitempty"`
	APICallbackURL      *string              `json:"api_callback_url,omitempty"`
	ObjectVersion       *uint64              `json:"object_version,omitempty"`
	AccessToken         *string              `json:"access_token,omitempty"`
	Timezone            *string              `json:"timezone,omitempty"`
	Tags                *[]*Tag              `json:"tags,omitempty"`
	IsTemplate          *bool                `json:"is_template,omitempty"`
	IsSaved             *bool                `json:"is_saved,omitempty"`
	FolderID            *string              `json:"folder_id,omitempty"`
	IsShared            *bool                `json:"is_shared,omitempty"`
	IsTrashed           *bool                `json:"is_trashed,omitempty"`
	IsDeleted           *bool                `json:"is_deleted,omitempty"`
	Viewer              *Viewer              `json:"viewer,omitempty"`
	ShareableLink       *string              `json:"shareable_link,omitempty"`
	TemplateID          *string              `json:"template_id,omitempty"`
	FromShareableLink   *bool                `json:"from_shareable_link,omitempty"`
}

type DocumentHistory

type DocumentHistory struct {
	Events []*HistoryItem `json:"events"`
}

type EmailDeliveryStatus

type EmailDeliveryStatus string
const (
	EmailDeliveryStatusUnknown      EmailDeliveryStatus = unknown
	EmailDeliveryStatusNotDelivered EmailDeliveryStatus = notDelivered
	EmailDeliveryStatusDelivered    EmailDeliveryStatus = delivered
	EmailDeliveryStatusDeferred     EmailDeliveryStatus = deferred
)

type ErrorType

type ErrorType = string
const (
	ErrorTypeServerError                   ErrorType = "server_error"
	ErrorTypeEndpointNotFound              ErrorType = "endpoint_not_found"
	ErrorTypeInvalidAuthorisation          ErrorType = "invalid_authorisation"
	ErrorTypeInsufficientPrivileges        ErrorType = "insufficient_privileges"
	ErrorTypeResourceNotFound              ErrorType = "resource_not_found"
	ErrorTypeDocumentActionForbidden       ErrorType = "document_action_forbidden"
	ErrorTypeRequestParametersMissing      ErrorType = "request_parameters_missing"
	ErrorTypeRequestParametersParseError   ErrorType = "request_parameters_parse_error"
	ErrorTypeRequestParametersInvalid      ErrorType = "request_parameters_invalid"
	ErrorTypeDocumentObjectVersionMismatch ErrorType = "document_object_version_mismatch"
	ErrorTypeSignatoryStateError           ErrorType = "signatory_state_error"
	ErrorTypeLocal                         ErrorType = "local_error"
)

type File

type File struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type FileResponse

type FileResponse struct {
	Length int64 // Length of file in bytes, iff reported by server `Content-Length` header. Otherwise -1
	Body   io.ReadCloser
}

type ForwardDocumentParams

type ForwardDocumentParams struct {
	DocumentID    string
	Email         string
	NoContent     *bool
	NoAttachments *bool
	ObjectVersion *uint64
}

type GetDocumentListParams

type GetDocumentListParams struct {
	Offset  *uint64
	Max     *uint64
	Filter  []map[string]interface{}
	Sorting []map[string]string
}

type GetDocumentsListResponse

type GetDocumentsListResponse struct {
	TotalMatching uint64      `json:"total_matching"`
	Documents     []*Document `json:"documents"`
}

type HighlightedPage

type HighlightedPage struct {
	Page   uint32 `json:"page"`
	FileID string `json:"file_id"`
}

type HistoryItem

type HistoryItem struct {
	Status HistoryStatus `json:"status"`
	Time   string        `json:"time"`
	Text   string        `json:"text"`
	Party  string        `json:"party"`
}

type HistoryStatus

type HistoryStatus string
const (
	HistoryStatusInitiated       HistoryStatus = "initiated"
	HistoryStatusDraft           HistoryStatus = "draft"
	HistoryStatusCancelled       HistoryStatus = "cancelled"
	HistoryStatusRejected        HistoryStatus = "rejected"
	HistoryStatusTimeouted       HistoryStatus = "timeouted"
	HistoryStatusProblem         HistoryStatus = "problem"
	HistoryStatusDeliveryProblem HistoryStatus = "deliveryproblem"
	HistoryStatusSent            HistoryStatus = "sent"
	HistoryStatusDelivered       HistoryStatus = "delivered"
	HistoryStatusRead            HistoryStatus = "read"
	HistoryStatusOpened          HistoryStatus = "opened"
	HistoryStatusSigned          HistoryStatus = "signed"
	HistoryStatusProlonged       HistoryStatus = "prolonged"
	HistoryStatusSealed          HistoryStatus = "sealed"
	HistoryStatusExtended        HistoryStatus = "extended"
)

type IsUserDeletableResp

type IsUserDeletableResp struct {
	Deletable bool    `json:"deletable"`
	Reason    *string `json:"reason"`
}

type Lang

type Lang string
const (
	LangDA Lang = "da"
	LangDE Lang = "de"
	LangEL Lang = "el"
	LangEN Lang = "en"
	LangES Lang = "es"
	LangET Lang = "et"
	LangFI Lang = "fi"
	LangFR Lang = "fr"
	LangIS Lang = "is"
	LangIT Lang = "it"
	LangLT Lang = "lt"
	LangLV Lang = "lv"
	LangNL Lang = "nl"
	LangNO Lang = "no"
	LangPT Lang = "pt"
	LangSV Lang = "sv"
)

type ListAttachmentsParams

type ListAttachmentsParams struct {
	Domain  *string
	Filter  []*AttachmentListFilter
	Sorting []*ListSortParam
}

type ListSortKey

type ListSortKey string
const (
	ListSortTitle  ListSortKey = "title"
	ListSortStatus ListSortKey = "status"
	ListSortMTime  ListSortKey = "mtime"
	ListSortAuthor ListSortKey = "author"
)

type ListSortOrder

type ListSortOrder string
const (
	ListSortAscending  ListSortOrder = "ascending"
	ListSortDescending ListSortOrder = "descending"
)

type ListSortParam

type ListSortParam struct {
	Order  ListSortOrder `json:"order"`
	SortBy ListSortKey   `json:"sort_by"`
}

type LoginToken

type LoginToken struct {
	LoginToken     string `json:"login_token"`
	QRCode         string `json:"qr_code"`
	ExpirationTime string `json:"expiration_time"`
}

type MobileDeliveryStatus

type MobileDeliveryStatus string
const (
	MobileDeliveryStatusUnknown      MobileDeliveryStatus = unknown
	MobileDeliveryStatusNotDelivered MobileDeliveryStatus = notDelivered
	MobileDeliveryStatusDelivered    MobileDeliveryStatus = delivered
	MobileDeliveryStatusDeferred     MobileDeliveryStatus = deferred
)

type NewDocumentFromTemplateParams

type NewDocumentFromTemplateParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type NewDocumentParams

type NewDocumentParams struct {
	FileName string
	File     []byte
	Saved    *bool
}

type NotificationDeliveryMethod

type NotificationDeliveryMethod string
const (
	NotificationDeliveryMethodEmail           NotificationDeliveryMethod = email
	NotificationDeliveryMethodMobile          NotificationDeliveryMethod = mobile
	NotificationDeliveryMethodEmailMobile     NotificationDeliveryMethod = emailMobile
	NotificationDeliveryMethodEmailLink       NotificationDeliveryMethod = emailLink
	NotificationDeliveryMethodEmailLinkMobile NotificationDeliveryMethod = emailLinkMobile
	NotificationDeliveryMethodNone            NotificationDeliveryMethod = none
)

func (NotificationDeliveryMethod) Ptr

type OAuthAuthorization

type OAuthAuthorization struct {
	APIToken     string `json:"apitoken"`
	APISecret    string `json:"apisecret"`
	AccessToken  string `json:"accesstoken"`
	AccessSecret string `json:"accsesssecret"`
}

type PAC

type PAC struct {
	ClientCredentialsIdentifier string
	ClientCredentialsSecret     string
	TokenCredentialsIdentifier  string
	TokenCredentialsSecret      string
}

PAC represents Personal Access Credentials. Found in Scrive dashboard under "Integration Settings"

type PersonalCredentialsToken

type PersonalCredentialsToken struct {
	LoginToken     string `json:"login_token"`
	QRCode         string `json:"qr_code"`
	ExpirationTime string `json:"expiration_time"`
}

type ProlongDocumentParams

type ProlongDocumentParams struct {
	DocumentID    string
	Days          *uint64
	ObjectVersion *uint64
}

type RemindSignatoriesParams

type RemindSignatoriesParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type RemovePagesParams

type RemovePagesParams struct {
	DocumentID    string
	Pages         []uint64
	ObjectVersion *uint64
}

type RequestMethod

type RequestMethod = string

type RestartDocumentParams

type RestartDocumentParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type ScriveError

type ScriveError struct {
	ErrorType    ErrorType
	ErrorMessage string
	HttpCode     int
}

type Session

type Session struct {
	SessionID string `json:"session_id"`
}

type SetAttachment

type SetAttachment struct {
	Name            string `json:"name"`
	Required        bool   `json:"required"`
	AddToSealedFile bool   `json:"add_to_sealed_file"`
	FileParam       string `json:"file_param"`
	FileName        string `json:"-"`
	File            []byte `json:"-"`
}

type SetAttachmentsParams

type SetAttachmentsParams struct {
	DocumentID    string
	Attachments   []*SetAttachment
	Incremental   *bool
	ObjectVersion *uint64
}

type Setup2FAResponse

type Setup2FAResponse struct {
	TwofactorAlive bool    `json:"twofactor_alive"`
	QRCode         *string `json:"qr_code"`
}

type ShareTemplatesParams

type ShareTemplatesParams struct {
	DocumentIDs []string
	Shared      bool
}

type Signatory

type Signatory struct {
	ID                                 *string                             `json:"id,omitempty"`
	UserID                             *string                             `json:"user_id,omitempty"`
	IsAuthor                           *bool                               `json:"is_author,omitempty"`
	IsSignatory                        *bool                               `json:"is_signatory,omitempty"`
	SignatoryRole                      *SignatoryRole                      `json:"signatory_role,omitempty"`
	Fields                             *[]*SignatoryField                  `json:"fields,omitempty"`
	ConsentModule                      *ConsentModule                      `json:"consent_module,omitempty"`
	SignOrder                          *uint32                             `json:"sign_order,omitempty"`
	SignTime                           *string                             `json:"sign_time,omitempty,omitempty"`
	SeenTime                           *string                             `json:"seen_time,omitempty,omitempty"`
	ReadInvitationTime                 *string                             `json:"read_invitation_time,omitempty"`
	RejectedTime                       *string                             `json:"rejected_time,omitempty,omitempty"`
	RejectionReason                    *string                             `json:"rejection_reason,omitempty"`
	SignSuccessRedirectURL             *string                             `json:"sign_success_redirect_url,omitempty"`
	RejectRedirectURL                  *string                             `json:"reject_redirect_url,omitempty"`
	EmailDeliveryStatus                *EmailDeliveryStatus                `json:"email_delivery_status,omitempty"`
	MobileDeliveryStatus               *MobileDeliveryStatus               `json:"mobile_delivery_status,omitempty"`
	ConfirmationEmailDeliveryStatus    *ConfirmationEmailDeliveryStatus    `json:"confirmation_email_delivery_status,omitempty"`
	HasAuthenticatedToView             *bool                               `json:"has_authenticated_to_view,omitempty"`
	CSV                                *[]string                           `json:"csv,omitempty"`
	DeliveryMethod                     *DeliveryMethod                     `json:"delivery_method,omitempty"`
	AuthenticationMethodToView         *AuthenticationMethodToView         `json:"authentication_method_to_view,omitempty"`
	AuthenticationMethodToViewArchived *AuthenticationMethodToViewArchived `json:"authentication_method_to_view_archived,omitempty"`
	AuthenticationMethodToSign         *AuthenticationMethodToSign         `json:"authentication_method_to_sign,omitempty"`
	ConfirmationDeliveryMethod         *ConfirmationDeliveryMethod         `json:"confirmation_delivery_method,omitempty"`
	NotificationDeliveryMethod         *NotificationDeliveryMethod         `json:"notification_delivery_method,omitempty"`
	AllowsHighlighting                 *bool                               `json:"allows_highlighting,omitempty"`
	HidePersonalNumber                 *bool                               `json:"hide_personal_number,omitempty"`
	CanForward                         *bool                               `json:"can_forward,omitempty"`
	Attachments                        *[]*Attachment                      `json:"attachments,omitempty"`
	HighlightedPages                   *[]*HighlightedPage                 `json:"highlighted_pages,omitempty"`
	APIDeliveryURL                     *string                             `json:"api_delivery_url,omitempty"`
}

type SignatoryAuthenticationToSignParams

type SignatoryAuthenticationToSignParams struct {
	DocumentID           string
	SignatoryID          string
	AuthenticationMethod AuthenticationMethodToSign
	PersonalNumber       *string
	MobileNumber         *string
	ObjectVersion        *uint64
}

type SignatoryAuthenticationToViewParams

type SignatoryAuthenticationToViewParams struct {
	DocumentID           string
	SignatoryID          string
	AuthenticationMethod AuthenticationMethodToView
	PersonalNumber       *string
	MobileNumber         *string
	ObjectVersion        *uint64
}

type SignatoryField

type SignatoryField struct {
	Type      SignatoryFieldType `json:"type"`
	Name      *string            `json:"name,omitempty"`
	IsChecked *bool              `json:"is_checked,omitempty"`
	Signature *string            `json:"signature,omitempty"`
	Order     *uint32            `json:"order,omitempty"`
	Value     *string            `json:"value,omitempty"`
	// values must be equal in length to placements
	Values                 *[]string                          `json:"values,omitempty"`
	IsObligatory           *bool                              `json:"is_obligatory"`
	ShouldBeFilledBySender *bool                              `json:"should_be_filled_by_sender,omitempty"`
	EditableBySignatory    *bool                              `json:"editable_by_signatory,omitempty"`
	Placements             *[]*SignatoryFieldPlacement        `json:"placements,omitempty"`
	CustomValidation       *[]*SignatoryFieldCustomValidation `json:"custom_validation,omitempty"`
}

type SignatoryFieldCustomValidation

type SignatoryFieldCustomValidation struct {
	Pattern         string `json:"pattern"`
	PositiveExample string `json:"positive_example"`
	Tooltip         string `json:"tooltip"`
}

type SignatoryFieldPlacement

type SignatoryFieldPlacement struct {
	XRel    float32                          `json:"xrel"`
	YRel    float32                          `json:"yrel"`
	WRel    float32                          `json:"wrel"`
	HRel    float32                          `json:"hrel"`
	FSRel   float32                          `json:"fsrel"`
	Page    uint32                           `json:"page"`
	Tip     *SignatoryFieldPlacementTip      `json:"tip"`
	Anchors []*SignatoryFieldPlacementAnchor `json:"anchors"`
}

type SignatoryFieldPlacementAnchor

type SignatoryFieldPlacementAnchor struct {
	Text  string `json:"text"`
	Index int    `json:"index"`
}

type SignatoryFieldPlacementTip

type SignatoryFieldPlacementTip string
const (
	SignatoryFieldPlacementTipLeft  SignatoryFieldPlacementTip = "left"
	SignatoryFieldPlacementTipRight SignatoryFieldPlacementTip = "right"
)

type SignatoryFieldType

type SignatoryFieldType string
const (
	SignatoryFieldTypeName           SignatoryFieldType = "name"
	SignatoryFieldTypeEmail          SignatoryFieldType = "email"
	SignatoryFieldTypeMobile         SignatoryFieldType = "mobile"
	SignatoryFieldTypeSignature      SignatoryFieldType = "signature"
	SignatoryFieldTypeCompanyName    SignatoryFieldType = "company"
	SignatoryFieldTypeCompanyNumber  SignatoryFieldType = "company_number"
	SignatoryFieldTypePersonalNumber SignatoryFieldType = "personal_number"
	SignatoryFieldTypeCheckbox       SignatoryFieldType = "checkbox"
	SignatoryFieldTypeRadiogroup     SignatoryFieldType = "radiogroup"
	SignatoryFieldTypeCustomText     SignatoryFieldType = "text"
)

type SignatoryRole

type SignatoryRole string
const (
	SignatoryRoleViewer       SignatoryRole = viewer
	SignatoryRoleSigningParty SignatoryRole = signingParty
	SignatoryRoleApprover     SignatoryRole = approver
)

func (SignatoryRole) Ptr

func (s SignatoryRole) Ptr() *SignatoryRole

type StartParams

type StartParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type Status

type Status string
const (
	StatusPreparation   Status = "preparation"
	StatusPending       Status = "pending"
	StatusClosed        Status = "closed"
	StatusCanceled      Status = "canceled"
	StatusTimedout      Status = "timedout"
	StatusRejected      Status = "rejected"
	StatusDocumentError Status = "document_error"
)

type Tag

type Tag struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type TrashDocumentParams

type TrashDocumentParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type TrashDocumentsResponse

type TrashDocumentsResponse struct {
	Trashed   uint64      `json:"trashed"`
	Documents []*Document `json:"documents"`
}

type TriggerAPICallbackParams

type TriggerAPICallbackParams struct {
	DocumentID    string
	ObjectVersion *uint64
}

type UpdateDocumentParams

type UpdateDocumentParams struct {
	DocumentID    string
	Document      *Document
	ObjectVersion *uint64
}

type UserGroup

type UserGroup struct {
	ID             string             `json:"id"`
	ParentID       string             `json:"parent_id"`
	Name           string             `json:"name"`
	Children       []*UserGroupChild  `json:"children"`
	Settings       *UserGroupSettings `json:"settings"`
	ContactDetails *ContactDetails    `json:"contact_details"`
}

type UserGroupChild

type UserGroupChild struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type UserGroupSettings

type UserGroupSettings struct {
	InheritedFrom       *string              `json:"inherited_from"`
	DataRetentionPolicy *DataRetentionPolicy `json:"data_retention_policy"`
	InheritablePreview  *UserGroupSettings   `json:"inheritable_preview"`
}

type Viewer

type Viewer struct {
	Role        ViewerRole `json:"role"`
	SignatoryID string     `json:"signatory_id"`
}

type ViewerRole

type ViewerRole string
const (
	ViewerRoleCompanyShared ViewerRole = "company_shared"
	ViewerRoleCompanyAdmin  ViewerRole = "company_admin"
	ViewerRoleSignatory     ViewerRole = "signatory"
)

func (ViewerRole) Ptr

func (s ViewerRole) Ptr() *ViewerRole

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL