planvortex 0.17.0__tar.gz → 0.19.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 (109) hide show
  1. {planvortex-0.17.0 → planvortex-0.19.0}/CHANGELOG.md +55 -0
  2. {planvortex-0.17.0 → planvortex-0.19.0}/PKG-INFO +17 -2
  3. {planvortex-0.17.0 → planvortex-0.19.0}/README.md +16 -1
  4. {planvortex-0.17.0 → planvortex-0.19.0}/openapi/planvortex.openapi.json +391 -42
  5. {planvortex-0.17.0 → planvortex-0.19.0}/pyproject.toml +1 -1
  6. {planvortex-0.17.0 → planvortex-0.19.0}/scripts/route_coverage.py +2 -0
  7. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/__init__.py +2 -0
  8. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/errors.py +7 -2
  9. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/http.py +4 -1
  10. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/http_sync.py +4 -1
  11. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/transport.py +23 -2
  12. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_generated/models.py +68 -10
  13. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_version.py +1 -1
  14. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/accounts.py +6 -5
  15. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/base.py +43 -2
  16. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/catalog.py +2 -1
  17. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/comments.py +21 -1
  18. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/contacts.py +3 -0
  19. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/messages.py +29 -1
  20. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/accounts.py +6 -5
  21. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/base.py +41 -2
  22. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/catalog.py +2 -1
  23. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/comments.py +21 -1
  24. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/messages.py +29 -1
  25. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/types.py +8 -1
  26. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_comments.py +16 -0
  27. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_core.py +14 -0
  28. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_messages.py +82 -0
  29. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_models.py +15 -0
  30. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_route_coverage.py +5 -3
  31. {planvortex-0.17.0 → planvortex-0.19.0}/.gitignore +0 -0
  32. {planvortex-0.17.0 → planvortex-0.19.0}/LICENSE +0 -0
  33. {planvortex-0.17.0 → planvortex-0.19.0}/scripts/build_docs.py +0 -0
  34. {planvortex-0.17.0 → planvortex-0.19.0}/scripts/check_packaging.py +0 -0
  35. {planvortex-0.17.0 → planvortex-0.19.0}/scripts/generate_models.py +0 -0
  36. {planvortex-0.17.0 → planvortex-0.19.0}/scripts/generate_sync.py +0 -0
  37. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_client.py +0 -0
  38. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_client_sync.py +0 -0
  39. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/__init__.py +0 -0
  40. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/auth.py +0 -0
  41. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/auth_sync.py +0 -0
  42. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/files.py +0 -0
  43. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/pagination.py +0 -0
  44. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_core/query.py +0 -0
  45. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_generated/__init__.py +0 -0
  46. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/_shapes.py +0 -0
  47. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/py.typed +0 -0
  48. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/__init__.py +0 -0
  49. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/ai_plans.py +0 -0
  50. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/apps.py +0 -0
  51. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/clients.py +0 -0
  52. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/dashboard.py +0 -0
  53. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/integrations.py +0 -0
  54. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/organizations.py +0 -0
  55. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/products.py +0 -0
  56. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/publications.py +0 -0
  57. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources/uploads.py +0 -0
  58. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/__init__.py +0 -0
  59. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/ai_plans.py +0 -0
  60. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/apps.py +0 -0
  61. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/clients.py +0 -0
  62. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/contacts.py +0 -0
  63. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/dashboard.py +0 -0
  64. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/integrations.py +0 -0
  65. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/organizations.py +0 -0
  66. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/products.py +0 -0
  67. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/publications.py +0 -0
  68. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/resources_sync/uploads.py +0 -0
  69. {planvortex-0.17.0 → planvortex-0.19.0}/src/planvortex/webhooks.py +0 -0
  70. {planvortex-0.17.0 → planvortex-0.19.0}/tests/__init__.py +0 -0
  71. {planvortex-0.17.0 → planvortex-0.19.0}/tests/conftest.py +0 -0
  72. {planvortex-0.17.0 → planvortex-0.19.0}/tests/contrato.py +0 -0
  73. {planvortex-0.17.0 → planvortex-0.19.0}/tests/live/__init__.py +0 -0
  74. {planvortex-0.17.0 → planvortex-0.19.0}/tests/live/conftest.py +0 -0
  75. {planvortex-0.17.0 → planvortex-0.19.0}/tests/live/test_auth.py +0 -0
  76. {planvortex-0.17.0 → planvortex-0.19.0}/tests/live/test_catalog.py +0 -0
  77. {planvortex-0.17.0 → planvortex-0.19.0}/tests/live/test_connect_flow.py +0 -0
  78. {planvortex-0.17.0 → planvortex-0.19.0}/tests/live/test_errors.py +0 -0
  79. {planvortex-0.17.0 → planvortex-0.19.0}/tests/live/test_publish.py +0 -0
  80. {planvortex-0.17.0 → planvortex-0.19.0}/tests/live/test_read.py +0 -0
  81. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_accounts.py +0 -0
  82. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_ai_plans.py +0 -0
  83. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_apps.py +0 -0
  84. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_catalog.py +0 -0
  85. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_client.py +0 -0
  86. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_clients.py +0 -0
  87. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_contacts.py +0 -0
  88. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_dashboard.py +0 -0
  89. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_example_comments.py +0 -0
  90. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_example_connect.py +0 -0
  91. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_example_publish.py +0 -0
  92. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_example_schedule.py +0 -0
  93. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_example_webhooks.py +0 -0
  94. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_files.py +0 -0
  95. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_generate_models.py +0 -0
  96. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_generate_sync.py +0 -0
  97. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_integrations.py +0 -0
  98. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_openapi_freshness.py +0 -0
  99. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_organizations.py +0 -0
  100. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_packaging.py +0 -0
  101. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_pagination.py +0 -0
  102. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_products.py +0 -0
  103. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_publications.py +0 -0
  104. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_query_parity.py +0 -0
  105. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_readme.py +0 -0
  106. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_shapes_parity.py +0 -0
  107. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_types.py +0 -0
  108. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_uploads.py +0 -0
  109. {planvortex-0.17.0 → planvortex-0.19.0}/tests/test_webhooks.py +0 -0
@@ -4,6 +4,61 @@ All notable changes to this package are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [Unreleased]
8
+
9
+ ## [0.19.0] - 2026-11-13
10
+
11
+ ### Added
12
+
13
+ - **`statistics` in `catalog.social_capabilities()`.** `True` when PlanVortex reads any metric
14
+ of that network: every network but `whatsapp` today. Use it to decide which accounts to offer on
15
+ a statistics screen instead of finding out from an empty series, or ask the server directly with
16
+ `accounts.list(org, capability="statistics")`.
17
+ - The regenerated models also carry `Message.reactions`, the emoji reactions a message has on
18
+ WhatsApp, Instagram, Messenger and Bluesky (typing only: the field already came back from the API).
19
+ - **`user_id` on `SocialIdentifier` (WhatsApp).** The person's business-scoped user id at Meta
20
+ (BSUID), such as `ES.13491208655302741918`. Since 2026 Meta may leave the phone number out for
21
+ people who use a WhatsApp username and have not dealt with that business number by phone in the
22
+ last 30 days. For them the WhatsApp `external_identifier` **is the BSUID, not a phone number**: it
23
+ has a country code and a dot in front, so don't show it or dial it as one. You can still write to
24
+ them, and when their number arrives later the same contact gets it, with the same `_id` and
25
+ messages.
26
+ - The regenerated models also carry two things the API added to the spec: the `playable` query
27
+ parameter on the file downloads (`download_file()` does not take it yet) and the per-account
28
+ `accounts` list in the `unread_messages` response (`unread_count()` still returns the total).
29
+
30
+ ### Fixed
31
+
32
+ - **Error 1517 is a `MessagingError`.** It is an audio or a video that could not be converted with
33
+ `playable`; the original file is still there without the parameter. It was above the top of the
34
+ messaging range and arrived as the base error.
35
+
36
+ ## [0.18.0] - 2026-11-10
37
+
38
+ ### Added
39
+
40
+ - **`pv.messages.download_file()` and `pv.comments.download_file()`.** The files that arrive from
41
+ the network (a photo, a voice note or a document in a private message; a photo, a GIF or a sticker
42
+ in a comment) are not stored by PlanVortex: `files_urls` says where each one is, and these two ask
43
+ PlanVortex to fetch it from the network right then. They return a `DownloadedFile` with the
44
+ `data` bytes, the real `content_type`, the `file_name` when there is one and the `disposition`.
45
+ Every WhatsApp file needs them (none has a `url`, photos and videos included), as do Telegram
46
+ files, LinkedIn images and Bluesky videos. Both exist in the async and the sync client.
47
+ - **`files_urls` on comments**: a comment that is only a photo is no longer an empty row. Facebook,
48
+ Threads, LinkedIn, X, Bluesky, Discord and Telegram give them, and on Google Business they are the
49
+ photos and videos of a review; on Instagram and YouTube the list is always empty.
50
+
51
+ ### Fixed
52
+
53
+ - **Errors 1515 and 1516 are `MessagingError`.** They are the files: 1515 is the network no longer
54
+ having one (on a comment too), 1516 a message with no file at that position.
55
+
56
+ - **Errors 1513 and 1514 are `MessagingError`.** They are the WhatsApp message templates: 1513 is a
57
+ template PlanVortex refuses before sending it to WhatsApp because WhatsApp would reject its format
58
+ (`data.field` and `data.reason` say which rule, such as `missing_examples`), and 1514 is WhatsApp
59
+ refusing it when it is created (`data.code`, `data.subcode` and `data.message` are WhatsApp’s). Both
60
+ were above the top of the messaging range and arrived as the base error.
61
+
7
62
  ## [0.17.0] - 2026-10-28
8
63
 
9
64
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: planvortex
3
- Version: 0.17.0
3
+ Version: 0.19.0
4
4
  Summary: Official Python client for the PlanVortex API
5
5
  Project-URL: Homepage, https://planvortex.com/en/developers
6
6
  Project-URL: Documentation, https://taliasoftworks.github.io/PlanVortexPython/
@@ -214,6 +214,21 @@ if (pv.comments.actions_for("linkedin") or {}).get("hide"):
214
214
  ...
215
215
  ```
216
216
 
217
+ A photo, a voice note or a document in a private message, and a photo or a sticker in a comment,
218
+ **are not stored by PlanVortex**: they stay on the network, and `files_urls` says where each one is.
219
+ When an entry has a `url`, load it directly. When it has none (every WhatsApp and Telegram file, a
220
+ LinkedIn image, a Bluesky video) or the `url` stopped loading, ask PlanVortex for it:
221
+
222
+ ```python
223
+ file = pv.messages.download_file(org_id, account_id, message["_id"], 0)
224
+ # or: pv.comments.download_file(org_id, comment["_id"], 0)
225
+ print(file.content_type, file.file_name, len(file.data))
226
+ ```
227
+
228
+ WhatsApp lets go of a file 7 days after it arrived; from then on the answer is error 1515. A
229
+ `disposition` of `"attachment"` is a document somebody outside the business sent: don't render it
230
+ inside your own pages.
231
+
217
232
  ## AI plans, and what they are generated from
218
233
 
219
234
  A plan is a **week** of drafts written by a model: you queue it, a job generates it, and what comes
@@ -285,7 +300,7 @@ memorising numbers:
285
300
  | 1100-1111 | `organization` | `OrganizationError` |
286
301
  | 1200-1207 | `role` | `PlanVortexError` |
287
302
  | 1300-1308, 1400-1408 | `plan_limit` | `PlanLimitError` |
288
- | 1500-1512 | `messaging` | `MessagingError` |
303
+ | 1500-1517 | `messaging` | `MessagingError` |
289
304
  | 1600-1601 | `contact` | `ContactError` |
290
305
  | 1900-1906 | `payment` | `PlanVortexError` |
291
306
  | 2000-2099 | `product` | `ProductError` |
@@ -184,6 +184,21 @@ if (pv.comments.actions_for("linkedin") or {}).get("hide"):
184
184
  ...
185
185
  ```
186
186
 
187
+ A photo, a voice note or a document in a private message, and a photo or a sticker in a comment,
188
+ **are not stored by PlanVortex**: they stay on the network, and `files_urls` says where each one is.
189
+ When an entry has a `url`, load it directly. When it has none (every WhatsApp and Telegram file, a
190
+ LinkedIn image, a Bluesky video) or the `url` stopped loading, ask PlanVortex for it:
191
+
192
+ ```python
193
+ file = pv.messages.download_file(org_id, account_id, message["_id"], 0)
194
+ # or: pv.comments.download_file(org_id, comment["_id"], 0)
195
+ print(file.content_type, file.file_name, len(file.data))
196
+ ```
197
+
198
+ WhatsApp lets go of a file 7 days after it arrived; from then on the answer is error 1515. A
199
+ `disposition` of `"attachment"` is a document somebody outside the business sent: don't render it
200
+ inside your own pages.
201
+
187
202
  ## AI plans, and what they are generated from
188
203
 
189
204
  A plan is a **week** of drafts written by a model: you queue it, a job generates it, and what comes
@@ -255,7 +270,7 @@ memorising numbers:
255
270
  | 1100-1111 | `organization` | `OrganizationError` |
256
271
  | 1200-1207 | `role` | `PlanVortexError` |
257
272
  | 1300-1308, 1400-1408 | `plan_limit` | `PlanLimitError` |
258
- | 1500-1512 | `messaging` | `MessagingError` |
273
+ | 1500-1517 | `messaging` | `MessagingError` |
259
274
  | 1600-1601 | `contact` | `ContactError` |
260
275
  | 1900-1906 | `payment` | `PlanVortexError` |
261
276
  | 2000-2099 | `product` | `ProductError` |