planvortex 0.18.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.
- {planvortex-0.18.0 → planvortex-0.19.0}/CHANGELOG.md +27 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/PKG-INFO +2 -2
- {planvortex-0.18.0 → planvortex-0.19.0}/README.md +1 -1
- {planvortex-0.18.0 → planvortex-0.19.0}/openapi/planvortex.openapi.json +147 -22
- {planvortex-0.18.0 → planvortex-0.19.0}/pyproject.toml +1 -1
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/errors.py +4 -3
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_generated/models.py +33 -4
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_version.py +1 -1
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/accounts.py +6 -5
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/catalog.py +2 -1
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/contacts.py +3 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/accounts.py +6 -5
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/catalog.py +2 -1
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/types.py +8 -1
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_core.py +4 -1
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_models.py +15 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/.gitignore +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/LICENSE +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/scripts/build_docs.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/scripts/check_packaging.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/scripts/generate_models.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/scripts/generate_sync.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/scripts/route_coverage.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/__init__.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_client.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_client_sync.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/__init__.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/auth.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/auth_sync.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/files.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/http.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/http_sync.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/pagination.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/query.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_core/transport.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_generated/__init__.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/_shapes.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/py.typed +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/__init__.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/ai_plans.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/apps.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/base.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/clients.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/comments.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/dashboard.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/integrations.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/messages.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/organizations.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/products.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/publications.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources/uploads.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/__init__.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/ai_plans.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/apps.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/base.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/clients.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/comments.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/contacts.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/dashboard.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/integrations.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/messages.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/organizations.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/products.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/publications.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/resources_sync/uploads.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/src/planvortex/webhooks.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/__init__.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/conftest.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/contrato.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/live/__init__.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/live/conftest.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/live/test_auth.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/live/test_catalog.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/live/test_connect_flow.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/live/test_errors.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/live/test_publish.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/live/test_read.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_accounts.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_ai_plans.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_apps.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_catalog.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_client.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_clients.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_comments.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_contacts.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_dashboard.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_example_comments.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_example_connect.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_example_publish.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_example_schedule.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_example_webhooks.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_files.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_generate_models.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_generate_sync.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_integrations.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_messages.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_openapi_freshness.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_organizations.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_packaging.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_pagination.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_products.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_publications.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_query_parity.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_readme.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_route_coverage.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_shapes_parity.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_types.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_uploads.py +0 -0
- {planvortex-0.18.0 → planvortex-0.19.0}/tests/test_webhooks.py +0 -0
|
@@ -6,6 +6,33 @@ All notable changes to this package are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
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
|
+
|
|
9
36
|
## [0.18.0] - 2026-11-10
|
|
10
37
|
|
|
11
38
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: planvortex
|
|
3
|
-
Version: 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/
|
|
@@ -300,7 +300,7 @@ memorising numbers:
|
|
|
300
300
|
| 1100-1111 | `organization` | `OrganizationError` |
|
|
301
301
|
| 1200-1207 | `role` | `PlanVortexError` |
|
|
302
302
|
| 1300-1308, 1400-1408 | `plan_limit` | `PlanLimitError` |
|
|
303
|
-
| 1500-
|
|
303
|
+
| 1500-1517 | `messaging` | `MessagingError` |
|
|
304
304
|
| 1600-1601 | `contact` | `ContactError` |
|
|
305
305
|
| 1900-1906 | `payment` | `PlanVortexError` |
|
|
306
306
|
| 2000-2099 | `product` | `ProductError` |
|
|
@@ -270,7 +270,7 @@ memorising numbers:
|
|
|
270
270
|
| 1100-1111 | `organization` | `OrganizationError` |
|
|
271
271
|
| 1200-1207 | `role` | `PlanVortexError` |
|
|
272
272
|
| 1300-1308, 1400-1408 | `plan_limit` | `PlanLimitError` |
|
|
273
|
-
| 1500-
|
|
273
|
+
| 1500-1517 | `messaging` | `MessagingError` |
|
|
274
274
|
| 1600-1601 | `contact` | `ContactError` |
|
|
275
275
|
| 1900-1906 | `payment` | `PlanVortexError` |
|
|
276
276
|
| 2000-2099 | `product` | `ProductError` |
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
{
|
|
274
274
|
"name": "capability",
|
|
275
275
|
"in": "query",
|
|
276
|
-
"description": "Only accounts whose network can do this. It is the same matrix `GET /social_capabilities` publishes, applied server-side: the way to ask for 'the accounts I can publish with' without keeping your own table of which network does what.\n\n`comments` also looks at each account, not only at its network: a LinkedIn **personal profile** is left out, because only LinkedIn pages have a comment inbox. `total` counts the same way.",
|
|
276
|
+
"description": "Only accounts whose network can do this. It is the same matrix `GET /social_capabilities` publishes, applied server-side: the way to ask for 'the accounts I can publish with' without keeping your own table of which network does what.\n\n`comments` also looks at each account, not only at its network: a LinkedIn **personal profile** is left out, because only LinkedIn pages have a comment inbox. `total` counts the same way.\n\n`statistics` leaves out the networks PlanVortex reads no metric from (today `whatsapp`): the accounts worth offering on a statistics screen.",
|
|
277
277
|
"required": false,
|
|
278
278
|
"explode": true,
|
|
279
279
|
"schema": {
|
|
@@ -284,7 +284,8 @@
|
|
|
284
284
|
"products",
|
|
285
285
|
"webhooks",
|
|
286
286
|
"persistent_menu",
|
|
287
|
-
"comments"
|
|
287
|
+
"comments",
|
|
288
|
+
"statistics"
|
|
288
289
|
]
|
|
289
290
|
}
|
|
290
291
|
}
|
|
@@ -5280,7 +5281,7 @@
|
|
|
5280
5281
|
"comments"
|
|
5281
5282
|
],
|
|
5282
5283
|
"summary": "One file of a comment, fetched from the network",
|
|
5283
|
-
"description": "Files in a comment (a photo, a GIF, a sticker, a video) **are not stored by PlanVortex**: they stay on the network, and the comment's `files_urls` says where each one is. This endpoint asks the network for the file now and streams it back without keeping a copy. `index` is the file's position in `files_urls`.\n\nYou need it when a file has no `url`, or when its `url` stopped loading:\n\n• **LinkedIn** gives only the image's id, never a link.\n• **Telegram**'s download link carries the bot's token, so it never leaves PlanVortex. A bot can only download up to 20 MB: past that the answer is **1515** with `data.reason: \"too_big\"`, and the file is only visible in Telegram.\n• **Bluesky** videos are an HLS playlist that browsers other than Safari do not play; this returns the video file itself.\n• **Facebook, Threads and Discord** links expire; this reads the comment again and returns the file behind a fresh link.\n• **X** links do not expire, and reading a post again costs money, so X is not re-read: if its `url` no longer loads, the post was deleted and the answer is **1515**.\n\n**1515** means the network no longer has the file (`data.social_network`), and **2602** that the comment has no file at that position. A comment of another organization is **1102**.\n\nImages, videos and audio come back `inline`. Anything else comes back as an `attachment`: someone outside the business posted it, so don't render it inside your own pages.\n\nRequires the `comments:read` permission (`client_organization_comments:read` for apps) and a paid plan.",
|
|
5284
|
+
"description": "Files in a comment (a photo, a GIF, a sticker, a video) **are not stored by PlanVortex**: they stay on the network, and the comment's `files_urls` says where each one is. This endpoint asks the network for the file now and streams it back without keeping a copy. `index` is the file's position in `files_urls`.\n\nYou need it when a file has no `url`, or when its `url` stopped loading:\n\n• **LinkedIn** gives only the image's id, never a link.\n• **Telegram**'s download link carries the bot's token, so it never leaves PlanVortex. A bot can only download up to 20 MB: past that the answer is **1515** with `data.reason: \"too_big\"` and `data.max_mb: 20`, and the file is only visible in Telegram. Tell the user that, not that the file is gone: it is still there.\n• **Bluesky** videos are an HLS playlist that browsers other than Safari do not play; this returns the video file itself.\n• **Facebook, Threads and Discord** links expire; this reads the comment again and returns the file behind a fresh link.\n• **X** links do not expire, and reading a post again costs money, so X is not re-read: if its `url` no longer loads, the post was deleted and the answer is **1515**.\n\n**1515** means the network no longer has the file (`data.social_network`), and **2602** that the comment has no file at that position. A comment of another organization is **1102**.\n\nImages, videos and audio come back `inline`. Anything else comes back as an `attachment`: someone outside the business posted it, so don't render it inside your own pages.\n\n**Playing it in a browser.** Not every audio or video format plays in every browser: Safari does not play the Ogg/Opus of a Telegram voice note, for instance. Add `playable=1` and an audio or a video comes back converted to a format every browser plays (`audio/mp4` or `video/mp4`). **1517** means it could not be converted; the original is still there without the parameter, and the original is what a download should give.\n\nRequires the `comments:read` permission (`client_organization_comments:read` for apps) and a paid plan.",
|
|
5284
5285
|
"operationId": "getCommentFile",
|
|
5285
5286
|
"x-planvortex-identity": [
|
|
5286
5287
|
"current_user",
|
|
@@ -5302,11 +5303,24 @@
|
|
|
5302
5303
|
"type": "integer",
|
|
5303
5304
|
"minimum": 0
|
|
5304
5305
|
}
|
|
5306
|
+
},
|
|
5307
|
+
{
|
|
5308
|
+
"name": "playable",
|
|
5309
|
+
"in": "query",
|
|
5310
|
+
"required": false,
|
|
5311
|
+
"description": "`1` (or `true`) returns an audio or a video in a format every browser plays: audio as AAC in an M4A (`audio/mp4`), video as H.264 with AAC in an MP4 (`video/mp4`). Ask for it only when your player can't open the original. Images and documents come back unchanged. **1517** means it could not be converted (`data.reason`: `too_big` past 64 MB, or `unreadable`); the original is still there without this parameter. Offer the original for download, not the converted copy.",
|
|
5312
|
+
"schema": {
|
|
5313
|
+
"type": "string",
|
|
5314
|
+
"enum": [
|
|
5315
|
+
"1",
|
|
5316
|
+
"true"
|
|
5317
|
+
]
|
|
5318
|
+
}
|
|
5305
5319
|
}
|
|
5306
5320
|
],
|
|
5307
5321
|
"responses": {
|
|
5308
5322
|
"200": {
|
|
5309
|
-
"description": "The file, with the network's `Content-Type`.",
|
|
5323
|
+
"description": "The file, with the network's `Content-Type`. With `playable`, an audio comes back as `audio/mp4` and a video as `video/mp4`.",
|
|
5310
5324
|
"content": {
|
|
5311
5325
|
"*/*": {
|
|
5312
5326
|
"schema": {
|
|
@@ -5664,7 +5678,7 @@
|
|
|
5664
5678
|
"catalog"
|
|
5665
5679
|
],
|
|
5666
5680
|
"summary": "What every network supports",
|
|
5667
|
-
"description": "The full matrix network → capabilities. It is the **single source of truth** about what a network can do: the catalogue publishes it, the backend checks it before acting, and your integration should filter its account pickers with it rather than keeping a list of its own.\n\n`comments` is the coarse gate — whether the network has comments at all. Which *actions* it allows on one is a finer question and lives in `GET /social_comment_actions`, because the shape here is `{[capability]: boolean}` and nesting an object inside would break it.\n\nToday ten networks answer `comments: true`: Facebook, Instagram, Threads, LinkedIn, X, YouTube, Google Business, Bluesky, Discord and Telegram. TikTok, WhatsApp, Slack and Pinterest answer `false`, for reasons of theirs and not ours — on Pinterest the API *counts* a pin's comments and offers no way to read them, so the figure shows up in the publication's statistics and there is still no inbox.\n\n**Three of the keys are about publishing, not about reading.** `destinations` says the network publishes into places inside the account and every publication has to name one — a Pinterest board, read with `GET /organizations/{id_organization}/accounts/{id_account}/destinations`. `link` says a publication carries a destination link of its own, separate from its text. Both are `false` everywhere but `pinterest` today. `reply_control` says a publication can choose who can reply to it, and is `true` only on `threads`. The three are the reason to ask this matrix instead of keeping a list of your own: a composer with its own copy of which network has which field is exactly what drifted with the character limits.\n\n**Four more are what TikTok's content sharing guidelines ask a composer to show**, and are `true` only on `tiktok` today: `visibility` (on TikTok, with no default), `interactions`, `commercial_content`, and `publish_settings`, which says the options each account allows must be read from `GET /organizations/{id_organization}/accounts/{id_account}/publish_settings` instead of a fixed list.\n\nA `true` here is about the **network**, not about one account of it: a Telegram channel with no linked discussion group answers 965 on its comments even though the network has them.\n\nOnly needs authentication.",
|
|
5681
|
+
"description": "The full matrix network → capabilities. It is the **single source of truth** about what a network can do: the catalogue publishes it, the backend checks it before acting, and your integration should filter its account pickers with it rather than keeping a list of its own.\n\n`comments` is the coarse gate — whether the network has comments at all. Which *actions* it allows on one is a finer question and lives in `GET /social_comment_actions`, because the shape here is `{[capability]: boolean}` and nesting an object inside would break it.\n\nToday ten networks answer `comments: true`: Facebook, Instagram, Threads, LinkedIn, X, YouTube, Google Business, Bluesky, Discord and Telegram. TikTok, WhatsApp, Slack and Pinterest answer `false`, for reasons of theirs and not ours — on Pinterest the API *counts* a pin's comments and offers no way to read them, so the figure shows up in the publication's statistics and there is still no inbox.\n\n**Three of the keys are about publishing, not about reading.** `destinations` says the network publishes into places inside the account and every publication has to name one — a Pinterest board, read with `GET /organizations/{id_organization}/accounts/{id_account}/destinations`. `link` says a publication carries a destination link of its own, separate from its text. Both are `false` everywhere but `pinterest` today. `reply_control` says a publication can choose who can reply to it, and is `true` only on `threads`. The three are the reason to ask this matrix instead of keeping a list of your own: a composer with its own copy of which network has which field is exactly what drifted with the character limits.\n\n**Four more are what TikTok's content sharing guidelines ask a composer to show**, and are `true` only on `tiktok` today: `visibility` (on TikTok, with no default), `interactions`, `commercial_content`, and `publish_settings`, which says the options each account allows must be read from `GET /organizations/{id_organization}/accounts/{id_account}/publish_settings` instead of a fixed list.\n\n**`statistics` says whether PlanVortex reads any metric of that network.** It is `true` on every network but `whatsapp`, which does not publish and has no metrics to read. Use it to decide which accounts to offer on a statistics screen (or filter the account list with `capability=statistics`) instead of finding out from an empty series.\n\nA `true` here is about the **network**, not about one account of it: a Telegram channel with no linked discussion group answers 965 on its comments even though the network has them.\n\nOnly needs authentication.",
|
|
5668
5682
|
"operationId": "getSocialCapabilities",
|
|
5669
5683
|
"x-planvortex-identity": [
|
|
5670
5684
|
"current_user",
|
|
@@ -5697,7 +5711,8 @@
|
|
|
5697
5711
|
"made_for_kids": false,
|
|
5698
5712
|
"interactions": false,
|
|
5699
5713
|
"commercial_content": false,
|
|
5700
|
-
"publish_settings": false
|
|
5714
|
+
"publish_settings": false,
|
|
5715
|
+
"statistics": true
|
|
5701
5716
|
},
|
|
5702
5717
|
"google_business": {
|
|
5703
5718
|
"publications": false,
|
|
@@ -5713,7 +5728,8 @@
|
|
|
5713
5728
|
"made_for_kids": false,
|
|
5714
5729
|
"interactions": false,
|
|
5715
5730
|
"commercial_content": false,
|
|
5716
|
-
"publish_settings": false
|
|
5731
|
+
"publish_settings": false,
|
|
5732
|
+
"statistics": true
|
|
5717
5733
|
},
|
|
5718
5734
|
"pinterest": {
|
|
5719
5735
|
"publications": true,
|
|
@@ -5729,7 +5745,8 @@
|
|
|
5729
5745
|
"made_for_kids": false,
|
|
5730
5746
|
"interactions": false,
|
|
5731
5747
|
"commercial_content": false,
|
|
5732
|
-
"publish_settings": false
|
|
5748
|
+
"publish_settings": false,
|
|
5749
|
+
"statistics": true
|
|
5733
5750
|
},
|
|
5734
5751
|
"threads": {
|
|
5735
5752
|
"publications": true,
|
|
@@ -5745,7 +5762,25 @@
|
|
|
5745
5762
|
"made_for_kids": false,
|
|
5746
5763
|
"interactions": false,
|
|
5747
5764
|
"commercial_content": false,
|
|
5748
|
-
"publish_settings": false
|
|
5765
|
+
"publish_settings": false,
|
|
5766
|
+
"statistics": true
|
|
5767
|
+
},
|
|
5768
|
+
"whatsapp": {
|
|
5769
|
+
"publications": false,
|
|
5770
|
+
"messages": true,
|
|
5771
|
+
"products": false,
|
|
5772
|
+
"webhooks": true,
|
|
5773
|
+
"persistent_menu": false,
|
|
5774
|
+
"comments": false,
|
|
5775
|
+
"destinations": false,
|
|
5776
|
+
"link": false,
|
|
5777
|
+
"reply_control": false,
|
|
5778
|
+
"visibility": false,
|
|
5779
|
+
"made_for_kids": false,
|
|
5780
|
+
"interactions": false,
|
|
5781
|
+
"commercial_content": false,
|
|
5782
|
+
"publish_settings": false,
|
|
5783
|
+
"statistics": false
|
|
5749
5784
|
}
|
|
5750
5785
|
}
|
|
5751
5786
|
}
|
|
@@ -5858,7 +5893,7 @@
|
|
|
5858
5893
|
"contacts"
|
|
5859
5894
|
],
|
|
5860
5895
|
"summary": "List the contacts of an organization",
|
|
5861
|
-
"description": "Newest first. `search` is a full-text search over the name, and `extra_data` filters by your own fields — which is what makes it possible to ask for \"the contacts of this campaign\" without keeping a second database.",
|
|
5896
|
+
"description": "Newest first. `search` is a full-text search over the name, and `extra_data` filters by your own fields — which is what makes it possible to ask for \"the contacts of this campaign\" without keeping a second database.\n\n**A WhatsApp contact may have no phone number.** Since 2026 Meta leaves the number out for people who use a WhatsApp username and have not dealt with that business number by phone in the last 30 days. Such a contact's WhatsApp `external_identifier` is their `user_id` (the BSUID, e.g. `ES.13491208655302741918`), not a phone number, so don't show it or dial it as one. You can still write to them: PlanVortex sends through the BSUID. When their number arrives later, the same contact gets it as `external_identifier` and keeps its `_id` and its messages.",
|
|
5862
5897
|
"operationId": "getContacts",
|
|
5863
5898
|
"x-planvortex-identity": [
|
|
5864
5899
|
"current_user",
|
|
@@ -6275,7 +6310,7 @@
|
|
|
6275
6310
|
"dashboard"
|
|
6276
6311
|
],
|
|
6277
6312
|
"summary": "The whole home screen in one call",
|
|
6278
|
-
"description": "Composes every block of the home screen in a single round trip: operational health, publications, publication metrics, account metrics, plan use, AI plans, the best AI plans and unread messages.\n\n**A block the caller cannot read is omitted, not refused.** The endpoint
|
|
6313
|
+
"description": "Composes every block of the home screen in a single round trip: operational health, publications, publication metrics, account metrics, plan use, AI plans, the best AI plans and unread messages.\n\n**A block the caller cannot read is omitted, not refused.** The endpoint lets in anyone who can read at least one block (the organization, publications, publication stats, account stats, accounts, messages or AI plans) and then checks each block on its own: somebody who can only see publications gets their home with that block, not a 403. A caller who can read none of them gets `520`. `available_blocks` says which blocks were allowed, so an absent block for lack of permission and an absent block for lack of data can be drawn differently.\n\nThe messages block is also omitted when the client's plan has no messaging.",
|
|
6279
6314
|
"operationId": "getDashboard",
|
|
6280
6315
|
"x-planvortex-identity": [
|
|
6281
6316
|
"current_user",
|
|
@@ -7554,7 +7589,7 @@
|
|
|
7554
7589
|
"messages"
|
|
7555
7590
|
],
|
|
7556
7591
|
"summary": "Unread messages in the organization",
|
|
7557
|
-
"description": "How many incoming messages are still unread across every account of the organization.
|
|
7592
|
+
"description": "How many incoming messages are still unread across every account of the organization, in total and per account. `total` is the number for a badge; `accounts` says which account holds them, so an inbox can mark the right one instead of making the user open each. It costs one query: do not compute it by walking the conversations.",
|
|
7558
7593
|
"operationId": "getUnreadMessages",
|
|
7559
7594
|
"x-planvortex-identity": [
|
|
7560
7595
|
"current_user",
|
|
@@ -7575,11 +7610,47 @@
|
|
|
7575
7610
|
"type": "object",
|
|
7576
7611
|
"properties": {
|
|
7577
7612
|
"total": {
|
|
7578
|
-
"type": "integer"
|
|
7613
|
+
"type": "integer",
|
|
7614
|
+
"description": "Unread incoming messages across every account. Always the sum of `accounts`."
|
|
7615
|
+
},
|
|
7616
|
+
"accounts": {
|
|
7617
|
+
"type": "array",
|
|
7618
|
+
"description": "The same count per account. Only accounts with something unread are listed, most unread first; an account that is missing has none.",
|
|
7619
|
+
"items": {
|
|
7620
|
+
"type": "object",
|
|
7621
|
+
"properties": {
|
|
7622
|
+
"id_account": {
|
|
7623
|
+
"type": "string",
|
|
7624
|
+
"description": "The account's `_id`."
|
|
7625
|
+
},
|
|
7626
|
+
"total": {
|
|
7627
|
+
"type": "integer",
|
|
7628
|
+
"minimum": 1
|
|
7629
|
+
}
|
|
7630
|
+
},
|
|
7631
|
+
"required": [
|
|
7632
|
+
"id_account",
|
|
7633
|
+
"total"
|
|
7634
|
+
]
|
|
7635
|
+
}
|
|
7579
7636
|
}
|
|
7580
7637
|
},
|
|
7581
7638
|
"required": [
|
|
7582
|
-
"total"
|
|
7639
|
+
"total",
|
|
7640
|
+
"accounts"
|
|
7641
|
+
]
|
|
7642
|
+
},
|
|
7643
|
+
"example": {
|
|
7644
|
+
"total": 5,
|
|
7645
|
+
"accounts": [
|
|
7646
|
+
{
|
|
7647
|
+
"id_account": "6650f1c2a8b4e1d2c3f4a5b6",
|
|
7648
|
+
"total": 3
|
|
7649
|
+
},
|
|
7650
|
+
{
|
|
7651
|
+
"id_account": "6650f1c2a8b4e1d2c3f4a5b7",
|
|
7652
|
+
"total": 2
|
|
7653
|
+
}
|
|
7583
7654
|
]
|
|
7584
7655
|
}
|
|
7585
7656
|
}
|
|
@@ -8323,7 +8394,7 @@
|
|
|
8323
8394
|
"messages"
|
|
8324
8395
|
],
|
|
8325
8396
|
"summary": "One file of a message, fetched from the network",
|
|
8326
|
-
"description": "Files that arrive in a message (a photo, a video, a voice note, a document, a sticker) **are not stored by PlanVortex**: they stay on the network, and `message_options.files_urls` says where each one is.\n\n• **With `url`** (Instagram and Messenger): Meta's own CDN link. It works until Meta expires it.\n• **Without `url`** (every WhatsApp file): WhatsApp only hands a file over with the account's token, through a link that lasts five minutes, so there is no link to give you.\n\nEither way, this endpoint asks the network for the file now and streams it back without keeping a copy. `index` is the file's position in `files_urls`. `message_options.files` holds only the files **you** sent from PlanVortex, which are uploads.\n\n**The network decides how long a file lives.** WhatsApp lets go of a file 7 days after it arrived, and Meta drops one when the message or the story is deleted. After that the answer is **1515**, with `data.social_network`; on a number that also runs the WhatsApp Business app, the file is still there. **1516** means the message is not from this account, or has no file at that position.\n\nImages, videos and audio come back `inline`. Anything else (a PDF, a spreadsheet, an HTML file, an SVG) comes back as an `attachment`: someone outside the business sent it, so don't render it inside your own pages.",
|
|
8397
|
+
"description": "Files that arrive in a message (a photo, a video, a voice note, a document, a sticker) **are not stored by PlanVortex**: they stay on the network, and `message_options.files_urls` says where each one is.\n\n• **With `url`** (Instagram and Messenger): Meta's own CDN link. It works until Meta expires it.\n• **Without `url`** (every WhatsApp file): WhatsApp only hands a file over with the account's token, through a link that lasts five minutes, so there is no link to give you.\n\nEither way, this endpoint asks the network for the file now and streams it back without keeping a copy. `index` is the file's position in `files_urls`. `message_options.files` holds only the files **you** sent from PlanVortex, which are uploads.\n\n**The network decides how long a file lives.** WhatsApp lets go of a file 7 days after it arrived, and Meta drops one when the message or the story is deleted. After that the answer is **1515**, with `data.social_network`; on a number that also runs the WhatsApp Business app, the file is still there. **1516** means the message is not from this account, or has no file at that position.\n\nImages, videos and audio come back `inline`. Anything else (a PDF, a spreadsheet, an HTML file, an SVG) comes back as an `attachment`: someone outside the business sent it, so don't render it inside your own pages.\n\n**Playing it in a browser.** Not every format WhatsApp accepts plays in a browser: an AMR voice note or a 3GPP video plays in none, and Safari does not play the Ogg/Opus of an ordinary voice note. Add `playable=1` and an audio or a video comes back converted to a format every browser plays (`audio/mp4` or `video/mp4`). **1517** means it could not be converted; the original is still there without the parameter, and the original is what a download should give.",
|
|
8327
8398
|
"operationId": "getMessageFile",
|
|
8328
8399
|
"x-planvortex-identity": [
|
|
8329
8400
|
"current_user",
|
|
@@ -8355,11 +8426,24 @@
|
|
|
8355
8426
|
"type": "integer",
|
|
8356
8427
|
"minimum": 0
|
|
8357
8428
|
}
|
|
8429
|
+
},
|
|
8430
|
+
{
|
|
8431
|
+
"name": "playable",
|
|
8432
|
+
"in": "query",
|
|
8433
|
+
"required": false,
|
|
8434
|
+
"description": "`1` (or `true`) returns an audio or a video in a format every browser plays: audio as AAC in an M4A (`audio/mp4`), video as H.264 with AAC in an MP4 (`video/mp4`). Ask for it only when your player can't open the original. Images and documents come back unchanged. **1517** means it could not be converted (`data.reason`: `too_big` past 64 MB, or `unreadable`); the original is still there without this parameter. Offer the original for download, not the converted copy.",
|
|
8435
|
+
"schema": {
|
|
8436
|
+
"type": "string",
|
|
8437
|
+
"enum": [
|
|
8438
|
+
"1",
|
|
8439
|
+
"true"
|
|
8440
|
+
]
|
|
8441
|
+
}
|
|
8358
8442
|
}
|
|
8359
8443
|
],
|
|
8360
8444
|
"responses": {
|
|
8361
8445
|
"200": {
|
|
8362
|
-
"description": "The file, with the network's `Content-Type`.",
|
|
8446
|
+
"description": "The file, with the network's `Content-Type`. With `playable`, an audio comes back as `audio/mp4` and a video as `video/mp4`.",
|
|
8363
8447
|
"content": {
|
|
8364
8448
|
"*/*": {
|
|
8365
8449
|
"schema": {
|
|
@@ -12869,7 +12953,7 @@
|
|
|
12869
12953
|
"webhooks"
|
|
12870
12954
|
],
|
|
12871
12955
|
"summary": "A change happened (notification to your app)",
|
|
12872
|
-
"description": "PlanVortex `POST`s to the `webhook_url` of your client app when something happens. **The body is an array of changes**, and each one carries `field` telling you what it is — switch on it and ignore what you do not handle, because the list grows with the product.\n\nThree shapes travel in that array. A change on an **account** (`WebhookChange`) always carries `id_account`, `id_organization` and `social_network`. A change on an **integration** (`IntegrationWebhookChange`) and the end of an **AI plan** (`AiPlanWebhookChange`) carry none of those, because they hang off the organization and not off any account.\n\nThe events delivered today are `new_account`, `change_state_account`, `messages`, `messaging_postbacks`, `messaging_seen`, `messaging_error`, `message_echoes`, `comments`, `integration_error`, `ai_plan_generated` and `ai_plan_failed`.\n\n### Comments\n\n`field: \"comments\"` is the one for this section, and the comment itself travels in **`commentObj`** — a property of its own, never in `messageObj`. That is deliberate: a comment is not a message, it has no contact and it hangs off a publication. A consumer that only understands messages sees `commentObj` as absent and ignores the change, which is exactly what should happen.\n\n**Which networks arrive this way:** Facebook and Instagram, because Meta pushes them. YouTube, LinkedIn and Google Business have no comment webhook, so those are polled by a background job and appear in the inbox within a few hours rather than instantly. X is polled too, and only when the organization turns it on, because reading replies there is billed per unit.\n\n**Meta repeats deliveries.** The same comment can arrive more than once; the backend is idempotent about it and so should you be — deduplicate on `commentObj.external_id`.\n\n### AI plans\n\n`ai_plan_generated` and `ai_plan_failed` say that a plan has **finished**: it was generated, or it gave up. Instead of polling the plan every few seconds, wait for one of these and then read it once with `GET /clients/{id_client}/organizations/{id_organization}/ai_plans/{id_ai_plan}`. The change carries ids and numbers only, never the prompt or the generated text, so the publications are in that `GET`.\n\nA plan that hits a transient error goes back to the queue and is retried. That is not an end and sends nothing, so each plan sends **one** of these two events, never a `failed` followed by a `generated`. A plan generated with notices (`warnings` above zero) is still `ai_plan_generated`: it is usable, and the notices are in the plan.\n\nThe event goes to **every** app of the client that has a `webhook_url`, not only to the one that created the plan. And it is not retried: if your endpoint was down when the plan finished, the `GET` still tells you how it ended, so on startup read the plans you were waiting for.\n\n### WhatsApp replies sent from the phone\n\nA WhatsApp number can work in the **WhatsApp Business app** on a phone and in PlanVortex at the same time. What the business sends from the app arrives as `field: \"message_echoes\"`, with the message in `messageObj` as one of **ours**: `contact_id` is the person it was sent to and `from_contact_id` is absent. Store it in the thread; do not answer it. It does not open WhatsApp's 24-hour window.\n\nWhen a contact edits or deletes a message, no event is sent: the message itself changes, and the next read returns it with `edit_date` or `
|
|
12956
|
+
"description": "PlanVortex `POST`s to the `webhook_url` of your client app when something happens. **The body is an array of changes**, and each one carries `field` telling you what it is — switch on it and ignore what you do not handle, because the list grows with the product.\n\nThree shapes travel in that array. A change on an **account** (`WebhookChange`) always carries `id_account`, `id_organization` and `social_network`. A change on an **integration** (`IntegrationWebhookChange`) and the end of an **AI plan** (`AiPlanWebhookChange`) carry none of those, because they hang off the organization and not off any account.\n\nThe events delivered today are `new_account`, `change_state_account`, `messages`, `messaging_postbacks`, `messaging_seen`, `messaging_error`, `message_echoes`, `comments`, `integration_error`, `ai_plan_generated` and `ai_plan_failed`.\n\n### Comments\n\n`field: \"comments\"` is the one for this section, and the comment itself travels in **`commentObj`** — a property of its own, never in `messageObj`. That is deliberate: a comment is not a message, it has no contact and it hangs off a publication. A consumer that only understands messages sees `commentObj` as absent and ignores the change, which is exactly what should happen.\n\n**Which networks arrive this way:** Facebook and Instagram, because Meta pushes them. YouTube, LinkedIn and Google Business have no comment webhook, so those are polled by a background job and appear in the inbox within a few hours rather than instantly. X is polled too, and only when the organization turns it on, because reading replies there is billed per unit.\n\n**Meta repeats deliveries.** The same comment can arrive more than once; the backend is idempotent about it and so should you be — deduplicate on `commentObj.external_id`.\n\n### AI plans\n\n`ai_plan_generated` and `ai_plan_failed` say that a plan has **finished**: it was generated, or it gave up. Instead of polling the plan every few seconds, wait for one of these and then read it once with `GET /clients/{id_client}/organizations/{id_organization}/ai_plans/{id_ai_plan}`. The change carries ids and numbers only, never the prompt or the generated text, so the publications are in that `GET`.\n\nA plan that hits a transient error goes back to the queue and is retried. That is not an end and sends nothing, so each plan sends **one** of these two events, never a `failed` followed by a `generated`. A plan generated with notices (`warnings` above zero) is still `ai_plan_generated`: it is usable, and the notices are in the plan.\n\nThe event goes to **every** app of the client that has a `webhook_url`, not only to the one that created the plan. And it is not retried: if your endpoint was down when the plan finished, the `GET` still tells you how it ended, so on startup read the plans you were waiting for.\n\n### WhatsApp replies sent from the phone\n\nA WhatsApp number can work in the **WhatsApp Business app** on a phone and in PlanVortex at the same time. What the business sends from the app arrives as `field: \"message_echoes\"`, with the message in `messageObj` as one of **ours**: `contact_id` is the person it was sent to and `from_contact_id` is absent. Store it in the thread; do not answer it. It does not open WhatsApp's 24-hour window.\n\nWhen a contact edits or deletes a message, or anyone reacts to one, no event is sent: the message itself changes, and the next read returns it with `edit_date`, `deleted_date` or its `reactions`.\n\n### Verifying the signature\n\nEvery delivery carries the body signed with your app's secret, twice:\n\n- `x-hub-signature`: `sha1=<hmac>`\n- `x-hub-signature-256`: `sha256=<hmac>`\n\nCompute the HMAC over the **raw** request body — not over a re-serialized copy of the parsed JSON — and compare in constant time. Prefer the sha256 header.\n\nDelivery is best effort: PlanVortex does not retry a webhook that fails.",
|
|
12873
12957
|
"operationId": "onCommentsWebhook",
|
|
12874
12958
|
"requestBody": {
|
|
12875
12959
|
"required": true,
|
|
@@ -15637,6 +15721,10 @@
|
|
|
15637
15721
|
"publish_settings": {
|
|
15638
15722
|
"type": "boolean",
|
|
15639
15723
|
"description": "What each **account** allows when publishing is read from the network: `GET /organizations/{id_organization}/accounts/{id_account}/publish_settings` (privacy options, interactions the creator switched off, longest video, whether it can post now). Offer the `visibility` values from there, not a fixed list. Today only `tiktok`."
|
|
15724
|
+
},
|
|
15725
|
+
"statistics": {
|
|
15726
|
+
"type": "boolean",
|
|
15727
|
+
"description": "PlanVortex reads **statistics** for this network: account metrics (`GET /organizations/{id_organization}/accounts/{id_account}/metrics`, whose names come from `.../metric_list`) and, on the networks that publish, the metrics of each publication. It is `true` exactly when the network declares at least one account metric, so it never promises a statistics screen that would stay empty. Today every network but `whatsapp`, which does not publish and has none."
|
|
15640
15728
|
}
|
|
15641
15729
|
},
|
|
15642
15730
|
"required": [
|
|
@@ -15653,7 +15741,8 @@
|
|
|
15653
15741
|
"made_for_kids",
|
|
15654
15742
|
"interactions",
|
|
15655
15743
|
"commercial_content",
|
|
15656
|
-
"publish_settings"
|
|
15744
|
+
"publish_settings",
|
|
15745
|
+
"statistics"
|
|
15657
15746
|
]
|
|
15658
15747
|
},
|
|
15659
15748
|
"CommentsWebhookChange": {
|
|
@@ -15925,7 +16014,7 @@
|
|
|
15925
16014
|
},
|
|
15926
16015
|
"external_identifier": {
|
|
15927
16016
|
"type": "string",
|
|
15928
|
-
"description": "The contact id on that channel — the phone number on WhatsApp, the PSID on Messenger. Optional in the model, but a contact without it cannot be written to, and it is what deduplicates on create."
|
|
16017
|
+
"description": "The contact id on that channel — the phone number on WhatsApp, the PSID on Messenger. Optional in the model, but a contact without it cannot be written to, and it is what deduplicates on create. On WhatsApp, for someone whose number you don't have, the `user_id` (BSUID) of a contact the API already returned also works: PlanVortex then writes to them through it."
|
|
15929
16018
|
},
|
|
15930
16019
|
"social_network": {
|
|
15931
16020
|
"$ref": "#/components/schemas/ContactChannel"
|
|
@@ -16628,7 +16717,7 @@
|
|
|
16628
16717
|
},
|
|
16629
16718
|
"code": {
|
|
16630
16719
|
"type": "integer",
|
|
16631
|
-
"description": "PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1309 client plan · 1400-1408 organization plan · 1500-
|
|
16720
|
+
"description": "PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1309 client plan · 1400-1408 organization plan · 1500-1517 messaging · 1600-1601 contacts · 1900-1906 payments · 2000-2099 products · 2100-2199 AI plans · 2200-2299 integrations · 2500-2599 publication fields, the ones that no longer fit in 900-996 (visibility, made for kids, TikTok's interactions and commercial content) · 2600-2699 comments, the ones that no longer fit in 945-948."
|
|
16632
16721
|
},
|
|
16633
16722
|
"data": {
|
|
16634
16723
|
"additionalProperties": true,
|
|
@@ -17217,6 +17306,38 @@
|
|
|
17217
17306
|
"format": "date-time",
|
|
17218
17307
|
"description": "When the contact **deleted** this message for everyone (WhatsApp allows it for two days). The message stays in the thread with no `text` and no files."
|
|
17219
17308
|
},
|
|
17309
|
+
"reactions": {
|
|
17310
|
+
"type": "array",
|
|
17311
|
+
"description": "The emoji reactions this message has on the network: WhatsApp, Instagram, Messenger and Bluesky. On WhatsApp, Instagram and Messenger each side has at most one reaction per message, and a new one replaces the old; on Bluesky one person can add several. Empty when there are none.\n\nA reaction is not a new message and **no webhook event is sent** for it: the message itself changes, and the next read returns it with its `reactions`. A reaction to a message PlanVortex never received (sent before the account was connected) is not recorded. On Bluesky, which has no webhook, a new reaction is picked up within a few minutes, and a removed one the next time the conversation is read.",
|
|
17312
|
+
"items": {
|
|
17313
|
+
"type": "object",
|
|
17314
|
+
"properties": {
|
|
17315
|
+
"emoji": {
|
|
17316
|
+
"type": "string",
|
|
17317
|
+
"description": "The emoji, as the network sends it.",
|
|
17318
|
+
"example": "👍"
|
|
17319
|
+
},
|
|
17320
|
+
"by": {
|
|
17321
|
+
"type": "string",
|
|
17322
|
+
"enum": [
|
|
17323
|
+
"contact",
|
|
17324
|
+
"account"
|
|
17325
|
+
],
|
|
17326
|
+
"description": "Who reacted: the `contact`, or the `account` itself (the business, from the network's own app or inbox)."
|
|
17327
|
+
},
|
|
17328
|
+
"date": {
|
|
17329
|
+
"type": "string",
|
|
17330
|
+
"format": "date-time",
|
|
17331
|
+
"description": "When the reaction was added."
|
|
17332
|
+
}
|
|
17333
|
+
},
|
|
17334
|
+
"required": [
|
|
17335
|
+
"emoji",
|
|
17336
|
+
"by",
|
|
17337
|
+
"date"
|
|
17338
|
+
]
|
|
17339
|
+
}
|
|
17340
|
+
},
|
|
17220
17341
|
"creation_date": {
|
|
17221
17342
|
"type": "string",
|
|
17222
17343
|
"format": "date-time"
|
|
@@ -17305,7 +17426,7 @@
|
|
|
17305
17426
|
},
|
|
17306
17427
|
"MessageType": {
|
|
17307
17428
|
"type": "string",
|
|
17308
|
-
"description": "What kind of message this is. `simple_message` and `file_message` work everywhere; the rest are network-specific shapes.\n\n`unsupported_message` only ever **arrives**: a
|
|
17429
|
+
"description": "What kind of message this is. `simple_message` and `file_message` work everywhere; the rest are network-specific shapes.\n\n`unsupported_message` only ever **arrives**: a message the network does not let the API show. On WhatsApp it is a type the API cannot read, with WhatsApp's reason in `message_errors`; if the number is also in the WhatsApp Business app, the message can be read there. On Instagram and Messenger it is something that is not a file, such as an audio shared from Instagram's own library, which arrives as an empty template. It carries no files and keeps the caption as `text` when there is one. Sending one is refused.",
|
|
17309
17430
|
"enum": [
|
|
17310
17431
|
"simple_message",
|
|
17311
17432
|
"file_message",
|
|
@@ -19137,7 +19258,7 @@
|
|
|
19137
19258
|
},
|
|
19138
19259
|
"external_identifier": {
|
|
19139
19260
|
"type": "string",
|
|
19140
|
-
"description": "Identifier of the contact on that channel."
|
|
19261
|
+
"description": "Identifier of the contact on that channel. On WhatsApp it is the phone number, digits only, **except** for someone who uses a WhatsApp username and has not shared their number with that business number: then it is their `user_id` (the BSUID, e.g. `ES.13491208655302741918`). It has a country code and a dot in front, so it never looks like a phone number. Don't show it or dial it as one."
|
|
19141
19262
|
},
|
|
19142
19263
|
"social_network": {
|
|
19143
19264
|
"$ref": "#/components/schemas/ContactChannel"
|
|
@@ -19146,6 +19267,10 @@
|
|
|
19146
19267
|
"type": "string",
|
|
19147
19268
|
"format": "date-time",
|
|
19148
19269
|
"description": "Last message received from the contact. On WhatsApp it is what opens the 24-hour window in which a free-form message is allowed."
|
|
19270
|
+
},
|
|
19271
|
+
"user_id": {
|
|
19272
|
+
"type": "string",
|
|
19273
|
+
"description": "**WhatsApp only.** The person's business-scoped user id at Meta (BSUID), e.g. `ES.13491208655302741918`. Meta sends it with every message, and since 2026 it may leave the phone number out for people who use a username and have not dealt with that business number by phone in the last 30 days. When there is no phone number it is also the `external_identifier`, and PlanVortex writes to the contact through it. Treat it as opaque: it is scoped to Meta's business portfolio, and it changes when the person changes their number (PlanVortex updates the contact when that happens)."
|
|
19149
19274
|
}
|
|
19150
19275
|
},
|
|
19151
19276
|
"required": [
|
|
@@ -9,7 +9,7 @@ name = "planvortex"
|
|
|
9
9
|
# entonces `project.version` desapareceria del pyproject y el paso del workflow de release que
|
|
10
10
|
# compara el tag con la version —que lo lee con `tomllib`— dejaria de encontrarla. Se quedan las dos
|
|
11
11
|
# y las ata `tests/test_packaging.py`, que falla si se separan.
|
|
12
|
-
version = "0.
|
|
12
|
+
version = "0.19.0"
|
|
13
13
|
description = "Official Python client for the PlanVortex API"
|
|
14
14
|
readme = "README.md"
|
|
15
15
|
requires-python = ">=3.10"
|
|
@@ -53,8 +53,9 @@ PLANVORTEX_ERROR_RANGES: tuple[ErrorRange, ...] = (
|
|
|
53
53
|
# 1513 y 1514 son las plantillas de WhatsApp: el formato que Meta rechazaria sin decir por que,
|
|
54
54
|
# y Meta rechazandola al crearla. Nacieron por encima del techo, la cuarta vez que pasa. 1515 y
|
|
55
55
|
# 1516 son los archivos que llegan de la red: 1515 = la red ya no lo tiene (tambien en un
|
|
56
|
-
# comentario), 1516 = ese mensaje o esa posicion no existen.
|
|
57
|
-
|
|
56
|
+
# comentario), 1516 = ese mensaje o esa posicion no existen. 1517 = ese audio o video no se pudo
|
|
57
|
+
# convertir con `playable` (el original sigue ahi sin el parametro): la quinta vez.
|
|
58
|
+
ErrorRange(1500, 1517, "messaging"),
|
|
58
59
|
ErrorRange(1600, 1601, "contact"),
|
|
59
60
|
ErrorRange(1900, 1906, "payment"),
|
|
60
61
|
ErrorRange(2000, 2099, "product"),
|
|
@@ -174,7 +175,7 @@ class PlanLimitError(PlanVortexError):
|
|
|
174
175
|
|
|
175
176
|
|
|
176
177
|
class MessagingError(PlanVortexError):
|
|
177
|
-
"""1500-
|
|
178
|
+
"""1500-1517 — conversations, messages, templates and their files. Requires a paid plan."""
|
|
178
179
|
|
|
179
180
|
|
|
180
181
|
class ContactError(PlanVortexError):
|
|
@@ -1035,6 +1035,10 @@ class CommentsSocialCapabilities(TypedDict):
|
|
|
1035
1035
|
"""
|
|
1036
1036
|
What each **account** allows when publishing is read from the network: `GET /organizations/{id_organization}/accounts/{id_account}/publish_settings` (privacy options, interactions the creator switched off, longest video, whether it can post now). Offer the `visibility` values from there, not a fixed list. Today only `tiktok`.
|
|
1037
1037
|
"""
|
|
1038
|
+
statistics: bool
|
|
1039
|
+
"""
|
|
1040
|
+
PlanVortex reads **statistics** for this network: account metrics (`GET /organizations/{id_organization}/accounts/{id_account}/metrics`, whose names come from `.../metric_list`) and, on the networks that publish, the metrics of each publication. It is `true` exactly when the network declares at least one account metric, so it never promises a statistics screen that would stay empty. Today every network but `whatsapp`, which does not publish and has none.
|
|
1041
|
+
"""
|
|
1038
1042
|
|
|
1039
1043
|
|
|
1040
1044
|
ContactChannel: TypeAlias = Literal[
|
|
@@ -1096,7 +1100,7 @@ class ContactsSocialIdentifierInput(TypedDict):
|
|
|
1096
1100
|
"""
|
|
1097
1101
|
external_identifier: NotRequired[str]
|
|
1098
1102
|
"""
|
|
1099
|
-
The contact id on that channel — the phone number on WhatsApp, the PSID on Messenger. Optional in the model, but a contact without it cannot be written to, and it is what deduplicates on create.
|
|
1103
|
+
The contact id on that channel — the phone number on WhatsApp, the PSID on Messenger. Optional in the model, but a contact without it cannot be written to, and it is what deduplicates on create. On WhatsApp, for someone whose number you don't have, the `user_id` (BSUID) of a contact the API already returned also works: PlanVortex then writes to them through it.
|
|
1100
1104
|
"""
|
|
1101
1105
|
social_network: ContactChannel
|
|
1102
1106
|
|
|
@@ -1224,7 +1228,7 @@ class Error1(TypedDict):
|
|
|
1224
1228
|
"""
|
|
1225
1229
|
code: int
|
|
1226
1230
|
"""
|
|
1227
|
-
PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1309 client plan · 1400-1408 organization plan · 1500-
|
|
1231
|
+
PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1309 client plan · 1400-1408 organization plan · 1500-1517 messaging · 1600-1601 contacts · 1900-1906 payments · 2000-2099 products · 2100-2199 AI plans · 2200-2299 integrations · 2500-2599 publication fields, the ones that no longer fit in 900-996 (visibility, made for kids, TikTok's interactions and commercial content) · 2600-2699 comments, the ones that no longer fit in 945-948.
|
|
1228
1232
|
"""
|
|
1229
1233
|
data: NotRequired[dict[str, Any]]
|
|
1230
1234
|
"""
|
|
@@ -1445,6 +1449,21 @@ class IntegrationsWooCommerceConnectRequest(TypedDict):
|
|
|
1445
1449
|
"""
|
|
1446
1450
|
|
|
1447
1451
|
|
|
1452
|
+
class Reaction(TypedDict):
|
|
1453
|
+
emoji: str
|
|
1454
|
+
"""
|
|
1455
|
+
The emoji, as the network sends it.
|
|
1456
|
+
"""
|
|
1457
|
+
by: Literal["contact", "account"]
|
|
1458
|
+
"""
|
|
1459
|
+
Who reacted: the `contact`, or the `account` itself (the business, from the network's own app or inbox).
|
|
1460
|
+
"""
|
|
1461
|
+
date: str
|
|
1462
|
+
"""
|
|
1463
|
+
When the reaction was added.
|
|
1464
|
+
"""
|
|
1465
|
+
|
|
1466
|
+
|
|
1448
1467
|
MessageType: TypeAlias = Literal[
|
|
1449
1468
|
"simple_message",
|
|
1450
1469
|
"file_message",
|
|
@@ -1461,7 +1480,7 @@ MessageType: TypeAlias = Literal[
|
|
|
1461
1480
|
"""
|
|
1462
1481
|
What kind of message this is. `simple_message` and `file_message` work everywhere; the rest are network-specific shapes.
|
|
1463
1482
|
|
|
1464
|
-
`unsupported_message` only ever **arrives**: a
|
|
1483
|
+
`unsupported_message` only ever **arrives**: a message the network does not let the API show. On WhatsApp it is a type the API cannot read, with WhatsApp's reason in `message_errors`; if the number is also in the WhatsApp Business app, the message can be read there. On Instagram and Messenger it is something that is not a file, such as an audio shared from Instagram's own library, which arrives as an empty template. It carries no files and keeps the caption as `text` when there is one. Sending one is refused.
|
|
1465
1484
|
"""
|
|
1466
1485
|
|
|
1467
1486
|
|
|
@@ -2452,13 +2471,17 @@ class SocialIdentifier(TypedDict):
|
|
|
2452
2471
|
_id: str
|
|
2453
2472
|
external_identifier: NotRequired[str]
|
|
2454
2473
|
"""
|
|
2455
|
-
Identifier of the contact on that channel.
|
|
2474
|
+
Identifier of the contact on that channel. On WhatsApp it is the phone number, digits only, **except** for someone who uses a WhatsApp username and has not shared their number with that business number: then it is their `user_id` (the BSUID, e.g. `ES.13491208655302741918`). It has a country code and a dot in front, so it never looks like a phone number. Don't show it or dial it as one.
|
|
2456
2475
|
"""
|
|
2457
2476
|
social_network: ContactChannel
|
|
2458
2477
|
last_send_date: NotRequired[str]
|
|
2459
2478
|
"""
|
|
2460
2479
|
Last message received from the contact. On WhatsApp it is what opens the 24-hour window in which a free-form message is allowed.
|
|
2461
2480
|
"""
|
|
2481
|
+
user_id: NotRequired[str]
|
|
2482
|
+
"""
|
|
2483
|
+
**WhatsApp only.** The person's business-scoped user id at Meta (BSUID), e.g. `ES.13491208655302741918`. Meta sends it with every message, and since 2026 it may leave the phone number out for people who use a username and have not dealt with that business number by phone in the last 30 days. When there is no phone number it is also the `external_identifier`, and PlanVortex writes to the contact through it. Treat it as opaque: it is scoped to Meta's business portfolio, and it changes when the person changes their number (PlanVortex updates the contact when that happens).
|
|
2484
|
+
"""
|
|
2462
2485
|
|
|
2463
2486
|
|
|
2464
2487
|
SocialNetwork: TypeAlias = Literal[
|
|
@@ -4220,6 +4243,12 @@ class Message(TypedDict):
|
|
|
4220
4243
|
"""
|
|
4221
4244
|
When the contact **deleted** this message for everyone (WhatsApp allows it for two days). The message stays in the thread with no `text` and no files.
|
|
4222
4245
|
"""
|
|
4246
|
+
reactions: NotRequired[list[Reaction]]
|
|
4247
|
+
"""
|
|
4248
|
+
The emoji reactions this message has on the network: WhatsApp, Instagram, Messenger and Bluesky. On WhatsApp, Instagram and Messenger each side has at most one reaction per message, and a new one replaces the old; on Bluesky one person can add several. Empty when there are none.
|
|
4249
|
+
|
|
4250
|
+
A reaction is not a new message and **no webhook event is sent** for it: the message itself changes, and the next read returns it with its `reactions`. A reaction to a message PlanVortex never received (sent before the account was connected) is not recorded. On Bluesky, which has no webhook, a new reaction is picked up within a few minutes, and a removed one the next time the conversation is read.
|
|
4251
|
+
"""
|
|
4223
4252
|
creation_date: str
|
|
4224
4253
|
|
|
4225
4254
|
|
|
@@ -12,7 +12,7 @@ from __future__ import annotations
|
|
|
12
12
|
|
|
13
13
|
import platform
|
|
14
14
|
|
|
15
|
-
VERSION = "0.
|
|
15
|
+
VERSION = "0.19.0"
|
|
16
16
|
|
|
17
17
|
# Sin barra final, y con el `/v1.0.0` dentro: la version de la API es parte de la ruta, no una
|
|
18
18
|
# cabecera, asi que una `base_url` sin ella da 404 en todo.
|
|
@@ -180,11 +180,12 @@ class AsyncAccountsResource(AsyncResource):
|
|
|
180
180
|
"""An organization's accounts.
|
|
181
181
|
|
|
182
182
|
``capability`` filters by what the account's network can do — ``publications``, ``messages``,
|
|
183
|
-
``products``, ``webhooks``, ``persistent_menu``, ``comments`` — applied on
|
|
184
|
-
the same matrix ``catalog.social_capabilities()`` publishes. It is how you
|
|
185
|
-
accounts I can publish with" without keeping a table of your own. ``comments``
|
|
186
|
-
at each account: it leaves out LinkedIn personal profiles, which have no inbox
|
|
187
|
-
LinkedIn pages do.
|
|
183
|
+
``products``, ``webhooks``, ``persistent_menu``, ``comments``, ``statistics`` — applied on
|
|
184
|
+
the server with the same matrix ``catalog.social_capabilities()`` publishes. It is how you
|
|
185
|
+
ask for "the accounts I can publish with" without keeping a table of your own. ``comments``
|
|
186
|
+
also looks at each account: it leaves out LinkedIn personal profiles, which have no inbox
|
|
187
|
+
although LinkedIn pages do. ``statistics`` leaves out the networks PlanVortex reads no
|
|
188
|
+
metric from (today WhatsApp): the accounts worth offering on a statistics screen.
|
|
188
189
|
"""
|
|
189
190
|
pagina: Page[Account] = await self._list(
|
|
190
191
|
f"{self._organization_path(id_organization)}/accounts",
|
|
@@ -69,7 +69,8 @@ class AsyncCatalogResource(AsyncResource):
|
|
|
69
69
|
return redes
|
|
70
70
|
|
|
71
71
|
async def social_capabilities(self, *, timeout: float | None = None) -> dict[str, SocialCapabilities]:
|
|
72
|
-
"""The network → what it can do matrix: publish, messages, products, webhooks, menu, comments
|
|
72
|
+
"""The network → what it can do matrix: publish, messages, products, webhooks, menu, comments
|
|
73
|
+
and statistics (``statistics``, today every network but WhatsApp).
|
|
73
74
|
|
|
74
75
|
It is what stops an account being offered on a screen its network does not support —
|
|
75
76
|
WhatsApp in the composer, LinkedIn in the chat.
|
|
@@ -14,6 +14,9 @@ WHAT TO KNOW BEFORE CALLING ANYTHING HERE:
|
|
|
14
14
|
is there so nobody has to remember.
|
|
15
15
|
- **Deleting a contact deletes its messages too**, and deleting the organization's deletes them all.
|
|
16
16
|
There is no bin.
|
|
17
|
+
- **On WhatsApp a contact may have no phone number.** Someone who uses a username may never give
|
|
18
|
+
you theirs: their ``external_identifier`` is then their BSUID (``ES.1349...``, the same value as
|
|
19
|
+
``user_id``), which must not be shown as a phone number. See ``SocialIdentifier``.
|
|
17
20
|
- **It needs a paid plan** (error 516).
|
|
18
21
|
|
|
19
22
|
THIS FILE IS THE SOURCE OF ``resources_sync/contacts.py``.
|
|
@@ -171,11 +171,12 @@ class AccountsResource(Resource):
|
|
|
171
171
|
"""An organization's accounts.
|
|
172
172
|
|
|
173
173
|
``capability`` filters by what the account's network can do — ``publications``, ``messages``,
|
|
174
|
-
``products``, ``webhooks``, ``persistent_menu``, ``comments`` — applied on
|
|
175
|
-
the same matrix ``catalog.social_capabilities()`` publishes. It is how you
|
|
176
|
-
accounts I can publish with" without keeping a table of your own. ``comments``
|
|
177
|
-
at each account: it leaves out LinkedIn personal profiles, which have no inbox
|
|
178
|
-
LinkedIn pages do.
|
|
174
|
+
``products``, ``webhooks``, ``persistent_menu``, ``comments``, ``statistics`` — applied on
|
|
175
|
+
the server with the same matrix ``catalog.social_capabilities()`` publishes. It is how you
|
|
176
|
+
ask for "the accounts I can publish with" without keeping a table of your own. ``comments``
|
|
177
|
+
also looks at each account: it leaves out LinkedIn personal profiles, which have no inbox
|
|
178
|
+
although LinkedIn pages do. ``statistics`` leaves out the networks PlanVortex reads no
|
|
179
|
+
metric from (today WhatsApp): the accounts worth offering on a statistics screen.
|
|
179
180
|
"""
|
|
180
181
|
pagina: Page[Account] = self._list(
|
|
181
182
|
f"{self._organization_path(id_organization)}/accounts",
|
|
@@ -53,7 +53,8 @@ class CatalogResource(Resource):
|
|
|
53
53
|
return redes
|
|
54
54
|
|
|
55
55
|
def social_capabilities(self, *, timeout: float | None = None) -> dict[str, SocialCapabilities]:
|
|
56
|
-
"""The network → what it can do matrix: publish, messages, products, webhooks, menu, comments
|
|
56
|
+
"""The network → what it can do matrix: publish, messages, products, webhooks, menu, comments
|
|
57
|
+
and statistics (``statistics``, today every network but WhatsApp).
|
|
57
58
|
|
|
58
59
|
It is what stops an account being offered on a screen its network does not support —
|
|
59
60
|
WhatsApp in the composer, LinkedIn in the chat.
|
|
@@ -716,7 +716,14 @@ ContactExtraData: TypeAlias = _models.ContactExtraData
|
|
|
716
716
|
"""A contact's own fields: the address block and the six free properties."""
|
|
717
717
|
|
|
718
718
|
SocialIdentifier: TypeAlias = _models.SocialIdentifier
|
|
719
|
-
"""The same contact, on one channel. Either a social network or ``email``.
|
|
719
|
+
"""The same contact, on one channel. Either a social network or ``email``.
|
|
720
|
+
|
|
721
|
+
**On WhatsApp there may be no phone number.** Since 2026 Meta leaves the number out for people who
|
|
722
|
+
use a WhatsApp username and have not dealt with that business number by phone in the last 30 days.
|
|
723
|
+
What always arrives is ``user_id``, their BSUID (``ES.13491208655302741918``), and without a phone it
|
|
724
|
+
is also the ``external_identifier``. It has a country code and a dot in front, so it never looks
|
|
725
|
+
like a phone number: don't show it or dial it as one. You can still write to them.
|
|
726
|
+
"""
|
|
720
727
|
|
|
721
728
|
SocialIdentifierInput: TypeAlias = _models.ContactsSocialIdentifierInput
|
|
722
729
|
"""The same, as it is SENT: here ``_id`` is optional and the server assigns one.
|
|
@@ -371,7 +371,10 @@ def test_cada_rango_del_catalogo_cae_en_su_clase() -> None:
|
|
|
371
371
|
# comentario sin archivo en esa posicion, cae en los 2600 de comentarios.
|
|
372
372
|
assert error_class_for_code(1515).__name__ == "MessagingError"
|
|
373
373
|
assert error_class_for_code(1516).__name__ == "MessagingError"
|
|
374
|
-
|
|
374
|
+
# 1517: un audio o un video que no se pudo convertir para el navegador (`playable`). Sigue
|
|
375
|
+
# siendo del mensaje o del comentario, y el original se baja igual sin el parametro.
|
|
376
|
+
assert error_class_for_code(1517).__name__ == "MessagingError"
|
|
377
|
+
assert error_class_for_code(1518) is not error_class_for_code(1517)
|
|
375
378
|
assert error_class_for_code(2602).__name__ == "PublicationError"
|
|
376
379
|
# Los siete de las plantillas del planificador. No hay nada que registrar para que caigan aqui:
|
|
377
380
|
# entran por el rango 2100-2199, y eso es justo lo que hay que comprobar en vez de suponerlo.
|
|
@@ -253,6 +253,21 @@ def test_el_canal_de_un_contacto_es_una_red_o_el_correo() -> None:
|
|
|
253
253
|
assert "telegram" not in types.CONTACT_CHANNELS
|
|
254
254
|
|
|
255
255
|
|
|
256
|
+
def test_el_identificador_de_un_contacto_trae_el_bsuid_de_whatsapp_opcional() -> None:
|
|
257
|
+
"""WhatsApp sin telefono: quien usa nombre de usuario puede no darnos su numero, y entonces el
|
|
258
|
+
contacto se identifica por su BSUID (`user_id`), que es tambien su `external_identifier`.
|
|
259
|
+
Opcional, porque solo existe en WhatsApp.
|
|
260
|
+
"""
|
|
261
|
+
assert "user_id" in types.SocialIdentifier.__optional_keys__
|
|
262
|
+
sin_telefono: types.SocialIdentifier = {
|
|
263
|
+
"_id": "con1",
|
|
264
|
+
"social_network": "whatsapp",
|
|
265
|
+
"external_identifier": "ES.13491208655302741918",
|
|
266
|
+
"user_id": "ES.13491208655302741918",
|
|
267
|
+
}
|
|
268
|
+
assert sin_telefono["user_id"] == sin_telefono["external_identifier"]
|
|
269
|
+
|
|
270
|
+
|
|
256
271
|
# --------------------------------------------------------------- la superficie de `types.py`
|
|
257
272
|
|
|
258
273
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|