├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .wireignore ├── .yarnrc ├── LICENSE ├── README.md ├── android ├── build.sbt ├── project │ ├── build.properties │ └── plugins.sbt └── publishing.md ├── ios ├── descriptor.proto ├── ios.proto ├── objectivec-descriptor.proto └── swift-descriptor.proto ├── package.json ├── proto ├── messages.proto ├── mls.proto └── otr.proto ├── tsconfig.json ├── web └── compile.js └── yarn.lock /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Test, Build & Release 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | 9 | jobs: 10 | test_build_deploy: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: 'Checkout repository' 15 | uses: actions/checkout@v2 16 | 17 | - name: 'Extend environment variables' 18 | run: | 19 | echo "BRANCH_NAME=$(git branch --show-current)" >> $GITHUB_ENV 20 | 21 | - name: 'Build & Test' 22 | run: yarn && yarn dist && yarn test 23 | 24 | - name: 'Authenticate with GitHub (to commit new tag)' 25 | if: env.BRANCH_NAME == 'master' 26 | env: 27 | GH_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}} 28 | run: echo -e "machine github.com\n login ${GH_TOKEN}" > ~/.netrc 29 | 30 | - name: 'Authenticate with npm registry (to publish new version)' 31 | if: env.BRANCH_NAME == 'master' 32 | run: | 33 | echo "//registry.npmjs.org/:_authToken=${{secrets.WEBTEAM_NPM_TOKEN}}" >> "${HOME}/.npmrc" 34 | git config --global user.email webapp+travis@wire.com 35 | git config --global user.name "Wire Travis CI" 36 | 37 | - name: 'Release new version' 38 | if: env.BRANCH_NAME == 'master' 39 | run: yarn version --minor 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules/ 3 | package-lock.json 4 | target/ 5 | web/*.js 6 | web/*.d.ts 7 | !web/compile.js 8 | -------------------------------------------------------------------------------- /.wireignore: -------------------------------------------------------------------------------- 1 | android/ 2 | ios/ 3 | README.asciidoc 4 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | registry "https://registry.npmjs.org/" 2 | save-prefix "" 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Wire 2 | 3 | This repository is part of the source code of Wire. You can find more information at [wire.com](https://wire.com) or by contacting opensource@wire.com. 4 | 5 | You can find the published source code at [github.com/wireapp/wire](https://github.com/wireapp/wire). 6 | 7 | For licensing information, see the attached LICENSE file and the list of third-party licenses at [wire.com/legal/licenses/](https://wire.com/legal/licenses/). 8 | 9 | # GenericMessage protocol 10 | Protocol definition for generic messages. 11 | 12 | `GenericMessage` is supposed to be used in client messages ('client-message-add' event) and in OTR encrypted messages. Once E2EE is released client messages will no longer be used. 13 | 14 | `GenericMessage` contains message id and specific message content (`oneOf`) 15 | 16 | ## Message Id 17 | `MessageId` field is client generated identifier of a message this `GenericMessage` relates to, it should be used by all clients to correlate message updates. This is **not** unique event id, there may (and will) be several `GenericMessage` events with the same `messageId`, each `GenericMessage` provides part of final message or some update to it. 18 | 19 | Each ImageAsset version/tag is sent in separate request which means there are several `GenericMessage` events for each asset, all of them will use the same `messageId`, this actually replaces `correlationId` from regular asset events. It will be the same for different updates, for example *like* events, they will all contain `messageId` of references message. 20 | 21 | ### Id collisions 22 | Clients need to take case of message id collisions. It is possible, that some malicious client will generate events with the same id in order to override other messages. Every time `GenericMessage` is received, client need to check if it already has a message with the same id and make sure that this is a valid update. If received event is not valid update (for example sender doesn't match to original message author in text messages), then clients is allowed to drop the message or use different id for it. Using different id is preferred to handle unintended collisions or to expose buggy sender behaviour. 23 | 24 | ## Message Content 25 | Actual message content is included as `oneof` field in `GenericMessage`, this way we can later add more message types in backward compatible manner. 26 | 27 | ### Availability 28 | A user sends a generic message of type `Availability` if he wants to change his personal availability. The availability can be of four types: `None`, `Available`, `Busy`, and `Away`. 29 | 30 | ### Text 31 | Regular text message content, optionally including a list of mentioned users. 32 | 33 | #### Mention 34 | Describes user mentioned in text message. Contains `user_id`, `start` and `end` offsets of the mention string in UTF16 characters. The offset is used to highlight mention text inside the message. `user_id` is optional because to keep it backwards compatible when mentioning more than one user e.g. @everyone or @some_team. 35 | 36 | ### Knock 37 | 38 | ### LastRead 39 | Internal message, sent on self conversation to notify other clients (belonging to the same user) about messages being read in some conversation. 40 | 41 | ### Cleared 42 | Internal message, sent on self conversation to notify other clients about conversation being cleared. 43 | 44 | ### MessageHide 45 | Internal message, sent on self conversation to notify other clients about message being locally deleted. 46 | 47 | ### MessageDelete 48 | Message sent to recall previously sent message, can be only sent by original author of deleted message. 49 | 50 | ### MessageEdit 51 | If the content of a previously sent message should be edited, a generic message of type `MessageEdit` has to be sent. 52 | It should reference the new content (for now only type `Text` can be edited) as well as the nonce of the message it is replacing. If an edit message is received which is referencing a non existent nonce it should be discarded. 53 | 54 | ### Confirmation 55 | If the reception of a previously sent message should be confirmed, a generic message of type `Confirmation` has to be sent. It should reference the message to be confirmed. Currently the confirmation comes in two flavours: `Read` and `Delivered`. 56 | 57 | ### Location 58 | Location sharing message, contains GPS coordinates (latitude and longitude) and optional location name string. 59 | 60 | ### Reaction 61 | Expresses a reaction to a previously received message. The reaction itself can be any string but should be an emoji. If there are multiple reactions from one user to the same message, only the most recent one should be kept. In order to remove/clear a previous reaction, the empty string should be sent. 62 | 63 | ### ImageAsset 64 | Contains metadata for single image asset version, most fields correspond to metadata sent on regular assets endpoint. 65 | There are three special fields: 66 | 67 | - `otr_key` - optional symmetric encryption key. If asset message includes this key, then asset stored on backend is encrypted, and clients can use this key to decrypt original image data. 68 | - `sha256` - hash of encrypted asset ciphertext. Should be provided for encrypted messages, clients should check it before trying to decrypt an asset. 69 | 70 | Asset encryption should follow similar procedure as symmetric encryption in native push notifications. 71 | Encryption with standard AES256 in CBC mode with PKCS#5/7 padding and the initialization vector (IV) prepended to the ciphertext. 72 | SHA256 is computed from cyphertext, receiving client validates it before decrypting an asset. 73 | 74 | ### Asset 75 | Metadata for generic file uploads. Intended to supersede ImageAsset at a later point. For encryption and related fields, see ImageAsset. 76 | 77 | This message can be received in up to 3 parts which then can be merged together to build a complete asset record. 78 | 79 | - Upload is starting: the field `original` is set with basic info about the file being uploaded. 80 | - Preview has been uploaded: the field `preview` is set with basic info about the preview as well as the encryption fields. This step is optional. 81 | - One of two messages arrive next: 82 | + File upload is cancelled or has failed, in which case the `status.not_uploaded` field is set with the appropriate value. 83 | + File upload has completed successfully. The `status.uploaded` field is set with encryption info provided. 84 | 85 | ### External 86 | This message content is used if original message results in large payload, that would not be accepted by backend. 87 | Regular messages are encrypted multiple times (per recipient) and in case of multiple participants even quite small 88 | message can generate huge payload. 89 | In that case we want to encrypt original message with symmetric encryption and only send a key to all participants. 90 | 91 | Clients use fallowing procedure when sending a message: 92 | 93 | - generate original `GenericMessage` (`OM`) 94 | - estimate payload size - client could run regular encryption step and check the size of encrypted data, or could estimate the size based on participants count (make sure to recheck if new participant is added after `ClientMismatch` error) 95 | - if payload is smaller than 256KB then `OM` can be sent directly 96 | - if payload is too big: 97 | - encrypt `OM` using symmetric encryption (the same way as for assets) 98 | - create `External` message with AES key and sha of encrypted data 99 | - send message with `External` content and encrypted `OM` attached (`data` field in json) 100 | 101 | ## Forward compatibility 102 | Messages sent through OTR can be decrypted only once, so it's important not to loose any info, even when receiving a message that can not be fully decoded (when using older app version). It would be advisable to save original `GenericMessage` data and decode it again after app update. This should be done at least when decoded message seems to have no `content`, this will happen when new content type is added, in that case old app will think that the message is empty. 103 | -------------------------------------------------------------------------------- /android/build.sbt: -------------------------------------------------------------------------------- 1 | import protocbridge.Target 2 | 3 | name := "generic-message-proto" 4 | organization := "com.wire" 5 | 6 | version := "1.36.0" 7 | 8 | crossPaths := false 9 | scalaVersion := "2.11.12" 10 | 11 | licenses += ("GPL-3.0", url("https://opensource.org/licenses/GPL-3.0")) 12 | ThisBuild / versionScheme := Some("semver-spec") 13 | libraryDependencies ++= Seq( 14 | "com.google.protobuf" % "protobuf-javalite" % "3.19.1" 15 | ) 16 | 17 | Compile / PB.protoSources := Seq(baseDirectory.value.getParentFile / "proto") 18 | Compile / PB.targets := Seq( 19 | Target(PB.gens.java, (Compile / sourceManaged).value, Seq("lite")) 20 | ) 21 | // Prevents the plugin from adding libraryDependencies to your project 22 | PB.additionalDependencies := Nil 23 | PB.deleteTargetDirectory := false 24 | 25 | homepage := Some(url("https://github.com/wireapp/generic-message-proto")) 26 | 27 | // based on http://caryrobbins.com/dev/sbt-publishing/ 28 | publishMavenStyle := true 29 | pomIncludeRepository := { _ => false } 30 | publishTo := { 31 | val nexus = "https://oss.sonatype.org/" 32 | if (isSnapshot.value) 33 | Some("snapshots" at nexus + "content/repositories/snapshots") 34 | else 35 | Some("releases" at nexus + "service/local/staging/deploy/maven2") 36 | } 37 | 38 | credentials += Credentials(Path.userHome / ".sbt" / ".credentials") 39 | 40 | scmInfo := Some( 41 | ScmInfo( 42 | url("https://github.com/wireapp/generic-message-proto"), 43 | "scm:git:git@github.com:wireapp/generic-message-proto.git" 44 | ) 45 | ) 46 | 47 | developers := List( 48 | Developer("makingthematrix", "Maciej Gorywoda", "maciej.gorywoda@wire.com", url("https://github.com/makingthematrix")) 49 | ) 50 | 51 | resolvers ++= Seq( 52 | Resolver.sonatypeRepo("releases"), 53 | Resolver.sonatypeRepo("public"), 54 | Resolver.mavenLocal 55 | ) 56 | 57 | publishConfiguration := publishConfiguration.value.withOverwrite(true) 58 | publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true) 59 | publishM2Configuration := publishM2Configuration.value.withOverwrite(true) 60 | 61 | exportJars := true 62 | Compile / packageBin / packageOptions += 63 | Package.ManifestAttributes("Automatic-Module-Name" -> "generic-message-proto") 64 | 65 | usePgpKeyHex(sys.env.getOrElse("PGP_KEY_HEX", "")) -------------------------------------------------------------------------------- /android/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /android/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.12") 2 | addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7") 3 | addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.1.1") 4 | 5 | addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.0") 6 | 7 | libraryDependencies ++= Seq( 8 | "com.thesamet.scalapb" %% "compilerplugin" % "0.10.10" 9 | ) -------------------------------------------------------------------------------- /android/publishing.md: -------------------------------------------------------------------------------- 1 | 1. Clone the project 2 | 2. Change to android/ directory in the project 3 | 3. Run sbt compile 4 | 4. Run sbt package 5 | * You should have the .jar file under android/target now. 6 | 5. sbt publishM2 publishes the .jar file to your local maven repo. 7 | * Use this jar to verify that new version runs without problems. 8 | 6. sbt publish publishes to Sonatype. 9 | * This command asks for Sonatype credentials. 10 | -------------------------------------------------------------------------------- /ios/descriptor.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // The messages in this file describe the definitions found in .proto files. 36 | // A valid .proto file can be translated directly to a FileDescriptorProto 37 | // without any other information (e.g. without reading its imports). 38 | 39 | 40 | 41 | package google.protobuf; 42 | option java_package = "com.google.protobuf"; 43 | option java_outer_classname = "DescriptorProtos"; 44 | 45 | // descriptor.proto must be optimized for speed because reflection-based 46 | // algorithms don't work during bootstrapping. 47 | option optimize_for = SPEED; 48 | 49 | // The protocol compiler can output a FileDescriptorSet containing the .proto 50 | // files it parses. 51 | message FileDescriptorSet { 52 | repeated FileDescriptorProto file = 1; 53 | } 54 | 55 | // Describes a complete .proto file. 56 | message FileDescriptorProto { 57 | optional string name = 1; // file name, relative to root of source tree 58 | optional string package = 2; // e.g. "foo", "foo.bar", etc. 59 | 60 | // Names of files imported by this file. 61 | repeated string dependency = 3; 62 | // Indexes of the public imported files in the dependency list above. 63 | repeated int32 public_dependency = 10; 64 | // Indexes of the weak imported files in the dependency list. 65 | // For Google-internal migration only. Do not use. 66 | repeated int32 weak_dependency = 11; 67 | 68 | // All top-level definitions in this file. 69 | repeated DescriptorProto message_type = 4; 70 | repeated EnumDescriptorProto enum_type = 5; 71 | repeated ServiceDescriptorProto service = 6; 72 | repeated FieldDescriptorProto extension = 7; 73 | 74 | optional FileOptions options = 8; 75 | 76 | // This field contains optional information about the original source code. 77 | // You may safely remove this entire field whithout harming runtime 78 | // functionality of the descriptors -- the information is needed only by 79 | // development tools. 80 | optional SourceCodeInfo source_code_info = 9; 81 | } 82 | 83 | // Describes a message type. 84 | message DescriptorProto { 85 | optional string name = 1; 86 | 87 | repeated FieldDescriptorProto field = 2; 88 | repeated FieldDescriptorProto extension = 6; 89 | 90 | repeated DescriptorProto nested_type = 3; 91 | repeated EnumDescriptorProto enum_type = 4; 92 | 93 | message ExtensionRange { 94 | optional int32 start = 1; 95 | optional int32 end = 2; 96 | } 97 | repeated ExtensionRange extension_range = 5; 98 | 99 | repeated OneofDescriptorProto oneof_decl = 8; 100 | 101 | optional MessageOptions options = 7; 102 | } 103 | 104 | // Describes a field within a message. 105 | message FieldDescriptorProto { 106 | enum Type { 107 | // 0 is reserved for errors. 108 | // Order is weird for historical reasons. 109 | TYPE_DOUBLE = 1; 110 | TYPE_FLOAT = 2; 111 | // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if 112 | // negative values are likely. 113 | TYPE_INT64 = 3; 114 | TYPE_UINT64 = 4; 115 | // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if 116 | // negative values are likely. 117 | TYPE_INT32 = 5; 118 | TYPE_FIXED64 = 6; 119 | TYPE_FIXED32 = 7; 120 | TYPE_BOOL = 8; 121 | TYPE_STRING = 9; 122 | TYPE_GROUP = 10; // Tag-delimited aggregate. 123 | TYPE_MESSAGE = 11; // Length-delimited aggregate. 124 | 125 | // New in version 2. 126 | TYPE_BYTES = 12; 127 | TYPE_UINT32 = 13; 128 | TYPE_ENUM = 14; 129 | TYPE_SFIXED32 = 15; 130 | TYPE_SFIXED64 = 16; 131 | TYPE_SINT32 = 17; // Uses ZigZag encoding. 132 | TYPE_SINT64 = 18; // Uses ZigZag encoding. 133 | }; 134 | 135 | enum Label { 136 | // 0 is reserved for errors 137 | LABEL_OPTIONAL = 1; 138 | LABEL_REQUIRED = 2; 139 | LABEL_REPEATED = 3; 140 | // TODO(sanjay): Should we add LABEL_MAP? 141 | }; 142 | 143 | optional string name = 1; 144 | optional int32 number = 3; 145 | optional Label label = 4; 146 | 147 | // If type_name is set, this need not be set. If both this and type_name 148 | // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. 149 | optional Type type = 5; 150 | 151 | // For message and enum types, this is the name of the type. If the name 152 | // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping 153 | // rules are used to find the type (i.e. first the nested types within this 154 | // message are searched, then within the parent, on up to the root 155 | // namespace). 156 | optional string type_name = 6; 157 | 158 | // For extensions, this is the name of the type being extended. It is 159 | // resolved in the same manner as type_name. 160 | optional string extendee = 2; 161 | 162 | // For numeric types, contains the original text representation of the value. 163 | // For booleans, "true" or "false". 164 | // For strings, contains the default text contents (not escaped in any way). 165 | // For bytes, contains the C escaped value. All bytes >= 128 are escaped. 166 | // TODO(kenton): Base-64 encode? 167 | optional string default_value = 7; 168 | 169 | // If set, gives the index of a oneof in the containing type's oneof_decl 170 | // list. This field is a member of that oneof. Extensions of a oneof should 171 | // not set this since the oneof to which they belong will be inferred based 172 | // on the extension range containing the extension's field number. 173 | optional int32 oneof_index = 9; 174 | 175 | optional FieldOptions options = 8; 176 | } 177 | 178 | // Describes a oneof. 179 | message OneofDescriptorProto { 180 | optional string name = 1; 181 | } 182 | 183 | // Describes an enum type. 184 | message EnumDescriptorProto { 185 | optional string name = 1; 186 | 187 | repeated EnumValueDescriptorProto value = 2; 188 | 189 | optional EnumOptions options = 3; 190 | } 191 | 192 | // Describes a value within an enum. 193 | message EnumValueDescriptorProto { 194 | optional string name = 1; 195 | optional int32 number = 2; 196 | 197 | optional EnumValueOptions options = 3; 198 | } 199 | 200 | // Describes a service. 201 | message ServiceDescriptorProto { 202 | optional string name = 1; 203 | repeated MethodDescriptorProto method = 2; 204 | 205 | optional ServiceOptions options = 3; 206 | } 207 | 208 | // Describes a method of a service. 209 | message MethodDescriptorProto { 210 | optional string name = 1; 211 | 212 | // Input and output type names. These are resolved in the same way as 213 | // FieldDescriptorProto.type_name, but must refer to a message type. 214 | optional string input_type = 2; 215 | optional string output_type = 3; 216 | 217 | optional MethodOptions options = 4; 218 | } 219 | 220 | 221 | // =================================================================== 222 | // Options 223 | 224 | // Each of the definitions above may have "options" attached. These are 225 | // just annotations which may cause code to be generated slightly differently 226 | // or may contain hints for code that manipulates protocol messages. 227 | // 228 | // Clients may define custom options as extensions of the *Options messages. 229 | // These extensions may not yet be known at parsing time, so the parser cannot 230 | // store the values in them. Instead it stores them in a field in the *Options 231 | // message called uninterpreted_option. This field must have the same name 232 | // across all *Options messages. We then use this field to populate the 233 | // extensions when we build a descriptor, at which point all protos have been 234 | // parsed and so all extensions are known. 235 | // 236 | // Extension numbers for custom options may be chosen as follows: 237 | // * For options which will only be used within a single application or 238 | // organization, or for experimental options, use field numbers 50000 239 | // through 99999. It is up to you to ensure that you do not use the 240 | // same number for multiple options. 241 | // * For options which will be published and used publicly by multiple 242 | // independent entities, e-mail protobuf-global-extension-registry@google.com 243 | // to reserve extension numbers. Simply provide your project name (e.g. 244 | // Object-C plugin) and your porject website (if available) -- there's no need 245 | // to explain how you intend to use them. Usually you only need one extension 246 | // number. You can declare multiple options with only one extension number by 247 | // putting them in a sub-message. See the Custom Options section of the docs 248 | // for examples: 249 | // https://developers.google.com/protocol-buffers/docs/proto#options 250 | // If this turns out to be popular, a web service will be set up 251 | // to automatically assign option numbers. 252 | 253 | 254 | message FileOptions { 255 | 256 | // Sets the Java package where classes generated from this .proto will be 257 | // placed. By default, the proto package is used, but this is often 258 | // inappropriate because proto packages do not normally start with backwards 259 | // domain names. 260 | optional string java_package = 1; 261 | 262 | 263 | // If set, all the classes from the .proto file are wrapped in a single 264 | // outer class with the given name. This applies to both Proto1 265 | // (equivalent to the old "--one_java_file" option) and Proto2 (where 266 | // a .proto always translates to a single class, but you may want to 267 | // explicitly choose the class name). 268 | optional string java_outer_classname = 8; 269 | 270 | // If set true, then the Java code generator will generate a separate .java 271 | // file for each top-level message, enum, and service defined in the .proto 272 | // file. Thus, these types will *not* be nested inside the outer class 273 | // named by java_outer_classname. However, the outer class will still be 274 | // generated to contain the file's getDescriptor() method as well as any 275 | // top-level extensions defined in the file. 276 | optional bool java_multiple_files = 10 [default=false]; 277 | 278 | // If set true, then the Java code generator will generate equals() and 279 | // hashCode() methods for all messages defined in the .proto file. 280 | // - In the full runtime, this is purely a speed optimization, as the 281 | // AbstractMessage base class includes reflection-based implementations of 282 | // these methods. 283 | //- In the lite runtime, setting this option changes the semantics of 284 | // equals() and hashCode() to more closely match those of the full runtime; 285 | // the generated methods compute their results based on field values rather 286 | // than object identity. (Implementations should not assume that hashcodes 287 | // will be consistent across runtimes or versions of the protocol compiler.) 288 | optional bool java_generate_equals_and_hash = 20 [default=false]; 289 | 290 | // If set true, then the Java2 code generator will generate code that 291 | // throws an exception whenever an attempt is made to assign a non-UTF-8 292 | // byte sequence to a string field. 293 | // Message reflection will do the same. 294 | // However, an extension field still accepts non-UTF-8 byte sequences. 295 | // This option has no effect on when used with the lite runtime. 296 | optional bool java_string_check_utf8 = 27 [default=false]; 297 | 298 | 299 | // Generated classes can be optimized for speed or code size. 300 | enum OptimizeMode { 301 | SPEED = 1; // Generate complete code for parsing, serialization, 302 | // etc. 303 | CODE_SIZE = 2; // Use ReflectionOps to implement these methods. 304 | LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. 305 | } 306 | optional OptimizeMode optimize_for = 9 [default=SPEED]; 307 | 308 | // Sets the Go package where structs generated from this .proto will be 309 | // placed. There is no default. 310 | optional string go_package = 11; 311 | 312 | 313 | 314 | // Should generic services be generated in each language? "Generic" services 315 | // are not specific to any particular RPC system. They are generated by the 316 | // main code generators in each language (without additional plugins). 317 | // Generic services were the only kind of service generation supported by 318 | // early versions of proto2. 319 | // 320 | // Generic services are now considered deprecated in favor of using plugins 321 | // that generate code specific to your particular RPC system. Therefore, 322 | // these default to false. Old code which depends on generic services should 323 | // explicitly set them to true. 324 | optional bool cc_generic_services = 16 [default=false]; 325 | optional bool java_generic_services = 17 [default=false]; 326 | optional bool py_generic_services = 18 [default=false]; 327 | 328 | // Is this file deprecated? 329 | // Depending on the target platform, this can emit Deprecated annotations 330 | // for everything in the file, or it will be completely ignored; in the very 331 | // least, this is a formalization for deprecating files. 332 | optional bool deprecated = 23 [default=false]; 333 | 334 | 335 | // The parser stores options it doesn't recognize here. See above. 336 | repeated UninterpretedOption uninterpreted_option = 999; 337 | 338 | // Clients can define custom options in extensions of this message. See above. 339 | extensions 1000 to max; 340 | } 341 | 342 | message MessageOptions { 343 | // Set true to use the old proto1 MessageSet wire format for extensions. 344 | // This is provided for backwards-compatibility with the MessageSet wire 345 | // format. You should not use this for any other reason: It's less 346 | // efficient, has fewer features, and is more complicated. 347 | // 348 | // The message must be defined exactly as follows: 349 | // message Foo { 350 | // option message_set_wire_format = true; 351 | // extensions 4 to max; 352 | // } 353 | // Note that the message cannot have any defined fields; MessageSets only 354 | // have extensions. 355 | // 356 | // All extensions of your type must be singular messages; e.g. they cannot 357 | // be int32s, enums, or repeated messages. 358 | // 359 | // Because this is an option, the above two restrictions are not enforced by 360 | // the protocol compiler. 361 | optional bool message_set_wire_format = 1 [default=false]; 362 | 363 | // Disables the generation of the standard "descriptor()" accessor, which can 364 | // conflict with a field of the same name. This is meant to make migration 365 | // from proto1 easier; new code should avoid fields named "descriptor". 366 | optional bool no_standard_descriptor_accessor = 2 [default=false]; 367 | 368 | // Is this message deprecated? 369 | // Depending on the target platform, this can emit Deprecated annotations 370 | // for the message, or it will be completely ignored; in the very least, 371 | // this is a formalization for deprecating messages. 372 | optional bool deprecated = 3 [default=false]; 373 | 374 | // The parser stores options it doesn't recognize here. See above. 375 | repeated UninterpretedOption uninterpreted_option = 999; 376 | 377 | // Clients can define custom options in extensions of this message. See above. 378 | extensions 1000 to max; 379 | } 380 | 381 | message FieldOptions { 382 | // The ctype option instructs the C++ code generator to use a different 383 | // representation of the field than it normally would. See the specific 384 | // options below. This option is not yet implemented in the open source 385 | // release -- sorry, we'll try to include it in a future version! 386 | optional CType ctype = 1 [default = STRING]; 387 | enum CType { 388 | // Default mode. 389 | STRING = 0; 390 | 391 | CORD = 1; 392 | 393 | STRING_PIECE = 2; 394 | } 395 | // The packed option can be enabled for repeated primitive fields to enable 396 | // a more efficient representation on the wire. Rather than repeatedly 397 | // writing the tag and type for each element, the entire array is encoded as 398 | // a single length-delimited blob. 399 | optional bool packed = 2; 400 | 401 | 402 | 403 | // Should this field be parsed lazily? Lazy applies only to message-type 404 | // fields. It means that when the outer message is initially parsed, the 405 | // inner message's contents will not be parsed but instead stored in encoded 406 | // form. The inner message will actually be parsed when it is first accessed. 407 | // 408 | // This is only a hint. Implementations are free to choose whether to use 409 | // eager or lazy parsing regardless of the value of this option. However, 410 | // setting this option true suggests that the protocol author believes that 411 | // using lazy parsing on this field is worth the additional bookkeeping 412 | // overhead typically needed to implement it. 413 | // 414 | // This option does not affect the public interface of any generated code; 415 | // all method signatures remain the same. Furthermore, thread-safety of the 416 | // interface is not affected by this option; const methods remain safe to 417 | // call from multiple threads concurrently, while non-const methods continue 418 | // to require exclusive access. 419 | // 420 | // 421 | // Note that implementations may choose not to check required fields within 422 | // a lazy sub-message. That is, calling IsInitialized() on the outher message 423 | // may return true even if the inner message has missing required fields. 424 | // This is necessary because otherwise the inner message would have to be 425 | // parsed in order to perform the check, defeating the purpose of lazy 426 | // parsing. An implementation which chooses not to check required fields 427 | // must be consistent about it. That is, for any particular sub-message, the 428 | // implementation must either *always* check its required fields, or *never* 429 | // check its required fields, regardless of whether or not the message has 430 | // been parsed. 431 | optional bool lazy = 5 [default=false]; 432 | 433 | // Is this field deprecated? 434 | // Depending on the target platform, this can emit Deprecated annotations 435 | // for accessors, or it will be completely ignored; in the very least, this 436 | // is a formalization for deprecating fields. 437 | optional bool deprecated = 3 [default=false]; 438 | 439 | // EXPERIMENTAL. DO NOT USE. 440 | // For "map" fields, the name of the field in the enclosed type that 441 | // is the key for this map. For example, suppose we have: 442 | // message Item { 443 | // required string name = 1; 444 | // required string value = 2; 445 | // } 446 | // message Config { 447 | // repeated Item items = 1 [experimental_map_key="name"]; 448 | // } 449 | // In this situation, the map key for Item will be set to "name". 450 | // TODO: Fully-implement this, then remove the "experimental_" prefix. 451 | optional string experimental_map_key = 9; 452 | 453 | // For Google-internal migration only. Do not use. 454 | optional bool weak = 10 [default=false]; 455 | 456 | 457 | 458 | // The parser stores options it doesn't recognize here. See above. 459 | repeated UninterpretedOption uninterpreted_option = 999; 460 | 461 | // Clients can define custom options in extensions of this message. See above. 462 | extensions 1000 to max; 463 | } 464 | 465 | message EnumOptions { 466 | 467 | // Set this option to true to allow mapping different tag names to the same 468 | // value. 469 | optional bool allow_alias = 2; 470 | 471 | // Is this enum deprecated? 472 | // Depending on the target platform, this can emit Deprecated annotations 473 | // for the enum, or it will be completely ignored; in the very least, this 474 | // is a formalization for deprecating enums. 475 | optional bool deprecated = 3 [default=false]; 476 | 477 | // The parser stores options it doesn't recognize here. See above. 478 | repeated UninterpretedOption uninterpreted_option = 999; 479 | 480 | // Clients can define custom options in extensions of this message. See above. 481 | extensions 1000 to max; 482 | } 483 | 484 | message EnumValueOptions { 485 | // Is this enum value deprecated? 486 | // Depending on the target platform, this can emit Deprecated annotations 487 | // for the enum value, or it will be completely ignored; in the very least, 488 | // this is a formalization for deprecating enum values. 489 | optional bool deprecated = 1 [default=false]; 490 | 491 | // The parser stores options it doesn't recognize here. See above. 492 | repeated UninterpretedOption uninterpreted_option = 999; 493 | 494 | // Clients can define custom options in extensions of this message. See above. 495 | extensions 1000 to max; 496 | } 497 | 498 | message ServiceOptions { 499 | 500 | // Note: Field numbers 1 through 32 are reserved for Google's internal RPC 501 | // framework. We apologize for hoarding these numbers to ourselves, but 502 | // we were already using them long before we decided to release Protocol 503 | // Buffers. 504 | 505 | // Is this service deprecated? 506 | // Depending on the target platform, this can emit Deprecated annotations 507 | // for the service, or it will be completely ignored; in the very least, 508 | // this is a formalization for deprecating services. 509 | optional bool deprecated = 33 [default=false]; 510 | 511 | // The parser stores options it doesn't recognize here. See above. 512 | repeated UninterpretedOption uninterpreted_option = 999; 513 | 514 | // Clients can define custom options in extensions of this message. See above. 515 | extensions 1000 to max; 516 | } 517 | 518 | message MethodOptions { 519 | 520 | // Note: Field numbers 1 through 32 are reserved for Google's internal RPC 521 | // framework. We apologize for hoarding these numbers to ourselves, but 522 | // we were already using them long before we decided to release Protocol 523 | // Buffers. 524 | 525 | // Is this method deprecated? 526 | // Depending on the target platform, this can emit Deprecated annotations 527 | // for the method, or it will be completely ignored; in the very least, 528 | // this is a formalization for deprecating methods. 529 | optional bool deprecated = 33 [default=false]; 530 | 531 | // The parser stores options it doesn't recognize here. See above. 532 | repeated UninterpretedOption uninterpreted_option = 999; 533 | 534 | // Clients can define custom options in extensions of this message. See above. 535 | extensions 1000 to max; 536 | } 537 | 538 | 539 | // A message representing a option the parser does not recognize. This only 540 | // appears in options protos created by the compiler::Parser class. 541 | // DescriptorPool resolves these when building Descriptor objects. Therefore, 542 | // options protos in descriptor objects (e.g. returned by Descriptor::options(), 543 | // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions 544 | // in them. 545 | message UninterpretedOption { 546 | // The name of the uninterpreted option. Each string represents a segment in 547 | // a dot-separated name. is_extension is true iff a segment represents an 548 | // extension (denoted with parentheses in options specs in .proto files). 549 | // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents 550 | // "foo.(bar.baz).qux". 551 | message NamePart { 552 | required string name_part = 1; 553 | required bool is_extension = 2; 554 | } 555 | repeated NamePart name = 2; 556 | 557 | // The value of the uninterpreted option, in whatever type the tokenizer 558 | // identified it as during parsing. Exactly one of these should be set. 559 | optional string identifier_value = 3; 560 | optional uint64 positive_int_value = 4; 561 | optional int64 negative_int_value = 5; 562 | optional double double_value = 6; 563 | optional bytes string_value = 7; 564 | optional string aggregate_value = 8; 565 | } 566 | 567 | // =================================================================== 568 | // Optional source code info 569 | 570 | // Encapsulates information about the original source file from which a 571 | // FileDescriptorProto was generated. 572 | message SourceCodeInfo { 573 | // A Location identifies a piece of source code in a .proto file which 574 | // corresponds to a particular definition. This information is intended 575 | // to be useful to IDEs, code indexers, documentation generators, and similar 576 | // tools. 577 | // 578 | // For example, say we have a file like: 579 | // message Foo { 580 | // optional string foo = 1; 581 | // } 582 | // Let's look at just the field definition: 583 | // optional string foo = 1; 584 | // ^ ^^ ^^ ^ ^^^ 585 | // a bc de f ghi 586 | // We have the following locations: 587 | // span path represents 588 | // [a,i) [ 4, 0, 2, 0 ] The whole field definition. 589 | // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). 590 | // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). 591 | // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). 592 | // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). 593 | // 594 | // Notes: 595 | // - A location may refer to a repeated field itself (i.e. not to any 596 | // particular index within it). This is used whenever a set of elements are 597 | // logically enclosed in a single code segment. For example, an entire 598 | // extend block (possibly containing multiple extension definitions) will 599 | // have an outer location whose path refers to the "extensions" repeated 600 | // field without an index. 601 | // - Multiple locations may have the same path. This happens when a single 602 | // logical declaration is spread out across multiple places. The most 603 | // obvious example is the "extend" block again -- there may be multiple 604 | // extend blocks in the same scope, each of which will have the same path. 605 | // - A location's span is not always a subset of its parent's span. For 606 | // example, the "extendee" of an extension declaration appears at the 607 | // beginning of the "extend" block and is shared by all extensions within 608 | // the block. 609 | // - Just because a location's span is a subset of some other location's span 610 | // does not mean that it is a descendent. For example, a "group" defines 611 | // both a type and a field in a single declaration. Thus, the locations 612 | // corresponding to the type and field and their components will overlap. 613 | // - Code which tries to interpret locations should probably be designed to 614 | // ignore those that it doesn't understand, as more types of locations could 615 | // be recorded in the future. 616 | repeated Location location = 1; 617 | message Location { 618 | // Identifies which part of the FileDescriptorProto was defined at this 619 | // location. 620 | // 621 | // Each element is a field number or an index. They form a path from 622 | // the root FileDescriptorProto to the place where the definition. For 623 | // example, this path: 624 | // [ 4, 3, 2, 7, 1 ] 625 | // refers to: 626 | // file.message_type(3) // 4, 3 627 | // .field(7) // 2, 7 628 | // .name() // 1 629 | // This is because FileDescriptorProto.message_type has field number 4: 630 | // repeated DescriptorProto message_type = 4; 631 | // and DescriptorProto.field has field number 2: 632 | // repeated FieldDescriptorProto field = 2; 633 | // and FieldDescriptorProto.name has field number 1: 634 | // optional string name = 1; 635 | // 636 | // Thus, the above path gives the location of a field name. If we removed 637 | // the last element: 638 | // [ 4, 3, 2, 7 ] 639 | // this path refers to the whole field declaration (from the beginning 640 | // of the label to the terminating semicolon). 641 | repeated int32 path = 1 [packed=true]; 642 | 643 | // Always has exactly three or four elements: start line, start column, 644 | // end line (optional, otherwise assumed same as start line), end column. 645 | // These are packed into a single field for efficiency. Note that line 646 | // and column numbers are zero-based -- typically you will want to add 647 | // 1 to each before displaying to a user. 648 | repeated int32 span = 2 [packed=true]; 649 | 650 | // If this SourceCodeInfo represents a complete declaration, these are any 651 | // comments appearing before and after the declaration which appear to be 652 | // attached to the declaration. 653 | // 654 | // A series of line comments appearing on consecutive lines, with no other 655 | // tokens appearing on those lines, will be treated as a single comment. 656 | // 657 | // Only the comment content is provided; comment markers (e.g. //) are 658 | // stripped out. For block comments, leading whitespace and an asterisk 659 | // will be stripped from the beginning of each line other than the first. 660 | // Newlines are included in the output. 661 | // 662 | // Examples: 663 | // 664 | // optional int32 foo = 1; // Comment attached to foo. 665 | // // Comment attached to bar. 666 | // optional int32 bar = 2; 667 | // 668 | // optional string baz = 3; 669 | // // Comment attached to baz. 670 | // // Another line attached to baz. 671 | // 672 | // // Comment attached to qux. 673 | // // 674 | // // Another line attached to qux. 675 | // optional double qux = 4; 676 | // 677 | // optional string corge = 5; 678 | // /* Block comment attached 679 | // * to corge. Leading asterisks 680 | // * will be removed. */ 681 | // /* Block comment attached to 682 | // * grault. */ 683 | // optional int32 grault = 6; 684 | optional string leading_comments = 3; 685 | optional string trailing_comments = 4; 686 | } 687 | } 688 | -------------------------------------------------------------------------------- /ios/ios.proto: -------------------------------------------------------------------------------- 1 | import 'objectivec-descriptor.proto'; 2 | option (google.protobuf.objectivec_file_options).class_prefix = "ZM"; 3 | option (google.protobuf.objectivec_file_options).relax_camel_case = true; 4 | -------------------------------------------------------------------------------- /ios/objectivec-descriptor.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. 3 | // http://code.google.com/p/protobuf/ 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | // Author: cyrusn@google.com (Cyrus Najmabadi) 18 | 19 | import "descriptor.proto"; 20 | 21 | package google.protobuf; 22 | 23 | message ObjectiveCFileOptions { 24 | // Sets the ObjectiveC package where classes generated from this .proto 25 | // will be placed. This is typically used since Objective C libraries output 26 | // all their headers into a single directory. i.e. Foundation\* 27 | // AddressBook\* UIKit\* etc. etc. 28 | optional string package = 1; 29 | 30 | // The string to be prefixed in front of all classes in order to make them 31 | // 'cocoa-y'. i.e. 'NS/AB/CF/PB' for the 32 | // NextStep/AddressBook/CoreFoundation/ProtocolBuffer libraries respectively. 33 | // This will commonly be the capitalized letters from the above defined 34 | // 'objectivec_directory' 35 | optional string class_prefix = 2; 36 | 37 | // Relax the strict camel case that is the default. 38 | // When this option is set, only the first letter after an underscore is 39 | // forced to uppercase. 40 | optional bool relax_camel_case = 3; 41 | } 42 | 43 | extend google.protobuf.FileOptions { 44 | // The extension #1002 has been reserved for us and is registered with 45 | // Google as being 'in use'. 46 | optional ObjectiveCFileOptions objectivec_file_options = 1002; 47 | } 48 | -------------------------------------------------------------------------------- /ios/swift-descriptor.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers for Swift 2 | // 3 | // Copyright 2014 AlexeyXo. 4 | // Copyright 2008 Google Inc. 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | import "descriptor.proto"; 19 | 20 | package google.protobuf; 21 | 22 | enum AccessControl { 23 | InternalEntities = 0; 24 | PublicEntities = 1; 25 | } 26 | message SwiftFileOptions { 27 | 28 | optional string class_prefix = 1; 29 | optional AccessControl entities_access_control = 2 [default = InternalEntities]; 30 | optional bool compile_for_framework = 3 [default = true]; 31 | } 32 | 33 | extend google.protobuf.FileOptions { 34 | optional SwiftFileOptions swift_file_options = 5092014; 35 | } 36 | 37 | option (.google.protobuf.swift_file_options).compile_for_framework = false; 38 | option (.google.protobuf.swift_file_options).entities_access_control = PublicEntities; 39 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@wireapp/protocol-messaging", 3 | "license": "GPL-3.0", 4 | "description": "Protocol definition for generic messages.", 5 | "repository": "https://github.com/wireapp/generic-message-proto.git", 6 | "files": [ 7 | "proto/*.proto", 8 | "web/*.d.ts", 9 | "web/*.js", 10 | "!web/compile.js" 11 | ], 12 | "main": "web/messages.js", 13 | "dependencies": { 14 | "long": "5.2.0", 15 | "protobufjs": "7.2.5", 16 | "protobufjs-cli": "1.1.2", 17 | "typescript": "4.8.4" 18 | }, 19 | "devDependencies": { 20 | "@types/long": "5.0.0", 21 | "@types/node": "16.18.0", 22 | "typescript": "4.8.4" 23 | }, 24 | "scripts": { 25 | "dist": "node web/compile.js", 26 | "postversion": "git push origin master --tags && npm publish", 27 | "preversion": "git checkout master && git pull && yarn && yarn dist && yarn test", 28 | "test": "tsc --noEmit" 29 | }, 30 | "version": "1.52.0" 31 | } 32 | -------------------------------------------------------------------------------- /proto/messages.proto: -------------------------------------------------------------------------------- 1 | /* 2 | * Wire 3 | * Copyright (C) 2021 Wire Swiss GmbH 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see http://www.gnu.org/licenses/. 17 | * 18 | */ 19 | 20 | syntax = "proto2"; 21 | 22 | option java_package = "com.waz.model"; 23 | option optimize_for = LITE_RUNTIME; 24 | 25 | message GenericMessage { 26 | required string message_id = 1; // client generated random id, preferably UUID 27 | oneof content { 28 | Text text = 2; 29 | ImageAsset image = 3; // deprecated in favour of Asset 30 | Knock knock = 4; 31 | LastRead lastRead = 6; 32 | Cleared cleared = 7; 33 | External external = 8; 34 | ClientAction clientAction = 9; 35 | Calling calling = 10; 36 | Asset asset = 11; 37 | Multipart multipart = 27; 38 | MessageHide hidden = 12; 39 | Location location = 13; 40 | MessageDelete deleted = 14; 41 | MessageEdit edited = 15; 42 | Confirmation confirmation = 16; 43 | Reaction reaction = 17; 44 | Ephemeral ephemeral = 18; 45 | Availability availability = 19; 46 | Composite composite = 20; 47 | ButtonAction buttonAction = 21; 48 | ButtonActionConfirmation buttonActionConfirmation = 22; 49 | DataTransfer dataTransfer = 23; // client-side synchronization across devices of the same user 50 | InCallEmoji inCallEmoji = 24; 51 | // UnknownStrategy unknownStrategy = 25; -- Defined outside the oneof 52 | // Next field should be 26 ↓ 53 | InCallHandRaise inCallHandRaise = 26; 54 | } 55 | optional UnknownStrategy unknownStrategy = 25 [default = IGNORE]; 56 | 57 | // See internal RFC: "2024-07-18 RFC Improve future-proofing for new OTR message types" 58 | enum UnknownStrategy { 59 | IGNORE = 0; // Ignore the message completely. Trash. Bye 60 | DISCARD_AND_WARN = 1; // Warn the user, but discard the message, as it won't be helpful in the future. 61 | WARN_USER_ALLOW_RETRY = 2; // Warn the user. Client has freedom to store it and retry in the future. 62 | } 63 | } 64 | 65 | message QualifiedUserId { 66 | required string id = 1; 67 | required string domain = 2; 68 | } 69 | 70 | message QualifiedConversationId { 71 | required string id = 1; 72 | required string domain = 2; 73 | } 74 | 75 | message Composite { 76 | repeated Item items = 1; 77 | optional bool expects_read_confirmation = 2 [default = false]; 78 | optional LegalHoldStatus legal_hold_status = 3 [default = UNKNOWN]; 79 | 80 | message Item { 81 | oneof content { 82 | Text text = 1; 83 | Button button = 2; 84 | } 85 | } 86 | } 87 | 88 | message Button { 89 | required string text = 1; 90 | required string id = 2; 91 | } 92 | 93 | message ButtonAction { 94 | required string button_id = 1; 95 | required string reference_message_id = 2; 96 | } 97 | 98 | message ButtonActionConfirmation { 99 | required string reference_message_id = 1; 100 | optional string button_id = 2; // if not present, no button is accepted 101 | } 102 | 103 | message Availability { 104 | enum Type { 105 | NONE = 0; 106 | AVAILABLE = 1; 107 | AWAY = 2; 108 | BUSY = 3; 109 | } 110 | 111 | required Type type = 1; 112 | } 113 | 114 | message Ephemeral { 115 | required int64 expire_after_millis = 1; 116 | oneof content { 117 | Text text = 2; 118 | ImageAsset image = 3; // deprecated in favour of Asset 119 | Knock knock = 4; 120 | Asset asset = 5; 121 | Location location = 6; 122 | } 123 | } 124 | 125 | message Text { 126 | required string content = 1; 127 | // reserved 2; // reserved keyword is not available in older protoc versions 128 | repeated LinkPreview link_preview = 3; 129 | repeated Mention mentions = 4; 130 | optional Quote quote = 5; // if this Text is part of a MessageEdit, this field is ignored 131 | optional bool expects_read_confirmation = 6 [default = false]; // whether the sender is expecting to receive a read confirmation 132 | optional LegalHoldStatus legal_hold_status = 7 [default = UNKNOWN]; // whether this message was sent to legal hold 133 | } 134 | 135 | message Knock { 136 | required bool hot_knock = 1 [default = false]; 137 | optional bool expects_read_confirmation = 2 [default = false]; // whether the sender is expecting to receive a read confirmation 138 | optional LegalHoldStatus legal_hold_status = 3 [default = UNKNOWN]; // whether this message was sent to legal hold 139 | } 140 | 141 | message LinkPreview { 142 | required string url = 1; 143 | required int32 url_offset = 2; // url offset from beginning of text message 144 | 145 | oneof preview { 146 | Article article = 3; // deprecated - use meta_data 147 | } 148 | 149 | optional string permanent_url = 5; 150 | optional string title = 6; 151 | optional string summary = 7; 152 | optional Asset image = 8; 153 | 154 | oneof meta_data { 155 | Tweet tweet = 9; 156 | } 157 | } 158 | 159 | message Tweet { 160 | optional string author = 1; 161 | optional string username = 2; 162 | } 163 | 164 | // deprecated - use the additional fields in LinkPreview 165 | message Article { 166 | required string permanent_url = 1; 167 | optional string title = 2; 168 | optional string summary = 3; 169 | optional Asset image = 4; 170 | } 171 | 172 | message Mention { 173 | required int32 start = 1; // offset from beginning of the message counting in utf16 characters 174 | required int32 length = 2; 175 | oneof mention_type { 176 | // deprecated. Should be set such that old clients always fail when looking 177 | // up the user. Ideally, this should not be a problem, as a non-federation 178 | // aware user should never be part of a federated conversation. 179 | string user_id = 3; 180 | } 181 | // only optional to maintain backwards compatibility. 182 | optional QualifiedUserId qualified_user_id = 4; 183 | } 184 | 185 | message LastRead { 186 | // deprecated. Should be set such that old clients always fail when looking up 187 | // the conversation. 188 | required string conversation_id = 1; 189 | required int64 last_read_timestamp = 2; 190 | // only optional to maintain backwards compatibility 191 | optional QualifiedConversationId qualified_conversation_id = 3; 192 | } 193 | 194 | message Cleared { 195 | // deprecated. Should be set such that old clients always fail when looking up 196 | // the conversation. 197 | required string conversation_id = 1; 198 | required int64 cleared_timestamp = 2; 199 | // only optional to maintain backwards compatibility 200 | optional QualifiedConversationId qualified_conversation_id = 3; 201 | } 202 | 203 | message MessageHide { 204 | // deprecated. Should be set such that old clients always fail when looking up 205 | // the conversation. 206 | required string conversation_id = 1; 207 | required string message_id = 2; 208 | // only optional to maintain backwards compatibility 209 | optional QualifiedConversationId qualified_conversation_id = 3; 210 | } 211 | 212 | message MessageDelete { 213 | required string message_id = 1; 214 | } 215 | 216 | message MessageEdit { 217 | required string replacing_message_id = 1; 218 | oneof content { 219 | Text text = 2; 220 | Composite composite = 3; 221 | } 222 | } 223 | 224 | message Quote { 225 | required string quoted_message_id = 1; 226 | optional bytes quoted_message_sha256 = 2; 227 | } 228 | 229 | message Confirmation { 230 | enum Type { 231 | DELIVERED = 0; 232 | READ = 1; 233 | } 234 | 235 | required Type type = 2; 236 | required string first_message_id = 1; 237 | repeated string more_message_ids = 3; 238 | } 239 | 240 | message Location { 241 | required float longitude = 1; 242 | required float latitude = 2; 243 | optional string name = 3; // location description/name 244 | optional int32 zoom = 4; // google maps zoom level (check maps api documentation) 245 | optional bool expects_read_confirmation = 5 [default = false]; // whether the sender is expecting to receive a read confirmation 246 | optional LegalHoldStatus legal_hold_status = 6 [default = UNKNOWN]; // whether this message was sent to legal hold 247 | } 248 | 249 | // deprecated in favour of Asset.Original.ImageMetaData 250 | message ImageAsset { 251 | required string tag = 1; 252 | required int32 width = 2; 253 | required int32 height = 3; 254 | required int32 original_width = 4; 255 | required int32 original_height = 5; 256 | required string mime_type = 6; 257 | required int32 size = 7; 258 | optional bytes otr_key = 8; 259 | optional bytes mac_key = 9; // deprecated - use sha256 260 | optional bytes mac = 10; // deprecated - use sha256 261 | optional bytes sha256 = 11; // sha256 of ciphertext 262 | } 263 | 264 | // Attachment can attach different kind of assets to a Multipart message 265 | message Attachment { 266 | oneof content { 267 | Asset asset = 1; 268 | CellAsset cell_asset = 2; 269 | } 270 | } 271 | 272 | // Multipart message combines optional text with multiple attachments 273 | message Multipart { 274 | optional Text text = 1; 275 | repeated Attachment attachments = 2; 276 | 277 | // Standard flags for all message types 278 | optional bool expects_read_confirmation = 3 [default = false]; 279 | optional LegalHoldStatus legal_hold_status = 4 [default = UNKNOWN]; 280 | } 281 | 282 | // CellAsset represents a file uploaded to a conversation cell 283 | message CellAsset { 284 | 285 | // Required pydio backend reference 286 | required string uuid = 1; 287 | // known mime_type 288 | required string content_type = 2; 289 | 290 | // Fields below are used for optimistic display: they could have changed since first posting 291 | 292 | // Path contains full path including name (last path part) 293 | optional string initial_name = 3; 294 | // Size of the file 295 | optional int64 initial_size = 4; 296 | 297 | message ImageMetaData { 298 | required int32 width = 1; 299 | required int32 height = 2; 300 | } 301 | 302 | message VideoMetaData { 303 | optional int32 width = 1; 304 | optional int32 height = 2; 305 | optional uint64 duration_in_millis = 3; 306 | } 307 | 308 | message AudioMetaData { 309 | optional uint64 duration_in_millis = 1; 310 | optional bytes normalized_loudness = 2; 311 | } 312 | 313 | oneof initial_meta_data { 314 | ImageMetaData image = 5; 315 | VideoMetaData video = 6; 316 | AudioMetaData audio = 7; 317 | } 318 | 319 | } 320 | 321 | message Asset { 322 | message Original { 323 | required string mime_type = 1; 324 | required uint64 size = 2; 325 | optional string name = 3; 326 | oneof meta_data { 327 | ImageMetaData image = 4; 328 | VideoMetaData video = 5; 329 | AudioMetaData audio = 6; 330 | } 331 | optional string source = 7; // link to source e.g. http://giphy.com/234245 332 | optional string caption = 8; // caption of the asset, e.g. "dog" for a Giphy "dog" search result 333 | } 334 | 335 | message Preview { 336 | required string mime_type = 1; 337 | required uint64 size = 2; 338 | optional RemoteData remote = 3; 339 | oneof meta_data { 340 | ImageMetaData image = 4; 341 | } 342 | } 343 | 344 | message ImageMetaData { 345 | required int32 width = 1; 346 | required int32 height = 2; 347 | optional string tag = 3; 348 | } 349 | 350 | message VideoMetaData { 351 | optional int32 width = 1; 352 | optional int32 height = 2; 353 | optional uint64 duration_in_millis = 3; 354 | } 355 | 356 | message AudioMetaData { 357 | optional uint64 duration_in_millis = 1; 358 | // repeated float normalized_loudness = 2 [packed=true]; // deprecated - Switched to bytes instead 359 | optional bytes normalized_loudness = 3; // each byte represent one loudness value as a byte (char) value. 360 | // e.g. a 100-bytes field here represents 100 loudness values. 361 | // Values are in chronological order and range from 0 to 255. 362 | } 363 | 364 | enum NotUploaded { 365 | CANCELLED = 0; 366 | FAILED = 1; 367 | } 368 | 369 | message RemoteData { 370 | required bytes otr_key = 1; 371 | required bytes sha256 = 2; // obsolete but required for backward compatibility 372 | optional string asset_id = 3; 373 | // optional bytes asset_token = 4; // deprecated - changed type to string 374 | optional string asset_token = 5; 375 | optional string asset_domain = 7; 376 | optional EncryptionAlgorithm encryption = 6; 377 | } 378 | 379 | optional Original original = 1; 380 | // optional Preview preview = 2; // deprecated - preview was completely replaced 381 | oneof status { 382 | NotUploaded not_uploaded = 3; 383 | RemoteData uploaded = 4; 384 | } 385 | optional Preview preview = 5; 386 | optional bool expects_read_confirmation = 6 [default = false]; // whether the sender is expecting to receive a read confirmation 387 | optional LegalHoldStatus legal_hold_status = 7 [default = UNKNOWN]; // whether this message was sent to legal hold 388 | } 389 | 390 | // Actual message is encrypted with AES and sent as additional data 391 | message External { 392 | required bytes otr_key = 1; 393 | optional bytes sha256 = 2; // sha256 of ciphertext, obsolete but required for backward compatibility 394 | optional EncryptionAlgorithm encryption = 3; 395 | } 396 | 397 | message Reaction { 398 | optional string emoji = 1; // some emoji reaction or the empty string to remove previous reaction(s) 399 | required string message_id = 2; 400 | optional LegalHoldStatus legal_hold_status = 3 [default = UNKNOWN]; // whether this message was sent to legal hold 401 | } 402 | 403 | message InCallEmoji { 404 | map emojis = 1; 405 | } 406 | 407 | message InCallHandRaise { 408 | required bool is_hand_up = 1; // true if the hand is raised, false if lowered 409 | } 410 | 411 | message Calling { 412 | required string content = 1; 413 | optional QualifiedConversationId qualified_conversation_id = 2; 414 | } 415 | 416 | message DataTransfer { 417 | optional TrackingIdentifier trackingIdentifier = 1; 418 | } 419 | 420 | message TrackingIdentifier { 421 | required string identifier = 1; 422 | } 423 | 424 | // Enums have to come last because of an unresolved issue with jsdoc 425 | // https://github.com/jsdoc/jsdoc/pull/1686 426 | 427 | enum ClientAction { 428 | RESET_SESSION = 0; 429 | } 430 | 431 | enum EncryptionAlgorithm { 432 | AES_CBC = 0; 433 | AES_GCM = 1; 434 | } 435 | 436 | enum LegalHoldStatus { 437 | UNKNOWN = 0; 438 | DISABLED = 1; 439 | ENABLED = 2; 440 | } 441 | -------------------------------------------------------------------------------- /proto/mls.proto: -------------------------------------------------------------------------------- 1 | /* 2 | * Wire 3 | * Copyright (C) 2021 Wire Swiss GmbH 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see http://www.gnu.org/licenses/. 17 | * 18 | */ 19 | 20 | syntax = "proto2"; 21 | 22 | package mls; 23 | 24 | option java_package = "com.wire.messages"; 25 | option java_outer_classname = "Mls"; 26 | option optimize_for = LITE_RUNTIME; 27 | 28 | enum GroupInfoType { 29 | PUBLIC_GROUP_STATE = 1; 30 | GROUP_INFO = 2; 31 | GROUP_INFO_JWE = 3; 32 | }; 33 | 34 | enum RatchetTreeType { 35 | FULL = 1; 36 | DELTA = 2; 37 | REFERENCE = 3; 38 | }; 39 | 40 | message GroupInfoBundle { 41 | required GroupInfoType group_info_type = 1; 42 | required RatchetTreeType ratchet_tree_type = 2; 43 | required bytes group_info = 3; 44 | } 45 | 46 | message CommitBundle { 47 | required bytes commit = 1; // MlsMessage containing an MlsPlaintext Commit 48 | optional bytes welcome = 2; // MlsMessage containing a Welcome 49 | required GroupInfoBundle group_info_bundle = 3; 50 | } 51 | -------------------------------------------------------------------------------- /proto/otr.proto: -------------------------------------------------------------------------------- 1 | /* 2 | * Wire 3 | * Copyright (C) 2021 Wire Swiss GmbH 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see http://www.gnu.org/licenses/. 17 | * 18 | */ 19 | 20 | syntax = "proto2"; 21 | 22 | package proteus; 23 | 24 | option java_package = "com.wire.messages"; 25 | option java_outer_classname = "Otr"; 26 | option optimize_for = LITE_RUNTIME; 27 | 28 | message UserId { 29 | required bytes uuid = 1; 30 | } 31 | 32 | message QualifiedUserId { 33 | required string id = 1; 34 | required string domain = 2; 35 | } 36 | 37 | message ClientId { 38 | required uint64 client = 1; 39 | } 40 | 41 | message ClientEntry { 42 | required ClientId client = 1; 43 | required bytes text = 2; 44 | } 45 | 46 | message UserEntry { 47 | required UserId user = 1; 48 | repeated ClientEntry clients = 2; 49 | } 50 | 51 | message QualifiedUserEntry { 52 | required string domain = 1; 53 | repeated UserEntry entries = 2; 54 | } 55 | 56 | enum Priority { 57 | // 0 is reserved for errors 58 | LOW_PRIORITY = 1; 59 | HIGH_PRIORITY = 2; 60 | }; 61 | 62 | // deprecated, use QualifiedNewOtrMessage 63 | message NewOtrMessage { 64 | required ClientId sender = 1; 65 | repeated UserEntry recipients = 2; 66 | optional bool native_push = 3 [default = true]; 67 | optional bytes blob = 4; 68 | optional Priority native_priority = 5; 69 | optional bool transient = 6; 70 | repeated UserId report_missing = 7; 71 | } 72 | 73 | message QualifiedNewOtrMessage { 74 | required ClientId sender = 1; 75 | repeated QualifiedUserEntry recipients = 2; 76 | optional bool native_push = 3 [default = true]; 77 | optional bytes blob = 4; 78 | optional Priority native_priority = 5; 79 | optional bool transient = 6; 80 | // For more details please refer to backend swagger at 81 | // https://staging-nginz-https.zinfra.io/api/swagger-ui/ 82 | oneof client_mismatch_strategy { 83 | ClientMismatchStrategy.ReportAll report_all = 7; 84 | ClientMismatchStrategy.IgnoreAll ignore_all = 8; 85 | ClientMismatchStrategy.ReportOnly report_only = 9; 86 | ClientMismatchStrategy.IgnoreOnly ignore_only = 10; 87 | } 88 | } 89 | 90 | message ClientMismatchStrategy { 91 | message ReportAll {} 92 | message IgnoreAll {} 93 | 94 | message ReportOnly { 95 | repeated QualifiedUserId user_ids = 1; 96 | } 97 | 98 | message IgnoreOnly { 99 | repeated QualifiedUserId user_ids = 1; 100 | } 101 | } 102 | 103 | message OtrAssetMeta { 104 | required ClientId sender = 1; 105 | repeated UserEntry recipients = 2; 106 | optional bool isInline = 3 [default = false]; 107 | optional bool native_push = 4 [default = true]; 108 | } 109 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "lib": ["DOM", "ES6"], 5 | "module": "CommonJS", 6 | "moduleResolution": "Node", 7 | "noEmitOnError": true, 8 | "noImplicitAny": true, 9 | "noImplicitReturns": true, 10 | "outDir": "web", 11 | "removeComments": true, 12 | "rootDir": "web", 13 | "sourceMap": false, 14 | "strict": true, 15 | "target": "ES5" 16 | }, 17 | "exclude": ["node_modules"] 18 | } 19 | -------------------------------------------------------------------------------- /web/compile.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Wire 3 | * Copyright (C) 2018 Wire Swiss GmbH 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see http://www.gnu.org/licenses/. 17 | * 18 | */ 19 | 20 | const fs = require('fs'); 21 | const path = require('path'); 22 | const { pbjs, pbts } = require('protobufjs-cli'); 23 | 24 | const protoDir = path.join(__dirname, '../proto'); 25 | const protoFiles = fs.readdirSync(protoDir).filter(fileName => fileName.endsWith('.proto')); 26 | 27 | for (const protoFileName of protoFiles) { 28 | const protoBufferFile = path.join(__dirname, '../proto', protoFileName); 29 | const dtsOutput = path.join(__dirname, protoFileName.replace(/\.proto$/, '.d.ts')); 30 | const jsOutput = path.join(__dirname, protoFileName.replace(/\.proto$/, '.js')); 31 | 32 | pbjs.main(['--target', 'static-module', '--wrap', 'commonjs', protoBufferFile], (error, output) => { 33 | if (error) { 34 | throw error; 35 | } 36 | if (!output) return; 37 | fs.writeFileSync(jsOutput, output, { encoding: 'utf8' }); 38 | pbts.main(['--out', dtsOutput, '--no-comments', jsOutput]); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/parser@^7.20.15": 6 | version "7.24.5" 7 | resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" 8 | integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== 9 | 10 | "@jsdoc/salty@^0.2.1": 11 | version "0.2.8" 12 | resolved "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.8.tgz#8d29923a9429694a437a50ab75004b576131d597" 13 | integrity sha512-5e+SFVavj1ORKlKaKr2BmTOekmXbelU7dC0cDkQLqag7xfuTPuGMUFx7KWJuv4bYZrTsoL2Z18VVCOKYxzoHcg== 14 | dependencies: 15 | lodash "^4.17.21" 16 | 17 | "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": 18 | version "1.1.2" 19 | resolved "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" 20 | integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== 21 | 22 | "@protobufjs/base64@^1.1.2": 23 | version "1.1.2" 24 | resolved "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" 25 | integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== 26 | 27 | "@protobufjs/codegen@^2.0.4": 28 | version "2.0.4" 29 | resolved "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" 30 | integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== 31 | 32 | "@protobufjs/eventemitter@^1.1.0": 33 | version "1.1.0" 34 | resolved "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" 35 | integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== 36 | 37 | "@protobufjs/fetch@^1.1.0": 38 | version "1.1.0" 39 | resolved "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" 40 | integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== 41 | dependencies: 42 | "@protobufjs/aspromise" "^1.1.1" 43 | "@protobufjs/inquire" "^1.1.0" 44 | 45 | "@protobufjs/float@^1.0.2": 46 | version "1.0.2" 47 | resolved "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" 48 | integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== 49 | 50 | "@protobufjs/inquire@^1.1.0": 51 | version "1.1.0" 52 | resolved "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" 53 | integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== 54 | 55 | "@protobufjs/path@^1.1.2": 56 | version "1.1.2" 57 | resolved "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" 58 | integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== 59 | 60 | "@protobufjs/pool@^1.1.0": 61 | version "1.1.0" 62 | resolved "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" 63 | integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== 64 | 65 | "@protobufjs/utf8@^1.1.0": 66 | version "1.1.0" 67 | resolved "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" 68 | integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== 69 | 70 | "@types/linkify-it@^5": 71 | version "5.0.0" 72 | resolved "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz#21413001973106cda1c3a9b91eedd4ccd5469d76" 73 | integrity sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q== 74 | 75 | "@types/long@5.0.0": 76 | version "5.0.0" 77 | resolved "https://registry.npmjs.org/@types/long/-/long-5.0.0.tgz#daaa7b7f74c919c946ff74889d5ca2afe363b2cd" 78 | integrity sha512-eQs9RsucA/LNjnMoJvWG/nXa7Pot/RbBzilF/QRIU/xRl+0ApxrSUFsV5lmf01SvSlqMzJ7Zwxe440wmz2SJGA== 79 | dependencies: 80 | long "*" 81 | 82 | "@types/markdown-it@^14.1.1": 83 | version "14.1.1" 84 | resolved "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz#06bafb7a4e3f77b62b1f308acf7df76687887e0b" 85 | integrity sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg== 86 | dependencies: 87 | "@types/linkify-it" "^5" 88 | "@types/mdurl" "^2" 89 | 90 | "@types/mdurl@^2": 91 | version "2.0.0" 92 | resolved "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz#d43878b5b20222682163ae6f897b20447233bdfd" 93 | integrity sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg== 94 | 95 | "@types/node@16.18.0": 96 | version "16.18.0" 97 | resolved "https://registry.npmjs.org/@types/node/-/node-16.18.0.tgz#34982c6d5b5734c900f4ee69e1b87d212db6c60f" 98 | integrity sha512-LqYqYzYvnbCaQfLAwRt0zboqnsViwhZm+vjaMSqcfN36vulAg7Pt0T83q4WZO2YOBw3XdyHi8cQ88H22zmULOA== 99 | 100 | "@types/node@>=13.7.0": 101 | version "20.12.12" 102 | resolved "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" 103 | integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== 104 | dependencies: 105 | undici-types "~5.26.4" 106 | 107 | acorn-jsx@^5.3.2: 108 | version "5.3.2" 109 | resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" 110 | integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== 111 | 112 | acorn@^8.9.0: 113 | version "8.11.3" 114 | resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" 115 | integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== 116 | 117 | ansi-styles@^4.1.0: 118 | version "4.3.0" 119 | resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 120 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== 121 | dependencies: 122 | color-convert "^2.0.1" 123 | 124 | argparse@^2.0.1: 125 | version "2.0.1" 126 | resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" 127 | integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== 128 | 129 | balanced-match@^1.0.0: 130 | version "1.0.2" 131 | resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 132 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 133 | 134 | bluebird@^3.7.2: 135 | version "3.7.2" 136 | resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" 137 | integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== 138 | 139 | brace-expansion@^2.0.1: 140 | version "2.0.1" 141 | resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" 142 | integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== 143 | dependencies: 144 | balanced-match "^1.0.0" 145 | 146 | catharsis@^0.9.0: 147 | version "0.9.0" 148 | resolved "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz#40382a168be0e6da308c277d3a2b3eb40c7d2121" 149 | integrity sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A== 150 | dependencies: 151 | lodash "^4.17.15" 152 | 153 | chalk@^4.0.0: 154 | version "4.1.2" 155 | resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" 156 | integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== 157 | dependencies: 158 | ansi-styles "^4.1.0" 159 | supports-color "^7.1.0" 160 | 161 | color-convert@^2.0.1: 162 | version "2.0.1" 163 | resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 164 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 165 | dependencies: 166 | color-name "~1.1.4" 167 | 168 | color-name@~1.1.4: 169 | version "1.1.4" 170 | resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 171 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 172 | 173 | deep-is@~0.1.3: 174 | version "0.1.4" 175 | resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" 176 | integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== 177 | 178 | entities@^4.4.0: 179 | version "4.5.0" 180 | resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" 181 | integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== 182 | 183 | escape-string-regexp@^2.0.0: 184 | version "2.0.0" 185 | resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" 186 | integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== 187 | 188 | escodegen@^1.13.0: 189 | version "1.14.3" 190 | resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" 191 | integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== 192 | dependencies: 193 | esprima "^4.0.1" 194 | estraverse "^4.2.0" 195 | esutils "^2.0.2" 196 | optionator "^0.8.1" 197 | optionalDependencies: 198 | source-map "~0.6.1" 199 | 200 | eslint-visitor-keys@^3.4.1: 201 | version "3.4.3" 202 | resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" 203 | integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== 204 | 205 | espree@^9.0.0: 206 | version "9.6.1" 207 | resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" 208 | integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== 209 | dependencies: 210 | acorn "^8.9.0" 211 | acorn-jsx "^5.3.2" 212 | eslint-visitor-keys "^3.4.1" 213 | 214 | esprima@^4.0.1: 215 | version "4.0.1" 216 | resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 217 | integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== 218 | 219 | estraverse@^4.2.0: 220 | version "4.3.0" 221 | resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" 222 | integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== 223 | 224 | estraverse@^5.1.0: 225 | version "5.3.0" 226 | resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" 227 | integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== 228 | 229 | esutils@^2.0.2: 230 | version "2.0.3" 231 | resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" 232 | integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== 233 | 234 | fast-levenshtein@~2.0.6: 235 | version "2.0.6" 236 | resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 237 | integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== 238 | 239 | fs.realpath@^1.0.0: 240 | version "1.0.0" 241 | resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 242 | integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== 243 | 244 | glob@^8.0.0: 245 | version "8.1.0" 246 | resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" 247 | integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== 248 | dependencies: 249 | fs.realpath "^1.0.0" 250 | inflight "^1.0.4" 251 | inherits "2" 252 | minimatch "^5.0.1" 253 | once "^1.3.0" 254 | 255 | graceful-fs@^4.1.9: 256 | version "4.2.11" 257 | resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" 258 | integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== 259 | 260 | has-flag@^4.0.0: 261 | version "4.0.0" 262 | resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 263 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 264 | 265 | inflight@^1.0.4: 266 | version "1.0.6" 267 | resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 268 | integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== 269 | dependencies: 270 | once "^1.3.0" 271 | wrappy "1" 272 | 273 | inherits@2: 274 | version "2.0.4" 275 | resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 276 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 277 | 278 | js2xmlparser@^4.0.2: 279 | version "4.0.2" 280 | resolved "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz#2a1fdf01e90585ef2ae872a01bc169c6a8d5e60a" 281 | integrity sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA== 282 | dependencies: 283 | xmlcreate "^2.0.4" 284 | 285 | jsdoc@^4.0.0: 286 | version "4.0.3" 287 | resolved "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.3.tgz#bfee86c6a82f6823e12b5e8be698fd99ae46c061" 288 | integrity sha512-Nu7Sf35kXJ1MWDZIMAuATRQTg1iIPdzh7tqJ6jjvaU/GfDf+qi5UV8zJR3Mo+/pYFvm8mzay4+6O5EWigaQBQw== 289 | dependencies: 290 | "@babel/parser" "^7.20.15" 291 | "@jsdoc/salty" "^0.2.1" 292 | "@types/markdown-it" "^14.1.1" 293 | bluebird "^3.7.2" 294 | catharsis "^0.9.0" 295 | escape-string-regexp "^2.0.0" 296 | js2xmlparser "^4.0.2" 297 | klaw "^3.0.0" 298 | markdown-it "^14.1.0" 299 | markdown-it-anchor "^8.6.7" 300 | marked "^4.0.10" 301 | mkdirp "^1.0.4" 302 | requizzle "^0.2.3" 303 | strip-json-comments "^3.1.0" 304 | underscore "~1.13.2" 305 | 306 | klaw@^3.0.0: 307 | version "3.0.0" 308 | resolved "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146" 309 | integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== 310 | dependencies: 311 | graceful-fs "^4.1.9" 312 | 313 | levn@~0.3.0: 314 | version "0.3.0" 315 | resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 316 | integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== 317 | dependencies: 318 | prelude-ls "~1.1.2" 319 | type-check "~0.3.2" 320 | 321 | linkify-it@^5.0.0: 322 | version "5.0.0" 323 | resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" 324 | integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== 325 | dependencies: 326 | uc.micro "^2.0.0" 327 | 328 | lodash@^4.17.15, lodash@^4.17.21: 329 | version "4.17.21" 330 | resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" 331 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== 332 | 333 | long@*, long@^5.0.0: 334 | version "5.2.3" 335 | resolved "https://registry.npmjs.org/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" 336 | integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== 337 | 338 | long@5.2.0: 339 | version "5.2.0" 340 | resolved "https://registry.npmjs.org/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61" 341 | integrity sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w== 342 | 343 | markdown-it-anchor@^8.6.7: 344 | version "8.6.7" 345 | resolved "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634" 346 | integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== 347 | 348 | markdown-it@^14.1.0: 349 | version "14.1.0" 350 | resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" 351 | integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== 352 | dependencies: 353 | argparse "^2.0.1" 354 | entities "^4.4.0" 355 | linkify-it "^5.0.0" 356 | mdurl "^2.0.0" 357 | punycode.js "^2.3.1" 358 | uc.micro "^2.1.0" 359 | 360 | marked@^4.0.10: 361 | version "4.3.0" 362 | resolved "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" 363 | integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== 364 | 365 | mdurl@^2.0.0: 366 | version "2.0.0" 367 | resolved "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" 368 | integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== 369 | 370 | minimatch@^5.0.1: 371 | version "5.1.6" 372 | resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" 373 | integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== 374 | dependencies: 375 | brace-expansion "^2.0.1" 376 | 377 | minimist@^1.2.0: 378 | version "1.2.8" 379 | resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" 380 | integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== 381 | 382 | mkdirp@^1.0.4: 383 | version "1.0.4" 384 | resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" 385 | integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== 386 | 387 | once@^1.3.0: 388 | version "1.4.0" 389 | resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 390 | integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== 391 | dependencies: 392 | wrappy "1" 393 | 394 | optionator@^0.8.1: 395 | version "0.8.3" 396 | resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" 397 | integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== 398 | dependencies: 399 | deep-is "~0.1.3" 400 | fast-levenshtein "~2.0.6" 401 | levn "~0.3.0" 402 | prelude-ls "~1.1.2" 403 | type-check "~0.3.2" 404 | word-wrap "~1.2.3" 405 | 406 | prelude-ls@~1.1.2: 407 | version "1.1.2" 408 | resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 409 | integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== 410 | 411 | protobufjs-cli@1.1.2: 412 | version "1.1.2" 413 | resolved "https://registry.npmjs.org/protobufjs-cli/-/protobufjs-cli-1.1.2.tgz#b32a7dc6aa3866cc103278539561bb4758249c8b" 414 | integrity sha512-8ivXWxT39gZN4mm4ArQyJrRgnIwZqffBWoLDsE21TmMcKI3XwJMV4lEF2WU02C4JAtgYYc2SfJIltelD8to35g== 415 | dependencies: 416 | chalk "^4.0.0" 417 | escodegen "^1.13.0" 418 | espree "^9.0.0" 419 | estraverse "^5.1.0" 420 | glob "^8.0.0" 421 | jsdoc "^4.0.0" 422 | minimist "^1.2.0" 423 | semver "^7.1.2" 424 | tmp "^0.2.1" 425 | uglify-js "^3.7.7" 426 | 427 | protobufjs@7.2.5: 428 | version "7.2.5" 429 | resolved "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz#45d5c57387a6d29a17aab6846dcc283f9b8e7f2d" 430 | integrity sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A== 431 | dependencies: 432 | "@protobufjs/aspromise" "^1.1.2" 433 | "@protobufjs/base64" "^1.1.2" 434 | "@protobufjs/codegen" "^2.0.4" 435 | "@protobufjs/eventemitter" "^1.1.0" 436 | "@protobufjs/fetch" "^1.1.0" 437 | "@protobufjs/float" "^1.0.2" 438 | "@protobufjs/inquire" "^1.1.0" 439 | "@protobufjs/path" "^1.1.2" 440 | "@protobufjs/pool" "^1.1.0" 441 | "@protobufjs/utf8" "^1.1.0" 442 | "@types/node" ">=13.7.0" 443 | long "^5.0.0" 444 | 445 | punycode.js@^2.3.1: 446 | version "2.3.1" 447 | resolved "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" 448 | integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== 449 | 450 | requizzle@^0.2.3: 451 | version "0.2.4" 452 | resolved "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz#319eb658b28c370f0c20f968fa8ceab98c13d27c" 453 | integrity sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw== 454 | dependencies: 455 | lodash "^4.17.21" 456 | 457 | semver@^7.1.2: 458 | version "7.6.2" 459 | resolved "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" 460 | integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== 461 | 462 | source-map@~0.6.1: 463 | version "0.6.1" 464 | resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 465 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 466 | 467 | strip-json-comments@^3.1.0: 468 | version "3.1.1" 469 | resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" 470 | integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== 471 | 472 | supports-color@^7.1.0: 473 | version "7.2.0" 474 | resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" 475 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== 476 | dependencies: 477 | has-flag "^4.0.0" 478 | 479 | tmp@^0.2.1: 480 | version "0.2.3" 481 | resolved "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" 482 | integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== 483 | 484 | type-check@~0.3.2: 485 | version "0.3.2" 486 | resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 487 | integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== 488 | dependencies: 489 | prelude-ls "~1.1.2" 490 | 491 | typescript@4.8.4: 492 | version "4.8.4" 493 | resolved "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" 494 | integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== 495 | 496 | uc.micro@^2.0.0, uc.micro@^2.1.0: 497 | version "2.1.0" 498 | resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" 499 | integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== 500 | 501 | uglify-js@^3.7.7: 502 | version "3.17.4" 503 | resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" 504 | integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== 505 | 506 | underscore@~1.13.2: 507 | version "1.13.6" 508 | resolved "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" 509 | integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== 510 | 511 | undici-types@~5.26.4: 512 | version "5.26.5" 513 | resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" 514 | integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== 515 | 516 | word-wrap@~1.2.3: 517 | version "1.2.5" 518 | resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" 519 | integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== 520 | 521 | wrappy@1: 522 | version "1.0.2" 523 | resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 524 | integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== 525 | 526 | xmlcreate@^2.0.4: 527 | version "2.0.4" 528 | resolved "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz#0c5ab0f99cdd02a81065fa9cd8f8ae87624889be" 529 | integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== 530 | --------------------------------------------------------------------------------