assinafy 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.en.md +1 -4
- data/README.md +1 -0
- data/lib/assinafy/oauth.rb +1 -0
- data/lib/assinafy/resources/assignment_resource.rb +6 -2
- data/lib/assinafy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c8637c85e37c7dc8a524e97a7e32ffeeed8b4f2a0f8772d51dc8966a1a6b716
|
|
4
|
+
data.tar.gz: 8ac098cbe6a55604c944ec60645ea4cbace737d56b840862ea8945ba7607e70c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f8f64f0af1beace16c369b7fd7638931b34f46da608f48d54dde4e5e1d0a69b3b54b00fdef3d8278dee965e961d161697f33097d962d0317e321e5cfa5a0f04
|
|
7
|
+
data.tar.gz: 8dc95c0b6ebbbfba1ef7e3798e5b728e09232cd340258449693cc385e45fdf95331e9f3ae6b957b685c8cfc979058a0553038dae79dcf216081089dc99d8cd9a
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the `assinafy` Ruby gem are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.8.0
|
|
6
|
+
|
|
7
|
+
- The OAuth scope catalog includes `webhooks:write` for configuring and deactivating a workspace webhook subscription.
|
|
8
|
+
|
|
9
|
+
## 1.7.0
|
|
10
|
+
|
|
11
|
+
- Require at least one signer on every assignment payload, not just `virtual` ones. The published
|
|
12
|
+
contract marks `signers` as required only for `virtual`, but the API prices per signer in both
|
|
13
|
+
modes and answers a signer-less body with
|
|
14
|
+
`400 "Pelo menos um signatários precisa ser informado."` `build_payload` also dropped the
|
|
15
|
+
`signers` key entirely when the list was empty, so a `collect` estimate could never be priced.
|
|
16
|
+
Both `create` and `estimate_cost` now raise `ValidationError` locally instead of failing upstream.
|
|
17
|
+
|
|
5
18
|
## 1.6.0
|
|
6
19
|
|
|
7
20
|
### Added
|
data/README.en.md
CHANGED
|
@@ -147,6 +147,7 @@ The flow is authorization-code with **mandatory PKCE**; the authorization server
|
|
|
147
147
|
| `templates:read` | Read templates, pages, roles, fields, tags |
|
|
148
148
|
| `templates:write` | Create, update, delete templates |
|
|
149
149
|
| `account:read` | Read the workspace profile, theme, logo |
|
|
150
|
+
| `webhooks:write` | Configure and deactivate the workspace webhook subscription |
|
|
150
151
|
| `openid` | Identify the user (`sub` claim) and enable `/oauth/userinfo` |
|
|
151
152
|
| `profile` | Include the user's name in the claims |
|
|
152
153
|
| `email` | Include the user's email and verification status in the claims |
|
|
@@ -802,10 +803,6 @@ bundle exec rspec spec/integration
|
|
|
802
803
|
|
|
803
804
|
> These tests create and clean up real resources and, for the assignment flow, send real signature-request emails to the addresses in `ASSINAFY_TEST_EMAIL` / `ASSINAFY_TEST_EMAIL2`.
|
|
804
805
|
|
|
805
|
-
GitHub Actions provides the manual **Live Sandbox** workflow. Select a protected environment containing
|
|
806
|
-
`ASSINAFY_API_KEY`, `ASSINAFY_ACCOUNT_ID`, `ASSINAFY_TEST_EMAIL`, and `ASSINAFY_TEST_EMAIL2`; environment
|
|
807
|
-
branch/tag rules and approvals are applied before GitHub exposes those secrets to the job.
|
|
808
|
-
|
|
809
806
|
## Contributing
|
|
810
807
|
|
|
811
808
|
Pull requests and issues are welcome at <https://github.com/assinafy/ruby-sdk>.
|
data/README.md
CHANGED
|
@@ -395,6 +395,7 @@ Fluxo *authorization code* com **PKCE obrigatório** (o servidor aceita apenas `
|
|
|
395
395
|
| `templates:read` | ler templates, páginas, papéis, campos e tags |
|
|
396
396
|
| `templates:write` | criar, alterar e excluir templates |
|
|
397
397
|
| `account:read` | ler perfil, tema e logo da workspace |
|
|
398
|
+
| `webhooks:write` | configurar e desativar a assinatura de webhooks da workspace |
|
|
398
399
|
| `openid` | identificar o usuário (claim `sub`) e habilitar `/oauth/userinfo` |
|
|
399
400
|
| `profile` | incluir o nome do usuário nas claims |
|
|
400
401
|
| `email` | incluir o e-mail e seu status de verificação nas claims |
|
data/lib/assinafy/oauth.rb
CHANGED
|
@@ -105,7 +105,7 @@ module Assinafy
|
|
|
105
105
|
validate_optional_fields!(p)
|
|
106
106
|
|
|
107
107
|
result = { method: method }
|
|
108
|
-
result[:signers] = signers.map { |ref| normalise_signer_ref(ref, options) }
|
|
108
|
+
result[:signers] = signers.map { |ref| normalise_signer_ref(ref, options) }
|
|
109
109
|
OPTIONAL_FIELDS.each { |key| result[key] = p[key] if p[key] }
|
|
110
110
|
result[:entries] = entries if entries
|
|
111
111
|
Utils.body_params(result)
|
|
@@ -118,7 +118,11 @@ module Assinafy
|
|
|
118
118
|
raise ValidationError.new("Assignment method must be one of: #{METHODS.join(', ')}")
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
# `signers` is required for both methods: creation needs to know who signs, and the
|
|
122
|
+
# estimate is priced per signer. The published contract marks it required only for
|
|
123
|
+
# `virtual`, but the API answers a signer-less body with
|
|
124
|
+
# 400 "Pelo menos um signatários precisa ser informado."
|
|
125
|
+
if signers.empty?
|
|
122
126
|
raise ValidationError.new(
|
|
123
127
|
'At least one signer is required',
|
|
124
128
|
{ signers: payload[:signers] || payload[:signer_ids] || payload[:signerIds] }
|
data/lib/assinafy/version.rb
CHANGED