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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e552b1b827ecb77d5f39f9b6eb64e99e3172173535ef3889a42ae6e17b2c6f9b
4
- data.tar.gz: c5ffe52ec11ba92dcc11544149d233bcb925f71881ea3df20f267fff15980886
3
+ metadata.gz: 5c8637c85e37c7dc8a524e97a7e32ffeeed8b4f2a0f8772d51dc8966a1a6b716
4
+ data.tar.gz: 8ac098cbe6a55604c944ec60645ea4cbace737d56b840862ea8945ba7607e70c
5
5
  SHA512:
6
- metadata.gz: cd67d2ab9e3eddec23af125e5bb99e373844dcd2e1c78b40b84011dd6d03feb54d487d12682df11565ba5494e06051e08f6767d273af25ddcf4b0579a78e5eed
7
- data.tar.gz: ec329eab7fcc39c1028dc41554888de5597defdeca50e49bf0dee66a2fb58d4ade1b18ab69466619c62e38a5521a3a810c518b3da754d1eb2afc41ca6e49d86a
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 |
@@ -62,6 +62,7 @@ module Assinafy
62
62
  templates:read
63
63
  templates:write
64
64
  account:read
65
+ webhooks:write
65
66
  openid
66
67
  profile
67
68
  email
@@ -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) } unless signers.empty?
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
- if method == 'virtual' && signers.empty?
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] }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Assinafy
4
- VERSION = '1.6.0'
4
+ VERSION = '1.8.0'
5
5
  USER_AGENT = "Assinafy-Ruby-SDK/v#{VERSION}".freeze
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assinafy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Assinafy SDK Contributors