From ee4eb39a9a6175f58f91284885860260812c8970 Mon Sep 17 00:00:00 2001 From: Anna Hileta <80112359+annahileta@users.noreply.github.com> Date: Fri, 5 Apr 2024 20:38:55 +0300 Subject: [PATCH] Maestro API code examples (#136) Added Maestro examples --- composer.json | 5 +- composer.lock | 500 +++++++----- public/assets/search.js | 3 + src/Controllers/Auth/DocuSign.php | 4 + .../Examples/Maestro/Eg001TriggerWorkflow.php | 211 +++++ .../Examples/Maestro/Eg002CancelWorkflow.php | 90 +++ .../Maestro/Eg003GetWorkflowStatus.php | 83 ++ .../eSignature/EG008CreateTemplate.php | 2 + src/Controllers/MaestroApiBaseController.php | 137 ++++ src/Services/ApiTypes.php | 1 + .../Maestro/CancelMaestroWorkflowService.php | 59 ++ .../Maestro/GetWorkflowStatusService.php | 34 + .../Maestro/TriggerMaestroWorkflowService.php | 723 ++++++++++++++++++ src/Services/MaestroApiClientService.php | 176 +++++ src/Services/ManifestService.php | 3 + src/Services/RouterService.php | 6 + .../esignature/eg002_signing_via_email.html | 2 + templates/home_esig.html | 2 + templates/maestro/eg001_publish_workflow.html | 11 + templates/maestro/eg001_trigger_workflow.html | 133 ++++ templates/maestro/eg002_cancel_workflow.html | 84 ++ .../maestro/eg003_get_workflow_status.html | 84 ++ tests/JWTLoginMethod.php | 2 + 23 files changed, 2146 insertions(+), 209 deletions(-) create mode 100644 src/Controllers/Examples/Maestro/Eg001TriggerWorkflow.php create mode 100644 src/Controllers/Examples/Maestro/Eg002CancelWorkflow.php create mode 100644 src/Controllers/Examples/Maestro/Eg003GetWorkflowStatus.php create mode 100644 src/Controllers/MaestroApiBaseController.php create mode 100644 src/Services/Examples/Maestro/CancelMaestroWorkflowService.php create mode 100644 src/Services/Examples/Maestro/GetWorkflowStatusService.php create mode 100644 src/Services/Examples/Maestro/TriggerMaestroWorkflowService.php create mode 100644 src/Services/MaestroApiClientService.php create mode 100644 templates/maestro/eg001_publish_workflow.html create mode 100644 templates/maestro/eg001_trigger_workflow.html create mode 100644 templates/maestro/eg002_cancel_workflow.html create mode 100644 templates/maestro/eg003_get_workflow_status.html diff --git a/composer.json b/composer.json index 0c99dc1..d8d7470 100644 --- a/composer.json +++ b/composer.json @@ -21,11 +21,12 @@ "docusign/rooms-client": "^2.1.0", "docusign/monitor-client": "^1.1.0", "docusign/webforms-client": "^1.0.0", + "docusign/maestro-client": "dev-1.0.0-rc1-v1.0.0-1.0.3", "twig/twig": "^3.5.1", "league/oauth2-client": "^2.6.1", "ext-json": "*", "guzzlehttp/guzzle": "7.5.0", - "firebase/php-jwt": "5.5.1", + "firebase/php-jwt": "6.0.0", "mashape/unirest-php": "3.0.4", "squizlabs/php_codesniffer": "*", "phpunit/phpunit": "^9.5" @@ -33,4 +34,4 @@ "require-dev": { "squizlabs/php_codesniffer": "*" } -} +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index d4e3936..06a663b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,35 +4,36 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "34bfa1fe97606526b1ac6ce341873821", + "content-hash": "74beb729a988d914646855718b1f8684", "packages": [ { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "6c0ee619435c5d4f3bc515ab1514cf4cf1006c6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/6c0ee619435c5d4f3bc515ab1514cf4cf1006c6e", + "reference": "6c0ee619435c5d4f3bc515ab1514cf4cf1006c6e", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^12", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^10.5", + "vimeo/psalm": "^5.4" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -58,7 +59,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.x" }, "funding": [ { @@ -74,27 +75,27 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2023-12-09T14:19:21+00:00" }, { "name": "docusign/admin-client", - "version": "v1.4.1", + "version": "v1.4.2-rc1", "source": { "type": "git", "url": "https://github.com/docusign/docusign-admin-php-client.git", - "reference": "4c07d15f9aaeb822b8b6e9625782d83974568f00" + "reference": "99f6b8dc8e3bc2d81783a3ec764b5ed92f60f6a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/docusign/docusign-admin-php-client/zipball/4c07d15f9aaeb822b8b6e9625782d83974568f00", - "reference": "4c07d15f9aaeb822b8b6e9625782d83974568f00", + "url": "https://api.github.com/repos/docusign/docusign-admin-php-client/zipball/99f6b8dc8e3bc2d81783a3ec764b5ed92f60f6a3", + "reference": "99f6b8dc8e3bc2d81783a3ec764b5ed92f60f6a3", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "firebase/php-jwt": "^5.0", + "firebase/php-jwt": "^6.0", "php": ">=7.4" }, "require-dev": { @@ -119,7 +120,7 @@ "homepage": "https://developers.docusign.com" } ], - "description": "The DocuSign package makes integrating DocuSign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-admin-php-client repository.", + "description": "The DocuSign Admin API enables you to automate user management with your existing systems while ensuring governance and compliance.", "homepage": "https://developers.docusign.com", "keywords": [ "admin", @@ -130,30 +131,30 @@ ], "support": { "issues": "https://github.com/docusign/docusign-admin-php-client/issues", - "source": "https://github.com/docusign/docusign-admin-php-client/tree/v1.4.1" + "source": "https://github.com/docusign/docusign-admin-php-client/tree/v1.4.2-rc1" }, - "time": "2023-10-26T03:21:39+00:00" + "time": "2024-03-20T13:02:21+00:00" }, { "name": "docusign/click-client", - "version": "v1.4.0", + "version": "v1.4.1-rc1", "source": { "type": "git", "url": "https://github.com/docusign/docusign-click-php-client.git", - "reference": "0c73cbce6c98a90df610259860ebbc84b39338e4" + "reference": "daef6b091742d49f4580953cb3de3ef4853cb101" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/docusign/docusign-click-php-client/zipball/0c73cbce6c98a90df610259860ebbc84b39338e4", - "reference": "0c73cbce6c98a90df610259860ebbc84b39338e4", + "url": "https://api.github.com/repos/docusign/docusign-click-php-client/zipball/daef6b091742d49f4580953cb3de3ef4853cb101", + "reference": "daef6b091742d49f4580953cb3de3ef4853cb101", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "firebase/php-jwt": "^5.0", - "php": ">=5.4" + "firebase/php-jwt": "^6.0", + "php": ">=7.4" }, "require-dev": { "friendsofphp/php-cs-fixer": "*", @@ -188,29 +189,29 @@ ], "support": { "issues": "https://github.com/docusign/docusign-click-php-client/issues", - "source": "https://github.com/docusign/docusign-click-php-client/tree/v1.4.0" + "source": "https://github.com/docusign/docusign-click-php-client/tree/v1.4.1-rc1" }, - "time": "2023-06-27T20:39:07+00:00" + "time": "2024-03-21T08:07:16+00:00" }, { "name": "docusign/esign-client", - "version": "v6.18.0", + "version": "v6.19.0-rc2", "source": { "type": "git", "url": "https://github.com/docusign/docusign-esign-php-client.git", - "reference": "f056cf2b7ebe671b95421e335de24b78d80a259a" + "reference": "b74a1fc3b96bd83e7deccd19d054a5b9d1ce70df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/docusign/docusign-esign-php-client/zipball/f056cf2b7ebe671b95421e335de24b78d80a259a", - "reference": "f056cf2b7ebe671b95421e335de24b78d80a259a", + "url": "https://api.github.com/repos/docusign/docusign-esign-php-client/zipball/b74a1fc3b96bd83e7deccd19d054a5b9d1ce70df", + "reference": "b74a1fc3b96bd83e7deccd19d054a5b9d1ce70df", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "firebase/php-jwt": "^5.0 || ^6.0", + "firebase/php-jwt": "^6.0", "php": ">=7.4" }, "require-dev": { @@ -235,7 +236,7 @@ "homepage": "https://developers.docusign.com" } ], - "description": "The DocuSign PHP library makes integrating DocuSign into your websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-php-client repository. Join the eSign revolution!", + "description": "The DocuSign PHP library makes integrating DocuSign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-esign-php-client repository. Join the eSign revolution!", "homepage": "https://developers.docusign.com", "keywords": [ "agreement", @@ -247,30 +248,88 @@ ], "support": { "issues": "https://github.com/docusign/docusign-esign-php-client/issues", - "source": "https://github.com/docusign/docusign-esign-php-client/tree/v6.18.0" + "source": "https://github.com/docusign/docusign-esign-php-client/tree/v6.19.0-rc2" }, - "time": "2023-11-22T17:42:56+00:00" + "time": "2024-03-15T15:56:33+00:00" + }, + { + "name": "docusign/maestro-client", + "version": "dev-1.0.0-rc1-v1.0.0-1.0.3", + "source": { + "type": "git", + "url": "https://github.com/docusign/docusign-maestro-php-client.git", + "reference": "93a6ca6056a9a3aba8ef17c92fadf81159f30128" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/docusign/docusign-maestro-php-client/zipball/93a6ca6056a9a3aba8ef17c92fadf81159f30128", + "reference": "93a6ca6056a9a3aba8ef17c92fadf81159f30128", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "firebase/php-jwt": "^6.0", + "php": ">=7.4" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "*", + "phpunit/phpunit": "~4.8", + "satooshi/php-coveralls": "~1.0", + "squizlabs/php_codesniffer": "~2.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "DocuSign\\Maestro\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "DocuSign", + "homepage": "https://developers.docusign.com" + } + ], + "description": "The DocuSign package makes integrating DocuSign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-maestro-php-client repository.", + "homepage": "https://developers.docusign.com", + "keywords": [ + "Maestro", + "api", + "docusign", + "php", + "sdk" + ], + "support": { + "issues": "https://github.com/docusign/docusign-maestro-php-client/issues", + "source": "https://github.com/docusign/docusign-maestro-php-client/tree/1.0.0-rc1-v1.0.0-1.0.3" + }, + "time": "2024-04-03T17:49:00+00:00" }, { "name": "docusign/monitor-client", - "version": "v1.2.0", + "version": "v1.2.1-rc1", "source": { "type": "git", "url": "https://github.com/docusign/docusign-monitor-php-client.git", - "reference": "c1edb3b7ec9dc80c8fa540b1f7cc432ed1b86976" + "reference": "9e03f8f3bb453c7218e8808bc268ca77047421ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/docusign/docusign-monitor-php-client/zipball/c1edb3b7ec9dc80c8fa540b1f7cc432ed1b86976", - "reference": "c1edb3b7ec9dc80c8fa540b1f7cc432ed1b86976", + "url": "https://api.github.com/repos/docusign/docusign-monitor-php-client/zipball/9e03f8f3bb453c7218e8808bc268ca77047421ff", + "reference": "9e03f8f3bb453c7218e8808bc268ca77047421ff", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "firebase/php-jwt": "^5.0", - "php": ">=5.4" + "firebase/php-jwt": "^6.0", + "php": ">=7.4" }, "require-dev": { "friendsofphp/php-cs-fixer": "*", @@ -305,29 +364,29 @@ ], "support": { "issues": "https://github.com/docusign/docusign-monitor-php-client/issues", - "source": "https://github.com/docusign/docusign-monitor-php-client/tree/v1.2.0" + "source": "https://github.com/docusign/docusign-monitor-php-client/tree/v1.2.1-rc1" }, - "time": "2023-07-10T17:18:56+00:00" + "time": "2024-03-20T14:03:16+00:00" }, { "name": "docusign/rooms-client", - "version": "v2.1.0", + "version": "v2.1.1-rc1", "source": { "type": "git", "url": "https://github.com/docusign/docusign-rooms-php-client.git", - "reference": "85f45cffa56192b5d5e85b8678c15be97795ddb5" + "reference": "f3998a3551332e5bb45731418cd7a67b2c650149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/docusign/docusign-rooms-php-client/zipball/85f45cffa56192b5d5e85b8678c15be97795ddb5", - "reference": "85f45cffa56192b5d5e85b8678c15be97795ddb5", + "url": "https://api.github.com/repos/docusign/docusign-rooms-php-client/zipball/f3998a3551332e5bb45731418cd7a67b2c650149", + "reference": "f3998a3551332e5bb45731418cd7a67b2c650149", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "firebase/php-jwt": "^5.0", + "firebase/php-jwt": "^6.0", "php": ">=7.4" }, "require-dev": { @@ -352,7 +411,7 @@ "homepage": "https://developers.docusign.com" } ], - "description": "The DocuSign PHP library makes integrating DocuSign into your websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-php-client repository. Join the eSign revolution!", + "description": "The DocuSign PHP library makes integrating DocuSign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-rooms-php-client repository.", "homepage": "https://developers.docusign.com", "keywords": [ "api", @@ -363,29 +422,29 @@ ], "support": { "issues": "https://github.com/docusign/docusign-rooms-php-client/issues", - "source": "https://github.com/docusign/docusign-rooms-php-client/tree/v2.1.0" + "source": "https://github.com/docusign/docusign-rooms-php-client/tree/v2.1.1-rc1" }, - "time": "2023-03-04T01:48:45+00:00" + "time": "2024-03-21T08:24:01+00:00" }, { "name": "docusign/webforms-client", - "version": "v1.0.0", + "version": "v1.0.1-rc1", "source": { "type": "git", "url": "https://github.com/docusign/docusign-webforms-php-client.git", - "reference": "2a24e5e04b6cdeb82fc60531d079539eb37e17e1" + "reference": "b3f2c6f7940b319011cd941735ecb0213ed4c2b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/docusign/docusign-webforms-php-client/zipball/2a24e5e04b6cdeb82fc60531d079539eb37e17e1", - "reference": "2a24e5e04b6cdeb82fc60531d079539eb37e17e1", + "url": "https://api.github.com/repos/docusign/docusign-webforms-php-client/zipball/b3f2c6f7940b319011cd941735ecb0213ed4c2b6", + "reference": "b3f2c6f7940b319011cd941735ecb0213ed4c2b6", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "firebase/php-jwt": "^5.0", + "firebase/php-jwt": "^6.0", "php": ">=7.4" }, "require-dev": { @@ -421,22 +480,22 @@ ], "support": { "issues": "https://github.com/docusign/docusign-webforms-php-client/issues", - "source": "https://github.com/docusign/docusign-webforms-php-client/tree/v1.0.0" + "source": "https://github.com/docusign/docusign-webforms-php-client/tree/v1.0.1-rc1" }, - "time": "2024-02-14T12:32:10+00:00" + "time": "2024-03-21T08:20:45+00:00" }, { "name": "firebase/php-jwt", - "version": "v5.5.1", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "83b609028194aa042ea33b5af2d41a7427de80e6" + "reference": "0541cba75ab108ef901985e68055a92646c73534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/83b609028194aa042ea33b5af2d41a7427de80e6", - "reference": "83b609028194aa042ea33b5af2d41a7427de80e6", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/0541cba75ab108ef901985e68055a92646c73534", + "reference": "0541cba75ab108ef901985e68055a92646c73534", "shasum": "" }, "require": { @@ -478,9 +537,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v5.5.1" + "source": "https://github.com/firebase/php-jwt/tree/v6.0.0" }, - "time": "2021-11-08T20:18:51+00:00" + "time": "2022-01-24T15:18:34+00:00" }, { "name": "guzzlehttp/guzzle", @@ -612,7 +671,7 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.3", + "version": "1.5.x-dev", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", @@ -630,6 +689,7 @@ "require-dev": { "symfony/phpunit-bridge": "^4.4 || ^5.1" }, + "default-branch": true, "type": "library", "autoload": { "files": [ @@ -691,16 +751,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.6.x-dev", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "a243f80a1ca7fe8ceed4deee17f12c1930efe662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a243f80a1ca7fe8ceed4deee17f12c1930efe662", + "reference": "a243f80a1ca7fe8ceed4deee17f12c1930efe662", "shasum": "" }, "require": { @@ -721,6 +781,7 @@ "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, + "default-branch": true, "type": "library", "extra": { "bamarni-bin": { @@ -787,7 +848,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.6" }, "funding": [ { @@ -803,7 +864,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-03-31T10:09:24+00:00" }, { "name": "league/oauth2-client", @@ -928,16 +989,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "2f5294676c802a62b0549f6bc8983f14294ce369" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/2f5294676c802a62b0549f6bc8983f14294ce369", + "reference": "2f5294676c802a62b0549f6bc8983f14294ce369", "shasum": "" }, "require": { @@ -945,13 +1006,15 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, + "default-branch": true, "type": "library", "autoload": { "files": [ @@ -975,7 +1038,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.x" }, "funding": [ { @@ -983,20 +1046,20 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-02-10T11:10:03+00:00" }, { "name": "nikic/php-parser", - "version": "v5.0.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" + "reference": "46be4560c4cd4bab2b74882c0da39a4548a5cfbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/46be4560c4cd4bab2b74882c0da39a4548a5cfbe", + "reference": "46be4560c4cd4bab2b74882c0da39a4548a5cfbe", "shasum": "" }, "require": { @@ -1007,8 +1070,9 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, + "default-branch": true, "bin": [ "bin/php-parse" ], @@ -1039,9 +1103,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" + "source": "https://github.com/nikic/PHP-Parser/tree/master" }, - "time": "2024-01-07T17:17:35+00:00" + "time": "2024-03-17T10:24:36+00:00" }, { "name": "paragonie/random_compat", @@ -1095,25 +1159,27 @@ }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", "php": "^7.2 || ^8.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1149,9 +1215,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -1206,16 +1278,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.30", + "version": "9.2.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + "reference": "3352293d9e91513d5508c415835014881b420218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/3352293d9e91513d5508c415835014881b420218", + "reference": "3352293d9e91513d5508c415835014881b420218", "shasum": "" }, "require": { @@ -1272,7 +1344,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" }, "funding": [ { @@ -1280,20 +1352,20 @@ "type": "github" } ], - "time": "2023-12-22T06:47:57+00:00" + "time": "2024-03-22T05:16:32+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "3.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "38b24367e1b340aa78b96d7cab042942d917bb84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/38b24367e1b340aa78b96d7cab042942d917bb84", + "reference": "38b24367e1b340aa78b96d7cab042942d917bb84", "shasum": "" }, "require": { @@ -1332,7 +1404,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0" }, "funding": [ { @@ -1340,7 +1412,7 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2022-02-11T16:23:04+00:00" }, { "name": "phpunit/php-invoker", @@ -1525,16 +1597,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.16", + "version": "9.6.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" + "reference": "452df670ecd903905905a2fed00447e0f57df1af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/452df670ecd903905905a2fed00447e0f57df1af", + "reference": "452df670ecd903905905a2fed00447e0f57df1af", "shasum": "" }, "require": { @@ -1608,7 +1680,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6" }, "funding": [ { @@ -1624,11 +1696,11 @@ "type": "tidelift" } ], - "time": "2024-01-19T07:03:14+00:00" + "time": "2024-04-04T07:49:41+00:00" }, { "name": "psr/http-client", - "version": "1.0.3", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", @@ -1644,6 +1716,7 @@ "php": "^7.0 || ^8.0", "psr/http-message": "^1.0 || ^2.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1680,22 +1753,23 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "7037f4b0950474e9d1350e8df89b15f1842085f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/7037f4b0950474e9d1350e8df89b15f1842085f6", + "reference": "7037f4b0950474e9d1350e8df89b15f1842085f6", "shasum": "" }, "require": { "php": ">=7.0.0", "psr/http-message": "^1.0 || ^2.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1717,7 +1791,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -1729,13 +1803,13 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2023-09-22T11:16:44+00:00" }, { "name": "psr/http-message", - "version": "2.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", @@ -1750,6 +1824,7 @@ "require": { "php": "^7.2 || ^8.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1832,16 +1907,16 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -1876,7 +1951,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -1884,7 +1959,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -1999,16 +2074,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "b247957a1c8dc81a671770f74b479c0a78a818f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/b247957a1c8dc81a671770f74b479c0a78a818f1", + "reference": "b247957a1c8dc81a671770f74b479c0a78a818f1", "shasum": "" }, "require": { @@ -2061,7 +2136,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0" }, "funding": [ { @@ -2069,11 +2144,11 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2022-09-14T12:46:14+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", @@ -2130,16 +2205,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -2184,7 +2259,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -2192,11 +2267,11 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "5.1.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", @@ -2247,7 +2322,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1" }, "funding": [ { @@ -2259,16 +2334,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -2324,7 +2399,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -2332,20 +2407,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -2388,7 +2463,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -2396,11 +2471,11 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "1.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", @@ -2569,7 +2644,7 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", @@ -2632,16 +2707,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "ff553e7482dcee39fa4acc2b175d6ddeb0f7bc25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ff553e7482dcee39fa4acc2b175d6ddeb0f7bc25", + "reference": "ff553e7482dcee39fa4acc2b175d6ddeb0f7bc25", "shasum": "" }, "require": { @@ -2650,10 +2725,11 @@ "require-dev": { "phpunit/phpunit": "^9.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2674,8 +2750,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/main" }, "funding": [ { @@ -2683,11 +2758,11 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T18:47:08+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "3.2.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", @@ -2731,7 +2806,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/3.2" }, "funding": [ { @@ -2743,7 +2818,7 @@ }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "3.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", @@ -2796,26 +2871,26 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.8.1", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" + "reference": "ea4781819dd824d0637ee1174304dc8cd04040f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", - "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ea4781819dd824d0637ee1174304dc8cd04040f0", + "reference": "ea4781819dd824d0637ee1174304dc8cd04040f0", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.4.0" + "php": ">=7.2.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + "phpunit/phpunit": "^8.0 || ^9.3.4" }, "bin": [ "bin/phpcbf", @@ -2845,7 +2920,7 @@ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.", "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", @@ -2872,29 +2947,30 @@ "type": "open_collective" } ], - "time": "2024-01-11T20:47:48+00:00" + "time": "2024-04-03T02:02:00+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "2c438b99bb2753c1628c1e6f523991edea5b03a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/2c438b99bb2753c1628c1e6f523991edea5b03a4", + "reference": "2c438b99bb2753c1628c1e6f523991edea5b03a4", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -2923,7 +2999,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/main" }, "funding": [ { @@ -2939,11 +3015,11 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2024-01-02T14:07:37+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -2964,6 +3040,7 @@ "suggest": { "ext-ctype": "For best performance" }, + "default-branch": true, "type": "library", "extra": { "thanks": { @@ -3022,16 +3099,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "e5e7ddb00b859dbdf5ad8f3bbe4cd29a3a37aa34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e5e7ddb00b859dbdf5ad8f3bbe4cd29a3a37aa34", + "reference": "e5e7ddb00b859dbdf5ad8f3bbe4cd29a3a37aa34", "shasum": "" }, "require": { @@ -3043,6 +3120,7 @@ "suggest": { "ext-mbstring": "For best performance" }, + "default-branch": true, "type": "library", "extra": { "thanks": { @@ -3082,7 +3160,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/1.x" }, "funding": [ { @@ -3098,11 +3176,11 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-03-14T13:49:05+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", @@ -3117,6 +3195,7 @@ "require": { "php": ">=7.1" }, + "default-branch": true, "type": "library", "extra": { "thanks": { @@ -3182,16 +3261,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -3220,7 +3299,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -3228,34 +3307,42 @@ "type": "github" } ], - "time": "2023-11-20T00:12:19+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "twig/twig", - "version": "v3.8.0", + "version": "3.x-dev", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d" + "reference": "64ee590d469227705cb4bad179cbda90241511ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", - "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/64ee590d469227705cb4bad179cbda90241511ac", + "reference": "64ee590d469227705cb4bad179cbda90241511ac", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3", "symfony/polyfill-php80": "^1.22" }, "require-dev": { "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0" + "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, + "default-branch": true, "type": "library", "autoload": { + "files": [ + "src/Resources/core.php", + "src/Resources/debug.php", + "src/Resources/escaper.php", + "src/Resources/string_loader.php" + ], "psr-4": { "Twig\\": "src/" } @@ -3288,7 +3375,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.8.0" + "source": "https://github.com/twigphp/Twig/tree/3.x" }, "funding": [ { @@ -3300,15 +3387,14 @@ "type": "tidelift" } ], - "time": "2023-11-21T18:54:41+00:00" + "time": "2024-04-03T15:08:28+00:00" } ], "packages-dev": [], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": { - "docusign/click-client": 5, - "docusign/esign-client": 5 + "docusign/maestro-client": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/public/assets/search.js b/public/assets/search.js index 0f89992..f9ddb0b 100644 --- a/public/assets/search.js +++ b/public/assets/search.js @@ -6,6 +6,7 @@ let DS_SEARCH = (function () { ROOMS: 'rooms', ADMIN: 'admin', CONNECT: 'connect', + MAESTRO: 'maestro', WEBFORMS: 'webforms' }; @@ -126,6 +127,8 @@ let DS_SEARCH = (function () { return "eg"; case API_TYPES.CONNECT: return "con"; + case API_TYPES.MAESTRO: + return "mae"; case API_TYPES.WEBFORMS: return "web"; } diff --git a/src/Controllers/Auth/DocuSign.php b/src/Controllers/Auth/DocuSign.php index 9e797e1..3ea5972 100644 --- a/src/Controllers/Auth/DocuSign.php +++ b/src/Controllers/Auth/DocuSign.php @@ -121,6 +121,10 @@ public function getDefaultScopes(): array . " account_read domain_read identity_provider_read user_data_redact asset_group_account_read" . " asset_group_account_clone_write asset_group_account_clone_read" ]; + } elseif ($_SESSION['api_type'] == ApiTypes::MAESTRO) { + return [ + "signature aow_manage" + ]; } elseif ($_SESSION['api_type'] == ApiTypes::WEBFORMS) { return [ "signature webforms_read webforms_instance_read webforms_instance_write" diff --git a/src/Controllers/Examples/Maestro/Eg001TriggerWorkflow.php b/src/Controllers/Examples/Maestro/Eg001TriggerWorkflow.php new file mode 100644 index 0000000..588621c --- /dev/null +++ b/src/Controllers/Examples/Maestro/Eg001TriggerWorkflow.php @@ -0,0 +1,211 @@ +checkDsToken(); + $this->codeExampleText = $this->getPageText(static::EG); + $workflowName = 'Example workflow - send invite to signer'; + $accountId = $this->args['account_id']; + $workflowManagementApi = $this->clientService->workflowManagementApi(); + + try { + $workflowDefinitions = TriggerMaestroWorkflowService::getWorkflowDefinitions( + $workflowManagementApi, + $accountId + ); + + $this->selectNewestWorkflowByName($workflowDefinitions, $workflowName); + } catch (ApiException $e) { + if ($e->getCode() == 403) { + $this->contactSupportToEnableFeature($e); + } + } + + if ($_COOKIE["template_id"] != null && $_SESSION["workflow_id"] === null) { + try { + $createdWorkflowDefinition = TriggerMaestroWorkflowService::createWorkflow( + $workflowManagementApi, + $accountId, + $_COOKIE["template_id"] + ); + + $_SESSION["workflow_id"] = $createdWorkflowDefinition->getWorkflowDefinitionId(); + + $publishWorkflowUrl = TriggerMaestroWorkflowService::publishWorkflow( + $workflowManagementApi, + $accountId, + $_SESSION["workflow_id"] + ); + + $_SESSION["workflow_published"] = true; + $this->openPublishWorkflowPage($publishWorkflowUrl); + } catch (ApiException $e) { + if ($e->getCode() == 403) { + $this->contactSupportToEnableFeature($e); + } + } + } + + if ($_SESSION['workflow_published']) { + $publishWorkflowUrl = TriggerMaestroWorkflowService::publishWorkflow( + $workflowManagementApi, + $accountId, + $_SESSION["workflow_id"] + ); + + if ($publishWorkflowUrl == null) { + $_SESSION["workflow_published"] = false; + } else { + $this->openPublishWorkflowPage($publishWorkflowUrl); + } + } + + parent::controller(); + } + + /** + * Check the access token and call the worker method + * @return void + * @throws ApiException + */ + public function createController(): void + { + $this->getTemplateArgs(); + + $workflowId = $_SESSION["workflow_id"]; + $workflowManagementApi = $this->clientService->workflowManagementApi(); + + $trigger = new TriggerWorkflowViaPostResponse(); + try { + $workflowDefinition = TriggerMaestroWorkflowService::getWorkflowDefinition( + $workflowManagementApi, + $this->args['account_id'], + $workflowId + ); + + $triggerUrl = $workflowDefinition->getTriggerUrl(); + + $queryParams = parse_url($triggerUrl, PHP_URL_QUERY); + parse_str($queryParams, $params); + + $mtid = $params['mtid']; + $mtsec = $params['mtsec']; + + $triggerApi = $this->clientService->workflowTriggerApi(); + + $trigger = TriggerMaestroWorkflowService::triggerWorkflow( + $triggerApi, + $this->args['account_id'], + $this->args['envelope_args']['instance_name'], + $this->args['envelope_args']['signer_name'], + $this->args['envelope_args']['signer_email'], + $this->args['envelope_args']['cc_name'], + $this->args['envelope_args']['cc_email'], + $mtid, + $mtsec + ); + $_SESSION['instance_id'] = $trigger->getInstanceId(); + } catch (ApiException $e) { + if ($e->getCode() == 403) { + $this->contactSupportToEnableFeature($e); + } + } + $this->clientService->showDoneTemplateFromManifest( + $this->codeExampleText, + json_encode($trigger->__toString()) + ); + } + + /** + * Get specific template arguments + * @return array + */ + public function getTemplateArgs(): array + { + $envelope_args = [ + 'instance_name' => $_POST['instance_name'], + 'signer_email' => $_POST['signer_email'], + 'signer_name' => $_POST['signer_name'], + 'cc_email' => $_POST['cc_email'], + 'cc_name' => $_POST['cc_name'], + ]; + return [ + 'account_id' => $_SESSION['ds_account_id'], + 'base_path' => $_SESSION['ds_base_path'], + 'ds_access_token' => $_SESSION['ds_access_token'], + 'envelope_args' => $envelope_args + ]; + } + + private function contactSupportToEnableFeature($e) + { + $GLOBALS['twig']->display('error.html', [ + 'error_code' => $e->getCode(), + 'error_message' => ManifestService::replacePlaceholders( + '{0}', + 'Maestro', + ManifestService::getCommonTexts()['ContactSupportToEnableFeature'] + ), + 'common_texts' => ManifestService::getCommonTexts() + ]); + exit; + } + + private function selectNewestWorkflowByName($workflowDefinitions, $workflowName) + { + if ($workflowDefinitions['count'] > 0) { + $filteredWorkflows = array_filter( + $workflowDefinitions['value'], + function ($workflow) use ($workflowName) { + return $workflow['name'] === $workflowName; + } + ); + + usort($filteredWorkflows, function ($wf1, $wf2) { + return strtotime($wf2['lastUpdatedDate']) - strtotime($wf1['lastUpdatedDate']); + }); + + $workflow = reset($filteredWorkflows); + + if ($workflow) { + $_SESSION["workflow_id"] = $workflow['id']; + } + } + } + + private function openPublishWorkflowPage($publishWorkflowUrl) + { + $GLOBALS['twig']->display("maestro/eg001_publish_workflow.html", [ + 'title' => $this->routerService->getTitle(static::EG), + 'consent_url' => ManifestService::replacePlaceholders( + '{0}', + $publishWorkflowUrl, + $this->codeExampleText['AdditionalPage'][0]['ResultsPageText'] + ), + 'code_example_text' => $this->codeExampleText, + 'common_texts' => $this->getCommonText() + ]); + exit(); + } +} diff --git a/src/Controllers/Examples/Maestro/Eg002CancelWorkflow.php b/src/Controllers/Examples/Maestro/Eg002CancelWorkflow.php new file mode 100644 index 0000000..a9cebfc --- /dev/null +++ b/src/Controllers/Examples/Maestro/Eg002CancelWorkflow.php @@ -0,0 +1,90 @@ +clientService->workflowInstanceManagementApi(); + + try { + $isRedirectNeeded = CancelMaestroWorkflowService::getWorkflowInstanceAndCheckItsStatus( + $workflowInstanceApi, + $accountId, + $workflowId, + $instanceId + ); + + if (!$isRedirectNeeded) { + header('Location: ' . $GLOBALS['app_url'] . 'index.php?page=mae001'); + } + + $result = CancelMaestroWorkflowService::cancelWorkflowInstance( + $workflowInstanceApi, + $accountId, + $instanceId + ); + } catch (ApiException $e) { + if ($e->getCode() == 403) { + $GLOBALS['twig']->display('error.html', [ + 'error_code' => $e->getCode(), + 'error_message' => ManifestService::replacePlaceholders( + '{0}', + 'Maestro', + ManifestService::getCommonTexts()['ContactSupportToEnableFeature'] + ), + 'common_texts' => ManifestService::getCommonTexts() + ]); + exit; + } + } + + $this->clientService->showDoneTemplateFromManifest( + $this->codeExampleText, + json_encode($result->__toString()), + ManifestService::replacePlaceholders('{0}', $instanceId, $this->codeExampleText['ResultsPageText']) + ); + } + + /** + * Get specific template arguments + * @return array + */ + public function getTemplateArgs(): array + { + return [ + 'account_id' => $_SESSION['ds_account_id'], + 'base_path' => $_SESSION['ds_base_path'], + 'ds_access_token' => $_SESSION['ds_access_token'], + ]; + } +} diff --git a/src/Controllers/Examples/Maestro/Eg003GetWorkflowStatus.php b/src/Controllers/Examples/Maestro/Eg003GetWorkflowStatus.php new file mode 100644 index 0000000..bbda344 --- /dev/null +++ b/src/Controllers/Examples/Maestro/Eg003GetWorkflowStatus.php @@ -0,0 +1,83 @@ +getTemplateArgs(); + $instanceId = $_SESSION['instance_id']; + $workflowId = $_SESSION["workflow_id"]; + $workflowInstanceApi = $this->clientService->workflowInstanceManagementApi(); + + try { + $workflowInstance = GetWorkflowStatusService::getWorkflowInstance( + $workflowInstanceApi, + $this->args['account_id'], + $workflowId, + $instanceId + ); + } catch (ApiException $e) { + if ($e->getCode() == 403) { + $GLOBALS['twig']->display('error.html', [ + 'error_code' => $e->getCode(), + 'error_message' => ManifestService::replacePlaceholders( + '{0}', + 'Maestro', + ManifestService::getCommonTexts()['ContactSupportToEnableFeature'] + ), + 'common_texts' => ManifestService::getCommonTexts() + ]); + exit; + } + } + + $this->clientService->showDoneTemplateFromManifest( + $this->codeExampleText, + json_encode($workflowInstance->__toString()), + ManifestService::replacePlaceholders( + '{0}', + $workflowInstance->getInstanceState(), + $this->codeExampleText['ResultsPageText'] + ) + ); + } + + /** + * Get specific template arguments + * @return array + */ + public function getTemplateArgs(): array + { + return [ + 'account_id' => $_SESSION['ds_account_id'], + 'base_path' => $_SESSION['ds_base_path'], + 'ds_access_token' => $_SESSION['ds_access_token'] + ]; + } +} diff --git a/src/Controllers/Examples/eSignature/EG008CreateTemplate.php b/src/Controllers/Examples/eSignature/EG008CreateTemplate.php index 34624f5..506e034 100644 --- a/src/Controllers/Examples/eSignature/EG008CreateTemplate.php +++ b/src/Controllers/Examples/eSignature/EG008CreateTemplate.php @@ -45,6 +45,8 @@ public function createController(): void ); if ($templateInformation) { $_SESSION["template_id"] = $templateInformation["template_id"]; # Save for use by other examples + setcookie("template_id", $_SESSION["template_id"]); + $msg = $templateInformation['created_new_template'] ? "The template has been created!" : "Done. The template already existed in your account."; diff --git a/src/Controllers/MaestroApiBaseController.php b/src/Controllers/MaestroApiBaseController.php new file mode 100644 index 0000000..85039d3 --- /dev/null +++ b/src/Controllers/MaestroApiBaseController.php @@ -0,0 +1,137 @@ +args = $this->getTemplateArgs(); + $this->clientService = new MaestroApiClientService($this->args); + $this->routerService = new RouterService(); + if (defined("static::EG")) { + $this->checkDsToken(); + } + } + + abstract protected function getTemplateArgs(): array; + + /** + * Base controller + * + * @param $args array|null + * @return void + */ + public function controller(array $args = null): void + { + $this->codeExampleText = $this->getPageText(static::EG); + + if ($this->isMethodGet()) { + $this->getController($this->routerService, basename(static::FILE), $args); + } + if ($this->isMethodPost()) { + $this->routerService->checkCsrf(); + $this->createController(); + } + } + + /** + * Show the example's form page + * + * @param $routerService RouterService + * @param $basename string|null + * @param $args array|null + * @return void + */ + private function getController( + RouterService $routerService, + ?string $basename, + ?array $args + ): void { + if ($this->isHomePage(static::EG)) { + $GLOBALS['twig']->display( + static::EG . '.html', + [ + 'title' => $this->homePageTitle(static::EG), + 'show_doc' => false, + 'common_texts' => $this->getCommonText() + ] + ); + } else { + $currentAPI = ManifestService::getAPIByLink(static::EG); + if ($routerService->dsTokenOk() && $currentAPI === $_SESSION['api_type']) { + $GLOBALS['twig']->display($routerService->getTemplate(static::EG), [ + 'title' => $routerService->getTitle(static::EG), + 'source_file' => $basename, + 'source_url' => $GLOBALS['DS_CONFIG']['github_example_url'] . "/Maestro/" . $basename, + 'documentation' => $GLOBALS['DS_CONFIG']['documentation'] . static::EG, + 'show_doc' => $GLOBALS['DS_CONFIG']['documentation'], + 'args' => $args, + 'template_id' => $_COOKIE["template_id"], + 'workflow_id' => $_SESSION["workflow_id"], + 'instance_id' => $_SESSION['instance_id'], + 'signer_name' => $GLOBALS['DS_CONFIG']['signer_name'], + 'signer_email' => $GLOBALS['DS_CONFIG']['signer_email'], + 'code_example_text' => $this->codeExampleText, + 'common_texts' => $this->getCommonText() + ]); + } else { + # Save the current operation so it will be resumed after authentication + $_SESSION['prefered_api_type'] = ApiTypes::MAESTRO; + $_SESSION['eg'] = $GLOBALS['app_url'] . 'index.php?page=' . static::EG; + header('Location: ' . $GLOBALS['app_url'] . 'index.php?page=' . static::LOGIN_REDIRECT); + exit; + } + } + } + + /** + * Declaration for the base controller creator. Each creator should be described in specific Controller + */ + abstract protected function createController(): void; + + /** + * @return array + */ + protected function getDefaultTemplateArgs(): array + { + return [ + 'account_id' => $_SESSION['ds_account_id'], + 'base_path' => $_SESSION['ds_base_path'], // here + 'ds_access_token' => $_SESSION['ds_access_token'] + ]; + } + + /** + * Check ds + */ + protected function checkDsToken(): void + { + $currentAPI = ManifestService::getAPIByLink(static::EG); + + if (!$this->routerService->dsTokenOk(self::MINIMUM_BUFFER_MIN) || $currentAPI !== $_SESSION['api_type']) { + $_SESSION['prefered_api_type'] = ApiTypes::MAESTRO; + $this->clientService->needToReAuth(static::EG); + } + } + + /** + * Check input values using regular expressions + * @param $value + * @return string + */ + protected function checkInputValues($value): string + { + return preg_replace('/([^\w \-\@\.\,])+/', '', $value); + } +} diff --git a/src/Services/ApiTypes.php b/src/Services/ApiTypes.php index 5d0c2e9..470ae7b 100644 --- a/src/Services/ApiTypes.php +++ b/src/Services/ApiTypes.php @@ -10,5 +10,6 @@ abstract class ApiTypes const ROOMS = 'Rooms'; const ESIGNATURE = 'eSignature'; const CONNECT = 'Connect'; + const MAESTRO = 'Maestro'; const WEBFORMS = 'WebForms'; } diff --git a/src/Services/Examples/Maestro/CancelMaestroWorkflowService.php b/src/Services/Examples/Maestro/CancelMaestroWorkflowService.php new file mode 100644 index 0000000..0625060 --- /dev/null +++ b/src/Services/Examples/Maestro/CancelMaestroWorkflowService.php @@ -0,0 +1,59 @@ +getWorkflowInstance( + $accountId, + $workflowId, + $instanceId + ); + + if ($instance->getInstanceState() != "In progress") { + return true; + } + + return false; + } catch (ApiException $exception) { + return true; + } + } + + /** + * Cancel workflow instance + * @param WorkflowInstanceManagementApi $workflowInstanceApi + * @param string $accountId + * @param string $instanceId + * @return CancelResponse + * @throws ApiException + */ + #ds-snippet-start:Maestro2Step2 + public static function cancelWorkflowInstance( + WorkflowInstanceManagementApi $workflowInstanceApi, + string $accountId, + string $instanceId + ): CancelResponse { + return $workflowInstanceApi->cancelWorkflowInstance($accountId, $instanceId); + } + #ds-snippet-end:Maestro2Step2 +} diff --git a/src/Services/Examples/Maestro/GetWorkflowStatusService.php b/src/Services/Examples/Maestro/GetWorkflowStatusService.php new file mode 100644 index 0000000..9938766 --- /dev/null +++ b/src/Services/Examples/Maestro/GetWorkflowStatusService.php @@ -0,0 +1,34 @@ +getWorkflowInstance( + $accountId, + $workflowId, + $instanceId + ); + } + #ds-snippet-end:Maestro3Step2 +} diff --git a/src/Services/Examples/Maestro/TriggerMaestroWorkflowService.php b/src/Services/Examples/Maestro/TriggerMaestroWorkflowService.php new file mode 100644 index 0000000..9205dab --- /dev/null +++ b/src/Services/Examples/Maestro/TriggerMaestroWorkflowService.php @@ -0,0 +1,723 @@ +getWorkflowDefinition($accountId, $workflowId); + } + #ds-snippet-end:Maestro1Step3 + + /** + * Get workflow definitions + * @param WorkflowManagementApi $managementApi + * @param string $accountId + * @return WorkflowDefinitionList + * @throws ApiException + */ + public static function getWorkflowDefinitions( + WorkflowManagementApi $managementApi, + string $accountId + ): WorkflowDefinitionList { + $workflowDefinitionsOptions = new GetWorkflowDefinitionsOptions(); + $workflowDefinitionsOptions->setStatus("active"); + + return $managementApi->getWorkflowDefinitions($accountId, $workflowDefinitionsOptions); + } + + /** + * Trigger workflow + * @param WorkflowTriggerApi $workflowTriggerApi + * @param string $accountId + * @param string $instanceName + * @param string $signerName + * @param string $signerEmail + * @param string $ccName + * @param string $ccEmail + * @param string $mtid + * @param string $mtsec + * @return TriggerWorkflowViaPostResponse + * @throws ApiException + */ + public static function triggerWorkflow( + WorkflowTriggerApi $workflowTriggerApi, + string $accountId, + string $instanceName, + string $signerName, + string $signerEmail, + string $ccName, + string $ccEmail, + string $mtid, + string $mtsec + ): TriggerWorkflowViaPostResponse { + #ds-snippet-start:Maestro1Step4 + $triggerPayload = new TriggerPayload(); + $triggerPayload->setInstanceName($instanceName); + $triggerPayload->setParticipants(new stdClass()); + $triggerPayload->setPayload( + (object)array( + "signerEmail" => $signerEmail, + "signerName" => $signerName, + "ccEmail" => $ccEmail, + "ccName" => $ccName + ) + ); + $triggerPayload->setMetadata(new stdClass()); + + $triggerOptions = new TriggerWorkflowOptions(); + $triggerOptions->setMtid($mtid); + $triggerOptions->setMtsec($mtsec); + #ds-snippet-end:Maestro1Step4 + + #ds-snippet-start:Maestro1Step5 + return $workflowTriggerApi->triggerWorkflow($accountId, $triggerPayload, $triggerOptions); + #ds-snippet-end:Maestro1Step5 + } + + /** + * Trigger workflow + * @return WorkflowDefinitionWithId + * @throws ApiException + */ + public static function publishWorkflow( + WorkflowManagementApi $managementApi, + string $accountId, + string $workflowId + ): string { + try { + $managementApi->publishOrUnPublishWorkflowDefinition( + $accountId, + $workflowId, + new DeployRequest() + ); + return ""; + } catch (ApiException $exception) { + $isConsentRequired = str_contains( + strtolower($exception->getResponseBody()->message), + 'consent required' + ); + + if ($isConsentRequired) { + return $exception->getResponseBody()->consentUrl; + } else { + throw $exception; + } + } + } + + /** + * Generate random guid + * @throws Exception + */ + private static function generateSecureGuid(): string + { + mt_srand((double)microtime() * 10000); + $charid = strtoupper(md5(uniqid(rand(), true))); + $hyphen = '-'; + $uuid = substr($charid, 0, 8) . $hyphen + . substr($charid, 8, 4) . $hyphen + . substr($charid, 12, 4) . $hyphen + . substr($charid, 16, 4) . $hyphen + . substr($charid, 20, 12); + return $uuid; + } + + /** + * Create workflow + * @param WorkflowManagementApi $managementApi + * @param string $accountId + * @param string $templateId + * @return NewOrUpdatedWorkflowDefinitionResponse + * @throws ApiException + * @throws Exception + */ + public static function createWorkflow( + WorkflowManagementApi $managementApi, + string $accountId, + string $templateId + ): NewOrUpdatedWorkflowDefinitionResponse { + $signerId = TriggerMaestroWorkflowService::generateSecureGuid(); + $ccId = TriggerMaestroWorkflowService::generateSecureGuid(); + $triggerId = "wfTrigger"; + + $body = '{ + "workflowDefinition": { + "workflowName": "Example workflow - send invite to signer", + "workflowDescription": "", + "accountId": "' . $accountId . '", + "documentVersion": "1.0.0", + "schemaVersion": "1.0.0", + "participants": { + "' . $signerId . '": { + "participantRole": "Signer" + }, + "' . $ccId . '": { + "participantRole": "CC" + } + }, + "trigger": { + "name": "Get_URL", + "type": "Http", + "httpType": "Get", + "id": "' . $triggerId . '", + "input": { + "metadata": { + "customAttributes": {} + }, + "payload": { + "dacId_' . $triggerId . '": { + "source": "step", + "propertyName": "dacId", + "stepId": "'. $triggerId . '" + }, + "id_' . $triggerId . '": { + "source": "step", + "propertyName": "id", + "stepId": "' . $triggerId . '" + }, + "signerName_' . $triggerId . '": { + "source": "step", + "propertyName": "signerName", + "stepId": "' . $triggerId . '" + }, + "signerEmail_' . $triggerId . '": { + "source": "step", + "propertyName": "signerEmail", + "stepId": "' . $triggerId . '" + }, + "ccName_' . $triggerId . '": { + "source": "step", + "propertyName": "ccName", + "stepId": "' . $triggerId . '" + }, + "ccEmail_' . $triggerId . '": { + "source": "step", + "propertyName": "ccEmail", + "stepId": "'. $triggerId . '" + } + }, + "participants": {} + }, + "output": { + "dacId_'. $triggerId . '": { + "source": "step", + "propertyName": "dacId", + "stepId": "'. $triggerId . '" + } + } + }, + "variables": { + "dacId_'. $triggerId . '": { + "source": "step", + "propertyName": "dacId", + "stepId": "'. $triggerId . '" + }, + "id_'. $triggerId . '": { + "source": "step", + "propertyName": "id", + "stepId": "'. $triggerId . '" + }, + "signerName_'. $triggerId . '": { + "source": "step", + "propertyName": "signerName", + "stepId": "'. $triggerId . '" + }, + "signerEmail_'. $triggerId . '": { + "source": "step", + "propertyName": "signerEmail", + "stepId": "'. $triggerId . '" + }, + "ccName_'. $triggerId . '": { + "source": "step", + "propertyName": "ccName", + "stepId": "'. $triggerId . '" + }, + "ccEmail_'. $triggerId . '": { + "source": "step", + "propertyName": "ccEmail", + "stepId": "'. $triggerId . '" + }, + "envelopeId_step2": { + "source": "step", + "propertyName": "envelopeId", + "stepId": "step2", + "type": "String" + }, + "combinedDocumentsBase64_step2": { + "source": "step", + "propertyName": "combinedDocumentsBase64", + "stepId": "step2", + "type": "File" + }, + "fields.signer.text.value_step2": { + "source": "step", + "propertyName": "fields.signer.text.value", + "stepId": "step2", + "type": "String" + } + }, + "steps": [ + { + "id": "step1", + "name": "Set Up Invite", + "moduleName": "Notification-SendEmail", + "configurationProgress": "Completed", + "type": "DS-EmailNotification", + "config": { + "templateType": "WorkflowParticipantNotification", + "templateVersion": 1, + "language": "en", + "sender_name": "DocuSign Orchestration", + "sender_alias": "Orchestration", + "participantId": "'. $signerId .'" + }, + "input": { + "recipients": [ + { + "name": { + "source": "step", + "propertyName": "signerName", + "stepId": "'. $triggerId . '" + }, + "email": { + "source": "step", + "propertyName": "signerEmail", + "stepId": "'. $triggerId . '" + } + } + ], + "mergeValues": { + "CustomMessage": "Follow this link to access and complete the workflow.", + "ParticipantFullName": { + "source": "step", + "propertyName": "signerName", + "stepId": "'. $triggerId . '" + } + } + }, + "output": {} + }, + { + "id": "step2", + "name": "Get Signatures", + "moduleName": "ESign", + "configurationProgress": "Completed", + "type": "DS-Sign", + "config": { + "participantId": "'. $signerId .'" + }, + "input": { + "isEmbeddedSign": true, + "documents": [ + { + "type": "FromDSTemplate", + "eSignTemplateId": "'. $templateId.'" + } + ], + "emailSubject": "Please sign this document", + "emailBlurb": "", + "recipients": { + "signers": [ + { + "defaultRecipient": "false", + "tabs": { + "signHereTabs": [ + { + "stampType": "signature", + "name": "SignHere", + "tabLabel": "Sign Here", + "scaleValue": "1", + "optional": "false", + "documentId": "1", + "recipientId": "1", + "pageNumber": "1", + "xPosition": "191", + "yPosition": "148", + "tabId": "1", + "tabType": "signhere" + } + ], + "textTabs": [ + { + "requireAll": "false", + "value": "", + "required": "false", + "locked": "false", + "concealValueOnDocument": "false", + "disableAutoSize": "false", + "tabLabel": "text", + "font": "helvetica", + "fontSize": "size14", + "localePolicy": {}, + "documentId": "1", + "recipientId": "1", + "pageNumber": "1", + "xPosition": "153", + "yPosition": "230", + "width": "84", + "height": "23", + "tabId": "2", + "tabType": "text" + } + ], + "checkboxTabs": [ + { + "name": "", + "tabLabel": "ckAuthorization", + "selected": "false", + "selectedOriginal": "false", + "requireInitialOnSharedChange": "false", + "required": "true", + "locked": "false", + "documentId": "1", + "recipientId": "1", + "pageNumber": "1", + "xPosition": "75", + "yPosition": "417", + "width": "0", + "height": "0", + "tabId": "3", + "tabType": "checkbox" + }, + { + "name": "", + "tabLabel": "ckAuthentication", + "selected": "false", + "selectedOriginal": "false", + "requireInitialOnSharedChange": "false", + "required": "true", + "locked": "false", + "documentId": "1", + "recipientId": "1", + "pageNumber": "1", + "xPosition": "75", + "yPosition": "447", + "width": "0", + "height": "0", + "tabId": "4", + "tabType": "checkbox" + }, + { + "name": "", + "tabLabel": "ckAgreement", + "selected": "false", + "selectedOriginal": "false", + "requireInitialOnSharedChange": "false", + "required": "true", + "locked": "false", + "documentId": "1", + "recipientId": "1", + "pageNumber": "1", + "xPosition": "75", + "yPosition": "478", + "width": "0", + "height": "0", + "tabId": "5", + "tabType": "checkbox" + }, + { + "name": "", + "tabLabel": "ckAcknowledgement", + "selected": "false", + "selectedOriginal": "false", + "requireInitialOnSharedChange": "false", + "required": "true", + "locked": "false", + "documentId": "1", + "recipientId": "1", + "pageNumber": "1", + "xPosition": "75", + "yPosition": "508", + "width": "0", + "height": "0", + "tabId": "6", + "tabType": "checkbox" + } + ], + "radioGroupTabs": [ + { + "documentId": "1", + "recipientId": "1", + "groupName": "radio1", + "radios": [ + { + "pageNumber": "1", + "xPosition": "142", + "yPosition": "384", + "value": "white", + "selected": "false", + "tabId": "7", + "required": "false", + "locked": "false", + "bold": "false", + "italic": "false", + "underline": "false", + "fontColor": "black", + "fontSize": "size7" + }, + { + "pageNumber": "1", + "xPosition": "74", + "yPosition": "384", + "value": "red", + "selected": "false", + "tabId": "8", + "required": "false", + "locked": "false", + "bold": "false", + "italic": "false", + "underline": "false", + "fontColor": "black", + "fontSize": "size7" + }, + { + "pageNumber": "1", + "xPosition": "220", + "yPosition": "384", + "value": "blue", + "selected": "false", + "tabId": "9", + "required": "false", + "locked": "false", + "bold": "false", + "italic": "false", + "underline": "false", + "fontColor": "black", + "fontSize": "size7" + } + ], + "shared": "false", + "requireInitialOnSharedChange": "false", + "requireAll": "false", + "tabType": "radiogroup", + "value": "", + "originalValue": "" + } + ], + "listTabs": [ + { + "listItems": [ + { + "text": "Red", + "value": "red", + "selected": "false" + }, + { + "text": "Orange", + "value": "orange", + "selected": "false" + }, + { + "text": "Yellow", + "value": "yellow", + "selected": "false" + }, + { + "text": "Green", + "value": "green", + "selected": "false" + }, + { + "text": "Blue", + "value": "blue", + "selected": "false" + }, + { + "text": "Indigo", + "value": "indigo", + "selected": "false" + }, + { + "text": "Violet", + "value": "violet", + "selected": "false" + } + ], + "value": "", + "originalValue": "", + "required": "false", + "locked": "false", + "requireAll": "false", + "tabLabel": "list", + "font": "helvetica", + "fontSize": "size14", + "localePolicy": {}, + "documentId": "1", + "recipientId": "1", + "pageNumber": "1", + "xPosition": "142", + "yPosition": "291", + "width": "78", + "height": "0", + "tabId": "10", + "tabType": "list" + } + ], + "numericalTabs": [ + { + "validationType": "currency", + "value": "", + "required": "false", + "locked": "false", + "concealValueOnDocument": "false", + "disableAutoSize": "false", + "tabLabel": "numericalCurrency", + "font": "helvetica", + "fontSize": "size14", + "localePolicy": { + "cultureName": "en-US", + "currencyPositiveFormat": "csym_1_comma_234_comma_567_period_89", + "currencyNegativeFormat": + "opar_csym_1_comma_234_comma_567_period_89_cpar", + "currencyCode": "usd" + }, + "documentId": "1", + "recipientId": "1", + "pageNumber": "1", + "xPosition": "163", + "yPosition": "260", + "width": "84", + "height": "0", + "tabId": "11", + "tabType": "numerical" + } + ] + }, + "signInEachLocation": "false", + "agentCanEditEmail": "false", + "agentCanEditName": "false", + "requireUploadSignature": "false", + "name": { + "source": "step", + "propertyName": "signerName", + "stepId": "'. $triggerId . '" + }, + "email": { + "source": "step", + "propertyName": "signerEmail", + "stepId": "'. $triggerId . '" + }, + "recipientId": "1", + "recipientIdGuid": "00000000-0000-0000-0000-000000000000", + "accessCode": "", + "requireIdLookup": "false", + "routingOrder": "1", + "note": "", + "roleName": "signer", + "completedCount": "0", + "deliveryMethod": "email", + "templateLocked": "false", + "templateRequired": "false", + "inheritEmailNotificationConfiguration": "false", + "recipientType": "signer" + } + ], + "carbonCopies": [ + { + "agentCanEditEmail": "false", + "agentCanEditName": "false", + "name": { + "source": "step", + "propertyName": "ccName", + "stepId": "'. $triggerId . '" + }, + "email": { + "source": "step", + "propertyName": "ccEmail", + "stepId": "'. $triggerId . '" + }, + "recipientId": "2", + "recipientIdGuid": "00000000-0000-0000-0000-000000000000", + "accessCode": "", + "requireIdLookup": "false", + "routingOrder": "2", + "note": "", + "roleName": "cc", + "completedCount": "0", + "deliveryMethod": "email", + "templateLocked": "false", + "templateRequired": "false", + "inheritEmailNotificationConfiguration": "false", + "recipientType": "carboncopy" + } + ], + "certifiedDeliveries": [] + } + }, + "output": { + "envelopeId_step2": { + "source": "step", + "propertyName": "envelopeId", + "stepId": "step2", + "type": "String" + }, + "combinedDocumentsBase64_step2": { + "source": "step", + "propertyName": "combinedDocumentsBase64", + "stepId": "step2", + "type": "File" + }, + "fields.signer.text.value_step2": { + "source": "step", + "propertyName": "fields.signer.text.value", + "stepId": "step2", + "type": "String" + } + } + }, + { + "id": "step3", + "name": "Show a Confirmation Screen", + "moduleName": "ShowConfirmationScreen", + "configurationProgress": "Completed", + "type": "DS-ShowScreenStep", + "config": { + "participantId": "'. $signerId .'" + }, + "input": { + "httpType": "Post", + "payload": { + "participantId": "'. $signerId .'", + "confirmationMessage": { + "title": "Tasks complete", + "description": "You have completed all your workflow tasks." + } + } + }, + "output": {} + } + ] + } + }'; + + return $managementApi->createWorkflowDefinition($_SESSION['ds_account_id'], $body); + } +} diff --git a/src/Services/MaestroApiClientService.php b/src/Services/MaestroApiClientService.php new file mode 100644 index 0000000..165d2b1 --- /dev/null +++ b/src/Services/MaestroApiClientService.php @@ -0,0 +1,176 @@ +setHost($basePath); + $config->addDefaultHeader('Authorization', 'Bearer ' . $args['ds_access_token']); + $this->apiClient = new ApiClient($config); + + $this->accessToken = $args['ds_access_token']?? ""; + $this->routerService = new RouterService(); + } + + /** + * Getter for the WorkflowManagementApi + */ + public function workflowManagementApi(): WorkflowManagementApi + { + return new WorkflowManagementApi($this->apiClient); + } + + /** + * Getter for the WorkflowTriggerApi + */ + public function workflowTriggerApi(): WorkflowTriggerApi + { + $basePath = "https://demo.services.docusign.net/"; + $config = new Configuration(); + $config->setHost($basePath); + $config->addDefaultHeader('Authorization', 'Bearer ' . $this->accessToken); + $apiClient = new ApiClient($config); + + return new WorkflowTriggerApi($apiClient); + } + + /** + * Getter for the WorkflowInstanceManagementApi + */ + public function workflowInstanceManagementApi(): WorkflowInstanceManagementApi + { + return new WorkflowInstanceManagementApi($this->apiClient); + } + + /** + * Redirect user to the auth page + * + * @param $eg + * @return void + */ + public function needToReAuth($eg): void + { + $this->routerService->flash('Sorry, you need to re-authenticate.'); + # We could store the parameters of the requested operation + # so it could be restarted automatically. + # But since it should be rare to have a token issue here, + # we'll make the user re-enter the form data after + # authentication. + $_SESSION['eg'] = $GLOBALS['app_url'] . 'index.php?page=' . $eg; + header('Location: ' . $GLOBALS['app_url'] . 'index.php?page=' . BaseController::LOGIN_REDIRECT); + exit; + } + + /** + * Redirect user to the error page + * + * @param ApiException $e + * @return void + */ + public function showErrorTemplate(ApiException $e): void + { + + if ($e->getCode() == 990) { + $GLOBALS['twig']->display( + 'error.html', + [ + 'error_code' => ' ', + 'error_message' => $e->getMessage(), + 'common_texts' => ManifestService::getCommonTexts() + ] + ); + } else { + $body = $e->getResponseBody(); + $GLOBALS['twig']->display( + 'error.html', + [ + 'error_code' => $body->errorCode ?? unserialize($body)->errorCode, + 'error_message' => $body->message ?? unserialize($body)->message, + 'common_texts' => ManifestService::getCommonTexts() + ] + ); + } + } + + /** + * Redirect user to results page + * + * @param $codeExampleText array + * @param null $results + * @param $message string + * @return void + */ + public function showDoneTemplateFromManifest(array $codeExampleText, $results = null, string $message = null): void + { + if ($message == null) { + $message = $codeExampleText["ResultsPageText"]; + } + + $GLOBALS['twig']->display('example_done.html', [ + 'title' => $codeExampleText["ExampleName"], + 'h1' => $codeExampleText["ExampleName"], + 'message' => $message, + 'json' => $results, + 'common_texts' => ManifestService::getCommonTexts() + ]); + exit; + } + + /** + * Redirect user to results page + * + * @param $title string + * @param $headline string + * @param $message string + * @param null $results + * @return void + */ + public function showDoneTemplate(string $title, string $headline, string $message, $results = null): void + { + $GLOBALS['twig']->display( + 'example_done.html', + [ + 'title' => $title, + 'h1' => $headline, + 'message' => $message, + 'json' => $results, + 'common_texts' => ManifestService::getCommonTexts() + ] + ); + exit; + } +} diff --git a/src/Services/ManifestService.php b/src/Services/ManifestService.php index 22e06c5..ef1ab48 100644 --- a/src/Services/ManifestService.php +++ b/src/Services/ManifestService.php @@ -82,6 +82,9 @@ public static function getAPIByLink(string $link): string case "con": $currentAPI = ApiTypes::CONNECT; break; + case "mae": + $currentAPI = ApiTypes::MAESTRO; + break; case "web": $currentAPI = ApiTypes::WEBFORMS; break; diff --git a/src/Services/RouterService.php b/src/Services/RouterService.php index 85f0f30..ecedac4 100644 --- a/src/Services/RouterService.php +++ b/src/Services/RouterService.php @@ -89,6 +89,9 @@ class RouterService implements IRouterService 'aeg011' => 'Admin\EG011DeleteUserDataFromAccount', 'aeg012' => 'Admin\EG012CloneAccount', 'con001' => 'Connect\Eg001ValidateUsingHmac', + 'mae001' => 'Maestro\Eg001TriggerWorkflow', + 'mae002' => 'Maestro\Eg002CancelWorkflow', + 'mae003' => 'Maestro\Eg003GetWorkflowStatus', 'web001' => 'WebForms\EG001CreateAndEmbedForm', ]; /** @@ -171,6 +174,9 @@ class RouterService implements IRouterService 'aeg010' => 'admin/eg010_delete_user_data_from_organization.html', 'aeg011' => 'admin/eg011_delete_user_data_from_account.html', 'con001' => 'connect/eg001_validate_using_hmac.html', + 'mae001' => 'maestro/eg001_trigger_workflow.html', + 'mae002' => 'maestro/eg002_cancel_workflow.html', + 'mae003' => 'maestro/eg003_get_workflow_status.html', 'web001' => 'webforms/eg001_embed_form.html' ]; diff --git a/templates/esignature/eg002_signing_via_email.html b/templates/esignature/eg002_signing_via_email.html index 5d879ab..e2e9bee 100644 --- a/templates/esignature/eg002_signing_via_email.html +++ b/templates/esignature/eg002_signing_via_email.html @@ -79,6 +79,7 @@

{{ code_example_text['ExampleName'] | raw }}

id="cc_email" name="cc_email" aria-describedby="emailHelp" + value="{{ signer_email }}" placeholder="{{code_example_text['Forms'][formNumber]['Inputs'][ccEmailInputNumber]['InputPlaceholder']}}" required > @@ -94,6 +95,7 @@

{{ code_example_text['ExampleName'] | raw }}

diff --git a/templates/home_esig.html b/templates/home_esig.html index 9f6e777..7bae118 100644 --- a/templates/home_esig.html +++ b/templates/home_esig.html @@ -52,6 +52,8 @@

PHP Launcher

{% set linkToCodeExample = "reg" %} {% elseif api["Name"] == "Admin" %} {% set linkToCodeExample = "aeg" %} + {% elseif api["Name"] == "Maestro" %} + {% set linkToCodeExample = "mae" %} {% elseif api["Name"] == "WebForms" %} {% set linkToCodeExample = "web" %} {% elseif api["Name"] == "Connect" %} diff --git a/templates/maestro/eg001_publish_workflow.html b/templates/maestro/eg001_publish_workflow.html new file mode 100644 index 0000000..7d8eb57 --- /dev/null +++ b/templates/maestro/eg001_publish_workflow.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} {% block content %} + +

{{ code_example_text['ExampleName'] | raw }}

+

{{ consent_url | raw }}

+ +
+ + + {{ common_texts["ContinueButton"] | raw }} + +
{{ code_example_text['ExampleName'] | raw }} +

{{ code_example_text["ExampleDescription"] | raw }}

+ +{% if show_doc %} +

Documentation about this example.

+{% endif %} + +

+ {% if code_example_text["LinksToAPIMethod"] | length == 1 %} + {{ common_texts["APIMethodUsed"] | raw }} + {% else %} + {{ common_texts["APIMethodUsedPlural"] | raw }} + {% endif %} + + {% for i in 0..(code_example_text["LinksToAPIMethod"] | length - 1) %} + + {{ code_example_text['LinksToAPIMethod'][i]['PathName'] | raw}} + + + {% if i + 1 == code_example_text["LinksToAPIMethod"] | length - 1 %} + and + {% elseif i + 1 != code_example_text["LinksToAPIMethod"] | length %} + , + {% endif %} + {% endfor %} +

+ +

+ {{ common_texts["ViewSourceFile"]|replace({ ("{0}"): ("%s"|format(source_url, source_file)) })| raw }} +

+ +{% if template_id == null and workflow_id == null %} + {{ code_example_text['RedirectsToOtherCodeExamples'][0]['RedirectText']|replace({ ("{0}"): redirectToCodeExample }) | raw }} + +
+ + +
+{% else %} +
+
+ + + +
+ +
+ + + + + + {{ common_texts["HelpingTexts"]["EmailWontBeShared"] | raw }} + +
+ +
+ + + +
+ +
+ + + + + {{ common_texts["HelpingTexts"]["CCEmailShouldDifferFromSigner"] | raw }} + +
+ +
+ + + +
+ + + +
+{% endif %} + +{% endblock %} + diff --git a/templates/maestro/eg002_cancel_workflow.html b/templates/maestro/eg002_cancel_workflow.html new file mode 100644 index 0000000..de99d16 --- /dev/null +++ b/templates/maestro/eg002_cancel_workflow.html @@ -0,0 +1,84 @@ +{% extends "base.html" %} {% block content %} + +{% set formNumber = 0 %} +{% set workflowIdInputNumber = 0 %} +{% set instanceIdInputNumber = 1 %} +{% set redirectToCodeExample = "href='" ~ app_url ~ "index.php?page=mae001'" %} + +

{{ code_example_text['ExampleName'] | raw }}

+

{{ code_example_text["ExampleDescription"] | raw }}

+ +{% if show_doc %} +

Documentation about this example.

+{% endif %} + +

+ {% if code_example_text["LinksToAPIMethod"] | length == 1 %} + {{ common_texts["APIMethodUsed"] | raw }} + {% else %} + {{ common_texts["APIMethodUsedPlural"] | raw }} + {% endif %} + + {% for i in 0..(code_example_text["LinksToAPIMethod"] | length - 1) %} + + {{ code_example_text['LinksToAPIMethod'][i]['PathName'] | raw}} + + + {% if i + 1 == code_example_text["LinksToAPIMethod"] | length - 1 %} + and + {% elseif i + 1 != code_example_text["LinksToAPIMethod"] | length %} + , + {% endif %} + {% endfor %} +

+ +

+ {{ common_texts["ViewSourceFile"]|replace({ ("{0}"): ("%s"|format(source_url, source_file)) })| raw }} +

+ +{% if workflow_id == null or instance_id == null %} + {{ code_example_text['RedirectsToOtherCodeExamples'][0]['RedirectText']|replace({ ("{0}"): redirectToCodeExample }) | raw }} + +
+ + +
+{% else %} +
+
+ + + +
+ +
+ + + +
+ + + +
+{% endif %} + +{% endblock %} + diff --git a/templates/maestro/eg003_get_workflow_status.html b/templates/maestro/eg003_get_workflow_status.html new file mode 100644 index 0000000..4310f6d --- /dev/null +++ b/templates/maestro/eg003_get_workflow_status.html @@ -0,0 +1,84 @@ +{% extends "base.html" %} {% block content %} + +{% set formNumber = 0 %} +{% set workflowIdInputNumber = 0 %} +{% set instanceIdInputNumber = 1 %} +{% set redirectToCodeExample = "href='" ~ app_url ~ "index.php?page=mae001'" %} + +

{{ code_example_text['ExampleName'] | raw }}

+

{{ code_example_text["ExampleDescription"] | raw }}

+ +{% if show_doc %} +

Documentation about this example.

+{% endif %} + +

+ {% if code_example_text["LinksToAPIMethod"] | length == 1 %} + {{ common_texts["APIMethodUsed"] | raw }} + {% else %} + {{ common_texts["APIMethodUsedPlural"] | raw }} + {% endif %} + + {% for i in 0..(code_example_text["LinksToAPIMethod"] | length - 1) %} + + {{ code_example_text['LinksToAPIMethod'][i]['PathName'] | raw}} + + + {% if i + 1 == code_example_text["LinksToAPIMethod"] | length - 1 %} + and + {% elseif i + 1 != code_example_text["LinksToAPIMethod"] | length %} + , + {% endif %} + {% endfor %} +

+ +

+ {{ common_texts["ViewSourceFile"]|replace({ ("{0}"): ("%s"|format(source_url, source_file)) })| raw }} +

+ +{% if workflow_id == null or instance_id == null %} + {{ code_example_text['RedirectsToOtherCodeExamples'][0]['RedirectText']|replace({ ("{0}"): redirectToCodeExample }) | raw }} + +
+ + +
+{% else %} +
+
+ + + +
+ +
+ + + +
+ + + +
+{% endif %} + +{% endblock %} + diff --git a/tests/JWTLoginMethod.php b/tests/JWTLoginMethod.php index 246da1d..b8d874a 100644 --- a/tests/JWTLoginMethod.php +++ b/tests/JWTLoginMethod.php @@ -35,6 +35,8 @@ public static function jwtAuthenticationMethod(string $apiType, TestConfig $test $scopes = "signature user_write group_read organization_read permission_read user_read " . "account_read domain_read identity_provider_read user_data_redact" . "asset_group_account_read asset_group_account_clone_write asset_group_account_clone_read"; + } elseif ($apiType == ApiTypes::MAESTRO) { + $scopes = "signature aow_manage"; } elseif ($apiType == ApiTypes::WEBFORMS) { $scopes = "signature webforms_read webforms_instance_read webforms_instance_write"; } else {