Releases: david-lev/pywa
1.15.0
What's Changed
Update with pip:
pip3 install -U pywa
- [client] added
register_phone_number
by @yehuda-lev in #34 - [client] mark the
body
arg in send image/video/doc as deprecated. usecaption
instead - [utils] bump
FLOW_JSON
version to 3.1 - [flows] allow
DataSource
inFlowResponse
data - [flows]
Image
.src can be dynamic - [flows] default
ActionNext
to SCREEN - [flows] adding
.success
for screen and adding in-docs examples
Full Changelog: 1.14.0...1.15.0
1.14.0
What's Changed
Update with pip:
pip3 install -U pywa
- [flows] define
Form
init_values
from childreninit_value
- [flows] adding a new
ScreenData
type to be used in screen.data
- [flows] adding
.form_ref
and.form_ref_of(form_name)
to form components - [docs] adding s real-world example for a complex flow
flow = FlowJSON(
screens=[
Screen(
id="WELCOME",
title="Welcome",
terminal=True,
data=[
welcome_header := ScreenData(key="welcome_header", example="Welcome to the demo!"),
initial_name := ScreenData(key="initial_name", example="David"),
],
layout=Layout(
children=[
TextHeading(text=welcome_header.data_key),
Form(
name="form",
children=[
name := TextInput(
name="name",
label="Name",
required=True,
init_value=initial_name.data_key,
),
email := TextInput(
name="email",
label="Email",
input_type=InputType.EMAIL,
required=True,
)
]
),
Footer(
label="Done",
on_click_action=Action(
name=FlowActionType.COMPLETE,
payload={
"name": name.form_ref,
"email": email.form_ref,
}
)
)
]
)
)
]
)
Full Changelog: 1.13.0...1.14.0
1.13.0
What's Changed
Update with pip:
pip3 install -U pywa
- [flows] Adding full support for WhatsApp Flows!
- [client] adding
request_location
method toWhatsApp
client by @yehuda-lev in #29 - [base_update] adding
.raw
attr to hold the original update - [utils] adding
Version
to provide the latest versions to the api & flows, and to perform min checks
Full Changelog: 1.12.1...1.13.0
1.13.0-rc.5
What's Changed
Update with pip:
pip3 install -U "pywa[cryptography]==1.13.0-rc.5"
- [flows] add supported types for Layout and Form
.children
and fixFlowPreview.expires_at
- [webhook] validate
cryptography
is installed when using the default flows decryptor/encryptor
READ MORE AT THE DOCS: https://pywa.readthedocs.io/en/latest/content/flows/overview.html
Full Changelog: 1.13.0-rc.4...1.13.0-rc.5
1.13.0-rc.4
What's Changed
Update with pip:
pip3 install -U "pywa[cryptography]==1.13.0-rc.4"
- [client] expose
set_business_public_key
- [flows] adding
DataKey
andFormRef
to use when building aFlowJSON
- [template] adding support to create and send template with
FlowButton
- [errors] remove
FlowInvalidError
(Too broad error code)
READ MORE AT THE DOCS: https://pywa.readthedocs.io/en/latest/content/flows/overview.html
Full Changelog: 1.13.0-rc.3...1.13.0-rc.4
1.13.0-rc.3
What's Changed
Update with pip:
pip3 install -U "pywa[cryptography]==1.13.0-rc.3"
- [errors] adding flows specific errors
- [flows] allow to
@on_flow_request
callbacks to return or raiseFlowResponseError
subclasses
READ MORE AT THE DOCS: https://pywa.readthedocs.io/en/latest/content/flows/overview.html
Full Changelog: 1.13.0-rc.2...1.13.0-rc.3
1.13.0-rc.2
What's Changed
Update with pip:
pip3 install -U "pywa[cryptography]==1.13.0rc2"
- [base_update] adding
.raw
attr to hold the original update - [requirements] set
cryptography
as extra dependency
READ MORE AT THE DOCS: https://pywa.readthedocs.io/en/latest/content/flows/overview.html
Full Changelog: 1.13.0-rc.1...1.13.0-rc.2
1.13.0-rc.1
What's Changed
Update with pip:
pip3 install -U pywa==1.13.0rc1
- [flows] Adding Beta support for WhatsApp Flows!
READ MORE AT THE DOCS: https://pywa.readthedocs.io/en/latest/content/flows/overview.html
Full Changelog: 1.12.1...1.13.0-rc.1
1.12.1
What's Changed
Update with pip:
pip3 install -U pywa
- [filters] adding new filter called
sent_to
to filter updates even ifWhatsApp(..., filter_updates=False)
- [webhook] renaming route callbacks names to allow multiple
WhatsApp
instances to use the same server - [message_type] default missing to
UNKNOWN
- [bugs] fix bug on interactive message without data
Full Changelog: 1.12.0...1.12.1
1.12.0
What's Changed
Update with pip:
pip3 install -U pywa
- [reply_to_msg] adding
ReferredProduct
to message context - [filters] adding filter for messages that has
referred_product
in their context - [types] unfrozen editable types
- [base_update] hash updates by their update ID
- [client] adding
dl_session
param of typerequests.Session
to.upload_media
when uploading locally from URL - [errors] adding more
template
andflow
exceptions; fix typo inTooManyMessages
from pywa import WhatsApp, filters
wa = WhatsApp(...)
@wa.on_message(filters.has_referred_product, filters.text)
def print_product_question(_: WhatsApp, msg: Message):
sku = msg.reply_to_message.referred_product.sku
print(f"The user {msg.from_user.name} asked about {sku}: {msg.text}")
Full Changelog: 1.11.1...1.12.0