slidge-whatsapp 0.2.6__cp313-cp313-manylinux_2_36_aarch64.whl → 0.3.0b0__cp313-cp313-manylinux_2_36_aarch64.whl

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.

Potentially problematic release.


This version of slidge-whatsapp might be problematic. Click here for more details.

Files changed (258) hide show
  1. slidge_whatsapp/contact.py +13 -3
  2. slidge_whatsapp/event.go +115 -39
  3. slidge_whatsapp/gateway.go +7 -63
  4. slidge_whatsapp/gateway.py +2 -3
  5. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +156 -139
  6. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
  7. slidge_whatsapp/generated/build.py +135 -121
  8. slidge_whatsapp/generated/whatsapp.c +1441 -1169
  9. slidge_whatsapp/generated/whatsapp.go +1090 -979
  10. slidge_whatsapp/generated/whatsapp.py +854 -729
  11. slidge_whatsapp/generated/whatsapp_go.h +156 -139
  12. slidge_whatsapp/go.mod +18 -15
  13. slidge_whatsapp/go.sum +38 -32
  14. slidge_whatsapp/group.py +34 -30
  15. slidge_whatsapp/media/media.go +6 -2
  16. slidge_whatsapp/session.go +33 -16
  17. slidge_whatsapp/session.py +46 -14
  18. slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
  19. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
  20. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
  21. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
  22. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
  23. slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
  24. slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
  25. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
  26. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
  27. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
  28. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
  29. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
  30. slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
  31. slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
  32. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
  33. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
  34. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
  35. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
  36. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
  37. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
  38. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
  39. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
  40. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
  41. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
  42. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +30 -0
  43. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
  44. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
  45. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
  46. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
  47. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
  48. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
  49. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
  50. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
  51. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
  52. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
  53. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
  54. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
  55. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
  56. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
  57. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +51 -13
  58. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
  59. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -0
  60. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +3096 -1651
  61. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +188 -128
  62. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
  63. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
  64. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +2 -2
  65. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
  66. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
  67. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
  68. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
  69. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
  70. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
  71. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
  72. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
  73. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
  74. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
  75. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
  76. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
  77. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
  78. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
  79. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
  80. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
  81. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
  82. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +60 -26
  83. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +1 -6
  84. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +2 -1
  85. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +104 -0
  86. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +19 -3
  87. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
  88. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -1
  89. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
  90. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +5 -1
  91. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
  92. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
  93. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
  94. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +40 -7
  95. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
  96. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +2 -1
  97. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +79 -45
  98. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +13 -6
  99. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +19 -12
  100. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +26 -6
  101. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +3 -0
  102. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +99 -27
  103. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +54 -26
  104. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +1 -0
  105. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +208 -57
  106. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +2 -14
  107. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
  108. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +17 -8
  109. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +2 -2
  110. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +15 -6
  111. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
  112. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
  113. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
  114. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
  115. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
  116. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
  117. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
  118. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
  119. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
  120. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
  121. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
  122. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
  123. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
  124. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
  125. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
  126. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
  127. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
  128. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
  129. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
  130. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
  131. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
  132. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
  133. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
  134. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
  135. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
  136. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
  137. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +16 -4
  138. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +3 -0
  139. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
  140. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
  141. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +46 -10
  142. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +4 -0
  143. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +8975 -11209
  144. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +193 -421
  145. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +52 -23
  146. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +3 -0
  147. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
  148. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
  149. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
  150. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +952 -0
  151. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +88 -0
  152. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1143 -463
  153. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +60 -0
  154. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +60 -38
  155. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +3 -0
  156. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +11 -3
  157. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +2 -0
  158. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +20 -7
  159. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
  160. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
  161. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +10 -2
  162. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +38 -21
  163. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +1 -0
  164. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
  165. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +3 -2
  166. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +9 -6
  167. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +25 -5
  168. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +4 -2
  169. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
  170. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +5 -1
  171. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
  172. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +13 -2
  173. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +2 -1
  174. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +1 -0
  175. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
  176. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +14 -8
  177. slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
  178. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +44 -2
  179. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +8 -8
  180. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +14 -3
  181. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +7 -29
  182. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +53 -71
  183. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +20 -74
  184. slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
  185. slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
  186. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +1 -55
  187. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
  188. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
  189. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
  190. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
  191. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
  192. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
  193. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
  194. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
  195. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
  196. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
  197. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
  198. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
  199. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
  200. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
  201. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
  202. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
  203. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
  204. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
  205. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
  206. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
  207. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
  208. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
  209. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
  210. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
  211. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
  212. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
  213. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
  214. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
  215. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
  216. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
  217. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
  218. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
  219. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
  220. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
  221. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
  222. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
  223. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
  224. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
  225. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
  226. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
  227. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
  228. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
  229. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
  230. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
  231. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
  232. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
  233. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
  234. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
  235. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
  236. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +6 -0
  237. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +483 -483
  238. slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
  239. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  240. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +10 -5
  241. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
  242. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
  243. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +68 -22
  244. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
  245. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
  246. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
  247. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  248. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +8 -0
  249. slidge_whatsapp/vendor/modules.txt +57 -23
  250. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/METADATA +2 -2
  251. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/RECORD +254 -174
  252. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
  253. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +0 -61
  254. slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +0 -16
  255. slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +0 -20
  256. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/LICENSE +0 -0
  257. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/WHEEL +0 -0
  258. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/entry_points.txt +0 -0
@@ -1013,9 +1013,9 @@ DefaultUserServer = "s.whatsapp.net"
1013
1013
 
1014
1014
  # ---- Structs ---
1015
1015
 
1016
- # Python type for struct whatsapp.Presence
1017
- class Presence(go.GoClass):
1018
- """Precence represents a contact's general state of activity, and is periodically updated as\ncontacts start or stop paying attention to their client of choice.\n"""
1016
+ # Python type for struct whatsapp.Gateway
1017
+ class Gateway(go.GoClass):
1018
+ """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
1019
1019
  def __init__(self, *args, **kwargs):
1020
1020
  """
1021
1021
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1029,25 +1029,29 @@ class Presence(go.GoClass):
1029
1029
  self.handle = args[0].handle
1030
1030
  _whatsapp.IncRef(self.handle)
1031
1031
  else:
1032
- self.handle = _whatsapp.whatsapp_Presence_CTor()
1032
+ self.handle = _whatsapp.whatsapp_Gateway_CTor()
1033
1033
  _whatsapp.IncRef(self.handle)
1034
1034
  if 0 < len(args):
1035
- self.JID = args[0]
1036
- if "JID" in kwargs:
1037
- self.JID = kwargs["JID"]
1035
+ self.DBPath = args[0]
1036
+ if "DBPath" in kwargs:
1037
+ self.DBPath = kwargs["DBPath"]
1038
1038
  if 1 < len(args):
1039
- self.Kind = args[1]
1040
- if "Kind" in kwargs:
1041
- self.Kind = kwargs["Kind"]
1039
+ self.Name = args[1]
1040
+ if "Name" in kwargs:
1041
+ self.Name = kwargs["Name"]
1042
1042
  if 2 < len(args):
1043
- self.LastSeen = args[2]
1044
- if "LastSeen" in kwargs:
1045
- self.LastSeen = kwargs["LastSeen"]
1043
+ self.LogLevel = args[2]
1044
+ if "LogLevel" in kwargs:
1045
+ self.LogLevel = kwargs["LogLevel"]
1046
+ if 3 < len(args):
1047
+ self.TempDir = args[3]
1048
+ if "TempDir" in kwargs:
1049
+ self.TempDir = kwargs["TempDir"]
1046
1050
  def __del__(self):
1047
1051
  _whatsapp.DecRef(self.handle)
1048
1052
  def __str__(self):
1049
1053
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1050
- sv = 'whatsapp.Presence{'
1054
+ sv = 'whatsapp.Gateway{'
1051
1055
  first = True
1052
1056
  for v in pr:
1053
1057
  if callable(v[1]):
@@ -1060,42 +1064,72 @@ class Presence(go.GoClass):
1060
1064
  return sv + '}'
1061
1065
  def __repr__(self):
1062
1066
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1063
- sv = 'whatsapp.Presence ( '
1067
+ sv = 'whatsapp.Gateway ( '
1064
1068
  for v in pr:
1065
1069
  if not callable(v[1]):
1066
1070
  sv += v[0] + '=' + str(v[1]) + ', '
1067
1071
  return sv + ')'
1068
1072
  @property
1069
- def JID(self):
1070
- return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
1071
- @JID.setter
1072
- def JID(self, value):
1073
+ def DBPath(self):
1074
+ return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
1075
+ @DBPath.setter
1076
+ def DBPath(self, value):
1073
1077
  if isinstance(value, go.GoClass):
1074
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
1078
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
1075
1079
  else:
1076
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
1080
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
1077
1081
  @property
1078
- def Kind(self):
1079
- return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
1080
- @Kind.setter
1081
- def Kind(self, value):
1082
+ def Name(self):
1083
+ return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
1084
+ @Name.setter
1085
+ def Name(self, value):
1082
1086
  if isinstance(value, go.GoClass):
1083
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
1087
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
1084
1088
  else:
1085
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
1089
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
1086
1090
  @property
1087
- def LastSeen(self):
1088
- return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
1089
- @LastSeen.setter
1090
- def LastSeen(self, value):
1091
+ def LogLevel(self):
1092
+ return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
1093
+ @LogLevel.setter
1094
+ def LogLevel(self, value):
1091
1095
  if isinstance(value, go.GoClass):
1092
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
1096
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
1093
1097
  else:
1094
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
1098
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
1099
+ @property
1100
+ def TempDir(self):
1101
+ return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
1102
+ @TempDir.setter
1103
+ def TempDir(self, value):
1104
+ if isinstance(value, go.GoClass):
1105
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
1106
+ else:
1107
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
1108
+ def Init(self):
1109
+ """Init() str
1110
+
1111
+ Init performs initialization procedures for the Gateway, and is expected to be run before any
1112
+ calls to [Gateway.Session].
1113
+ """
1114
+ return _whatsapp.whatsapp_Gateway_Init(self.handle)
1115
+ def NewSession(self, device):
1116
+ """NewSession(object device) object
1117
+
1118
+ NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
1119
+ a valid ID, a pair operation will be required, as described in [Session.Login].
1120
+ """
1121
+ return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
1122
+ def CleanupSession(self, device):
1123
+ """CleanupSession(object device) str
1124
+
1125
+ CleanupSession will remove all invalid and obsolete references to the given device, and should be
1126
+ used when pairing a new device or unregistering from the Gateway.
1127
+ """
1128
+ return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
1095
1129
 
1096
- # Python type for struct whatsapp.Receipt
1097
- class Receipt(go.GoClass):
1098
- """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
1130
+ # Python type for struct whatsapp.GroupParticipant
1131
+ class GroupParticipant(go.GoClass):
1132
+ """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can generally be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
1099
1133
  def __init__(self, *args, **kwargs):
1100
1134
  """
1101
1135
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1109,37 +1143,29 @@ class Receipt(go.GoClass):
1109
1143
  self.handle = args[0].handle
1110
1144
  _whatsapp.IncRef(self.handle)
1111
1145
  else:
1112
- self.handle = _whatsapp.whatsapp_Receipt_CTor()
1146
+ self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1113
1147
  _whatsapp.IncRef(self.handle)
1114
1148
  if 0 < len(args):
1115
- self.Kind = args[0]
1116
- if "Kind" in kwargs:
1117
- self.Kind = kwargs["Kind"]
1118
- if 1 < len(args):
1119
- self.MessageIDs = args[1]
1120
- if "MessageIDs" in kwargs:
1121
- self.MessageIDs = kwargs["MessageIDs"]
1122
- if 2 < len(args):
1123
- self.JID = args[2]
1149
+ self.JID = args[0]
1124
1150
  if "JID" in kwargs:
1125
1151
  self.JID = kwargs["JID"]
1152
+ if 1 < len(args):
1153
+ self.Nickname = args[1]
1154
+ if "Nickname" in kwargs:
1155
+ self.Nickname = kwargs["Nickname"]
1156
+ if 2 < len(args):
1157
+ self.Affiliation = args[2]
1158
+ if "Affiliation" in kwargs:
1159
+ self.Affiliation = kwargs["Affiliation"]
1126
1160
  if 3 < len(args):
1127
- self.GroupJID = args[3]
1128
- if "GroupJID" in kwargs:
1129
- self.GroupJID = kwargs["GroupJID"]
1130
- if 4 < len(args):
1131
- self.Timestamp = args[4]
1132
- if "Timestamp" in kwargs:
1133
- self.Timestamp = kwargs["Timestamp"]
1134
- if 5 < len(args):
1135
- self.IsCarbon = args[5]
1136
- if "IsCarbon" in kwargs:
1137
- self.IsCarbon = kwargs["IsCarbon"]
1161
+ self.Action = args[3]
1162
+ if "Action" in kwargs:
1163
+ self.Action = kwargs["Action"]
1138
1164
  def __del__(self):
1139
1165
  _whatsapp.DecRef(self.handle)
1140
1166
  def __str__(self):
1141
1167
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1142
- sv = 'whatsapp.Receipt{'
1168
+ sv = 'whatsapp.GroupParticipant{'
1143
1169
  first = True
1144
1170
  for v in pr:
1145
1171
  if callable(v[1]):
@@ -1152,69 +1178,51 @@ class Receipt(go.GoClass):
1152
1178
  return sv + '}'
1153
1179
  def __repr__(self):
1154
1180
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1155
- sv = 'whatsapp.Receipt ( '
1181
+ sv = 'whatsapp.GroupParticipant ( '
1156
1182
  for v in pr:
1157
1183
  if not callable(v[1]):
1158
1184
  sv += v[0] + '=' + str(v[1]) + ', '
1159
1185
  return sv + ')'
1160
1186
  @property
1161
- def Kind(self):
1162
- return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
1163
- @Kind.setter
1164
- def Kind(self, value):
1165
- if isinstance(value, go.GoClass):
1166
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
1167
- else:
1168
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
1169
- @property
1170
- def MessageIDs(self):
1171
- return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
1172
- @MessageIDs.setter
1173
- def MessageIDs(self, value):
1174
- if isinstance(value, go.GoClass):
1175
- _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
1176
- else:
1177
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1178
- @property
1179
1187
  def JID(self):
1180
- return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
1188
+ return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1181
1189
  @JID.setter
1182
1190
  def JID(self, value):
1183
1191
  if isinstance(value, go.GoClass):
1184
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
1192
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1185
1193
  else:
1186
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
1194
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1187
1195
  @property
1188
- def GroupJID(self):
1189
- return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
1190
- @GroupJID.setter
1191
- def GroupJID(self, value):
1196
+ def Nickname(self):
1197
+ return _whatsapp.whatsapp_GroupParticipant_Nickname_Get(self.handle)
1198
+ @Nickname.setter
1199
+ def Nickname(self, value):
1192
1200
  if isinstance(value, go.GoClass):
1193
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
1201
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value.handle)
1194
1202
  else:
1195
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
1203
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value)
1196
1204
  @property
1197
- def Timestamp(self):
1198
- return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
1199
- @Timestamp.setter
1200
- def Timestamp(self, value):
1205
+ def Affiliation(self):
1206
+ return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1207
+ @Affiliation.setter
1208
+ def Affiliation(self, value):
1201
1209
  if isinstance(value, go.GoClass):
1202
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
1210
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1203
1211
  else:
1204
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
1212
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1205
1213
  @property
1206
- def IsCarbon(self):
1207
- return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
1208
- @IsCarbon.setter
1209
- def IsCarbon(self, value):
1214
+ def Action(self):
1215
+ return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1216
+ @Action.setter
1217
+ def Action(self, value):
1210
1218
  if isinstance(value, go.GoClass):
1211
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
1219
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1212
1220
  else:
1213
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
1221
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1214
1222
 
1215
- # Python type for struct whatsapp.Session
1216
- class Session(go.GoClass):
1217
- """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
1223
+ # Python type for struct whatsapp.Preview
1224
+ class Preview(go.GoClass):
1225
+ """A Preview represents a short description for a URL provided in a message body, as usually derived\nfrom the content of the page pointed at.\n"""
1218
1226
  def __init__(self, *args, **kwargs):
1219
1227
  """
1220
1228
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1228,13 +1236,33 @@ class Session(go.GoClass):
1228
1236
  self.handle = args[0].handle
1229
1237
  _whatsapp.IncRef(self.handle)
1230
1238
  else:
1231
- self.handle = _whatsapp.whatsapp_Session_CTor()
1239
+ self.handle = _whatsapp.whatsapp_Preview_CTor()
1232
1240
  _whatsapp.IncRef(self.handle)
1241
+ if 0 < len(args):
1242
+ self.Kind = args[0]
1243
+ if "Kind" in kwargs:
1244
+ self.Kind = kwargs["Kind"]
1245
+ if 1 < len(args):
1246
+ self.URL = args[1]
1247
+ if "URL" in kwargs:
1248
+ self.URL = kwargs["URL"]
1249
+ if 2 < len(args):
1250
+ self.Title = args[2]
1251
+ if "Title" in kwargs:
1252
+ self.Title = kwargs["Title"]
1253
+ if 3 < len(args):
1254
+ self.Description = args[3]
1255
+ if "Description" in kwargs:
1256
+ self.Description = kwargs["Description"]
1257
+ if 4 < len(args):
1258
+ self.Thumbnail = args[4]
1259
+ if "Thumbnail" in kwargs:
1260
+ self.Thumbnail = kwargs["Thumbnail"]
1233
1261
  def __del__(self):
1234
1262
  _whatsapp.DecRef(self.handle)
1235
1263
  def __str__(self):
1236
1264
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1237
- sv = 'whatsapp.Session{'
1265
+ sv = 'whatsapp.Preview{'
1238
1266
  first = True
1239
1267
  for v in pr:
1240
1268
  if callable(v[1]):
@@ -1247,167 +1275,60 @@ class Session(go.GoClass):
1247
1275
  return sv + '}'
1248
1276
  def __repr__(self):
1249
1277
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1250
- sv = 'whatsapp.Session ( '
1278
+ sv = 'whatsapp.Preview ( '
1251
1279
  for v in pr:
1252
1280
  if not callable(v[1]):
1253
1281
  sv += v[0] + '=' + str(v[1]) + ', '
1254
1282
  return sv + ')'
1255
- def Login(self):
1256
- """Login() str
1257
-
1258
- Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
1259
- or by initiating a pairing session for a new linked device. Callers are expected to have set an
1260
- event handler in order to receive any incoming events from the underlying WhatsApp session.
1261
- """
1262
- return _whatsapp.whatsapp_Session_Login(self.handle)
1263
- def Logout(self):
1264
- """Logout() str
1265
-
1266
- Logout disconnects and removes the current linked device locally and initiates a logout remotely.
1267
- """
1268
- return _whatsapp.whatsapp_Session_Logout(self.handle)
1269
- def Disconnect(self):
1270
- """Disconnect() str
1271
-
1272
- Disconnects detaches the current connection to WhatsApp without removing any linked device state.
1273
- """
1274
- return _whatsapp.whatsapp_Session_Disconnect(self.handle)
1275
- def PairPhone(self, phone):
1276
- """PairPhone(str phone) str, str
1277
-
1278
- PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
1279
- user's primary device, as identified by the given phone number. This will return an error if the
1280
- [Session] is already paired, or if the phone number given is empty or invalid.
1281
- """
1282
- return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
1283
- def SendMessage(self, message):
1284
- """SendMessage(object message) str
1285
-
1286
- SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
1287
- specified within. In general, different message kinds require different fields to be set; see the
1288
- documentation for the [Message] type for more information.
1289
- """
1290
- return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
1291
- def GenerateMessageID(self):
1292
- """GenerateMessageID() str
1293
-
1294
- GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
1295
- """
1296
- return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
1297
- def SendChatState(self, state):
1298
- """SendChatState(object state) str
1299
-
1300
- SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
1301
- contact specified within.
1302
- """
1303
- return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
1304
- def SendReceipt(self, receipt):
1305
- """SendReceipt(object receipt) str
1306
-
1307
- SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
1308
- """
1309
- return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
1310
- def SendPresence(self, presence, statusMessage):
1311
- """SendPresence(int presence, str statusMessage) str
1312
-
1313
- SendPresence sets the activity state and (optional) status message for the current session and
1314
- user. An error is returned if setting availability fails for any reason.
1315
- """
1316
- return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
1317
- def GetContacts(self, refresh):
1318
- """GetContacts(bool refresh) []object, str
1319
-
1320
- GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
1321
- If `refresh` is `true`, FetchRoster will pull application state from the remote service and
1322
- synchronize any contacts found with the adapter.
1323
- """
1324
- return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
1325
- def GetGroups(self):
1326
- """GetGroups() []object, str
1327
-
1328
- GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
1329
- information on present participants.
1330
- """
1331
- return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
1332
- def CreateGroup(self, name, participants):
1333
- """CreateGroup(str name, []str participants) object, str
1334
-
1335
- CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
1336
- participant JIDs given.
1337
- """
1338
- return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
1339
- def LeaveGroup(self, resourceID):
1340
- """LeaveGroup(str resourceID) str
1341
-
1342
- LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
1343
- """
1344
- return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
1345
- def GetAvatar(self, resourceID, avatarID):
1346
- """GetAvatar(str resourceID, str avatarID) object, str
1347
-
1348
- GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
1349
- is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
1350
- for the given ID has not changed.
1351
- """
1352
- return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
1353
- def SetAvatar(self, resourceID, avatar):
1354
- """SetAvatar(str resourceID, []int avatar) str, str
1355
-
1356
- SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
1357
- profile picture for our own user by providing an empty JID. The unique picture ID is returned,
1358
- typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
1359
- """
1360
- return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
1361
- def SetGroupName(self, resourceID, name):
1362
- """SetGroupName(str resourceID, str name) str
1363
-
1364
- SetGroupName updates the name of a WhatsApp group for the Group JID given.
1365
- """
1366
- return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
1367
- def SetGroupTopic(self, resourceID, topic):
1368
- """SetGroupTopic(str resourceID, str topic) str
1369
-
1370
- SetGroupName updates the topic of a WhatsApp group for the Group JID given.
1371
- """
1372
- return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
1373
- def UpdateGroupParticipants(self, resourceID, participants):
1374
- """UpdateGroupParticipants(str resourceID, []object participants) []object, str
1375
-
1376
- UpdateGroupParticipants processes changes to the given group's participants, including additions,
1377
- removals, and changes to privileges. Participant JIDs given must be part of the authenticated
1378
- session's roster at least, and must also be active group participants for other types of changes.
1379
- """
1380
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
1381
- def FindContact(self, phone):
1382
- """FindContact(str phone) object, str
1383
-
1384
- FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
1385
- phone number, returning a concrete instance if found; typically, only the contact JID is set. No
1386
- error is returned if no contact was found, but any unexpected errors will otherwise be returned
1387
- directly.
1388
- """
1389
- return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
1390
- def RequestMessageHistory(self, resourceID, oldestMessage):
1391
- """RequestMessageHistory(str resourceID, object oldestMessage) str
1392
-
1393
- RequestMessageHistory sends and asynchronous request for message history related to the given
1394
- resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
1395
- history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
1396
- event handler. An error will be returned if requesting history fails for any reason.
1397
- """
1398
- return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
1399
- def SetEventHandler(self, h, goRun=False):
1400
- """SetEventHandler(callable h)
1401
-
1402
- SetEventHandler assigns the given handler function for propagating internal events into the Python
1403
- gateway. Note that the event handler function is not entirely safe to use directly, and all calls
1404
- should instead be sent to the [Gateway] via its internal call channel.
1405
- """
1406
- _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
1283
+ @property
1284
+ def Kind(self):
1285
+ return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
1286
+ @Kind.setter
1287
+ def Kind(self, value):
1288
+ if isinstance(value, go.GoClass):
1289
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
1290
+ else:
1291
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
1292
+ @property
1293
+ def URL(self):
1294
+ return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
1295
+ @URL.setter
1296
+ def URL(self, value):
1297
+ if isinstance(value, go.GoClass):
1298
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
1299
+ else:
1300
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
1301
+ @property
1302
+ def Title(self):
1303
+ return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
1304
+ @Title.setter
1305
+ def Title(self, value):
1306
+ if isinstance(value, go.GoClass):
1307
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
1308
+ else:
1309
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
1310
+ @property
1311
+ def Description(self):
1312
+ return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
1313
+ @Description.setter
1314
+ def Description(self, value):
1315
+ if isinstance(value, go.GoClass):
1316
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
1317
+ else:
1318
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
1319
+ @property
1320
+ def Thumbnail(self):
1321
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
1322
+ @Thumbnail.setter
1323
+ def Thumbnail(self, value):
1324
+ if isinstance(value, go.GoClass):
1325
+ _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
1326
+ else:
1327
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1407
1328
 
1408
- # Python type for struct whatsapp.Call
1409
- class Call(go.GoClass):
1410
- """A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for\ncalls is currently not implemented, and this structure contains the bare minimum data required\nfor notifying on missed calls.\n"""
1329
+ # Python type for struct whatsapp.ChatState
1330
+ class ChatState(go.GoClass):
1331
+ """A ChatState represents the activity of a contact within a certain discussion, for instance,\nwhether the contact is currently composing a message. This is separate to the concept of a\nPresence, which is the contact's general state across all discussions.\n"""
1411
1332
  def __init__(self, *args, **kwargs):
1412
1333
  """
1413
1334
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1421,25 +1342,25 @@ class Call(go.GoClass):
1421
1342
  self.handle = args[0].handle
1422
1343
  _whatsapp.IncRef(self.handle)
1423
1344
  else:
1424
- self.handle = _whatsapp.whatsapp_Call_CTor()
1345
+ self.handle = _whatsapp.whatsapp_ChatState_CTor()
1425
1346
  _whatsapp.IncRef(self.handle)
1426
1347
  if 0 < len(args):
1427
- self.State = args[0]
1428
- if "State" in kwargs:
1429
- self.State = kwargs["State"]
1348
+ self.Kind = args[0]
1349
+ if "Kind" in kwargs:
1350
+ self.Kind = kwargs["Kind"]
1430
1351
  if 1 < len(args):
1431
1352
  self.JID = args[1]
1432
1353
  if "JID" in kwargs:
1433
1354
  self.JID = kwargs["JID"]
1434
1355
  if 2 < len(args):
1435
- self.Timestamp = args[2]
1436
- if "Timestamp" in kwargs:
1437
- self.Timestamp = kwargs["Timestamp"]
1356
+ self.GroupJID = args[2]
1357
+ if "GroupJID" in kwargs:
1358
+ self.GroupJID = kwargs["GroupJID"]
1438
1359
  def __del__(self):
1439
1360
  _whatsapp.DecRef(self.handle)
1440
1361
  def __str__(self):
1441
1362
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1442
- sv = 'whatsapp.Call{'
1363
+ sv = 'whatsapp.ChatState{'
1443
1364
  first = True
1444
1365
  for v in pr:
1445
1366
  if callable(v[1]):
@@ -1452,38 +1373,38 @@ class Call(go.GoClass):
1452
1373
  return sv + '}'
1453
1374
  def __repr__(self):
1454
1375
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1455
- sv = 'whatsapp.Call ( '
1376
+ sv = 'whatsapp.ChatState ( '
1456
1377
  for v in pr:
1457
1378
  if not callable(v[1]):
1458
1379
  sv += v[0] + '=' + str(v[1]) + ', '
1459
1380
  return sv + ')'
1460
1381
  @property
1461
- def State(self):
1462
- return _whatsapp.whatsapp_Call_State_Get(self.handle)
1463
- @State.setter
1464
- def State(self, value):
1382
+ def Kind(self):
1383
+ return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
1384
+ @Kind.setter
1385
+ def Kind(self, value):
1465
1386
  if isinstance(value, go.GoClass):
1466
- _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
1387
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
1467
1388
  else:
1468
- _whatsapp.whatsapp_Call_State_Set(self.handle, value)
1389
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
1469
1390
  @property
1470
1391
  def JID(self):
1471
- return _whatsapp.whatsapp_Call_JID_Get(self.handle)
1392
+ return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
1472
1393
  @JID.setter
1473
1394
  def JID(self, value):
1474
1395
  if isinstance(value, go.GoClass):
1475
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
1396
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
1476
1397
  else:
1477
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
1398
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
1478
1399
  @property
1479
- def Timestamp(self):
1480
- return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
1481
- @Timestamp.setter
1482
- def Timestamp(self, value):
1400
+ def GroupJID(self):
1401
+ return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
1402
+ @GroupJID.setter
1403
+ def GroupJID(self, value):
1483
1404
  if isinstance(value, go.GoClass):
1484
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
1405
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
1485
1406
  else:
1486
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1407
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
1487
1408
 
1488
1409
  # Python type for struct whatsapp.EventPayload
1489
1410
  class EventPayload(go.GoClass):
@@ -1516,31 +1437,35 @@ class EventPayload(go.GoClass):
1516
1437
  if "Connect" in kwargs:
1517
1438
  self.Connect = kwargs["Connect"]
1518
1439
  if 3 < len(args):
1519
- self.Contact = args[3]
1440
+ self.LoggedOut = args[3]
1441
+ if "LoggedOut" in kwargs:
1442
+ self.LoggedOut = kwargs["LoggedOut"]
1443
+ if 4 < len(args):
1444
+ self.Contact = args[4]
1520
1445
  if "Contact" in kwargs:
1521
1446
  self.Contact = kwargs["Contact"]
1522
- if 4 < len(args):
1523
- self.Presence = args[4]
1447
+ if 5 < len(args):
1448
+ self.Presence = args[5]
1524
1449
  if "Presence" in kwargs:
1525
1450
  self.Presence = kwargs["Presence"]
1526
- if 5 < len(args):
1527
- self.Message = args[5]
1451
+ if 6 < len(args):
1452
+ self.Message = args[6]
1528
1453
  if "Message" in kwargs:
1529
1454
  self.Message = kwargs["Message"]
1530
- if 6 < len(args):
1531
- self.ChatState = args[6]
1455
+ if 7 < len(args):
1456
+ self.ChatState = args[7]
1532
1457
  if "ChatState" in kwargs:
1533
1458
  self.ChatState = kwargs["ChatState"]
1534
- if 7 < len(args):
1535
- self.Receipt = args[7]
1459
+ if 8 < len(args):
1460
+ self.Receipt = args[8]
1536
1461
  if "Receipt" in kwargs:
1537
1462
  self.Receipt = kwargs["Receipt"]
1538
- if 8 < len(args):
1539
- self.Group = args[8]
1463
+ if 9 < len(args):
1464
+ self.Group = args[9]
1540
1465
  if "Group" in kwargs:
1541
1466
  self.Group = kwargs["Group"]
1542
- if 9 < len(args):
1543
- self.Call = args[9]
1467
+ if 10 < len(args):
1468
+ self.Call = args[10]
1544
1469
  if "Call" in kwargs:
1545
1470
  self.Call = kwargs["Call"]
1546
1471
  def __del__(self):
@@ -1593,6 +1518,15 @@ class EventPayload(go.GoClass):
1593
1518
  else:
1594
1519
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1595
1520
  @property
1521
+ def LoggedOut(self):
1522
+ return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
1523
+ @LoggedOut.setter
1524
+ def LoggedOut(self, value):
1525
+ if isinstance(value, go.GoClass):
1526
+ _whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
1527
+ else:
1528
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1529
+ @property
1596
1530
  def Contact(self):
1597
1531
  return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
1598
1532
  @Contact.setter
@@ -1656,9 +1590,9 @@ class EventPayload(go.GoClass):
1656
1590
  else:
1657
1591
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1658
1592
 
1659
- # Python type for struct whatsapp.GroupSubject
1660
- class GroupSubject(go.GoClass):
1661
- """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
1593
+ # Python type for struct whatsapp.Group
1594
+ class Group(go.GoClass):
1595
+ """A Group represents a named, many-to-many chat space which may be joined or left at will. All\nfields apart from the group JID are considered to be optional, and may not be set in cases where\ngroup information is being updated against previous assumed state. Groups in WhatsApp are\ngenerally invited to out-of-band with respect to overarching adaptor; see the documentation for\n[Session.GetGroups] for more information.\n"""
1662
1596
  def __init__(self, *args, **kwargs):
1663
1597
  """
1664
1598
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1672,25 +1606,37 @@ class GroupSubject(go.GoClass):
1672
1606
  self.handle = args[0].handle
1673
1607
  _whatsapp.IncRef(self.handle)
1674
1608
  else:
1675
- self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
1609
+ self.handle = _whatsapp.whatsapp_Group_CTor()
1676
1610
  _whatsapp.IncRef(self.handle)
1677
1611
  if 0 < len(args):
1678
- self.Subject = args[0]
1679
- if "Subject" in kwargs:
1680
- self.Subject = kwargs["Subject"]
1612
+ self.JID = args[0]
1613
+ if "JID" in kwargs:
1614
+ self.JID = kwargs["JID"]
1681
1615
  if 1 < len(args):
1682
- self.SetAt = args[1]
1683
- if "SetAt" in kwargs:
1684
- self.SetAt = kwargs["SetAt"]
1616
+ self.Name = args[1]
1617
+ if "Name" in kwargs:
1618
+ self.Name = kwargs["Name"]
1685
1619
  if 2 < len(args):
1686
- self.SetByJID = args[2]
1687
- if "SetByJID" in kwargs:
1688
- self.SetByJID = kwargs["SetByJID"]
1620
+ self.Subject = args[2]
1621
+ if "Subject" in kwargs:
1622
+ self.Subject = kwargs["Subject"]
1623
+ if 3 < len(args):
1624
+ self.Nickname = args[3]
1625
+ if "Nickname" in kwargs:
1626
+ self.Nickname = kwargs["Nickname"]
1627
+ if 4 < len(args):
1628
+ self.Participants = args[4]
1629
+ if "Participants" in kwargs:
1630
+ self.Participants = kwargs["Participants"]
1631
+ if 5 < len(args):
1632
+ self.InviteCode = args[5]
1633
+ if "InviteCode" in kwargs:
1634
+ self.InviteCode = kwargs["InviteCode"]
1689
1635
  def __del__(self):
1690
1636
  _whatsapp.DecRef(self.handle)
1691
1637
  def __str__(self):
1692
1638
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1693
- sv = 'whatsapp.GroupSubject{'
1639
+ sv = 'whatsapp.Group{'
1694
1640
  first = True
1695
1641
  for v in pr:
1696
1642
  if callable(v[1]):
@@ -1703,42 +1649,69 @@ class GroupSubject(go.GoClass):
1703
1649
  return sv + '}'
1704
1650
  def __repr__(self):
1705
1651
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1706
- sv = 'whatsapp.GroupSubject ( '
1652
+ sv = 'whatsapp.Group ( '
1707
1653
  for v in pr:
1708
1654
  if not callable(v[1]):
1709
1655
  sv += v[0] + '=' + str(v[1]) + ', '
1710
1656
  return sv + ')'
1711
1657
  @property
1658
+ def JID(self):
1659
+ return _whatsapp.whatsapp_Group_JID_Get(self.handle)
1660
+ @JID.setter
1661
+ def JID(self, value):
1662
+ if isinstance(value, go.GoClass):
1663
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
1664
+ else:
1665
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
1666
+ @property
1667
+ def Name(self):
1668
+ return _whatsapp.whatsapp_Group_Name_Get(self.handle)
1669
+ @Name.setter
1670
+ def Name(self, value):
1671
+ if isinstance(value, go.GoClass):
1672
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
1673
+ else:
1674
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
1675
+ @property
1712
1676
  def Subject(self):
1713
- return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
1677
+ return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
1714
1678
  @Subject.setter
1715
1679
  def Subject(self, value):
1716
1680
  if isinstance(value, go.GoClass):
1717
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
1681
+ _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
1718
1682
  else:
1719
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
1683
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1720
1684
  @property
1721
- def SetAt(self):
1722
- return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
1723
- @SetAt.setter
1724
- def SetAt(self, value):
1685
+ def Nickname(self):
1686
+ return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
1687
+ @Nickname.setter
1688
+ def Nickname(self, value):
1725
1689
  if isinstance(value, go.GoClass):
1726
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
1690
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
1727
1691
  else:
1728
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
1692
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
1693
+ @property
1694
+ def Participants(self):
1695
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
1696
+ @Participants.setter
1697
+ def Participants(self, value):
1698
+ if isinstance(value, go.GoClass):
1699
+ _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
1700
+ else:
1701
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1729
1702
  @property
1730
- def SetByJID(self):
1731
- return _whatsapp.whatsapp_GroupSubject_SetByJID_Get(self.handle)
1732
- @SetByJID.setter
1733
- def SetByJID(self, value):
1703
+ def InviteCode(self):
1704
+ return _whatsapp.whatsapp_Group_InviteCode_Get(self.handle)
1705
+ @InviteCode.setter
1706
+ def InviteCode(self, value):
1734
1707
  if isinstance(value, go.GoClass):
1735
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value.handle)
1708
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value.handle)
1736
1709
  else:
1737
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value)
1710
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value)
1738
1711
 
1739
- # Python type for struct whatsapp.GroupParticipant
1740
- class GroupParticipant(go.GoClass):
1741
- """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can always be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
1712
+ # Python type for struct whatsapp.GroupSubject
1713
+ class GroupSubject(go.GoClass):
1714
+ """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
1742
1715
  def __init__(self, *args, **kwargs):
1743
1716
  """
1744
1717
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1752,25 +1725,25 @@ class GroupParticipant(go.GoClass):
1752
1725
  self.handle = args[0].handle
1753
1726
  _whatsapp.IncRef(self.handle)
1754
1727
  else:
1755
- self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1728
+ self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
1756
1729
  _whatsapp.IncRef(self.handle)
1757
1730
  if 0 < len(args):
1758
- self.JID = args[0]
1759
- if "JID" in kwargs:
1760
- self.JID = kwargs["JID"]
1731
+ self.Subject = args[0]
1732
+ if "Subject" in kwargs:
1733
+ self.Subject = kwargs["Subject"]
1761
1734
  if 1 < len(args):
1762
- self.Affiliation = args[1]
1763
- if "Affiliation" in kwargs:
1764
- self.Affiliation = kwargs["Affiliation"]
1735
+ self.SetAt = args[1]
1736
+ if "SetAt" in kwargs:
1737
+ self.SetAt = kwargs["SetAt"]
1765
1738
  if 2 < len(args):
1766
- self.Action = args[2]
1767
- if "Action" in kwargs:
1768
- self.Action = kwargs["Action"]
1739
+ self.SetBy = args[2]
1740
+ if "SetBy" in kwargs:
1741
+ self.SetBy = kwargs["SetBy"]
1769
1742
  def __del__(self):
1770
1743
  _whatsapp.DecRef(self.handle)
1771
1744
  def __str__(self):
1772
1745
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1773
- sv = 'whatsapp.GroupParticipant{'
1746
+ sv = 'whatsapp.GroupSubject{'
1774
1747
  first = True
1775
1748
  for v in pr:
1776
1749
  if callable(v[1]):
@@ -1783,42 +1756,42 @@ class GroupParticipant(go.GoClass):
1783
1756
  return sv + '}'
1784
1757
  def __repr__(self):
1785
1758
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1786
- sv = 'whatsapp.GroupParticipant ( '
1759
+ sv = 'whatsapp.GroupSubject ( '
1787
1760
  for v in pr:
1788
1761
  if not callable(v[1]):
1789
1762
  sv += v[0] + '=' + str(v[1]) + ', '
1790
1763
  return sv + ')'
1791
1764
  @property
1792
- def JID(self):
1793
- return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1794
- @JID.setter
1795
- def JID(self, value):
1765
+ def Subject(self):
1766
+ return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
1767
+ @Subject.setter
1768
+ def Subject(self, value):
1796
1769
  if isinstance(value, go.GoClass):
1797
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1770
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
1798
1771
  else:
1799
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1772
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
1800
1773
  @property
1801
- def Affiliation(self):
1802
- return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1803
- @Affiliation.setter
1804
- def Affiliation(self, value):
1774
+ def SetAt(self):
1775
+ return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
1776
+ @SetAt.setter
1777
+ def SetAt(self, value):
1805
1778
  if isinstance(value, go.GoClass):
1806
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1779
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
1807
1780
  else:
1808
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1781
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
1809
1782
  @property
1810
- def Action(self):
1811
- return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1812
- @Action.setter
1813
- def Action(self, value):
1783
+ def SetBy(self):
1784
+ return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
1785
+ @SetBy.setter
1786
+ def SetBy(self, value):
1814
1787
  if isinstance(value, go.GoClass):
1815
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1788
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value.handle)
1816
1789
  else:
1817
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1790
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value)
1818
1791
 
1819
- # Python type for struct whatsapp.LinkedDevice
1820
- class LinkedDevice(go.GoClass):
1821
- """A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not\nunique to the underlying \"main\" device (or phone number), as multiple linked devices may be paired\nwith any main device.\n"""
1792
+ # Python type for struct whatsapp.PollOption
1793
+ class PollOption(go.GoClass):
1794
+ """A PollOption represents an individual choice within a broader poll.\n"""
1822
1795
  def __init__(self, *args, **kwargs):
1823
1796
  """
1824
1797
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1832,17 +1805,17 @@ class LinkedDevice(go.GoClass):
1832
1805
  self.handle = args[0].handle
1833
1806
  _whatsapp.IncRef(self.handle)
1834
1807
  else:
1835
- self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
1808
+ self.handle = _whatsapp.whatsapp_PollOption_CTor()
1836
1809
  _whatsapp.IncRef(self.handle)
1837
1810
  if 0 < len(args):
1838
- self.ID = args[0]
1839
- if "ID" in kwargs:
1840
- self.ID = kwargs["ID"]
1811
+ self.Title = args[0]
1812
+ if "Title" in kwargs:
1813
+ self.Title = kwargs["Title"]
1841
1814
  def __del__(self):
1842
1815
  _whatsapp.DecRef(self.handle)
1843
1816
  def __str__(self):
1844
1817
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1845
- sv = 'whatsapp.LinkedDevice{'
1818
+ sv = 'whatsapp.PollOption{'
1846
1819
  first = True
1847
1820
  for v in pr:
1848
1821
  if callable(v[1]):
@@ -1855,34 +1828,24 @@ class LinkedDevice(go.GoClass):
1855
1828
  return sv + '}'
1856
1829
  def __repr__(self):
1857
1830
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1858
- sv = 'whatsapp.LinkedDevice ( '
1831
+ sv = 'whatsapp.PollOption ( '
1859
1832
  for v in pr:
1860
1833
  if not callable(v[1]):
1861
1834
  sv += v[0] + '=' + str(v[1]) + ', '
1862
1835
  return sv + ')'
1863
1836
  @property
1864
- def ID(self):
1865
- """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
1866
- is currently equivalent to a password, and needs to be protected accordingly.
1867
- """
1868
- return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
1869
- @ID.setter
1870
- def ID(self, value):
1837
+ def Title(self):
1838
+ return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
1839
+ @Title.setter
1840
+ def Title(self, value):
1871
1841
  if isinstance(value, go.GoClass):
1872
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
1842
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
1873
1843
  else:
1874
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
1875
- def JID(self):
1876
- """JID() object
1877
-
1878
- JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
1879
- may return invalid JIDs, and this function does not handle errors.
1880
- """
1881
- return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
1844
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
1882
1845
 
1883
- # Python type for struct whatsapp.Preview
1884
- class Preview(go.GoClass):
1885
- """A Preview represents a short description for a URL provided in a message body, as usually derived\nfrom the content of the page pointed at.\n"""
1846
+ # Python type for struct whatsapp.Receipt
1847
+ class Receipt(go.GoClass):
1848
+ """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
1886
1849
  def __init__(self, *args, **kwargs):
1887
1850
  """
1888
1851
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1896,33 +1859,37 @@ class Preview(go.GoClass):
1896
1859
  self.handle = args[0].handle
1897
1860
  _whatsapp.IncRef(self.handle)
1898
1861
  else:
1899
- self.handle = _whatsapp.whatsapp_Preview_CTor()
1862
+ self.handle = _whatsapp.whatsapp_Receipt_CTor()
1900
1863
  _whatsapp.IncRef(self.handle)
1901
1864
  if 0 < len(args):
1902
1865
  self.Kind = args[0]
1903
1866
  if "Kind" in kwargs:
1904
1867
  self.Kind = kwargs["Kind"]
1905
1868
  if 1 < len(args):
1906
- self.URL = args[1]
1907
- if "URL" in kwargs:
1908
- self.URL = kwargs["URL"]
1869
+ self.MessageIDs = args[1]
1870
+ if "MessageIDs" in kwargs:
1871
+ self.MessageIDs = kwargs["MessageIDs"]
1909
1872
  if 2 < len(args):
1910
- self.Title = args[2]
1911
- if "Title" in kwargs:
1912
- self.Title = kwargs["Title"]
1873
+ self.JID = args[2]
1874
+ if "JID" in kwargs:
1875
+ self.JID = kwargs["JID"]
1913
1876
  if 3 < len(args):
1914
- self.Description = args[3]
1915
- if "Description" in kwargs:
1916
- self.Description = kwargs["Description"]
1877
+ self.GroupJID = args[3]
1878
+ if "GroupJID" in kwargs:
1879
+ self.GroupJID = kwargs["GroupJID"]
1917
1880
  if 4 < len(args):
1918
- self.Thumbnail = args[4]
1919
- if "Thumbnail" in kwargs:
1920
- self.Thumbnail = kwargs["Thumbnail"]
1881
+ self.Timestamp = args[4]
1882
+ if "Timestamp" in kwargs:
1883
+ self.Timestamp = kwargs["Timestamp"]
1884
+ if 5 < len(args):
1885
+ self.IsCarbon = args[5]
1886
+ if "IsCarbon" in kwargs:
1887
+ self.IsCarbon = kwargs["IsCarbon"]
1921
1888
  def __del__(self):
1922
1889
  _whatsapp.DecRef(self.handle)
1923
1890
  def __str__(self):
1924
1891
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1925
- sv = 'whatsapp.Preview{'
1892
+ sv = 'whatsapp.Receipt{'
1926
1893
  first = True
1927
1894
  for v in pr:
1928
1895
  if callable(v[1]):
@@ -1935,56 +1902,65 @@ class Preview(go.GoClass):
1935
1902
  return sv + '}'
1936
1903
  def __repr__(self):
1937
1904
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1938
- sv = 'whatsapp.Preview ( '
1905
+ sv = 'whatsapp.Receipt ( '
1939
1906
  for v in pr:
1940
1907
  if not callable(v[1]):
1941
1908
  sv += v[0] + '=' + str(v[1]) + ', '
1942
1909
  return sv + ')'
1943
1910
  @property
1944
1911
  def Kind(self):
1945
- return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
1912
+ return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
1946
1913
  @Kind.setter
1947
1914
  def Kind(self, value):
1948
1915
  if isinstance(value, go.GoClass):
1949
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
1916
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
1950
1917
  else:
1951
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
1918
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
1952
1919
  @property
1953
- def URL(self):
1954
- return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
1955
- @URL.setter
1956
- def URL(self, value):
1920
+ def MessageIDs(self):
1921
+ return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
1922
+ @MessageIDs.setter
1923
+ def MessageIDs(self, value):
1957
1924
  if isinstance(value, go.GoClass):
1958
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
1925
+ _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
1959
1926
  else:
1960
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
1927
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1961
1928
  @property
1962
- def Title(self):
1963
- return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
1964
- @Title.setter
1965
- def Title(self, value):
1929
+ def JID(self):
1930
+ return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
1931
+ @JID.setter
1932
+ def JID(self, value):
1966
1933
  if isinstance(value, go.GoClass):
1967
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
1934
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
1968
1935
  else:
1969
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
1936
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
1970
1937
  @property
1971
- def Description(self):
1972
- return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
1973
- @Description.setter
1974
- def Description(self, value):
1938
+ def GroupJID(self):
1939
+ return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
1940
+ @GroupJID.setter
1941
+ def GroupJID(self, value):
1975
1942
  if isinstance(value, go.GoClass):
1976
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
1943
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
1977
1944
  else:
1978
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
1945
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
1979
1946
  @property
1980
- def Thumbnail(self):
1981
- return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
1982
- @Thumbnail.setter
1983
- def Thumbnail(self, value):
1947
+ def Timestamp(self):
1948
+ return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
1949
+ @Timestamp.setter
1950
+ def Timestamp(self, value):
1984
1951
  if isinstance(value, go.GoClass):
1985
- _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
1952
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
1986
1953
  else:
1987
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1954
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
1955
+ @property
1956
+ def IsCarbon(self):
1957
+ return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
1958
+ @IsCarbon.setter
1959
+ def IsCarbon(self, value):
1960
+ if isinstance(value, go.GoClass):
1961
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
1962
+ else:
1963
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
1988
1964
 
1989
1965
  # Python type for struct whatsapp.Album
1990
1966
  class Album(go.GoClass):
@@ -2165,9 +2141,9 @@ class Attachment(go.GoClass):
2165
2141
  """
2166
2142
  return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
2167
2143
 
2168
- # Python type for struct whatsapp.ChatState
2169
- class ChatState(go.GoClass):
2170
- """A ChatState represents the activity of a contact within a certain discussion, for instance,\nwhether the contact is currently composing a message. This is separate to the concept of a\nPresence, which is the contact's general state across all discussions.\n"""
2144
+ # Python type for struct whatsapp.Call
2145
+ class Call(go.GoClass):
2146
+ """A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for\ncalls is currently not implemented, and this structure contains the bare minimum data required\nfor notifying on missed calls.\n"""
2171
2147
  def __init__(self, *args, **kwargs):
2172
2148
  """
2173
2149
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2181,25 +2157,25 @@ class ChatState(go.GoClass):
2181
2157
  self.handle = args[0].handle
2182
2158
  _whatsapp.IncRef(self.handle)
2183
2159
  else:
2184
- self.handle = _whatsapp.whatsapp_ChatState_CTor()
2160
+ self.handle = _whatsapp.whatsapp_Call_CTor()
2185
2161
  _whatsapp.IncRef(self.handle)
2186
2162
  if 0 < len(args):
2187
- self.Kind = args[0]
2188
- if "Kind" in kwargs:
2189
- self.Kind = kwargs["Kind"]
2163
+ self.State = args[0]
2164
+ if "State" in kwargs:
2165
+ self.State = kwargs["State"]
2190
2166
  if 1 < len(args):
2191
2167
  self.JID = args[1]
2192
2168
  if "JID" in kwargs:
2193
2169
  self.JID = kwargs["JID"]
2194
2170
  if 2 < len(args):
2195
- self.GroupJID = args[2]
2196
- if "GroupJID" in kwargs:
2197
- self.GroupJID = kwargs["GroupJID"]
2171
+ self.Timestamp = args[2]
2172
+ if "Timestamp" in kwargs:
2173
+ self.Timestamp = kwargs["Timestamp"]
2198
2174
  def __del__(self):
2199
2175
  _whatsapp.DecRef(self.handle)
2200
2176
  def __str__(self):
2201
2177
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2202
- sv = 'whatsapp.ChatState{'
2178
+ sv = 'whatsapp.Call{'
2203
2179
  first = True
2204
2180
  for v in pr:
2205
2181
  if callable(v[1]):
@@ -2212,42 +2188,176 @@ class ChatState(go.GoClass):
2212
2188
  return sv + '}'
2213
2189
  def __repr__(self):
2214
2190
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2215
- sv = 'whatsapp.ChatState ( '
2191
+ sv = 'whatsapp.Call ( '
2216
2192
  for v in pr:
2217
2193
  if not callable(v[1]):
2218
2194
  sv += v[0] + '=' + str(v[1]) + ', '
2219
2195
  return sv + ')'
2220
2196
  @property
2221
- def Kind(self):
2222
- return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
2223
- @Kind.setter
2224
- def Kind(self, value):
2197
+ def State(self):
2198
+ return _whatsapp.whatsapp_Call_State_Get(self.handle)
2199
+ @State.setter
2200
+ def State(self, value):
2225
2201
  if isinstance(value, go.GoClass):
2226
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
2202
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
2227
2203
  else:
2228
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
2204
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value)
2229
2205
  @property
2230
2206
  def JID(self):
2231
- return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
2207
+ return _whatsapp.whatsapp_Call_JID_Get(self.handle)
2232
2208
  @JID.setter
2233
2209
  def JID(self, value):
2234
2210
  if isinstance(value, go.GoClass):
2235
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
2211
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
2236
2212
  else:
2237
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
2213
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
2238
2214
  @property
2239
- def GroupJID(self):
2240
- return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
2241
- @GroupJID.setter
2242
- def GroupJID(self, value):
2215
+ def Timestamp(self):
2216
+ return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
2217
+ @Timestamp.setter
2218
+ def Timestamp(self, value):
2243
2219
  if isinstance(value, go.GoClass):
2244
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
2220
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
2245
2221
  else:
2246
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
2222
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
2247
2223
 
2248
- # Python type for struct whatsapp.Group
2249
- class Group(go.GoClass):
2250
- """A Group represents a named, many-to-many chat space which may be joined or left at will. All\nfields apart from the group JID are considered to be optional, and may not be set in cases where\ngroup information is being updated against previous assumed state. Groups in WhatsApp are\ngenerally invited to out-of-band with respect to overarching adaptor; see the documentation for\n[Session.GetGroups] for more information.\n"""
2224
+ # Python type for struct whatsapp.Connect
2225
+ class Connect(go.GoClass):
2226
+ """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
2227
+ def __init__(self, *args, **kwargs):
2228
+ """
2229
+ handle=A Go-side object is always initialized with an explicit handle=arg
2230
+ otherwise parameters can be unnamed in order of field names or named fields
2231
+ in which case a new Go object is constructed first
2232
+ """
2233
+ if len(kwargs) == 1 and 'handle' in kwargs:
2234
+ self.handle = kwargs['handle']
2235
+ _whatsapp.IncRef(self.handle)
2236
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2237
+ self.handle = args[0].handle
2238
+ _whatsapp.IncRef(self.handle)
2239
+ else:
2240
+ self.handle = _whatsapp.whatsapp_Connect_CTor()
2241
+ _whatsapp.IncRef(self.handle)
2242
+ if 0 < len(args):
2243
+ self.JID = args[0]
2244
+ if "JID" in kwargs:
2245
+ self.JID = kwargs["JID"]
2246
+ if 1 < len(args):
2247
+ self.Error = args[1]
2248
+ if "Error" in kwargs:
2249
+ self.Error = kwargs["Error"]
2250
+ def __del__(self):
2251
+ _whatsapp.DecRef(self.handle)
2252
+ def __str__(self):
2253
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2254
+ sv = 'whatsapp.Connect{'
2255
+ first = True
2256
+ for v in pr:
2257
+ if callable(v[1]):
2258
+ continue
2259
+ if first:
2260
+ first = False
2261
+ else:
2262
+ sv += ', '
2263
+ sv += v[0] + '=' + str(v[1])
2264
+ return sv + '}'
2265
+ def __repr__(self):
2266
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2267
+ sv = 'whatsapp.Connect ( '
2268
+ for v in pr:
2269
+ if not callable(v[1]):
2270
+ sv += v[0] + '=' + str(v[1]) + ', '
2271
+ return sv + ')'
2272
+ @property
2273
+ def JID(self):
2274
+ return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
2275
+ @JID.setter
2276
+ def JID(self, value):
2277
+ if isinstance(value, go.GoClass):
2278
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
2279
+ else:
2280
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
2281
+ @property
2282
+ def Error(self):
2283
+ return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
2284
+ @Error.setter
2285
+ def Error(self, value):
2286
+ if isinstance(value, go.GoClass):
2287
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
2288
+ else:
2289
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
2290
+
2291
+ # Python type for struct whatsapp.Contact
2292
+ class Contact(go.GoClass):
2293
+ """A Contact represents any entity that be communicated with directly in WhatsApp. This typically\nrepresents people, but may represent a business or bot as well, but not a group-chat.\n"""
2294
+ def __init__(self, *args, **kwargs):
2295
+ """
2296
+ handle=A Go-side object is always initialized with an explicit handle=arg
2297
+ otherwise parameters can be unnamed in order of field names or named fields
2298
+ in which case a new Go object is constructed first
2299
+ """
2300
+ if len(kwargs) == 1 and 'handle' in kwargs:
2301
+ self.handle = kwargs['handle']
2302
+ _whatsapp.IncRef(self.handle)
2303
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2304
+ self.handle = args[0].handle
2305
+ _whatsapp.IncRef(self.handle)
2306
+ else:
2307
+ self.handle = _whatsapp.whatsapp_Contact_CTor()
2308
+ _whatsapp.IncRef(self.handle)
2309
+ if 0 < len(args):
2310
+ self.JID = args[0]
2311
+ if "JID" in kwargs:
2312
+ self.JID = kwargs["JID"]
2313
+ if 1 < len(args):
2314
+ self.Name = args[1]
2315
+ if "Name" in kwargs:
2316
+ self.Name = kwargs["Name"]
2317
+ def __del__(self):
2318
+ _whatsapp.DecRef(self.handle)
2319
+ def __str__(self):
2320
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2321
+ sv = 'whatsapp.Contact{'
2322
+ first = True
2323
+ for v in pr:
2324
+ if callable(v[1]):
2325
+ continue
2326
+ if first:
2327
+ first = False
2328
+ else:
2329
+ sv += ', '
2330
+ sv += v[0] + '=' + str(v[1])
2331
+ return sv + '}'
2332
+ def __repr__(self):
2333
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2334
+ sv = 'whatsapp.Contact ( '
2335
+ for v in pr:
2336
+ if not callable(v[1]):
2337
+ sv += v[0] + '=' + str(v[1]) + ', '
2338
+ return sv + ')'
2339
+ @property
2340
+ def JID(self):
2341
+ return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
2342
+ @JID.setter
2343
+ def JID(self, value):
2344
+ if isinstance(value, go.GoClass):
2345
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
2346
+ else:
2347
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
2348
+ @property
2349
+ def Name(self):
2350
+ return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
2351
+ @Name.setter
2352
+ def Name(self, value):
2353
+ if isinstance(value, go.GoClass):
2354
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
2355
+ else:
2356
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
2357
+
2358
+ # Python type for struct whatsapp.LinkedDevice
2359
+ class LinkedDevice(go.GoClass):
2360
+ """A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not\nunique to the underlying \"main\" device (or phone number), as multiple linked devices may be paired\nwith any main device.\n"""
2251
2361
  def __init__(self, *args, **kwargs):
2252
2362
  """
2253
2363
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2261,33 +2371,17 @@ class Group(go.GoClass):
2261
2371
  self.handle = args[0].handle
2262
2372
  _whatsapp.IncRef(self.handle)
2263
2373
  else:
2264
- self.handle = _whatsapp.whatsapp_Group_CTor()
2374
+ self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
2265
2375
  _whatsapp.IncRef(self.handle)
2266
2376
  if 0 < len(args):
2267
- self.JID = args[0]
2268
- if "JID" in kwargs:
2269
- self.JID = kwargs["JID"]
2270
- if 1 < len(args):
2271
- self.Name = args[1]
2272
- if "Name" in kwargs:
2273
- self.Name = kwargs["Name"]
2274
- if 2 < len(args):
2275
- self.Subject = args[2]
2276
- if "Subject" in kwargs:
2277
- self.Subject = kwargs["Subject"]
2278
- if 3 < len(args):
2279
- self.Nickname = args[3]
2280
- if "Nickname" in kwargs:
2281
- self.Nickname = kwargs["Nickname"]
2282
- if 4 < len(args):
2283
- self.Participants = args[4]
2284
- if "Participants" in kwargs:
2285
- self.Participants = kwargs["Participants"]
2377
+ self.ID = args[0]
2378
+ if "ID" in kwargs:
2379
+ self.ID = kwargs["ID"]
2286
2380
  def __del__(self):
2287
2381
  _whatsapp.DecRef(self.handle)
2288
2382
  def __str__(self):
2289
2383
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2290
- sv = 'whatsapp.Group{'
2384
+ sv = 'whatsapp.LinkedDevice{'
2291
2385
  first = True
2292
2386
  for v in pr:
2293
2387
  if callable(v[1]):
@@ -2300,56 +2394,30 @@ class Group(go.GoClass):
2300
2394
  return sv + '}'
2301
2395
  def __repr__(self):
2302
2396
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2303
- sv = 'whatsapp.Group ( '
2397
+ sv = 'whatsapp.LinkedDevice ( '
2304
2398
  for v in pr:
2305
2399
  if not callable(v[1]):
2306
2400
  sv += v[0] + '=' + str(v[1]) + ', '
2307
2401
  return sv + ')'
2308
2402
  @property
2309
- def JID(self):
2310
- return _whatsapp.whatsapp_Group_JID_Get(self.handle)
2311
- @JID.setter
2312
- def JID(self, value):
2313
- if isinstance(value, go.GoClass):
2314
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
2315
- else:
2316
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
2317
- @property
2318
- def Name(self):
2319
- return _whatsapp.whatsapp_Group_Name_Get(self.handle)
2320
- @Name.setter
2321
- def Name(self, value):
2322
- if isinstance(value, go.GoClass):
2323
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
2324
- else:
2325
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
2326
- @property
2327
- def Subject(self):
2328
- return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
2329
- @Subject.setter
2330
- def Subject(self, value):
2331
- if isinstance(value, go.GoClass):
2332
- _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
2333
- else:
2334
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2335
- @property
2336
- def Nickname(self):
2337
- return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
2338
- @Nickname.setter
2339
- def Nickname(self, value):
2340
- if isinstance(value, go.GoClass):
2341
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
2342
- else:
2343
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
2344
- @property
2345
- def Participants(self):
2346
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
2347
- @Participants.setter
2348
- def Participants(self, value):
2403
+ def ID(self):
2404
+ """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
2405
+ is currently equivalent to a password, and needs to be protected accordingly.
2406
+ """
2407
+ return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
2408
+ @ID.setter
2409
+ def ID(self, value):
2349
2410
  if isinstance(value, go.GoClass):
2350
- _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
2411
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
2351
2412
  else:
2352
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2413
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
2414
+ def JID(self):
2415
+ """JID() object
2416
+
2417
+ JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
2418
+ may return invalid JIDs, and this function does not handle errors.
2419
+ """
2420
+ return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
2353
2421
 
2354
2422
  # Python type for struct whatsapp.Location
2355
2423
  class Location(go.GoClass):
@@ -2485,76 +2553,9 @@ class Location(go.GoClass):
2485
2553
  else:
2486
2554
  _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
2487
2555
 
2488
- # Python type for struct whatsapp.Poll
2489
- class Poll(go.GoClass):
2490
- """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
2491
- def __init__(self, *args, **kwargs):
2492
- """
2493
- handle=A Go-side object is always initialized with an explicit handle=arg
2494
- otherwise parameters can be unnamed in order of field names or named fields
2495
- in which case a new Go object is constructed first
2496
- """
2497
- if len(kwargs) == 1 and 'handle' in kwargs:
2498
- self.handle = kwargs['handle']
2499
- _whatsapp.IncRef(self.handle)
2500
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2501
- self.handle = args[0].handle
2502
- _whatsapp.IncRef(self.handle)
2503
- else:
2504
- self.handle = _whatsapp.whatsapp_Poll_CTor()
2505
- _whatsapp.IncRef(self.handle)
2506
- if 0 < len(args):
2507
- self.Title = args[0]
2508
- if "Title" in kwargs:
2509
- self.Title = kwargs["Title"]
2510
- if 1 < len(args):
2511
- self.Options = args[1]
2512
- if "Options" in kwargs:
2513
- self.Options = kwargs["Options"]
2514
- def __del__(self):
2515
- _whatsapp.DecRef(self.handle)
2516
- def __str__(self):
2517
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2518
- sv = 'whatsapp.Poll{'
2519
- first = True
2520
- for v in pr:
2521
- if callable(v[1]):
2522
- continue
2523
- if first:
2524
- first = False
2525
- else:
2526
- sv += ', '
2527
- sv += v[0] + '=' + str(v[1])
2528
- return sv + '}'
2529
- def __repr__(self):
2530
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2531
- sv = 'whatsapp.Poll ( '
2532
- for v in pr:
2533
- if not callable(v[1]):
2534
- sv += v[0] + '=' + str(v[1]) + ', '
2535
- return sv + ')'
2536
- @property
2537
- def Title(self):
2538
- return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
2539
- @Title.setter
2540
- def Title(self, value):
2541
- if isinstance(value, go.GoClass):
2542
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
2543
- else:
2544
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
2545
- @property
2546
- def Options(self):
2547
- return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
2548
- @Options.setter
2549
- def Options(self, value):
2550
- if isinstance(value, go.GoClass):
2551
- _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
2552
- else:
2553
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2554
-
2555
- # Python type for struct whatsapp.Gateway
2556
- class Gateway(go.GoClass):
2557
- """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
2556
+ # Python type for struct whatsapp.LoggedOut
2557
+ class LoggedOut(go.GoClass):
2558
+ """LoggedOut repreents event data related to an explicit or implicit log-out event.\n"""
2558
2559
  def __init__(self, *args, **kwargs):
2559
2560
  """
2560
2561
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2568,29 +2569,17 @@ class Gateway(go.GoClass):
2568
2569
  self.handle = args[0].handle
2569
2570
  _whatsapp.IncRef(self.handle)
2570
2571
  else:
2571
- self.handle = _whatsapp.whatsapp_Gateway_CTor()
2572
+ self.handle = _whatsapp.whatsapp_LoggedOut_CTor()
2572
2573
  _whatsapp.IncRef(self.handle)
2573
2574
  if 0 < len(args):
2574
- self.DBPath = args[0]
2575
- if "DBPath" in kwargs:
2576
- self.DBPath = kwargs["DBPath"]
2577
- if 1 < len(args):
2578
- self.Name = args[1]
2579
- if "Name" in kwargs:
2580
- self.Name = kwargs["Name"]
2581
- if 2 < len(args):
2582
- self.LogLevel = args[2]
2583
- if "LogLevel" in kwargs:
2584
- self.LogLevel = kwargs["LogLevel"]
2585
- if 3 < len(args):
2586
- self.TempDir = args[3]
2587
- if "TempDir" in kwargs:
2588
- self.TempDir = kwargs["TempDir"]
2575
+ self.Reason = args[0]
2576
+ if "Reason" in kwargs:
2577
+ self.Reason = kwargs["Reason"]
2589
2578
  def __del__(self):
2590
2579
  _whatsapp.DecRef(self.handle)
2591
2580
  def __str__(self):
2592
2581
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2593
- sv = 'whatsapp.Gateway{'
2582
+ sv = 'whatsapp.LoggedOut{'
2594
2583
  first = True
2595
2584
  for v in pr:
2596
2585
  if callable(v[1]):
@@ -2603,68 +2592,20 @@ class Gateway(go.GoClass):
2603
2592
  return sv + '}'
2604
2593
  def __repr__(self):
2605
2594
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2606
- sv = 'whatsapp.Gateway ( '
2595
+ sv = 'whatsapp.LoggedOut ( '
2607
2596
  for v in pr:
2608
2597
  if not callable(v[1]):
2609
2598
  sv += v[0] + '=' + str(v[1]) + ', '
2610
2599
  return sv + ')'
2611
2600
  @property
2612
- def DBPath(self):
2613
- return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
2614
- @DBPath.setter
2615
- def DBPath(self, value):
2616
- if isinstance(value, go.GoClass):
2617
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
2618
- else:
2619
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
2620
- @property
2621
- def Name(self):
2622
- return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
2623
- @Name.setter
2624
- def Name(self, value):
2625
- if isinstance(value, go.GoClass):
2626
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
2627
- else:
2628
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
2629
- @property
2630
- def LogLevel(self):
2631
- return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
2632
- @LogLevel.setter
2633
- def LogLevel(self, value):
2634
- if isinstance(value, go.GoClass):
2635
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
2636
- else:
2637
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
2638
- @property
2639
- def TempDir(self):
2640
- return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
2641
- @TempDir.setter
2642
- def TempDir(self, value):
2601
+ def Reason(self):
2602
+ return _whatsapp.whatsapp_LoggedOut_Reason_Get(self.handle)
2603
+ @Reason.setter
2604
+ def Reason(self, value):
2643
2605
  if isinstance(value, go.GoClass):
2644
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
2606
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value.handle)
2645
2607
  else:
2646
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
2647
- def Init(self):
2648
- """Init() str
2649
-
2650
- Init performs initialization procedures for the Gateway, and is expected to be run before any
2651
- calls to [Gateway.Session].
2652
- """
2653
- return _whatsapp.whatsapp_Gateway_Init(self.handle)
2654
- def NewSession(self, device):
2655
- """NewSession(object device) object
2656
-
2657
- NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
2658
- a valid ID, a pair operation will be required, as described in [Session.Login].
2659
- """
2660
- return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
2661
- def CleanupSession(self, device):
2662
- """CleanupSession(object device) str
2663
-
2664
- CleanupSession will remove all invalid and obsolete references to the given device, and should be
2665
- used when pairing a new device or unregistering from the Gateway.
2666
- """
2667
- return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
2608
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value)
2668
2609
 
2669
2610
  # Python type for struct whatsapp.Message
2670
2611
  class Message(go.GoClass):
@@ -2749,17 +2690,25 @@ class Message(go.GoClass):
2749
2690
  if "Album" in kwargs:
2750
2691
  self.Album = kwargs["Album"]
2751
2692
  if 16 < len(args):
2752
- self.MentionJIDs = args[16]
2693
+ self.GroupInvite = args[16]
2694
+ if "GroupInvite" in kwargs:
2695
+ self.GroupInvite = kwargs["GroupInvite"]
2696
+ if 17 < len(args):
2697
+ self.MentionJIDs = args[17]
2753
2698
  if "MentionJIDs" in kwargs:
2754
2699
  self.MentionJIDs = kwargs["MentionJIDs"]
2755
- if 17 < len(args):
2756
- self.Receipts = args[17]
2700
+ if 18 < len(args):
2701
+ self.Receipts = args[18]
2757
2702
  if "Receipts" in kwargs:
2758
2703
  self.Receipts = kwargs["Receipts"]
2759
- if 18 < len(args):
2760
- self.Reactions = args[18]
2704
+ if 19 < len(args):
2705
+ self.Reactions = args[19]
2761
2706
  if "Reactions" in kwargs:
2762
2707
  self.Reactions = kwargs["Reactions"]
2708
+ if 20 < len(args):
2709
+ self.IsHistory = args[20]
2710
+ if "IsHistory" in kwargs:
2711
+ self.IsHistory = kwargs["IsHistory"]
2763
2712
  def __del__(self):
2764
2713
  _whatsapp.DecRef(self.handle)
2765
2714
  def __str__(self):
@@ -2927,6 +2876,15 @@ class Message(go.GoClass):
2927
2876
  else:
2928
2877
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2929
2878
  @property
2879
+ def GroupInvite(self):
2880
+ return Group(handle=_whatsapp.whatsapp_Message_GroupInvite_Get(self.handle))
2881
+ @GroupInvite.setter
2882
+ def GroupInvite(self, value):
2883
+ if isinstance(value, go.GoClass):
2884
+ _whatsapp.whatsapp_Message_GroupInvite_Set(self.handle, value.handle)
2885
+ else:
2886
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2887
+ @property
2930
2888
  def MentionJIDs(self):
2931
2889
  return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
2932
2890
  @MentionJIDs.setter
@@ -2953,10 +2911,19 @@ class Message(go.GoClass):
2953
2911
  _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
2954
2912
  else:
2955
2913
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2914
+ @property
2915
+ def IsHistory(self):
2916
+ return _whatsapp.whatsapp_Message_IsHistory_Get(self.handle)
2917
+ @IsHistory.setter
2918
+ def IsHistory(self, value):
2919
+ if isinstance(value, go.GoClass):
2920
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value.handle)
2921
+ else:
2922
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value)
2956
2923
 
2957
- # Python type for struct whatsapp.PollOption
2958
- class PollOption(go.GoClass):
2959
- """A PollOption represents an individual choice within a broader poll.\n"""
2924
+ # Python type for struct whatsapp.Poll
2925
+ class Poll(go.GoClass):
2926
+ """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
2960
2927
  def __init__(self, *args, **kwargs):
2961
2928
  """
2962
2929
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2970,17 +2937,21 @@ class PollOption(go.GoClass):
2970
2937
  self.handle = args[0].handle
2971
2938
  _whatsapp.IncRef(self.handle)
2972
2939
  else:
2973
- self.handle = _whatsapp.whatsapp_PollOption_CTor()
2940
+ self.handle = _whatsapp.whatsapp_Poll_CTor()
2974
2941
  _whatsapp.IncRef(self.handle)
2975
2942
  if 0 < len(args):
2976
2943
  self.Title = args[0]
2977
2944
  if "Title" in kwargs:
2978
2945
  self.Title = kwargs["Title"]
2946
+ if 1 < len(args):
2947
+ self.Options = args[1]
2948
+ if "Options" in kwargs:
2949
+ self.Options = kwargs["Options"]
2979
2950
  def __del__(self):
2980
2951
  _whatsapp.DecRef(self.handle)
2981
2952
  def __str__(self):
2982
2953
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2983
- sv = 'whatsapp.PollOption{'
2954
+ sv = 'whatsapp.Poll{'
2984
2955
  first = True
2985
2956
  for v in pr:
2986
2957
  if callable(v[1]):
@@ -2993,20 +2964,29 @@ class PollOption(go.GoClass):
2993
2964
  return sv + '}'
2994
2965
  def __repr__(self):
2995
2966
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2996
- sv = 'whatsapp.PollOption ( '
2967
+ sv = 'whatsapp.Poll ( '
2997
2968
  for v in pr:
2998
2969
  if not callable(v[1]):
2999
2970
  sv += v[0] + '=' + str(v[1]) + ', '
3000
2971
  return sv + ')'
3001
2972
  @property
3002
2973
  def Title(self):
3003
- return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
2974
+ return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
3004
2975
  @Title.setter
3005
2976
  def Title(self, value):
3006
2977
  if isinstance(value, go.GoClass):
3007
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
2978
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
3008
2979
  else:
3009
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
2980
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
2981
+ @property
2982
+ def Options(self):
2983
+ return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
2984
+ @Options.setter
2985
+ def Options(self, value):
2986
+ if isinstance(value, go.GoClass):
2987
+ _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
2988
+ else:
2989
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3010
2990
 
3011
2991
  # Python type for struct whatsapp.Avatar
3012
2992
  class Avatar(go.GoClass):
@@ -3075,9 +3055,9 @@ class Avatar(go.GoClass):
3075
3055
  else:
3076
3056
  _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
3077
3057
 
3078
- # Python type for struct whatsapp.Connect
3079
- class Connect(go.GoClass):
3080
- """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
3058
+ # Python type for struct whatsapp.Presence
3059
+ class Presence(go.GoClass):
3060
+ """Precence represents a contact's general state of activity, and is periodically updated as\ncontacts start or stop paying attention to their client of choice.\n"""
3081
3061
  def __init__(self, *args, **kwargs):
3082
3062
  """
3083
3063
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3091,21 +3071,25 @@ class Connect(go.GoClass):
3091
3071
  self.handle = args[0].handle
3092
3072
  _whatsapp.IncRef(self.handle)
3093
3073
  else:
3094
- self.handle = _whatsapp.whatsapp_Connect_CTor()
3074
+ self.handle = _whatsapp.whatsapp_Presence_CTor()
3095
3075
  _whatsapp.IncRef(self.handle)
3096
3076
  if 0 < len(args):
3097
3077
  self.JID = args[0]
3098
3078
  if "JID" in kwargs:
3099
3079
  self.JID = kwargs["JID"]
3100
3080
  if 1 < len(args):
3101
- self.Error = args[1]
3102
- if "Error" in kwargs:
3103
- self.Error = kwargs["Error"]
3081
+ self.Kind = args[1]
3082
+ if "Kind" in kwargs:
3083
+ self.Kind = kwargs["Kind"]
3084
+ if 2 < len(args):
3085
+ self.LastSeen = args[2]
3086
+ if "LastSeen" in kwargs:
3087
+ self.LastSeen = kwargs["LastSeen"]
3104
3088
  def __del__(self):
3105
3089
  _whatsapp.DecRef(self.handle)
3106
3090
  def __str__(self):
3107
3091
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3108
- sv = 'whatsapp.Connect{'
3092
+ sv = 'whatsapp.Presence{'
3109
3093
  first = True
3110
3094
  for v in pr:
3111
3095
  if callable(v[1]):
@@ -3118,33 +3102,42 @@ class Connect(go.GoClass):
3118
3102
  return sv + '}'
3119
3103
  def __repr__(self):
3120
3104
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3121
- sv = 'whatsapp.Connect ( '
3105
+ sv = 'whatsapp.Presence ( '
3122
3106
  for v in pr:
3123
3107
  if not callable(v[1]):
3124
3108
  sv += v[0] + '=' + str(v[1]) + ', '
3125
3109
  return sv + ')'
3126
3110
  @property
3127
3111
  def JID(self):
3128
- return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
3112
+ return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
3129
3113
  @JID.setter
3130
3114
  def JID(self, value):
3131
3115
  if isinstance(value, go.GoClass):
3132
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
3116
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
3133
3117
  else:
3134
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
3118
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
3135
3119
  @property
3136
- def Error(self):
3137
- return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
3138
- @Error.setter
3139
- def Error(self, value):
3120
+ def Kind(self):
3121
+ return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
3122
+ @Kind.setter
3123
+ def Kind(self, value):
3140
3124
  if isinstance(value, go.GoClass):
3141
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
3125
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
3142
3126
  else:
3143
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
3127
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
3128
+ @property
3129
+ def LastSeen(self):
3130
+ return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
3131
+ @LastSeen.setter
3132
+ def LastSeen(self, value):
3133
+ if isinstance(value, go.GoClass):
3134
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
3135
+ else:
3136
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
3144
3137
 
3145
- # Python type for struct whatsapp.Contact
3146
- class Contact(go.GoClass):
3147
- """A Contact represents any entity that be communicated with directly in WhatsApp. This typically\nrepresents people, but may represent a business or bot as well, but not a group-chat.\n"""
3138
+ # Python type for struct whatsapp.Session
3139
+ class Session(go.GoClass):
3140
+ """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
3148
3141
  def __init__(self, *args, **kwargs):
3149
3142
  """
3150
3143
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3158,21 +3151,13 @@ class Contact(go.GoClass):
3158
3151
  self.handle = args[0].handle
3159
3152
  _whatsapp.IncRef(self.handle)
3160
3153
  else:
3161
- self.handle = _whatsapp.whatsapp_Contact_CTor()
3154
+ self.handle = _whatsapp.whatsapp_Session_CTor()
3162
3155
  _whatsapp.IncRef(self.handle)
3163
- if 0 < len(args):
3164
- self.JID = args[0]
3165
- if "JID" in kwargs:
3166
- self.JID = kwargs["JID"]
3167
- if 1 < len(args):
3168
- self.Name = args[1]
3169
- if "Name" in kwargs:
3170
- self.Name = kwargs["Name"]
3171
3156
  def __del__(self):
3172
3157
  _whatsapp.DecRef(self.handle)
3173
3158
  def __str__(self):
3174
3159
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3175
- sv = 'whatsapp.Contact{'
3160
+ sv = 'whatsapp.Session{'
3176
3161
  first = True
3177
3162
  for v in pr:
3178
3163
  if callable(v[1]):
@@ -3185,29 +3170,163 @@ class Contact(go.GoClass):
3185
3170
  return sv + '}'
3186
3171
  def __repr__(self):
3187
3172
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3188
- sv = 'whatsapp.Contact ( '
3173
+ sv = 'whatsapp.Session ( '
3189
3174
  for v in pr:
3190
3175
  if not callable(v[1]):
3191
3176
  sv += v[0] + '=' + str(v[1]) + ', '
3192
3177
  return sv + ')'
3193
- @property
3194
- def JID(self):
3195
- return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
3196
- @JID.setter
3197
- def JID(self, value):
3198
- if isinstance(value, go.GoClass):
3199
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
3200
- else:
3201
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
3202
- @property
3203
- def Name(self):
3204
- return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
3205
- @Name.setter
3206
- def Name(self, value):
3207
- if isinstance(value, go.GoClass):
3208
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
3209
- else:
3210
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
3178
+ def Login(self):
3179
+ """Login() str
3180
+
3181
+ Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
3182
+ or by initiating a pairing session for a new linked device. Callers are expected to have set an
3183
+ event handler in order to receive any incoming events from the underlying WhatsApp session.
3184
+ """
3185
+ return _whatsapp.whatsapp_Session_Login(self.handle)
3186
+ def Logout(self):
3187
+ """Logout() str
3188
+
3189
+ Logout disconnects and removes the current linked device locally and initiates a logout remotely.
3190
+ """
3191
+ return _whatsapp.whatsapp_Session_Logout(self.handle)
3192
+ def Disconnect(self):
3193
+ """Disconnect() str
3194
+
3195
+ Disconnects detaches the current connection to WhatsApp without removing any linked device state.
3196
+ """
3197
+ return _whatsapp.whatsapp_Session_Disconnect(self.handle)
3198
+ def PairPhone(self, phone):
3199
+ """PairPhone(str phone) str, str
3200
+
3201
+ PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
3202
+ user's primary device, as identified by the given phone number. This will return an error if the
3203
+ [Session] is already paired, or if the phone number given is empty or invalid.
3204
+ """
3205
+ return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
3206
+ def SendMessage(self, message):
3207
+ """SendMessage(object message) str
3208
+
3209
+ SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
3210
+ specified within. In general, different message kinds require different fields to be set; see the
3211
+ documentation for the [Message] type for more information.
3212
+ """
3213
+ return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
3214
+ def GenerateMessageID(self):
3215
+ """GenerateMessageID() str
3216
+
3217
+ GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
3218
+ """
3219
+ return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
3220
+ def SendChatState(self, state):
3221
+ """SendChatState(object state) str
3222
+
3223
+ SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
3224
+ contact specified within.
3225
+ """
3226
+ return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
3227
+ def SendReceipt(self, receipt):
3228
+ """SendReceipt(object receipt) str
3229
+
3230
+ SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
3231
+ """
3232
+ return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
3233
+ def SendPresence(self, presence, statusMessage):
3234
+ """SendPresence(int presence, str statusMessage) str
3235
+
3236
+ SendPresence sets the activity state and (optional) status message for the current session and
3237
+ user. An error is returned if setting availability fails for any reason.
3238
+ """
3239
+ return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
3240
+ def GetContacts(self, refresh):
3241
+ """GetContacts(bool refresh) []object, str
3242
+
3243
+ GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
3244
+ If `refresh` is `true`, FetchRoster will pull application state from the remote service and
3245
+ synchronize any contacts found with the adapter.
3246
+ """
3247
+ return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
3248
+ def GetGroups(self):
3249
+ """GetGroups() []object, str
3250
+
3251
+ GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
3252
+ information on present participants.
3253
+ """
3254
+ return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
3255
+ def CreateGroup(self, name, participants):
3256
+ """CreateGroup(str name, []str participants) object, str
3257
+
3258
+ CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
3259
+ participant JIDs given.
3260
+ """
3261
+ return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
3262
+ def LeaveGroup(self, resourceID):
3263
+ """LeaveGroup(str resourceID) str
3264
+
3265
+ LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
3266
+ """
3267
+ return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
3268
+ def GetAvatar(self, resourceID, avatarID):
3269
+ """GetAvatar(str resourceID, str avatarID) object, str
3270
+
3271
+ GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
3272
+ is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
3273
+ for the given ID has not changed.
3274
+ """
3275
+ return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
3276
+ def SetAvatar(self, resourceID, avatar):
3277
+ """SetAvatar(str resourceID, []int avatar) str, str
3278
+
3279
+ SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
3280
+ profile picture for our own user by providing an empty JID. The unique picture ID is returned,
3281
+ typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
3282
+ """
3283
+ return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
3284
+ def SetGroupName(self, resourceID, name):
3285
+ """SetGroupName(str resourceID, str name) str
3286
+
3287
+ SetGroupName updates the name of a WhatsApp group for the Group JID given.
3288
+ """
3289
+ return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
3290
+ def SetGroupTopic(self, resourceID, topic):
3291
+ """SetGroupTopic(str resourceID, str topic) str
3292
+
3293
+ SetGroupName updates the topic of a WhatsApp group for the Group JID given.
3294
+ """
3295
+ return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
3296
+ def UpdateGroupParticipants(self, resourceID, participants):
3297
+ """UpdateGroupParticipants(str resourceID, []object participants) []object, str
3298
+
3299
+ UpdateGroupParticipants processes changes to the given group's participants, including additions,
3300
+ removals, and changes to privileges. Participant JIDs given must be part of the authenticated
3301
+ session's roster at least, and must also be active group participants for other types of changes.
3302
+ """
3303
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
3304
+ def FindContact(self, phone):
3305
+ """FindContact(str phone) object, str
3306
+
3307
+ FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
3308
+ phone number, returning a concrete instance if found; typically, only the contact JID is set. No
3309
+ error is returned if no contact was found, but any unexpected errors will otherwise be returned
3310
+ directly.
3311
+ """
3312
+ return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
3313
+ def RequestMessageHistory(self, resourceID, oldestMessage):
3314
+ """RequestMessageHistory(str resourceID, object oldestMessage) str
3315
+
3316
+ RequestMessageHistory sends and asynchronous request for message history related to the given
3317
+ resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
3318
+ history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
3319
+ event handler. An error will be returned if requesting history fails for any reason.
3320
+ """
3321
+ return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
3322
+ def SetEventHandler(self, h, goRun=False):
3323
+ """SetEventHandler(callable h)
3324
+
3325
+ SetEventHandler assigns the given handler function for propagating internal events into the Python
3326
+ gateway. Note that the event handler function is not entirely safe to use directly, and all calls
3327
+ should instead be sent to the [Gateway] via its internal call channel.
3328
+ """
3329
+ _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
3211
3330
 
3212
3331
 
3213
3332
  # ---- Slices ---
@@ -3227,5 +3346,11 @@ def NewGateway():
3227
3346
 
3228
3347
 
3229
3348
  # ---- Functions ---
3349
+ def IsAnonymousJID(id):
3350
+ """IsAnonymousJID(str id) bool
3351
+
3352
+ IsAnonymousJID returns true if the JID given is not addressible, that is, if it's actually a LID.
3353
+ """
3354
+ return _whatsapp.whatsapp_IsAnonymousJID(id)
3230
3355
 
3231
3356