承接 agrobens/sdk-php-autentique 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

agrobens/sdk-php-autentique

Composer 安装命令:

composer require agrobens/sdk-php-autentique

包简介

Api Autentique V2

README 文档

README

AUTENTIQUE Api v2

Latest Stable Version Total Downloads Build Status codecov Scrutinizer Code Quality Code Intelligence Status License

🚀 Usage

This package is so simple to use that it will save your time.

composer require vinicinbgs/autentique-v2

⚠️ IMPORTANT

This library depends on vlucas/phpdotenv to get environments variables (.env)
If you use a framework like Laravel, you don't need to download this library.

Fork do projeto principal para segurança de atualizações, utilize a lib princpal

composer require vlucas/phpdotenv

Set in file .env

AUTENTIQUE_URL=https://api.autentique.com.br/v2/graphql
AUTENTIQUE_TOKEN="YOUR_TOKEN"
AUTENTIQUE_DEV_MODE="true" || "false"
# if TRUE, document will be created in mode sandbox

Summary

  1. Instance
  2. Documents
  3. Folders
  4. Contributing 🤠

1. Instance

Import library

use vinicinbgs\Autentique\Documents;

$AUTENTIQUE_TOKEN="xxxxxxxx" (set or will be take in .env)

$documents = new Documents($AUTENTIQUE_TOKEN);

$folders = new Folders($AUTENTIQUE_TOKEN);

Why documents/folders receive token?

  • Easily to manage Documents in multiples accounts (token)

📝 2. Documents

1 - List all documents with pagination

$documentsPaginated = documents->listAll($page); // if not isset $page is equal 1

2 - List the document by id

$document = $documents->listById($documentId);

3 - Create a document

$attributes = [
         'document' => [
             'name' => 'NOME DO DOCUMENTO',
         ],
         'signers' => [
             [
                 'email' => 'email@email.com',
                 'action' => 'SIGN',
                 'positions' => [
                     [
                         'x' => '50', // Posição do Eixo X da ASSINATURA (0 a 100)
                         'y' => '80', // Posição do Eixo Y da ASSINATURA (0 a 100)
                         'z' => '1', // Página da ASSINATURA
                     ],
                     [
                         'x' => '50', // Posição do Eixo X da ASSINATURA (0 a 100)
                         'y' => '50', // Posição do Eixo Y da ASSINATURA (0 a 100)
                         'z' => '2', // Página da ASSINATURA
                     ],
                 ],
             ],
             [
                 'email' => 'email@email.com',
                 'action' => 'SIGN',
                 'positions' => [
                     [
                         'x' => '50', // Posição do Eixo X da ASSINATURA (0 a 100)
                         'y' => '80', // Posição do Eixo Y da ASSINATURA (0 a 100)
                         'z' => '1', // Página da ASSINATURA
                     ],
                     [
                         'x' => '50', // Posição do Eixo X da ASSINATURA (0 a 100)
                         'y' => '50', // Posição do Eixo Y da ASSINATURA (0 a 100)
                         'z' => '2', // Página da ASSINATURA
                     ],
                 ],
             ],
         ],
         'file' => './dummy.pdf',
     ];
 
 $documentCreated = $documents->create($attributes);

4 - Sign the document by id

$documentSign = $documents->signById($documentId);

5 - Delete the document by id

$documentDeleted = $documents->deleteById($documentId);

6 - Move the document to a folder

$attributes = [
    "folder" => [
                "name" => "folder name",
            ],
];
 
$folder = $folders->create($attributes);
$documentDeleted = $documents->moveToFolder($documentId, $folder["data"]["createFolder"]["id"]);

7 - Move the document from current folder to target folder

$documentDeleted = $documents->moveToFolderByFolder($documentId, $targetFolderId, $currentFolderId);

📁 3. Folders

1 - List all folders

$foldersPaginated = $folders->listAll($page); // if not isset $page is equal 1

2 - List the folder by id

$folder = $folders->listById($folderId);

3 - Create a folder

$attributes = [
    "folder" => [
                "name" => "folder name",
            ],
];
 
$folder = $folders->create($attributes);

4 - List the folder contents by id

$folderContents = $folders->listContentsById($folderId, $page = 1);

5 - Delete a folder

$folderDeleted = $folders->deleteById($folderId);

🔧 Contributing

💻 Setup

git clone git@github.com:vinicinbgs/autentique-v2.git
cd autentique-v2
composer install
npm install

⚙️ Configure

Create .env with variables

./contribute.sh

Configure prettier php in vscode

(CTRL + P) > Preferences: Open Setting (JSON)

 "emeraldwalk.runonsave": {
        "commands": [
            {
                "match": "\\.php$",
                "cmd": "npm run prettier -- ${relativeFile} --write",
            },
        ]
    }

agrobens/sdk-php-autentique 适用场景与选型建议

agrobens/sdk-php-autentique 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 32 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 06 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「v2」 「autentique」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 agrobens/sdk-php-autentique 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 agrobens/sdk-php-autentique 我们能提供哪些服务?
定制开发 / 二次开发

基于 agrobens/sdk-php-autentique 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 23
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-23