### Install Dependencies and Build Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/setup.rst.txt Installs PHP and JS dependencies, then starts the build process for JS assets. ```bash # Download composer dependencies composer install # Download JS dependencies npm ci # Build and watch JS changes npm run watch ``` -------------------------------- ### Setup and run integration tests Source: https://docs.libresign.coop/developer_manual/getting-started/tests.html Integration tests require dependencies installed within the tests/integration directory. ```bash cd tests/integration composer install ``` ```bash runuser -u www-data -- vendor/bin/behat --xdebug features/account/me.feature:5 ``` -------------------------------- ### Install Integration Test Dependencies Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/tests.rst.txt Install the necessary Composer dependencies for running integration tests. Navigate to the integration test directory before running this command. ```bash cd tests/integration composer install ``` -------------------------------- ### Install Dependencies and Build Frontend in Development Mode Source: https://docs.libresign.coop/developer_manual/getting-started/development-environment/frontend.html Install npm dependencies and build the frontend in development mode. This is necessary for features like using Vue Devtools. ```bash npm ci && npm run dev ``` -------------------------------- ### Build Frontend in Development Mode Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/frontend.rst.txt Install project dependencies and compile the frontend assets for development. ```bash npm ci && npm run dev ``` -------------------------------- ### Start Interactive Rebase Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/commits.rst.txt Initiate an interactive rebase for the last two commits to modify them. ```bash git rebase -i HEAD~2 ``` -------------------------------- ### Navigate to Server Root Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/frontend.rst.txt Change the working directory to the root folder of the Nextcloud server installation. ```bash cd /var/www/html ``` -------------------------------- ### Conventional Commits: Commit Description Example Source: https://docs.libresign.coop/developer_manual/getting-started/commits.html Example of a detailed commit description including related issues, type, and a checklist. Ensure all checklist items are addressed. ```git Short description of the pull request Related issue: #830 Type: Feature Checklist: - [x] Add "Open file" button - [x] Add action to the button ``` -------------------------------- ### Start Interactive Rebase Source: https://docs.libresign.coop/developer_manual/getting-started/commits.html Initiate an interactive rebase for the last two commits to modify them. ```git git rebase -i HEAD~2 ``` -------------------------------- ### Release Todo Issue Title Format Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Example titles for GitHub issues used to initiate the release process. These titles indicate the versions to be released. ```plain 🚀 Release todo v20.1.9 🚀 Release todo v20.1.9 and v21.1.8 ``` -------------------------------- ### Perform POST Request with CURL Source: https://docs.libresign.coop/developer_manual/_sources/api/guide-api.rst.txt Example of a POST request with a JSON body. Ensure Content-Type is set to application/json for POST, PUT, and PATCH methods. ```bash curl --request POST \ --url http://cloud.example.com/apps/libresign/api/v1/request-signature \ --header 'Authorization: Basic ' \ --header 'Content-Type: application/json' \ --data '{ "file": { "url": "https://example.com/test.pdf" }, "status": 0, "name": "Contract", "users": [ { "email": "a@b.c" "displayName": "User Name" } ] }' ``` -------------------------------- ### Conventional Commits: Update Second Commit Title Example Source: https://docs.libresign.coop/developer_manual/getting-started/commits.html Example of updating the second commit's title to adhere to Conventional Commits after amending. ```git docs: add donation links to GitHub Sponsors and Stripe ``` -------------------------------- ### Conventional Commits: Update Commit Title Example Source: https://docs.libresign.coop/developer_manual/getting-started/commits.html Example of changing a commit title to follow the Conventional Commits format during an amend operation. ```git docs: add donation link to appear on Nextcloud appstore ``` -------------------------------- ### Run Specific Integration Test Scenario Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/tests.rst.txt Execute a specific Behat integration test scenario. This command runs the scenario starting at a particular line number in the feature file. ```bash runuser -u www-data -- vendor/bin/behat --xdebug features/account/me.feature:5 ``` -------------------------------- ### Changelog Markdown Format Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Example of the required CHANGELOG.md format, including versioning, stable branch, release date, and categorized changes. Follows conventional commits and specifies PR number format. ```markdown ## [13.0.1] (stable33) - 2025-02-18 ### Fixed - #6944 fix: docmdp first signature allow - #6945 fix: signature status propfind - #6940 fix: avoid empty crl engine default ## [12.2.1] (stable32) - 2025-02-18 ### Fixed - #6943 fix: docmdp first signature allow - #6946 fix: signature status propfind - #6939 fix: avoid empty crl engine default ``` -------------------------------- ### Update LibreSign Main Branch Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/updating.rst.txt Ensure your local 'main' branch for LibreSign is synchronized with the upstream repository before starting new tasks. This involves checking out the 'main' branch and pulling the latest changes. ```bash cd path/to/libresign git checkout main git pull upstream main ``` -------------------------------- ### Run static analysis tools Source: https://docs.libresign.coop/developer_manual/getting-started/tests.html Commands for checking coding standards and performing type analysis. ```bash composer cs:fix ``` ```bash composer psalm ``` ```bash composer psalm:update-baseline ``` -------------------------------- ### List Open Milestones Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Use this command to list all open milestones in the repository. This is useful for verifying milestone renaming. ```sh gh api 'repos/LibreSign/libresign/milestones?state=open' --jq '.[] | "(.number) (.title)"' ``` -------------------------------- ### Clone LibreSign Repository Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/setup.rst.txt Clones the repository and initializes submodules within the Nextcloud apps-extra directory. ```bash git clone https://github.com/LibreSign/libresign.git cd libresign git submodule update --init ``` -------------------------------- ### Version Consistency Check Command Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Verify that `appinfo/info.xml` has the correct version and then update `package.json` and `package-lock.json` accordingly. This command ensures version consistency across project files. ```bash npm version --no-git-tag-version $(xmllint --xpath '/info/version/text()' appinfo/info.xml) ``` -------------------------------- ### Get Stable Branch Head Commit Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Retrieve the commit hash of the current head of the stable branch. This confirms the exact commit that will be tagged for the release. ```sh git ls-remote origin refs/heads/stable20 | awk '{print $1}' ``` -------------------------------- ### Create new GitHub release Source: https://docs.libresign.coop/developer_manual/release-process.html Navigate to the new releases page on GitHub to prepare a new release. Ensure the tag, target branch, and previous tag are correctly specified. ```github https://github.com/LibreSign/libresign/releases/new?tag=v20.1.9&target=stable20 ``` -------------------------------- ### Run Psalm Static Analysis Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/tests.rst.txt Perform static analysis using Psalm to check for type errors. This command is executed through Composer. ```bash composer psalm ``` -------------------------------- ### Initialize Swagger UI for OCS OpenAPI Source: https://docs.libresign.coop/developer_manual/_sources/api/openapi.rst.txt This snippet initializes the Swagger UI component to display the OCS OpenAPI documentation. Ensure the `url` points to the correct OpenAPI specification file. This is typically used in a web development context to provide interactive API documentation. ```html
``` -------------------------------- ### Navigate to Nextcloud Server Root Source: https://docs.libresign.coop/developer_manual/getting-started/development-environment/frontend.html Change directory to the root folder of the Nextcloud server within the container. ```bash cd /var/www/html ``` -------------------------------- ### Run specific unit tests Source: https://docs.libresign.coop/developer_manual/getting-started/tests.html Use the double dash to pass filter arguments to the test suite. ```bash composer test:unit -- --filter MyClassTest ``` -------------------------------- ### API Overview Source: https://docs.libresign.coop/developer_manual/api/index.html General information regarding API usage, base URLs, and authentication methods. ```APIDOC ## API Usage ### Description This section outlines the foundational requirements for interacting with the LibreSign API, including base URL configuration and authentication protocols. ### Base URLs - The API is accessible via the configured base URL for your LibreSign instance. ### Authentication - Authentication is required for all API requests. Please refer to the specific client implementation details for token or session management. ### Clients - Official and community-supported clients are available for integration. ### OCS OpenAPI - The API adheres to the OCS (Open Collaboration Services) OpenAPI specification. ``` -------------------------------- ### LibreSign OpenAPI Specification Source: https://docs.libresign.coop/developer_manual/_sources/api/openapi.rst.txt The LibreSign API is documented using the OpenAPI specification. Developers can interact with the API definition via the provided Swagger UI integration. ```APIDOC ## OpenAPI Specification ### Description The LibreSign API provides programmatic access to document signing workflows. The full specification is hosted as an OpenAPI JSON file. ### Endpoint https://raw.githubusercontent.com/LibreSign/libresign/refs/heads/main/openapi.json ``` -------------------------------- ### Release Issue Template Placeholder Source: https://docs.libresign.coop/developer_manual/release-process.html Template comments for release tracking issues. ```html ``` -------------------------------- ### Authenticate with Basic Auth (App Password) Source: https://docs.libresign.coop/developer_manual/_sources/api/guide-api.rst.txt Use an App Password for secure Basic Authentication. Ensure the OCS-APIRequest header is set to true. ```bash curl -sS -u "username:app-password" \ -H "Accept: application/json" \ -H "OCS-APIRequest: true" \ "https://cloud.example.com/ocs/v2.php/apps/libresign/api/v1/..." ``` -------------------------------- ### Access Nextcloud Container Source: https://docs.libresign.coop/developer_manual/getting-started/development-environment/frontend.html Use this command to access the Nextcloud container with the correct user for development tasks. ```bash docker compose exec -u www-data nextcloud bash ``` -------------------------------- ### Revert Frontend Build Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/frontend.rst.txt Remove the development build artifacts and restore the distribution folder from the Git repository. ```bash rm -rf dist git checkout -- dist ``` -------------------------------- ### XML Configuration for Nextcloud Server Version Compatibility Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/branch-policies.rst.txt This XML snippet from 'appinfo/info.xml' specifies the minimum and maximum compatible Nextcloud Server major versions for a stable branch. Ensure 'min-version' and 'max-version' match the supported major version. ```xml ``` -------------------------------- ### Fetch All Milestones with GitHub CLI API Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Retrieve all milestones for a repository using the GitHub CLI's API endpoint. This is the preferred method for listing milestones with current CLI versions. ```bash gh api repos/LibreSign/libresign/milestones?state=all\&per_page=100 ``` -------------------------------- ### Access Nextcloud Container Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/frontend.rst.txt Enter the Nextcloud container as the www-data user to perform administrative tasks. ```bash docker compose exec -u www-data nextcloud bash ``` -------------------------------- ### Bump Version in Package Files Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt This command updates the version in `package.json` and `package-lock.json` to match the version specified in `appinfo/info.xml`. Ensure the printed version matches expectations. ```sh # Make sure the printed version matches the info.xml version npm version --no-git-tag-version $(xmllint --xpath '/info/version/text()' appinfo/info.xml) ``` -------------------------------- ### Admin API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Administrative endpoint for previewing footer templates as PDF. ```APIDOC ## admin ### Description Preview footer template as PDF ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/admin/footer-template/preview-pdf ``` -------------------------------- ### List Git Tags Source: https://docs.libresign.coop/developer_manual/release-process.html Lists all tags sorted by version, newest first, to identify the previous release tag. Useful for determining the range of commits for changelog generation. ```bash # List all tags sorted by version (newest first) git tag -l "v*" --sort=-version:refname | head -20 # Or find the last tag for a specific branch git describe --tags --abbrev=0 stable22 ``` -------------------------------- ### LibreSign API Base URLs and Authentication Source: https://docs.libresign.coop/developer_manual/api/guide-api.html Details on accessing the LibreSign API, including base URLs for OCS endpoints and supported authentication methods like Basic Auth and OIDC. ```APIDOC ## Base URLs * **OCS** : `https://cloud.example.com/ocs/v2.php/apps/libresign/api/v1/` **Versioning** : breaking changes result in a new major version (e.g., `v2`). ## Authentication Supported methods: * **Basic Auth** (App Password or Username/Password) * **OIDC Access Token** (`Authorization: Bearer `) * **Session cookies** (for non-OCS endpoints, may require CSRF token) ### Basic Auth (App Password) ```curl curl -sS -u "username:app-password" \ -H "Accept: application/json" \ -H "OCS-APIRequest: true" \ "https://cloud.example.com/ocs/v2.php/apps/libresign/api/v1/..." ``` ### OIDC (Access Token) ```curl curl -sS \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "Accept: application/json" \ -H "OCS-APIRequest: true" \ "https://cloud.example.com/ocs/v2.php/apps/libresign/api/v1/..." ``` ``` -------------------------------- ### Identify previous release tags Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Commands to list recent tags or find the latest tag for a specific branch to determine the range for changelog generation. ```bash # List all tags sorted by version (newest first) git tag -l "v*" --sort=-version:refname | head -20 # Or find the last tag for a specific branch git describe --tags --abbrev=0 stable22 ``` -------------------------------- ### Update Nextcloud Submodules Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/updating.rst.txt After pulling Nextcloud updates, run this command if the '3rdparty' folder is outdated. It ensures all submodules are initialized and updated recursively. ```bash git submodule update --init --recursive ``` -------------------------------- ### Page Navigation API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoints for accessing various pages of the LibreSign application. ```APIDOC ## page ### Description Index page ### Method GET ### Endpoint /index.php/apps/libresign --- ### Description Index page to authenticated users ### Method GET ### Endpoint /index.php/apps/libresign/f --- ### Description Incomplete page ### Method GET ### Endpoint /index.php/apps/libresign/f/incomplete --- ### Description Incomplete page in full screen ### Method GET ### Endpoint /index.php/apps/libresign/p/incomplete --- ### Description Main page to authenticated signer with a path ### Method GET ### Endpoint /index.php/apps/libresign/f/{path} --- ### Description Sign page to authenticated signer ### Method GET ### Endpoint /index.php/apps/libresign/f/sign/{uuid} --- ### Description Sign page to authenticated signer with the path of file ### Method GET ### Endpoint /index.php/apps/libresign/f/sign/{uuid}/{path} --- ### Description Sign page to unauthenticated signer ### Method GET ### Endpoint /index.php/apps/libresign/p/sign/{uuid}/{path} --- ### Description Sign page to unauthenticated signer ### Method GET ### Endpoint /index.php/apps/libresign/p/sign/{uuid} --- ### Description Use UUID of file to get PDF ### Method GET ### Endpoint /index.php/apps/libresign/p/pdf/{uuid} --- ### Description Use UUID of user to get PDF ### Method GET ### Endpoint /index.php/apps/libresign/pdf/{uuid} --- ### Description Show validation page ### Method GET ### Endpoint /index.php/apps/libresign/p/validation --- ### Description Show validation page ### Method GET ### Endpoint /index.php/apps/libresign/validation/{uuid} --- ### Description Show validation page ### Method GET ### Endpoint /index.php/apps/libresign/reset-password --- ### Description Public page to show validation for a specific file UUID ### Method GET ### Endpoint /index.php/apps/libresign/p/validation/{uuid} ``` -------------------------------- ### Run JavaScript linters Source: https://docs.libresign.coop/developer_manual/getting-started/tests.html Commands to automatically fix linting and style issues in JavaScript and CSS files. ```bash npm run lint:fix npm run stylelint:fix ``` -------------------------------- ### Force Push Branch Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/commits.rst.txt Push your branch with force-lease after rewriting commit history. Use with caution. ```bash git push --force-with-lease origin patch-2 ``` -------------------------------- ### Conventional Commit Description Format Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/commits.rst.txt Provide a detailed description for your commits, including related issues and a checklist of changes. ```text Short description of the pull request Related issue: #830 Type: Feature Checklist: - [x] Add "Open file" button - [x] Add action to the button ``` -------------------------------- ### Manual Backporting Git Commands Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/branch-policies.rst.txt Commands for manually backporting a fix to a stable branch. This involves checking out the target branch, pulling updates, creating a new branch, cherry-picking the commit, resolving conflicts, and pushing the new branch. ```bash # Switch to the target branch and update it git checkout stable25 git pull origin stable25 # Create the new backport branch git checkout -b fix/foo-stable25 # Cherry-pick the change from the commit SHA of the original PR in main git cherry-pick abc123 # Resolve any conflicts, commit, and push git push origin fix/foo-stable25 # Open a pull request for the backport ``` -------------------------------- ### Development Utilities API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Provides utility endpoints for development and testing purposes. ```APIDOC ## develop ### Description Get a demo PDF file to be used by test purpose ### Method GET ### Endpoint /index.php/apps/libresign/develop/pdf ``` -------------------------------- ### Continue Rebase Source: https://docs.libresign.coop/developer_manual/getting-started/commits.html After amending a commit, use this command to continue the rebase process. ```git git rebase --continue ``` -------------------------------- ### Commit and Pull Request Naming Conventions Source: https://docs.libresign.coop/developer_manual/release-process.html Suggests naming conventions for commits and pull requests related to changelog updates for releases. Ensures clarity and consistency in versioning. ```text chore(release): Changelog for 20.1.9 chore(release): Changelog for 20.1.9 and 20.1.8 ``` -------------------------------- ### Account Management API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoints for managing user accounts, signatures, and settings. ```APIDOC ## account ### Description Create account to sign a document ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/create/{uuid} --- ### Description Create PFX file using self-signed certificate ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/signature --- ### Description Who am I ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/me --- ### Description Update the account phone number ### Method PATCH ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/settings --- ### Description Delete PFX file ### Method DELETE ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/pfx --- ### Description Upload PFX file ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/pfx --- ### Description Update PFX file ### Method PATCH ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/pfx --- ### Description Read content of PFX file ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/pfx/read --- ### Description Set user config value ### Method PUT ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/account/config/{key} ``` -------------------------------- ### Certificate Policy API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Retrieves the certificate policy of the LibreSign instance. ```APIDOC ## certificate_policy ### Description Certificate policy of this instance ### Method GET ### Endpoint /index.php/apps/libresign/certificate-policy.pdf ``` -------------------------------- ### Mark Commits for Editing Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/commits.rst.txt In the interactive rebase editor, change 'pick' to 'edit' for commits you intend to modify. ```text edit e49199874 App metadata: Add donation link to appear on Nextcloud appstore edit 1ed4561ad doc: add donation links to Github Sponsors and Stripe ``` -------------------------------- ### Authenticate with OIDC Access Token Source: https://docs.libresign.coop/developer_manual/_sources/api/guide-api.rst.txt Use a Bearer token in the Authorization header for OIDC authentication. ```bash curl -sS \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "Accept: application/json" \ -H "OCS-APIRequest: true" \ "https://cloud.example.com/ocs/v2.php/apps/libresign/api/v1/..." ``` -------------------------------- ### Fix CSS/SCSS Linting Errors Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/tests.rst.txt Automatically fix linting errors for CSS and SCSS files using Stylelint. This command is run via npm. ```bash npm run stylelint:fix ``` -------------------------------- ### File Element API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoints for creating, updating, and deleting visible elements within a file. ```APIDOC ## file_element ### Description Create visible element ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid} --- ### Description Update visible element ### Method PATCH ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}/{elementId} --- ### Description Delete visible element ### Method DELETE ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}/{elementId} ``` -------------------------------- ### Original First Commit Title Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/commits.rst.txt This is the original title of the first commit before amendment. ```text App metadata: Add donation link to appear on Nextcloud appstore ``` -------------------------------- ### Continue Rebase After First Commit Amend Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/commits.rst.txt After amending the first commit, continue the rebase process. ```bash git rebase --continue ``` -------------------------------- ### Check Local Nextcloud Modifications Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/updating.rst.txt Before pulling updates, check for any uncommitted changes in your local Nextcloud repository. Resolve these changes to avoid conflicts. ```bash cd path/to/nextcloud git status ``` -------------------------------- ### Conventional Commits: Feat Commit Title Source: https://docs.libresign.coop/developer_manual/getting-started/commits.html Use this format for commit titles when introducing a new feature. ```git feat: add button to open files ``` -------------------------------- ### POST /request-signature Source: https://docs.libresign.coop/developer_manual/_sources/api/guide-api.rst.txt Creates a new signature request for a document. ```APIDOC ## POST /request-signature ### Description Creates a new signature request by providing a file URL and a list of signers. ### Method POST ### Endpoint /apps/libresign/api/v1/request-signature ### Request Body - **file** (object) - Required - Contains the URL of the document to be signed. - **status** (integer) - Required - Initial status of the request. - **name** (string) - Required - Name of the signature request. - **users** (array) - Required - List of users who need to sign the document. ### Request Example { "file": { "url": "https://example.com/test.pdf" }, "status": 0, "name": "Contract", "users": [ { "email": "a@b.c", "displayName": "User Name" } ] } ``` -------------------------------- ### List Merged PRs with GitHub CLI Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Use the GitHub CLI to list merged pull requests targeting a specific branch, filtering by merge date or a specific date range. Useful for automating PR data collection for releases. ```bash gh pr list -B stable33 -S "merged:>$(git log -1 --format=%ai )" --json number,title,mergedAt ``` ```bash gh pr list -B stable33 --state merged --search "merged:>=2025-02-01" --json number,title ``` -------------------------------- ### Commit and Pull Request Naming Conventions Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Use these naming conventions for commits and pull requests related to changelog updates. The `[skip ci]` tag prevents unnecessary CI cycles before release. ```markdown name suggestions to commit and pull request: chore(release): Changelog for 20.1.9 chore(release): Changelog for 20.1.9 and 20.1.8 ``` -------------------------------- ### POST /request-signature Source: https://docs.libresign.coop/developer_manual/api/guide-api.html Endpoint to request a signature for a file. Requires JSON content type and authentication. ```APIDOC ## POST /request-signature ### Description Requests a signature for a given file, specifying users to sign and other details. ### Method POST ### Endpoint `http://cloud.example.com/apps/libresign/api/v1/request-signature` ### Parameters #### Request Body - **file** (object) - Required - Object containing file details. - **url** (string) - Required - URL of the file to be signed. - **status** (integer) - Required - Status code, likely indicating the state of the request. - **name** (string) - Required - Name of the signature request. - **users** (array) - Required - List of users who need to sign. - **email** (string) - Required - Email address of the user. - **displayName** (string) - Optional - Display name of the user. ### Request Example ```json { "file": { "url": "https://example.com/test.pdf" }, "status": 0, "name": "Contract", "users": [ { "email": "a@b.c", "displayName": "User Name" } ] } ``` ### Response #### Success Response (200) * **status** (string) - Indicates the success status of the operation. * **message** (string) - A message describing the result of the operation. #### Response Example ```json { "status": "success", "message": "Signature request created successfully." } ``` ``` -------------------------------- ### Sign File API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoints for signing files using different identifiers and managing signature renewal and code retrieval. ```APIDOC ## POST /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId} ### Description Sign a file using file Id. ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId} ## POST /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid} ### Description Sign a file using file UUID. ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid} ## POST /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}/renew/{method} ### Description Renew the signature method. ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}/renew/{method} ## POST /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}/code ### Description Get code to sign the document using UUID. ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}/code ## POST /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}/code ### Description Get code to sign the document using FileID. ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}/code ``` -------------------------------- ### Revert Frontend Build Changes Source: https://docs.libresign.coop/developer_manual/getting-started/development-environment/frontend.html Remove the development build artifacts and restore the 'dist' folder from Git. This is crucial before pulling updates from the master branch to prevent conflicts. ```bash rm -rf dist git checkout -- dist ``` -------------------------------- ### Pull Latest Nextcloud Changes Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/development-environment/updating.rst.txt Fetch and merge the latest changes from the Nextcloud master branch. This command updates your local repository to the most recent version. ```bash git pull origin master ``` -------------------------------- ### Update Psalm Baseline Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/tests.rst.txt Update the Psalm baseline file. Use this command only when appropriate, typically after significant code changes or Psalm configuration updates. ```bash composer psalm:update-baseline ``` -------------------------------- ### Collect merged pull requests Source: https://docs.libresign.coop/developer_manual/_sources/release-process.rst.txt Commands to retrieve merge commits between a previous tag and the current stable branch to assist in drafting the changelog. ```bash # Collect all merge commits from previous tag to stable branch git log --oneline --merges --first-parent ..stable # Example for stable33 since v13.0.0 git log --oneline --merges --first-parent v13.0.0..stable33 # Output format: merge commits with PR references (Merge pull request #XXXX) ``` -------------------------------- ### Interactive Rebase: Mark Commits for Editing Source: https://docs.libresign.coop/developer_manual/getting-started/commits.html In the interactive rebase editor, change 'pick' to 'edit' for commits that need modification. ```git edit e49199874 App metadata: Add donation link to appear on Nextcloud appstore edit 1ed4561ad doc: add donation links to Github Sponsors and Stripe ``` -------------------------------- ### Collect Merge Commits with Git Log Source: https://docs.libresign.coop/developer_manual/release-process.html Collects all merge commits from a previous tag to a stable branch using `git log`. This is the recommended method for gathering PRs for the changelog. ```bash # Collect all merge commits from previous tag to stable branch git log --oneline --merges --first-parent ..stable # Example for stable33 since v13.0.0 git log --oneline --merges --first-parent v13.0.0..stable33 # Output format: merge commits with PR references (Merge pull request #XXXX) ``` -------------------------------- ### File Progress API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoint for checking the progress of a file processing request. ```APIDOC ## file_progress ### Description Check file progress by sign request UUID with long-polling (similar to Talk) ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/progress/{uuid} ``` -------------------------------- ### File Operations API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoints for validating, listing, uploading, and deleting files. ```APIDOC ## file ### Description Validate a file using Uuid ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/validate/uuid/{uuid} --- ### Description Validate a file using FileId ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/validate/file_id/{fileId} --- ### Description Validate a binary file ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/validate --- ### Description List identification documents that need to be approved ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/list --- ### Description Return the thumbnail of a LibreSign file ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/thumbnail/{nodeId} --- ### Description Return the thumbnail of a LibreSign file by fileId ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/thumbnail/file_id/{fileId} --- ### Description Send a file ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file --- ### Description Add file to envelope ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/{uuid}/add-file --- ### Description Delete File ### Method DELETE ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/file/file_id/{fileId} ``` -------------------------------- ### Signature Elements API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoints for creating, retrieving, updating, and deleting signature elements. ```APIDOC ## POST /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements ### Description Create signature element. ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements ## GET /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements ### Description Get signature elements. ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements ## GET /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/preview/{nodeId} ### Description Get preview of signature elements of. ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/preview/{nodeId} ## GET /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId} ### Description Get signature element of signer. ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId} ## PATCH /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId} ### Description Update signature element. ### Method PATCH ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId} ## DELETE /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId} ### Description Delete signature element. ### Method DELETE ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId} ``` -------------------------------- ### Identify Account API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoint for searching and listing possible signers. ```APIDOC ## identify ### Description List possible signers ### Method GET ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/identify-account/search ``` -------------------------------- ### Original Second Commit Title Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/commits.rst.txt This is the original title of the second commit before amendment. ```text doc: add donation links to Github Sponsors and Stripe ``` -------------------------------- ### Fix JavaScript Linting Errors Source: https://docs.libresign.coop/developer_manual/_sources/getting-started/tests.rst.txt Automatically fix linting errors for JavaScript files using ESLint. This command is run via npm. ```bash npm run lint:fix ``` -------------------------------- ### Notify API Source: https://docs.libresign.coop/developer_manual/api/openapi.html Endpoints for notifying signers and dismissing notifications. ```APIDOC ## POST /ocs/v2.php/apps/libresign/api/{apiVersion}/notify/signers ### Description Notify signers of a file. ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/notify/signers ## POST /ocs/v2.php/apps/libresign/api/{apiVersion}/notify/signer ### Description Notify a signer of a file. ### Method POST ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/notify/signer ## DELETE /ocs/v2.php/apps/libresign/api/{apiVersion}/notify/notification ### Description Dismiss a specific notification. ### Method DELETE ### Endpoint /ocs/v2.php/apps/libresign/api/{apiVersion}/notify/notification ```