Aller au contenu

omnisign/docuseal Référence de l’API

Étage
Fournisseur · Omnisign
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Vérifié en réel
Licence
MIT
composer require omnisign/docuseal:1.x-dev

Lue dans les fichiers PHP du paquet au commit 332754e4f100 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Omnisign\Docuseal

  • Api class

    DocuSeal's API - an instance of one's own (open source: https://<host>/api) or DocuSeal's cloud (https://api.docuseal.com, api.docuseal.eu): the API key in X-Auth-Token, JSON both ways.

    4 methods · 3 properties · 3 constants

  • DocusealGatewayFactory class

    DocuSeal: an instance of one's own - open source, nothing leaves for a third party - or DocuSeal's cloud.

    16 options · 1 method

Omnisign\Docuseal\Action

  • AbstractAction class

    An action on DocuSeal's API.

    1 method

  • CancelAction class

    DELETE /submissions/{id}: archived - nobody may sign it any more.

    2 methods

  • CreateAction class

    A submission: from a template of the instance's (POST /submissions, template_id - what DocuSeal's open-source edition offers), or from the envelope's PDFs and fields (POST /submissions/pdf - DocuSeal Pro and its cloud). DocuSeal sends at once: e-mails, or nothing when embedded.

    2 methods

  • DownloadAction class

    GET /submissions/{id}: once completed, its documents' URLs and the audit log's - each fetched.

    2 methods

  • FetchAction class

    GET /submissions/{id}: its status and its submitters'.

    2 methods

  • NotifyAction class

    A webhook's call: X-Docuseal-Signature checked, event_type read.

    2 methods

  • RemindAction class

    PUT /submitters/{id}, send_email: true - for each signer who has not signed.

    2 methods

  • SendAction class

    DocuSeal sends at creation: Send reads the submission back.

    2 methods

  • SigningUrlAction class

    The signer's form: <app>/s/<slug> (embed_src) - a page of its own, or the docuseal-form web component's src.

    2 methods

Omnisign\Docuseal

Api class

final class Api Api.php:18

DocuSeal's API - an instance of one's own (open source: https://<host>/api) or DocuSeal's cloud (https://api.docuseal.com, api.docuseal.eu): the API key in X-Auth-Token, JSON both ways.

const PROVIDER = 'docuseal'
const STATUSES = ['pending' => Status::SENT, 'completed' => Status::COMPLETED, 'declined' => Status::DECLINED, 'expired' => Status::EXPIRED]
const SIGNER_STATUSES = ['awaiting' => SignerStatus::WAITING, 'sent' => SignerStatus::NOTIFIED, 'opened' => SignerStatus::OPENED, 'completed' => SignerStatus::SIGNED, 'declined' => …
public readonly string $url
public readonly string $appUrl

where a signer's form opens: <app_url>/s/<slug>

public readonly int $webhookTolerance

Api::__construct()

public function __construct(readonly HttpClientInterface $http, readonly string $apiKey, public readonly string $url, public readonly string $appUrl, readonly ?string $webhookSecret = null, public readonly int $webhookTolerance = 300, readonly ?\Closure $clock = null)

Api::json()

public function json(string $method, string $path, array $json = []): array

Api::fetchFile()

public function fetchFile(string $url): string

A file DocuSeal links to (a signed document, the audit log): its URLs are signed, the key goes only to the API's own host.

Api::verify()

public function verify(string $body, ?string $header): array

A webhook's call, its X-Docuseal-Signature checked: "<timestamp>.<hex HMAC-SHA-256 of '<timestamp>.<body>' under the webhook's secret>", as DocuSeal's lib/webhook_urls/signatures.rb signs it.

DocusealGatewayFactory class

final class DocusealGatewayFactory extends GatewayFactory DocusealGatewayFactory.php:32

DocuSeal: an instance of one's own - open source, nothing leaves for a third party - or DocuSeal's cloud.

options: url: https://sign.example.org/api # required: the API's root (cloud: https://api.docuseal.com, https://api.docuseal.eu) api_key: '%env(DOCUSEAL_API_KEY)%' # required: the instance's API key (Settings > API) app_url: ~ # where signers' forms open (<app_url>/s/<slug>); the url without /api by default webhook_secret: '%env(default::DOCUSEAL_WEBHOOK_SECRET)%' # whsec_...: notify() checks X-Docuseal-Signature with it webhook_tolerance: 300 third_party: ~ # whether the instance is someone else's; told from the url when left empty (the cloud: yes)

Options

OptionDefault
app_urlnull
webhook_secretnull
webhook_tolerance300
third_partynull
omnisign.capabilitiesstatic fn(Config $c) => new Capabilities([Level::SIMPLE], embedded: true, ordered: true, identityCheck: false, thirdParty: null !== $c->get('third_party') &&…
omnisign.apifunction (Config $c): Api { $url = rtrim((string) $c['url'], '/'); $app = $c->get('app_url') ?: (preg_match('~^https://api\.(docuseal\.(?:com|eu))$~'…
omnisign.action.createnew CreateAction()
omnisign.action.sendnew SendAction()
omnisign.action.fetchnew FetchAction()
omnisign.action.remindnew RemindAction()
omnisign.action.cancelnew CancelAction()
omnisign.action.downloadnew DownloadAction()
omnisign.action.signing_urlnew SigningUrlAction()
omnisign.action.notifystatic fn(Config $c) => $c->get('webhook_secret') ? new NotifyAction() : null
urlrequired
api_keyrequired

DocusealGatewayFactory::__construct()

public function __construct(readonly ?HttpClientInterface $http = null)

Omnisign\Docuseal\Action

AbstractAction class

abstract class AbstractAction implements ActionInterface, ApiAwareInterface AbstractAction.php:14

An action on DocuSeal's API.

AbstractAction::__construct()

public function __construct()

CancelAction class

final class CancelAction extends AbstractAction CancelAction.php:10

DELETE /submissions/{id}: archived - nobody may sign it any more.

CancelAction::supports()

public function supports(Request $request): bool

CancelAction::execute()

public function execute(Request $request): void

CreateAction class

final class CreateAction extends AbstractAction CreateAction.php:19

A submission: from a template of the instance's (POST /submissions, template_id - what DocuSeal's open-source edition offers), or from the envelope's PDFs and fields (POST /submissions/pdf - DocuSeal Pro and its cloud). DocuSeal sends at once: e-mails, or nothing when embedded.

CreateAction::supports()

public function supports(Request $request): bool

CreateAction::execute()

public function execute(Request $request): void

DownloadAction class

final class DownloadAction extends AbstractAction DownloadAction.php:15

GET /submissions/{id}: once completed, its documents' URLs and the audit log's - each fetched.

DownloadAction::supports()

public function supports(Request $request): bool

DownloadAction::execute()

public function execute(Request $request): void

FetchAction class

final class FetchAction extends AbstractAction FetchAction.php:9

GET /submissions/{id}: its status and its submitters'.

FetchAction::supports()

public function supports(Request $request): bool

FetchAction::execute()

public function execute(Request $request): void

NotifyAction class

final class NotifyAction extends AbstractAction NotifyAction.php:11

A webhook's call: X-Docuseal-Signature checked, event_type read.

NotifyAction::supports()

public function supports(Request $request): bool

NotifyAction::execute()

public function execute(Request $request): void

RemindAction class

final class RemindAction extends AbstractAction RemindAction.php:10

PUT /submitters/{id}, send_email: true - for each signer who has not signed.

RemindAction::supports()

public function supports(Request $request): bool

RemindAction::execute()

public function execute(Request $request): void

SendAction class

final class SendAction extends AbstractAction SendAction.php:9

DocuSeal sends at creation: Send reads the submission back.

SendAction::supports()

public function supports(Request $request): bool

SendAction::execute()

public function execute(Request $request): void

SigningUrlAction class

final class SigningUrlAction extends AbstractAction SigningUrlAction.php:14

The signer's form: <app>/s/<slug> (embed_src) - a page of its own, or the docuseal-form web component's src.

SigningUrlAction::supports()

public function supports(Request $request): bool

SigningUrlAction::execute()

public function execute(Request $request): void