blueink-client-python 1.3.0__tar.gz → 1.5.0__tar.gz

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.
Files changed (38) hide show
  1. {blueink_client_python-1.3.0/src/blueink_client_python.egg-info → blueink_client_python-1.5.0}/PKG-INFO +1 -1
  2. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/setup.cfg +1 -1
  3. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/constants.py +2 -0
  4. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/model/bundles.py +7 -0
  5. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/bundle.py +17 -1
  6. blueink_client_python-1.5.0/src/blueink/tests/test_apiv2_218_constants.py +23 -0
  7. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/tests/test_bundle_helper.py +28 -1
  8. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0/src/blueink_client_python.egg-info}/PKG-INFO +1 -1
  9. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink_client_python.egg-info/SOURCES.txt +1 -0
  10. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/LICENSE +0 -0
  11. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/README.md +0 -0
  12. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/pyproject.toml +0 -0
  13. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/__init__.py +0 -0
  14. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/bundle_helper.py +0 -0
  15. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/client.py +0 -0
  16. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/endpoints.py +0 -0
  17. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/model/__init__.py +0 -0
  18. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/model/persons.py +0 -0
  19. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/model/webhook.py +0 -0
  20. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/paginator.py +0 -0
  21. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/person_helper.py +0 -0
  22. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/request_helper.py +0 -0
  23. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/__init__.py +0 -0
  24. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/envelope_template.py +0 -0
  25. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/packet.py +0 -0
  26. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/person.py +0 -0
  27. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/subclient.py +0 -0
  28. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/template.py +0 -0
  29. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/verify.py +0 -0
  30. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/subclients/webhook.py +0 -0
  31. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/tests/__init__.py +0 -0
  32. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/tests/test_client.py +0 -0
  33. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/tests/test_person_helper.py +0 -0
  34. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/utils/__init__.py +0 -0
  35. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink/utils/testcase.py +0 -0
  36. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink_client_python.egg-info/dependency_links.txt +0 -0
  37. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink_client_python.egg-info/requires.txt +0 -0
  38. {blueink_client_python-1.3.0 → blueink_client_python-1.5.0}/src/blueink_client_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blueink-client-python
3
- Version: 1.3.0
3
+ Version: 1.5.0
4
4
  Summary: Python Client for Blueink eSignature API
5
5
  Home-page: https://github.com/blueinkhq/blueink-client-python
6
6
  Author: Blueink
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = blueink-client-python
3
- version = 1.3.0
3
+ version = 1.5.0
4
4
  author = Blueink
5
5
  author_email = pypi@blueink.com
6
6
  description = Python Client for Blueink eSignature API
@@ -64,6 +64,7 @@ FIELD_KIND = Munch(
64
64
  CHECKBOX="chk",
65
65
  CHECKBOXES="cbx",
66
66
  ATTACHMENT="att",
67
+ STAMP="stp",
67
68
  )
68
69
 
69
70
  PACKET_STATUS = Munch(
@@ -75,6 +76,7 @@ PACKET_STATUS = Munch(
75
76
  EXPIRED="ex",
76
77
  COMPLETE="co",
77
78
  FAILED="fa",
79
+ REASSIGNED="ra",
78
80
  )
79
81
 
80
82
  V_PATTERN = Munch(
@@ -257,6 +257,8 @@ class Document(BaseModel):
257
257
  fields: Optional[List[Field]] = None
258
258
  auto_placements: Optional[List[AutoPlacement]] = None
259
259
  html_fields_mode: Optional[str] = None
260
+ converted_adobe_fields_to: Optional[str] = None
261
+ adobe_field_assignments: Optional[dict] = None
260
262
 
261
263
  @classmethod
262
264
  def create(cls, key=None, **kwargs):
@@ -339,6 +341,11 @@ class Bundle(BaseModel):
339
341
  team: Optional[str] = None
340
342
  signing_brand: Optional[str] = None
341
343
  expires: Optional[str] = None
344
+ allow_signer_reassign: Optional[bool] = None
345
+ allow_chained_signer_reassign: Optional[bool] = None
346
+ max_reminders: Optional[int] = None
347
+ owner_name: Optional[str] = None
348
+ owner_email: Optional[str] = None
342
349
  tag_values: Optional[dict] = None
343
350
 
344
351
  @classmethod
@@ -289,7 +289,8 @@ class BundleSubClient(SubClient):
289
289
  """Partially update a Bundle (PATCH).
290
290
 
291
291
  Typically used to update fields such as ``signing_brand``, ``team``,
292
- ``expires``, ``cc_emails`` and reminder settings on an existing bundle.
292
+ ``expires``, ``cc_emails``, reminder settings, ``allow_signer_reassign``,
293
+ and ``allow_chained_signer_reassign`` on an existing bundle.
293
294
 
294
295
  Args:
295
296
  bundle_id: bundle slug
@@ -352,6 +353,21 @@ class BundleSubClient(SubClient):
352
353
  url = self.build_url(endpoints.BUNDLES.LIST_FILES, bundle_id=bundle_id)
353
354
  return self._requests.get(url)
354
355
 
356
+ def generate_files(self, bundle_id: str) -> NormalizedResponse:
357
+ """Enqueue unsigned filled-PDF generation for an incomplete Bundle.
358
+
359
+ Requires early file access (FEATURE.API_DATA_EARLY). Poll list_files
360
+ until ready (APIv2 2.19.0+).
361
+
362
+ Args:
363
+ bundle_id: which bundle to generate files for
364
+
365
+ Returns:
366
+ NormalizedResponse object (body includes the Bundle id)
367
+ """
368
+ url = self.build_url(endpoints.BUNDLES.LIST_FILES, bundle_id=bundle_id)
369
+ return self._requests.put(url)
370
+
355
371
  def list_data(self, bundle_id: str) -> NormalizedResponse:
356
372
  """Return a data for the supplied bundle corresponding to the id
357
373
 
@@ -0,0 +1,23 @@
1
+ from blueink.constants import FIELD_KIND, PACKET_STATUS
2
+ from blueink.model.bundles import Bundle
3
+ from blueink.utils.testcase import TestCase
4
+
5
+
6
+ class TestApiV218Constants(TestCase):
7
+ def test_field_kind_includes_stamp(self):
8
+ self.assert_equal(FIELD_KIND.STAMP, "stp")
9
+ self.assert_in("stp", FIELD_KIND.values())
10
+
11
+ def test_packet_status_includes_reassigned(self):
12
+ self.assert_equal(PACKET_STATUS.REASSIGNED, "ra")
13
+ self.assert_in("ra", PACKET_STATUS.values())
14
+
15
+ def test_bundle_model_accepts_reassign_flags(self):
16
+ bundle = Bundle(
17
+ packets=[],
18
+ documents=[],
19
+ allow_signer_reassign=True,
20
+ allow_chained_signer_reassign=False,
21
+ )
22
+ self.assert_equal(bundle.allow_signer_reassign, True)
23
+ self.assert_equal(bundle.allow_chained_signer_reassign, False)
@@ -5,7 +5,7 @@ import pytest
5
5
  from munch import Munch
6
6
 
7
7
  from blueink.bundle_helper import BundleHelper
8
- from blueink.model.bundles import ImportedDocument
8
+ from blueink.model.bundles import Bundle, Document, ImportedDocument
9
9
  from blueink.utils.testcase import TestCase
10
10
 
11
11
 
@@ -632,3 +632,30 @@ class TestImportedDocument(TestCase):
632
632
  """Test that providing only file_url raises a ValidationError"""
633
633
  with pytest.raises(Exception):
634
634
  ImportedDocument.create(file_url="https://example.com/test.pdf")
635
+
636
+
637
+ class TestApiV219BundleModels(TestCase):
638
+ def test_bundle_model_accepts_owner_and_max_reminders(self):
639
+ bundle = Bundle(
640
+ packets=[],
641
+ documents=[],
642
+ max_reminders=3,
643
+ owner_name="Ada Lovelace",
644
+ owner_email="ada@example.com",
645
+ )
646
+ self.assert_equal(bundle.max_reminders, 3)
647
+ self.assert_equal(bundle.owner_name, "Ada Lovelace")
648
+ self.assert_equal(bundle.owner_email, "ada@example.com")
649
+
650
+ def test_bundle_model_accepts_null_max_reminders(self):
651
+ bundle = Bundle(packets=[], documents=[], max_reminders=None)
652
+ self.assert_equal(bundle.max_reminders, None)
653
+
654
+ def test_document_model_accepts_adobe_field_assignments(self):
655
+ doc = Document(
656
+ key="doc-1",
657
+ converted_adobe_fields_to="signer-1",
658
+ adobe_field_assignments={"Signature1": "signer-1"},
659
+ )
660
+ self.assert_equal(doc.converted_adobe_fields_to, "signer-1")
661
+ self.assert_equal(doc.adobe_field_assignments["Signature1"], "signer-1")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blueink-client-python
3
- Version: 1.3.0
3
+ Version: 1.5.0
4
4
  Summary: Python Client for Blueink eSignature API
5
5
  Home-page: https://github.com/blueinkhq/blueink-client-python
6
6
  Author: Blueink
@@ -24,6 +24,7 @@ src/blueink/subclients/template.py
24
24
  src/blueink/subclients/verify.py
25
25
  src/blueink/subclients/webhook.py
26
26
  src/blueink/tests/__init__.py
27
+ src/blueink/tests/test_apiv2_218_constants.py
27
28
  src/blueink/tests/test_bundle_helper.py
28
29
  src/blueink/tests/test_client.py
29
30
  src/blueink/tests/test_person_helper.py