diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ebd9186..8b988db 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,14 +11,14 @@ jobs: strategy: fail-fast: false matrix: - go-version: ["1.25", "1.26"] - name: Lint ${{ matrix.go-version == '1.26' && '(latest)' || '(old)' }} + go-version: ["1.26", "1.27"] + name: Lint ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@v7 with: go-version: ${{ matrix.go-version }} cache: true @@ -40,14 +40,14 @@ jobs: strategy: fail-fast: false matrix: - go-version: ["1.25", "1.26"] - name: Test ${{ matrix.go-version == '1.26' && '(latest)' || '(old)' }} + go-version: ["1.26", "1.27"] + name: Test ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@v7 with: go-version: ${{ matrix.go-version }} cache: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 468ca95..a0d718c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# v26.09 + +* Bumped minimum Go version to 1.26. +* Updated libsignal to v1.102.2. +* Fixed handling messages with invalid values in formatting body ranges. +* Fixed websocket request retrying not working correctly if the first attempt + times out. +* Fixed another potential race condition with edited message bridging. + # v26.08 * Updated libsignal to v0.100.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..764f753 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +See diff --git a/cmd/mautrix-signal/main.go b/cmd/mautrix-signal/main.go index c5f5bf9..703d779 100644 --- a/cmd/mautrix-signal/main.go +++ b/cmd/mautrix-signal/main.go @@ -37,7 +37,7 @@ var m = mxmain.BridgeMain{ Name: "mautrix-signal", URL: "https://github.com/mautrix/signal", Description: "A Matrix-Signal puppeting bridge.", - Version: "26.08", + Version: "26.09", SemCalVer: true, Connector: &connector.SignalConnector{}, diff --git a/go.mod b/go.mod index 5c754b2..93eb572 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module go.mau.fi/mautrix-signal -go 1.25.0 +go 1.26.0 -toolchain go1.26.6 +toolchain go1.27.1 tool go.mau.fi/util/cmd/maubuild @@ -12,40 +12,40 @@ require ( github.com/google/uuid v1.6.0 github.com/mattn/go-pointer v0.0.1 github.com/rs/zerolog v1.35.1 - github.com/stretchr/testify v1.11.1 + github.com/stretchr/testify v1.12.0 github.com/tidwall/gjson v1.19.0 - go.mau.fi/util v0.10.0 - golang.org/x/crypto v0.55.0 - golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297 - golang.org/x/net v0.58.0 - golang.org/x/sync v0.22.0 + go.mau.fi/util v0.10.1 + golang.org/x/crypto v0.57.0 + golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba + golang.org/x/net v0.59.0 + golang.org/x/sync v0.23.0 + google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.30.0 + maunium.net/go/mautrix v0.31.0 ) require ( filippo.io/edwards25519 v1.2.0 // indirect github.com/coreos/go-systemd/v22 v22.7.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/lib/pq v1.12.3 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-sqlite3 v1.14.49 // indirect - github.com/petermattis/goid v0.0.0-20260816044145-ed329add6b1b // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/mattn/go-sqlite3 v1.14.52 // indirect + github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/rs/xid v1.6.0 // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/sjson v1.2.5 // indirect - github.com/yuin/goldmark v1.8.5 // indirect + github.com/yuin/goldmark v1.8.6 // indirect go.mau.fi/zeroconfig v0.2.0 // indirect - golang.org/x/mod v0.40.0 // indirect - golang.org/x/sys v0.47.0 // indirect - golang.org/x/text v0.41.0 // indirect + golang.org/x/mod v0.41.0 // indirect + golang.org/x/sys v0.48.0 // indirect + golang.org/x/text v0.42.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect maunium.net/go/mauflag v1.0.0 // indirect diff --git a/go.sum b/go.sum index e212cb7..606a4ad 100644 --- a/go.sum +++ b/go.sum @@ -2,15 +2,21 @@ filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA= github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA= github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff h1:4N8wnS3f1hNHSmFD5zgFkWCyA4L1kCDkImPAtK7D6tg= github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff/go.mod h1:HMJKR5wlh/ziNp+sHEDV2ltblO4JD2+IdDOWtGcQBTM= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -30,13 +36,11 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= -github.com/mattn/go-sqlite3 v1.14.49 h1:B8jBHC3xhxZgxztrgruTuLucebnULQnx4W7cF7SAE9w= -github.com/mattn/go-sqlite3 v1.14.49/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= -github.com/petermattis/goid v0.0.0-20260816044145-ed329add6b1b h1:sS7HLzwS+dO+gxATgQfeZDEdUZe2pKAB3nGoUwP5zU0= -github.com/petermattis/goid v0.0.0-20260816044145-ed329add6b1b/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/mattn/go-sqlite3 v1.14.52 h1:wVbm2Qnf4OXkqhBTSPuCRZDRnxfbVrrmiCEroVdog8U= +github.com/mattn/go-sqlite3 v1.14.52/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= +github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 h1:lcWAnrqr2nNfDiArwFNHCE4787Mw2tCdVSOXCru0/0E= +github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= @@ -46,8 +50,8 @@ github.com/rs/zerolog v1.35.1 h1:m7xQeoiLIiV0BCEY4Hs+j2NG4Gp2o2KPKmhnnLiazKI= github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.0 h1:K6Mr6jO9JICuend/5xzTM03ydSV3vdNRYAdPSukj8uI= +github.com/stretchr/testify v1.12.0/go.mod h1:bOYBZb5qJ00vPzWfIqBUZPaxK8jWiXc6d3ErP4Ca9Gw= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.19.0 h1:xwxm7n691Uf3u5OFjzngavjGTh55KX5q/9w9xHW88JU= github.com/tidwall/gjson v1.19.0/go.mod h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc= @@ -59,27 +63,45 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/yuin/goldmark v1.8.5 h1:r6N5afV5qj/5S4UTch8agZHJ8UxNCMwX7WjkkJam2NA= -github.com/yuin/goldmark v1.8.5/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -go.mau.fi/util v0.10.0 h1:vH9IXZmfBKa96p47HxrVqEPkrj02zDJg3o4EF172+Lk= -go.mau.fi/util v0.10.0/go.mod h1:uZwpm9sK4wO2Qqy+t6QoVq29szMsRxWXp9/BkQLG4xk= +github.com/yuin/goldmark v1.8.6 h1:d0VcaP1sx9GkFVkoW+KtggpGi2KZ965i14b0+bDQST4= +github.com/yuin/goldmark v1.8.6/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= +go.mau.fi/util v0.10.1 h1:1oSqb4TwzLA0cUDY0aomyBPFKkZ3J5fqCmrXV3VH3GQ= +go.mau.fi/util v0.10.1/go.mod h1:40TDo7/ekSeOjgr8KAmX31Yf4zrOF94j83WQB+u5ZPc= go.mau.fi/zeroconfig v0.2.0 h1:e/OGEERqVRRKlgaro7E6bh8xXiKFSXB3eNNIud7FUjU= go.mau.fi/zeroconfig v0.2.0/go.mod h1:J0Vn0prHNOm493oZoQ84kq83ZaNCYZnq+noI1b1eN8w= -golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M= -golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis= -golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297 h1:YXnL44eJ77R+ji4/ooy8UsXIhz+lbi2Qgdlc8iRN0gY= -golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297/go.mod h1:Mkmymgv+uMpSQ/XxJ/7GpdrdYoqm3u72jEbpCLiJmNk= -golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= -golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= -golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= -golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= -golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= -golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= +go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= +go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= +go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= +go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= +go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= +go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= +go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= +go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M= +golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA= +golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba h1:Ck8QetSgk912qxWLMCKxd0in+aiyBQyDSMae6e/xmpU= +golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba/go.mod h1:50RgIsmK7OwqzTTeqcSXQW8SswW0o8fRcDxmqGluJ8E= +golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= +golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= +golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= +golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= -golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= -golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= +golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU= +google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -91,5 +113,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.30.0 h1:bad+q7w5tLqiHpr+oUxVI+8m8ePbV3AvoFKg2jQzPyo= -maunium.net/go/mautrix v0.30.0/go.mod h1:bb0gjxbTFOqTaAYKGw5E7j9XROUR2Sl1Etm3IbmYXbo= +maunium.net/go/mautrix v0.31.0 h1:x6XNBSa0kOaBgcleI+ZBLkGvBdHIE0qdeY6TZ4wWUeI= +maunium.net/go/mautrix v0.31.0/go.mod h1:vfPYtoGAjlTnIF+W8tl+rjX3yB4PEfqYR2sDXvQo4Co= diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index da7b863..009943a 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -39,7 +39,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) var ( @@ -185,11 +185,22 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri msg.EditTarget.Metadata = &signalid.MessageMetadata{ContainsAttachments: len(converted.Attachments) > 0} msg.EditTarget.EditCount++ if prevID != msg.EditTarget.ID { - err = s.Main.Bridge.DB.Message.Update(ctx, msg.EditTarget) + err = s.Main.Bridge.DB.DoTxn(ctx, nil, func(ctx context.Context) error { + err = s.Main.Bridge.DB.Message.Update(ctx, msg.EditTarget) + if err != nil { + return err + } + err = saveEditStub(ctx, s.Main.Bridge, prevID, msg.EditTarget) + if err != nil { + return fmt.Errorf("failed to save edit stub: %w", err) + } + return nil + }) if err != nil { - zerolog.Ctx(ctx).Err(err).Msg("Failed to save message after editing") - } else { - saveEditStub(ctx, s.Main.Bridge, prevID, msg.EditTarget) + zerolog.Ctx(ctx).Err(err). + Str("prev_message_id", string(prevID)). + Str("message_id", string(msg.EditTarget.ID)). + Msg("Failed to save message after editing") } } return nil @@ -198,7 +209,7 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri // saveEditStub saves a placeholder message row pointing at the pre-edit ID of a message, such that // duplicate checks on incoming edits find it and are dropped. This is necessary because the first // time we see an edit it modifies the ID in place. -func saveEditStub(ctx context.Context, bridge *bridgev2.Bridge, prevID networkid.MessageID, target *database.Message) { +func saveEditStub(ctx context.Context, bridge *bridgev2.Bridge, prevID networkid.MessageID, target *database.Message) error { stub := &database.Message{ ID: prevID, PartID: editStubPartID, @@ -208,13 +219,7 @@ func saveEditStub(ctx context.Context, bridge *bridgev2.Bridge, prevID networkid Timestamp: target.Timestamp, } stub.SetFakeMXID() - err := bridge.DB.Message.Insert(ctx, stub) - if err != nil { - zerolog.Ctx(ctx).Warn().Err(err). - Str("prev_message_id", string(prevID)). - Str("message_id", string(target.ID)). - Msg("Failed to save stub row for pre-edit message ID") - } + return bridge.DB.Message.Insert(ctx, stub) } func (s *SignalClient) PreHandleMatrixReaction(ctx context.Context, msg *bridgev2.MatrixReaction) (bridgev2.MatrixReactionPreResponse, error) { diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index 7618514..fce7f2c 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -40,7 +40,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" "go.mau.fi/mautrix-signal/pkg/signalmeow/events" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) diff --git a/pkg/libsignalgo/aes256gcmsiv.go b/pkg/libsignalgo/aes256gcmsiv.go index 0fddea2..b02617d 100644 --- a/pkg/libsignalgo/aes256gcmsiv.go +++ b/pkg/libsignalgo/aes256gcmsiv.go @@ -82,6 +82,7 @@ func (aes *AES256_GCM_SIV) Decrypt(ciphertext, nonce, associatedData []byte) ([] BytesToBuffer(nonce), BytesToBuffer(associatedData), ) + runtime.KeepAlive(aes) if signalFfiError != nil { return nil, wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/authcredential.go b/pkg/libsignalgo/authcredential.go index 410eabd..0a1edfc 100644 --- a/pkg/libsignalgo/authcredential.go +++ b/pkg/libsignalgo/authcredential.go @@ -31,9 +31,10 @@ import ( // type AuthCredential [181]byte // type AuthCredentialResponse [361]byte const AuthCredentialWithPniLength = 265 +const AuthCredentialWithPniResponseLength = 425 type AuthCredentialWithPni [AuthCredentialWithPniLength]byte -type AuthCredentialWithPniResponse [425]byte +type AuthCredentialWithPniResponse [AuthCredentialWithPniResponseLength]byte type AuthCredentialPresentation []byte func (ac *AuthCredentialWithPni) Slice() []byte { @@ -68,6 +69,9 @@ func ReceiveAuthCredentialWithPni( } func NewAuthCredentialWithPniResponse(b []byte) (*AuthCredentialWithPniResponse, error) { + if len(b) != AuthCredentialWithPniResponseLength { + return nil, fmt.Errorf("invalid auth credential with pni response length %d (expected %d)", len(b), AuthCredentialWithPniResponseLength) + } borrowedBuffer := BytesToBuffer(b) signalFfiError := C.signal_auth_credential_with_pni_response_check_valid_contents(borrowedBuffer) if signalFfiError != nil { diff --git a/pkg/libsignalgo/buffer.go b/pkg/libsignalgo/buffer.go index 5518656..b3f2c3f 100644 --- a/pkg/libsignalgo/buffer.go +++ b/pkg/libsignalgo/buffer.go @@ -21,12 +21,14 @@ package libsignalgo */ import "C" import ( - "fmt" "runtime" "unsafe" ) func BorrowedMutableBuffer(length int) C.SignalBorrowedMutableBuffer { + if length <= 0 { + return C.SignalBorrowedMutableBuffer{} + } data := make([]byte, length) return C.SignalBorrowedMutableBuffer{ base: (*C.uchar)(unsafe.Pointer(&data[0])), @@ -48,10 +50,9 @@ func ManyBytesToBuffer[T ~[]byte](datas []T) (C.SignalBorrowedSliceOfBuffers, fu buffers := make([]C.SignalBorrowedBuffer, len(datas)) var pinner runtime.Pinner for i, data := range datas { - if len(data) == 0 { - panic(fmt.Errorf("empty slice passed to ManyBytesToBuffer at index %d", i)) + if len(data) > 0 { + pinner.Pin(&data[0]) } - pinner.Pin(&data[0]) buffers[i] = BytesToBuffer(data) } return C.SignalBorrowedSliceOfBuffers{ diff --git a/pkg/libsignalgo/cflags.go b/pkg/libsignalgo/cflags.go index e1bb7d5..50530d9 100644 --- a/pkg/libsignalgo/cflags.go +++ b/pkg/libsignalgo/cflags.go @@ -4,3 +4,9 @@ package libsignalgo #cgo LDFLAGS: -lsignal_ffi -ldl -lm -lz -lstdc++ */ import "C" + +import ( + "go.mau.fi/mautrix-signal/pkg/libsignalgo/signalversion" +) + +const Version = signalversion.Version diff --git a/pkg/libsignalgo/ciphertextmessage.go b/pkg/libsignalgo/ciphertextmessage.go index f74fcd5..bb2108f 100644 --- a/pkg/libsignalgo/ciphertextmessage.go +++ b/pkg/libsignalgo/ciphertextmessage.go @@ -49,6 +49,7 @@ func NewCiphertextMessage(plaintext *PlaintextContent) (*CiphertextMessage, erro &ciphertextMessage, plaintext.constPtr(), ) + runtime.KeepAlive(plaintext) if signalFfiError != nil { return nil, wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/fingerprint.go b/pkg/libsignalgo/fingerprint.go index b69ee71..f436aec 100644 --- a/pkg/libsignalgo/fingerprint.go +++ b/pkg/libsignalgo/fingerprint.go @@ -52,6 +52,8 @@ func NewFingerprint(iterations, version FingerprintVersion, localIdentifier []by BytesToBuffer(remoteIdentifier), remoteKey.constPtr(), ) + runtime.KeepAlive(localKey) + runtime.KeepAlive(remoteKey) if signalFfiError != nil { return nil, wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/groupsendendorsement.go b/pkg/libsignalgo/groupsendendorsement.go index afc359f..ed833e1 100644 --- a/pkg/libsignalgo/groupsendendorsement.go +++ b/pkg/libsignalgo/groupsendendorsement.go @@ -206,7 +206,13 @@ func (gser GroupSendEndorsementsResponse) ReceiveWithServiceIDs( memberEndorsements[member] = endorsements[i] } } - combined, err := GroupSendEndorsementCombine(endorsements...) + nonEmptyEndorsements := make([]GroupSendEndorsement, 0, len(endorsements)) + for _, endorsement := range endorsements { + if len(endorsement) > 0 { + nonEmptyEndorsements = append(nonEmptyEndorsements, endorsement) + } + } + combined, err := GroupSendEndorsementCombine(nonEmptyEndorsements...) if err != nil { return nil, memberEndorsements, err } diff --git a/pkg/libsignalgo/libsignal b/pkg/libsignalgo/libsignal index 857c4dc..8fc2113 160000 --- a/pkg/libsignalgo/libsignal +++ b/pkg/libsignalgo/libsignal @@ -1 +1 @@ -Subproject commit 857c4dca03537dc5e395a5e1eda6bf18f59c3601 +Subproject commit 8fc2113bda042fc972a166a24b974b0d34155c6c diff --git a/pkg/libsignalgo/libsignal-ffi.h b/pkg/libsignalgo/libsignal-ffi.h index 0979410..dec28cd 100644 --- a/pkg/libsignalgo/libsignal-ffi.h +++ b/pkg/libsignalgo/libsignal-ffi.h @@ -14,96 +14,108 @@ static_assert_64bit(alignof(uint8_t) == 1); typedef uint8_t SignalType_FixedArray32_uint8_t[32]; static_assert_64bit(sizeof(SignalType_FixedArray32_uint8_t) == 32); static_assert_64bit(alignof(SignalType_FixedArray32_uint8_t) == 1); -typedef const SignalType_FixedArray32_uint8_t* SignalType_ConstPointer_SignalType_FixedArray32_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray32_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray32_uint8_t) == 8); -typedef const SignalType_ConstPointer_SignalType_FixedArray32_uint8_t* SignalType_ConstPointer_SignalType_ConstPointer_SignalType_FixedArray32_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_ConstPointer_SignalType_FixedArray32_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_ConstPointer_SignalType_FixedArray32_uint8_t) == 8); +typedef const SignalType_FixedArray32_uint8_t* SignalType_ConstPointer_FixedArray32_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray32_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray32_uint8_t) == 8); +typedef const SignalType_ConstPointer_FixedArray32_uint8_t* SignalType_ConstPointer_ConstPointer_FixedArray32_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_ConstPointer_FixedArray32_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_ConstPointer_FixedArray32_uint8_t) == 8); +static_assert_64bit(sizeof(int8_t) == 1); +static_assert_64bit(alignof(int8_t) == 1); +typedef const int8_t* SignalCStringPtr; +static_assert_64bit(sizeof(SignalCStringPtr) == 8); +static_assert_64bit(alignof(SignalCStringPtr) == 8); +typedef const SignalCStringPtr* SignalType_ConstPointer_SignalCStringPtr; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCStringPtr) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalCStringPtr) == 8); typedef uint8_t SignalType_FixedArray129_uint8_t[129]; static_assert_64bit(sizeof(SignalType_FixedArray129_uint8_t) == 129); static_assert_64bit(alignof(SignalType_FixedArray129_uint8_t) == 1); -typedef const SignalType_FixedArray129_uint8_t* SignalType_ConstPointer_SignalType_FixedArray129_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray129_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray129_uint8_t) == 8); +typedef const SignalType_FixedArray129_uint8_t* SignalType_ConstPointer_FixedArray129_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray129_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray129_uint8_t) == 8); typedef uint8_t SignalType_FixedArray153_uint8_t[153]; static_assert_64bit(sizeof(SignalType_FixedArray153_uint8_t) == 153); static_assert_64bit(alignof(SignalType_FixedArray153_uint8_t) == 1); -typedef const SignalType_FixedArray153_uint8_t* SignalType_ConstPointer_SignalType_FixedArray153_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray153_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray153_uint8_t) == 8); +typedef const SignalType_FixedArray153_uint8_t* SignalType_ConstPointer_FixedArray153_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray153_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray153_uint8_t) == 8); typedef uint8_t SignalType_FixedArray15_uint8_t[15]; static_assert_64bit(sizeof(SignalType_FixedArray15_uint8_t) == 15); static_assert_64bit(alignof(SignalType_FixedArray15_uint8_t) == 1); -typedef const SignalType_FixedArray15_uint8_t* SignalType_ConstPointer_SignalType_FixedArray15_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray15_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray15_uint8_t) == 8); +typedef const SignalType_FixedArray15_uint8_t* SignalType_ConstPointer_FixedArray15_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray15_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray15_uint8_t) == 8); typedef uint8_t SignalType_FixedArray16_uint8_t[16]; static_assert_64bit(sizeof(SignalType_FixedArray16_uint8_t) == 16); static_assert_64bit(alignof(SignalType_FixedArray16_uint8_t) == 1); -typedef const SignalType_FixedArray16_uint8_t* SignalType_ConstPointer_SignalType_FixedArray16_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray16_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray16_uint8_t) == 8); +typedef const SignalType_FixedArray16_uint8_t* SignalType_ConstPointer_FixedArray16_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray16_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray16_uint8_t) == 8); typedef uint8_t SignalType_FixedArray177_uint8_t[177]; static_assert_64bit(sizeof(SignalType_FixedArray177_uint8_t) == 177); static_assert_64bit(alignof(SignalType_FixedArray177_uint8_t) == 1); -typedef const SignalType_FixedArray177_uint8_t* SignalType_ConstPointer_SignalType_FixedArray177_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray177_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray177_uint8_t) == 8); +typedef const SignalType_FixedArray177_uint8_t* SignalType_ConstPointer_FixedArray177_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray177_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray177_uint8_t) == 8); typedef uint8_t SignalType_FixedArray17_uint8_t[17]; static_assert_64bit(sizeof(SignalType_FixedArray17_uint8_t) == 17); static_assert_64bit(alignof(SignalType_FixedArray17_uint8_t) == 1); -typedef const SignalType_FixedArray17_uint8_t* SignalType_ConstPointer_SignalType_FixedArray17_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray17_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray17_uint8_t) == 8); +typedef const SignalType_FixedArray17_uint8_t* SignalType_ConstPointer_FixedArray17_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray17_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray17_uint8_t) == 8); typedef uint8_t SignalType_FixedArray289_uint8_t[289]; static_assert_64bit(sizeof(SignalType_FixedArray289_uint8_t) == 289); static_assert_64bit(alignof(SignalType_FixedArray289_uint8_t) == 1); -typedef const SignalType_FixedArray289_uint8_t* SignalType_ConstPointer_SignalType_FixedArray289_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray289_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray289_uint8_t) == 8); +typedef const SignalType_FixedArray289_uint8_t* SignalType_ConstPointer_FixedArray289_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray289_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray289_uint8_t) == 8); typedef uint8_t SignalType_FixedArray329_uint8_t[329]; static_assert_64bit(sizeof(SignalType_FixedArray329_uint8_t) == 329); static_assert_64bit(alignof(SignalType_FixedArray329_uint8_t) == 1); -typedef const SignalType_FixedArray329_uint8_t* SignalType_ConstPointer_SignalType_FixedArray329_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray329_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray329_uint8_t) == 8); +typedef const SignalType_FixedArray329_uint8_t* SignalType_ConstPointer_FixedArray329_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray329_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray329_uint8_t) == 8); typedef uint8_t SignalType_FixedArray409_uint8_t[409]; static_assert_64bit(sizeof(SignalType_FixedArray409_uint8_t) == 409); static_assert_64bit(alignof(SignalType_FixedArray409_uint8_t) == 1); -typedef const SignalType_FixedArray409_uint8_t* SignalType_ConstPointer_SignalType_FixedArray409_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray409_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray409_uint8_t) == 8); +typedef const SignalType_FixedArray409_uint8_t* SignalType_ConstPointer_FixedArray409_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray409_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray409_uint8_t) == 8); typedef uint8_t SignalType_FixedArray473_uint8_t[473]; static_assert_64bit(sizeof(SignalType_FixedArray473_uint8_t) == 473); static_assert_64bit(alignof(SignalType_FixedArray473_uint8_t) == 1); -typedef const SignalType_FixedArray473_uint8_t* SignalType_ConstPointer_SignalType_FixedArray473_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray473_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray473_uint8_t) == 8); +typedef const SignalType_FixedArray473_uint8_t* SignalType_ConstPointer_FixedArray473_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray473_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray473_uint8_t) == 8); typedef uint8_t SignalType_FixedArray497_uint8_t[497]; static_assert_64bit(sizeof(SignalType_FixedArray497_uint8_t) == 497); static_assert_64bit(alignof(SignalType_FixedArray497_uint8_t) == 1); -typedef const SignalType_FixedArray497_uint8_t* SignalType_ConstPointer_SignalType_FixedArray497_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray497_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray497_uint8_t) == 8); +typedef const SignalType_FixedArray497_uint8_t* SignalType_ConstPointer_FixedArray497_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray497_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray497_uint8_t) == 8); typedef uint8_t SignalType_FixedArray64_uint8_t[64]; static_assert_64bit(sizeof(SignalType_FixedArray64_uint8_t) == 64); static_assert_64bit(alignof(SignalType_FixedArray64_uint8_t) == 1); -typedef const SignalType_FixedArray64_uint8_t* SignalType_ConstPointer_SignalType_FixedArray64_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray64_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray64_uint8_t) == 8); +typedef const SignalType_FixedArray64_uint8_t* SignalType_ConstPointer_FixedArray64_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray64_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray64_uint8_t) == 8); typedef uint8_t SignalType_FixedArray65_uint8_t[65]; static_assert_64bit(sizeof(SignalType_FixedArray65_uint8_t) == 65); static_assert_64bit(alignof(SignalType_FixedArray65_uint8_t) == 1); -typedef const SignalType_FixedArray65_uint8_t* SignalType_ConstPointer_SignalType_FixedArray65_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray65_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray65_uint8_t) == 8); +typedef const SignalType_FixedArray65_uint8_t* SignalType_ConstPointer_FixedArray65_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray65_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray65_uint8_t) == 8); typedef uint8_t SignalType_FixedArray97_uint8_t[97]; static_assert_64bit(sizeof(SignalType_FixedArray97_uint8_t) == 97); static_assert_64bit(alignof(SignalType_FixedArray97_uint8_t) == 1); -typedef const SignalType_FixedArray97_uint8_t* SignalType_ConstPointer_SignalType_FixedArray97_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalType_FixedArray97_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalType_FixedArray97_uint8_t) == 8); +typedef const SignalType_FixedArray97_uint8_t* SignalType_ConstPointer_FixedArray97_uint8_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray97_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray97_uint8_t) == 8); +typedef struct SignalAes256GcmSiv SignalAes256GcmSiv; +typedef const SignalAes256GcmSiv* SignalType_ConstPointer_SignalAes256GcmSiv; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalAes256GcmSiv) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalAes256GcmSiv) == 8); static_assert_64bit(sizeof(bool) == 1); static_assert_64bit(alignof(bool) == 1); typedef const bool* SignalType_ConstPointer_bool; @@ -112,19 +124,15 @@ static_assert_64bit(alignof(SignalType_ConstPointer_bool) == 8); typedef const void* SignalType_ConstPointer_void; static_assert_64bit(sizeof(SignalType_ConstPointer_void) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_void) == 8); -static_assert_64bit(sizeof(int8_t) == 1); -static_assert_64bit(alignof(int8_t) == 1); -typedef const int8_t* SignalCStringPtr; -static_assert_64bit(sizeof(SignalCStringPtr) == 8); -static_assert_64bit(alignof(SignalCStringPtr) == 8); +static_assert_64bit(sizeof(int32_t) == 4); +static_assert_64bit(alignof(int32_t) == 4); +typedef const int32_t* SignalType_ConstPointer_int32_t; +static_assert_64bit(sizeof(SignalType_ConstPointer_int32_t) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_int32_t) == 8); typedef struct SignalPinHash SignalPinHash; typedef const SignalPinHash* SignalType_ConstPointer_SignalPinHash; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPinHash) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalPinHash) == 8); -typedef struct SignalAes256GcmSiv SignalAes256GcmSiv; -typedef const SignalAes256GcmSiv* SignalType_ConstPointer_SignalAes256GcmSiv; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalAes256GcmSiv) == 8); typedef const uint8_t* SignalType_ConstPointer_uint8_t; static_assert_64bit(sizeof(SignalType_ConstPointer_uint8_t) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_uint8_t) == 8); @@ -193,8 +201,6 @@ static_assert_64bit(alignof(SignalConstPointerSessionRecord) == 8); typedef const SignalConstPointerSessionRecord* SignalType_ConstPointer_SignalConstPointerSessionRecord; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConstPointerSessionRecord) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalConstPointerSessionRecord) == 8); -static_assert_64bit(sizeof(int32_t) == 4); -static_assert_64bit(alignof(int32_t) == 4); static_assert_64bit(sizeof(uint64_t) == 8); static_assert_64bit(alignof(uint64_t) == 8); typedef struct { @@ -484,9 +490,9 @@ static_assert_64bit(alignof(SignalOptionalUuid) == 1); typedef const SignalOptionalUuid* SignalType_ConstPointer_SignalOptionalUuid; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOptionalUuid) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalOptionalUuid) == 8); -typedef SignalType_FixedArray17_uint8_t* SignalType_MutPointer_SignalType_FixedArray17_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray17_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray17_uint8_t) == 8); +typedef SignalType_FixedArray17_uint8_t* SignalType_MutPointer_FixedArray17_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray17_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray17_uint8_t) == 8); typedef struct { SignalType_FixedArray17_uint8_t* base; size_t length; @@ -501,6 +507,92 @@ static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17 typedef const SignalOwnedBuffer* SignalType_ConstPointer_SignalOwnedBuffer; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBuffer) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBuffer) == 8); +typedef enum { + SignalAuthCheckResultFfiResultMatch, + SignalAuthCheckResultFfiResultNoMatch, + SignalAuthCheckResultFfiResultInvalid, +} SignalAuthCheckResultFfiResult; +static_assert_64bit(sizeof(SignalAuthCheckResultFfiResult) == 4); +static_assert_64bit(alignof(SignalAuthCheckResultFfiResult) == 4); +typedef struct { + const int8_t* first; + SignalAuthCheckResultFfiResult second; +} SignalPairOfCStringPtrAuthCheckResultFfiResult; +static_assert_64bit(offsetof(SignalPairOfCStringPtrAuthCheckResultFfiResult, first) == 0); +static_assert_64bit(offsetof(SignalPairOfCStringPtrAuthCheckResultFfiResult, second) == 8); +static_assert_64bit(sizeof(SignalPairOfCStringPtrAuthCheckResultFfiResult) == 16); +static_assert_64bit(alignof(SignalPairOfCStringPtrAuthCheckResultFfiResult) == 8); +typedef SignalPairOfCStringPtrAuthCheckResultFfiResult* SignalType_MutPointer_SignalPairOfCStringPtrAuthCheckResultFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfCStringPtrAuthCheckResultFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfCStringPtrAuthCheckResultFfiResult) == 8); +typedef struct { + SignalPairOfCStringPtrAuthCheckResultFfiResult* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); +typedef const SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult* SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); +typedef struct { + const int8_t* name; + uint64_t created_at; +} SignalBridgeMfaMetadataFfiResult; +static_assert_64bit(offsetof(SignalBridgeMfaMetadataFfiResult, name) == 0); +static_assert_64bit(offsetof(SignalBridgeMfaMetadataFfiResult, created_at) == 8); +static_assert_64bit(sizeof(SignalBridgeMfaMetadataFfiResult) == 16); +static_assert_64bit(alignof(SignalBridgeMfaMetadataFfiResult) == 8); +typedef enum { + SignalBridgeConfirmedMfaKeyMetadataFfiResultMetadata, + SignalBridgeConfirmedMfaKeyMetadataFfiResultUnreadable, +} SignalBridgeConfirmedMfaKeyMetadataFfiResult_Tag; +typedef struct { + SignalBridgeMfaMetadataFfiResult _0; +} SignalBridgeConfirmedMfaKeyMetadataFfiResultSignalMetadata_Body; +typedef struct { + SignalBridgeConfirmedMfaKeyMetadataFfiResult_Tag tag; + union { + SignalBridgeConfirmedMfaKeyMetadataFfiResultSignalMetadata_Body metadata; + }; +} SignalBridgeConfirmedMfaKeyMetadataFfiResult; +static_assert_64bit(sizeof(SignalBridgeConfirmedMfaKeyMetadataFfiResult) == 24); +static_assert_64bit(alignof(SignalBridgeConfirmedMfaKeyMetadataFfiResult) == 8); +typedef enum { + SignalBridgeMfaKeyKindFfiResultTotp, + SignalBridgeMfaKeyKindFfiResultUnknown, +} SignalBridgeMfaKeyKindFfiResult; +static_assert_64bit(sizeof(SignalBridgeMfaKeyKindFfiResult) == 4); +static_assert_64bit(alignof(SignalBridgeMfaKeyKindFfiResult) == 4); +typedef struct { + int32_t id; + SignalBridgeConfirmedMfaKeyMetadataFfiResult metadata; + SignalBridgeMfaKeyKindFfiResult kind; +} SignalBridgeConfirmedMfaKeyFfiResult; +static_assert_64bit(offsetof(SignalBridgeConfirmedMfaKeyFfiResult, id) == 0); +static_assert_64bit(offsetof(SignalBridgeConfirmedMfaKeyFfiResult, metadata) == 8); +static_assert_64bit(offsetof(SignalBridgeConfirmedMfaKeyFfiResult, kind) == 32); +static_assert_64bit(sizeof(SignalBridgeConfirmedMfaKeyFfiResult) == 40); +static_assert_64bit(alignof(SignalBridgeConfirmedMfaKeyFfiResult) == 8); +typedef SignalBridgeConfirmedMfaKeyFfiResult* SignalType_MutPointer_SignalBridgeConfirmedMfaKeyFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalBridgeConfirmedMfaKeyFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalBridgeConfirmedMfaKeyFfiResult) == 8); +typedef struct { + SignalBridgeConfirmedMfaKeyFfiResult* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); +typedef const SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult* SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); typedef struct { uint8_t id; SignalOwnedBuffer encrypted_name; @@ -576,20 +668,20 @@ static_assert_64bit(alignof(SignalType_ConstPointer_SignalUuid) == 8); typedef void* SignalType_MutPointer_void; static_assert_64bit(sizeof(SignalType_MutPointer_void) == 8); static_assert_64bit(alignof(SignalType_MutPointer_void) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_void)(SignalType_MutPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_void)(SignalType_MutPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_void) == 8); typedef struct SignalConnectionManager SignalConnectionManager; typedef const SignalConnectionManager* SignalType_ConstPointer_SignalConnectionManager; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConnectionManager) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalConnectionManager) == 8); -typedef SignalType_ConstPointer_SignalConnectionManager (*SignalType_FunctionPointer_SignalType_ConstPointer_SignalConnectionManager_SignalType_MutPointer_void)(SignalType_MutPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_SignalType_ConstPointer_SignalConnectionManager_SignalType_MutPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_SignalType_ConstPointer_SignalConnectionManager_SignalType_MutPointer_void) == 8); +typedef SignalType_ConstPointer_SignalConnectionManager (*SignalType_FunctionPointer_ConstPointer_SignalConnectionManager_MutPointer_void)(SignalType_MutPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_ConstPointer_SignalConnectionManager_MutPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_ConstPointer_SignalConnectionManager_MutPointer_void) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_SignalType_ConstPointer_SignalConnectionManager_SignalType_MutPointer_void get_connection_manager; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_ConstPointer_SignalConnectionManager_MutPointer_void get_connection_manager; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiConnectChatBridgeStruct; static_assert_64bit(offsetof(SignalFfiConnectChatBridgeStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiConnectChatBridgeStruct, get_connection_manager) == 8); @@ -615,17 +707,17 @@ static_assert_64bit(offsetof(SignalBorrowedMutableBuffer, base) == 0); static_assert_64bit(offsetof(SignalBorrowedMutableBuffer, length) == 8); static_assert_64bit(sizeof(SignalBorrowedMutableBuffer) == 16); static_assert_64bit(alignof(SignalBorrowedMutableBuffer) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_size_t_SignalBorrowedMutableBuffer)(SignalType_MutPointer_void, SignalType_MutPointer_size_t, SignalBorrowedMutableBuffer); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_size_t_SignalBorrowedMutableBuffer) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_size_t_SignalBorrowedMutableBuffer) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint64_t)(SignalType_MutPointer_void, uint64_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint64_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint64_t) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer)(SignalType_MutPointer_void, SignalType_MutPointer_size_t, SignalBorrowedMutableBuffer); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t)(SignalType_MutPointer_void, uint64_t); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_size_t_SignalBorrowedMutableBuffer read; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint64_t skip; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer read; + SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t skip; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiSyncInputStreamStruct; static_assert_64bit(offsetof(SignalFfiSyncInputStreamStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiSyncInputStreamStruct, read) == 8); @@ -710,6 +802,42 @@ static_assert_64bit(alignof(SignalBridgeMessageBackupInfoFfiResult) == 8); typedef const SignalBridgeMessageBackupInfoFfiResult* SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult) == 8); +typedef struct { + const int8_t* algorithm; + int32_t password_length; + int32_t time_step_seconds; +} SignalBridgeTotpParametersFfiResult; +static_assert_64bit(offsetof(SignalBridgeTotpParametersFfiResult, algorithm) == 0); +static_assert_64bit(offsetof(SignalBridgeTotpParametersFfiResult, password_length) == 8); +static_assert_64bit(offsetof(SignalBridgeTotpParametersFfiResult, time_step_seconds) == 12); +static_assert_64bit(sizeof(SignalBridgeTotpParametersFfiResult) == 16); +static_assert_64bit(alignof(SignalBridgeTotpParametersFfiResult) == 8); +typedef struct { + SignalOwnedBuffer key; + SignalBridgeTotpParametersFfiResult parameters; +} SignalBridgePendingTotpKeyFfiResult; +static_assert_64bit(offsetof(SignalBridgePendingTotpKeyFfiResult, key) == 0); +static_assert_64bit(offsetof(SignalBridgePendingTotpKeyFfiResult, parameters) == 16); +static_assert_64bit(sizeof(SignalBridgePendingTotpKeyFfiResult) == 32); +static_assert_64bit(alignof(SignalBridgePendingTotpKeyFfiResult) == 8); +typedef const SignalBridgePendingTotpKeyFfiResult* SignalType_ConstPointer_SignalBridgePendingTotpKeyFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgePendingTotpKeyFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgePendingTotpKeyFfiResult) == 8); +typedef struct { + int32_t aci_ec_pre_key_count; + int32_t aci_kem_pre_key_count; + int32_t pni_ec_pre_key_count; + int32_t pni_kem_pre_key_count; +} SignalBridgePreKeyCountsFfiResult; +static_assert_64bit(offsetof(SignalBridgePreKeyCountsFfiResult, aci_ec_pre_key_count) == 0); +static_assert_64bit(offsetof(SignalBridgePreKeyCountsFfiResult, aci_kem_pre_key_count) == 4); +static_assert_64bit(offsetof(SignalBridgePreKeyCountsFfiResult, pni_ec_pre_key_count) == 8); +static_assert_64bit(offsetof(SignalBridgePreKeyCountsFfiResult, pni_kem_pre_key_count) == 12); +static_assert_64bit(sizeof(SignalBridgePreKeyCountsFfiResult) == 16); +static_assert_64bit(alignof(SignalBridgePreKeyCountsFfiResult) == 4); +typedef const SignalBridgePreKeyCountsFfiResult* SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult) == 8); typedef enum { SignalBridgeCopyBackupMediaResultFfiResultSuccess, SignalBridgeCopyBackupMediaResultFfiResultSourceNotFound, @@ -808,15 +936,15 @@ typedef struct SignalDeleteBackupMediaStream SignalDeleteBackupMediaStream; typedef const SignalDeleteBackupMediaStream* SignalType_ConstPointer_SignalDeleteBackupMediaStream; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalDeleteBackupMediaStream) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalDeleteBackupMediaStream) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void)(SignalType_MutPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalFfiError)(SignalType_MutPointer_void, SignalType_MutPointer_SignalFfiError); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalFfiError) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalFfiError) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalBytestringArray)(SignalType_MutPointer_void, SignalBytestringArray); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalBytestringArray) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalBytestringArray) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void)(SignalType_MutPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError)(SignalType_MutPointer_void, SignalType_MutPointer_SignalFfiError); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray)(SignalType_MutPointer_void, SignalBytestringArray); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray) == 8); typedef struct SignalServerMessageAck SignalServerMessageAck; typedef SignalServerMessageAck* SignalType_MutPointer_SignalServerMessageAck; static_assert_64bit(sizeof(SignalType_MutPointer_SignalServerMessageAck) == 8); @@ -827,17 +955,17 @@ typedef struct { static_assert_64bit(offsetof(SignalMutPointerServerMessageAck, raw) == 0); static_assert_64bit(sizeof(SignalMutPointerServerMessageAck) == 8); static_assert_64bit(alignof(SignalMutPointerServerMessageAck) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalOwnedBuffer, uint64_t, SignalMutPointerServerMessageAck); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalOwnedBuffer, uint64_t, SignalMutPointerServerMessageAck); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck received_incoming_message; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void received_queue_empty; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalBytestringArray received_alerts; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint64_t received_server_timestamp; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalFfiError connection_interrupted; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck received_incoming_message; + SignalType_FunctionPointer_int32_t_MutPointer_void received_queue_empty; + SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray received_alerts; + SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t received_server_timestamp; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError connection_interrupted; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiChatListenerStruct; static_assert_64bit(offsetof(SignalFfiChatListenerStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiChatListenerStruct, received_incoming_message) == 8); @@ -851,18 +979,18 @@ static_assert_64bit(alignof(SignalFfiChatListenerStruct) == 8); typedef const SignalFfiChatListenerStruct* SignalType_ConstPointer_SignalFfiChatListenerStruct; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiChatListenerStruct) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiChatListenerStruct) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalCStringPtr, SignalMutPointerServerMessageAck); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalOwnedBuffer, SignalMutPointerServerMessageAck); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalCStringPtr, SignalMutPointerServerMessageAck); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalOwnedBuffer, SignalMutPointerServerMessageAck); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck received_address; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck received_envelope; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalFfiError connection_interrupted; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck received_address; + SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck received_envelope; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError connection_interrupted; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiProvisioningListenerStruct; static_assert_64bit(offsetof(SignalFfiProvisioningListenerStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiProvisioningListenerStruct, received_address) == 8); @@ -887,6 +1015,109 @@ static_assert_64bit(alignof(SignalType_ConstPointer_SignalServerMessageAck) == 8 typedef const SignalUnauthenticatedChatConnection* SignalType_ConstPointer_SignalUnauthenticatedChatConnection; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalUnauthenticatedChatConnection) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalUnauthenticatedChatConnection) == 8); +typedef SignalPairOfCStringPtrCStringPtr* SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr) == 8); +typedef struct { + SignalPairOfCStringPtrCStringPtr* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr) == 8); +typedef struct { + const int8_t* base; + SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr conversions; +} SignalCurrencyInternalFfiResult; +static_assert_64bit(offsetof(SignalCurrencyInternalFfiResult, base) == 0); +static_assert_64bit(offsetof(SignalCurrencyInternalFfiResult, conversions) == 8); +static_assert_64bit(sizeof(SignalCurrencyInternalFfiResult) == 32); +static_assert_64bit(alignof(SignalCurrencyInternalFfiResult) == 8); +typedef SignalCurrencyInternalFfiResult* SignalType_MutPointer_SignalCurrencyInternalFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCurrencyInternalFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCurrencyInternalFfiResult) == 8); +typedef struct { + SignalCurrencyInternalFfiResult* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult) == 8); +typedef struct { + uint64_t timestamp_ms; + SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult currencies; +} SignalCurrencyConversionsInternalFfiResult; +static_assert_64bit(offsetof(SignalCurrencyConversionsInternalFfiResult, timestamp_ms) == 0); +static_assert_64bit(offsetof(SignalCurrencyConversionsInternalFfiResult, currencies) == 8); +static_assert_64bit(sizeof(SignalCurrencyConversionsInternalFfiResult) == 32); +static_assert_64bit(alignof(SignalCurrencyConversionsInternalFfiResult) == 8); +typedef const SignalCurrencyConversionsInternalFfiResult* SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult) == 8); +typedef enum { + SignalDeviceCapabilityInternalFfiArgStorage, + SignalDeviceCapabilityInternalFfiArgTransfer, + SignalDeviceCapabilityInternalFfiArgAttachmentBackfill, + SignalDeviceCapabilityInternalFfiArgSparsePostQuantumRatchet, + SignalDeviceCapabilityInternalFfiArgProfilesV2, + SignalDeviceCapabilityInternalFfiArgUsernameChangeSyncMessage, + SignalDeviceCapabilityInternalFfiArgOptionalPhoneNumber, +} SignalDeviceCapabilityInternalFfiArg; +static_assert_64bit(sizeof(SignalDeviceCapabilityInternalFfiArg) == 4); +static_assert_64bit(alignof(SignalDeviceCapabilityInternalFfiArg) == 4); +typedef const SignalDeviceCapabilityInternalFfiArg* SignalType_ConstPointer_SignalDeviceCapabilityInternalFfiArg; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalDeviceCapabilityInternalFfiArg) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalDeviceCapabilityInternalFfiArg) == 8); +typedef struct { + const int8_t* key; + const int8_t* credential; + const int8_t* acl; + const int8_t* algorithm; + const int8_t* date; + const int8_t* policy; + const int8_t* signature; +} SignalS3UploadFormInternalFfiResult; +static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, key) == 0); +static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, credential) == 8); +static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, acl) == 16); +static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, algorithm) == 24); +static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, date) == 32); +static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, policy) == 40); +static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, signature) == 48); +static_assert_64bit(sizeof(SignalS3UploadFormInternalFfiResult) == 56); +static_assert_64bit(alignof(SignalS3UploadFormInternalFfiResult) == 8); +typedef SignalS3UploadFormInternalFfiResult* SignalType_MutPointer_SignalS3UploadFormInternalFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalS3UploadFormInternalFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalS3UploadFormInternalFfiResult) == 8); +typedef struct { + SignalS3UploadFormInternalFfiResult* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult) == 8); +typedef struct { + const int8_t* pack_id; + SignalS3UploadFormInternalFfiResult manifest_upload_form; + SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult sticker_upload_forms; +} SignalGetStickerUploadFormsResponseFfiResult; +static_assert_64bit(offsetof(SignalGetStickerUploadFormsResponseFfiResult, pack_id) == 0); +static_assert_64bit(offsetof(SignalGetStickerUploadFormsResponseFfiResult, manifest_upload_form) == 8); +static_assert_64bit(offsetof(SignalGetStickerUploadFormsResponseFfiResult, sticker_upload_forms) == 64); +static_assert_64bit(sizeof(SignalGetStickerUploadFormsResponseFfiResult) == 88); +static_assert_64bit(alignof(SignalGetStickerUploadFormsResponseFfiResult) == 8); +typedef const SignalGetStickerUploadFormsResponseFfiResult* SignalType_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult) == 8); typedef struct { int32_t cdn; SignalType_FixedArray15_uint8_t media_id; @@ -952,15 +1183,15 @@ typedef struct { static_assert_64bit(offsetof(SignalMutPointerProtocolAddress, raw) == 0); static_assert_64bit(sizeof(SignalMutPointerProtocolAddress) == 8); static_assert_64bit(alignof(SignalMutPointerProtocolAddress) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_bool, SignalMutPointerProtocolAddress, SignalMutPointerPublicKey, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_bool, SignalMutPointerProtocolAddress, SignalMutPointerPublicKey, uint32_t); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t) == 8); typedef SignalMutPointerPublicKey* SignalType_MutPointer_SignalMutPointerPublicKey; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPublicKey) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPublicKey) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerPublicKey, SignalMutPointerProtocolAddress); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerPublicKey, SignalMutPointerProtocolAddress); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress) == 8); typedef struct SignalPrivateKey SignalPrivateKey; typedef SignalPrivateKey* SignalType_MutPointer_SignalPrivateKey; static_assert_64bit(sizeof(SignalType_MutPointer_SignalPrivateKey) == 8); @@ -982,26 +1213,26 @@ static_assert_64bit(alignof(SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) typedef SignalPairOfMutPointerPrivateKeyMutPointerPublicKey* SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey; static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey)(SignalType_MutPointer_void, SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey)(SignalType_MutPointer_void, SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); typedef uint32_t* SignalType_MutPointer_uint32_t; static_assert_64bit(sizeof(SignalType_MutPointer_uint32_t) == 8); static_assert_64bit(alignof(SignalType_MutPointer_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey)(SignalType_MutPointer_void, SignalType_MutPointer_uint8_t, SignalMutPointerProtocolAddress, SignalMutPointerPublicKey); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_uint32_t); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey)(SignalType_MutPointer_void, SignalType_MutPointer_uint8_t, SignalMutPointerProtocolAddress, SignalMutPointerPublicKey); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey get_local_identity_key_pair; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint32_t get_local_registration_id; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress get_identity_key; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey save_identity_key; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t is_trusted_identity; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey get_local_identity_key_pair; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t get_local_registration_id; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress get_identity_key; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey save_identity_key; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t is_trusted_identity; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiIdentityKeyStoreStruct; static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, get_local_identity_key_pair) == 8); @@ -1028,21 +1259,21 @@ static_assert_64bit(alignof(SignalMutPointerKyberPreKeyRecord) == 8); typedef SignalMutPointerKyberPreKeyRecord* SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerKyberPreKeyRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey)(SignalType_MutPointer_void, uint32_t, uint32_t, SignalMutPointerPublicKey); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord, uint32_t); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerKyberPreKeyRecord); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey)(SignalType_MutPointer_void, uint32_t, uint32_t, SignalMutPointerPublicKey); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t load_kyber_pre_key; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord store_kyber_pre_key; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey mark_kyber_pre_key_used; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t load_kyber_pre_key; + SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord store_kyber_pre_key; + SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey mark_kyber_pre_key_used; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiKyberPreKeyStoreStruct; static_assert_64bit(offsetof(SignalFfiKyberPreKeyStoreStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiKyberPreKeyStoreStruct, load_kyber_pre_key) == 8); @@ -1067,21 +1298,21 @@ static_assert_64bit(alignof(SignalMutPointerPreKeyRecord) == 8); typedef SignalMutPointerPreKeyRecord* SignalType_MutPointer_SignalMutPointerPreKeyRecord; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPreKeyRecord) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPreKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerPreKeyRecord, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPreKeyRecord_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPreKeyRecord_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t)(SignalType_MutPointer_void, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerPreKeyRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerPreKeyRecord, uint32_t); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t)(SignalType_MutPointer_void, uint32_t); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerPreKeyRecord); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPreKeyRecord_uint32_t load_pre_key; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord store_pre_key; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t remove_pre_key; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t load_pre_key; + SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord store_pre_key; + SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t remove_pre_key; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiPreKeyStoreStruct; static_assert_64bit(offsetof(SignalFfiPreKeyStoreStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiPreKeyStoreStruct, load_pre_key) == 8); @@ -1106,17 +1337,17 @@ static_assert_64bit(alignof(SignalMutPointerSenderKeyRecord) == 8); typedef SignalMutPointerSenderKeyRecord* SignalType_MutPointer_SignalMutPointerSenderKeyRecord; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSenderKeyRecord) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSenderKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSenderKeyRecord, SignalMutPointerProtocolAddress, SignalUuid); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord)(SignalType_MutPointer_void, SignalMutPointerProtocolAddress, SignalUuid, SignalMutPointerSenderKeyRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSenderKeyRecord, SignalMutPointerProtocolAddress, SignalUuid); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord)(SignalType_MutPointer_void, SignalMutPointerProtocolAddress, SignalUuid, SignalMutPointerSenderKeyRecord); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid load_sender_key; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord store_sender_key; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid load_sender_key; + SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord store_sender_key; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiSenderKeyStoreStruct; static_assert_64bit(offsetof(SignalFfiSenderKeyStoreStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiSenderKeyStoreStruct, load_sender_key) == 8); @@ -1139,17 +1370,17 @@ static_assert_64bit(alignof(SignalMutPointerSessionRecord) == 8); typedef SignalMutPointerSessionRecord* SignalType_MutPointer_SignalMutPointerSessionRecord; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSessionRecord) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSessionRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSessionRecord, SignalMutPointerProtocolAddress); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord)(SignalType_MutPointer_void, SignalMutPointerProtocolAddress, SignalMutPointerSessionRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSessionRecord, SignalMutPointerProtocolAddress); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord)(SignalType_MutPointer_void, SignalMutPointerProtocolAddress, SignalMutPointerSessionRecord); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress load_session; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord store_session; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress load_session; + SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord store_session; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiSessionStoreStruct; static_assert_64bit(offsetof(SignalFfiSessionStoreStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiSessionStoreStruct, load_session) == 8); @@ -1173,17 +1404,17 @@ static_assert_64bit(alignof(SignalMutPointerSignedPreKeyRecord) == 8); typedef SignalMutPointerSignedPreKeyRecord* SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerSignedPreKeyRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord, uint32_t); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerSignedPreKeyRecord); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord) == 8); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t load_signed_pre_key; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord store_signed_pre_key; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t load_signed_pre_key; + SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord store_signed_pre_key; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiSignedPreKeyStoreStruct; static_assert_64bit(offsetof(SignalFfiSignedPreKeyStoreStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiSignedPreKeyStoreStruct, load_signed_pre_key) == 8); @@ -1307,48 +1538,51 @@ typedef struct SignalServerSecretParams SignalServerSecretParams; typedef const SignalServerSecretParams* SignalType_ConstPointer_SignalServerSecretParams; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalServerSecretParams) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalServerSecretParams) == 8); -typedef SignalType_FixedArray129_uint8_t* SignalType_MutPointer_SignalType_FixedArray129_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray129_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray129_uint8_t) == 8); -typedef SignalType_FixedArray153_uint8_t* SignalType_MutPointer_SignalType_FixedArray153_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray153_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray153_uint8_t) == 8); -typedef SignalType_FixedArray15_uint8_t* SignalType_MutPointer_SignalType_FixedArray15_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray15_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray15_uint8_t) == 8); -typedef SignalType_FixedArray16_uint8_t* SignalType_MutPointer_SignalType_FixedArray16_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray16_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray16_uint8_t) == 8); -typedef SignalType_FixedArray177_uint8_t* SignalType_MutPointer_SignalType_FixedArray177_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray177_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray177_uint8_t) == 8); -typedef SignalType_FixedArray289_uint8_t* SignalType_MutPointer_SignalType_FixedArray289_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray289_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray289_uint8_t) == 8); -typedef SignalType_FixedArray329_uint8_t* SignalType_MutPointer_SignalType_FixedArray329_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray329_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray329_uint8_t) == 8); -typedef SignalType_FixedArray32_uint8_t* SignalType_MutPointer_SignalType_FixedArray32_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray32_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray32_uint8_t) == 8); -typedef SignalType_FixedArray409_uint8_t* SignalType_MutPointer_SignalType_FixedArray409_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray409_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray409_uint8_t) == 8); -typedef SignalType_FixedArray473_uint8_t* SignalType_MutPointer_SignalType_FixedArray473_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray473_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray473_uint8_t) == 8); -typedef SignalType_FixedArray497_uint8_t* SignalType_MutPointer_SignalType_FixedArray497_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray497_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray497_uint8_t) == 8); -typedef SignalType_FixedArray64_uint8_t* SignalType_MutPointer_SignalType_FixedArray64_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray64_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray64_uint8_t) == 8); -typedef SignalType_FixedArray65_uint8_t* SignalType_MutPointer_SignalType_FixedArray65_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray65_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray65_uint8_t) == 8); -typedef SignalType_FixedArray97_uint8_t* SignalType_MutPointer_SignalType_FixedArray97_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalType_FixedArray97_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalType_FixedArray97_uint8_t) == 8); +typedef SignalType_FixedArray129_uint8_t* SignalType_MutPointer_FixedArray129_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray129_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray129_uint8_t) == 8); +typedef SignalType_FixedArray153_uint8_t* SignalType_MutPointer_FixedArray153_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray153_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray153_uint8_t) == 8); +typedef SignalType_FixedArray15_uint8_t* SignalType_MutPointer_FixedArray15_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray15_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray15_uint8_t) == 8); +typedef SignalType_FixedArray16_uint8_t* SignalType_MutPointer_FixedArray16_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray16_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray16_uint8_t) == 8); +typedef SignalType_FixedArray177_uint8_t* SignalType_MutPointer_FixedArray177_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray177_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray177_uint8_t) == 8); +typedef SignalType_FixedArray289_uint8_t* SignalType_MutPointer_FixedArray289_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray289_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray289_uint8_t) == 8); +typedef SignalType_FixedArray329_uint8_t* SignalType_MutPointer_FixedArray329_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray329_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray329_uint8_t) == 8); +typedef SignalType_FixedArray32_uint8_t* SignalType_MutPointer_FixedArray32_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray32_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray32_uint8_t) == 8); +typedef SignalType_FixedArray409_uint8_t* SignalType_MutPointer_FixedArray409_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray409_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray409_uint8_t) == 8); +typedef SignalType_FixedArray473_uint8_t* SignalType_MutPointer_FixedArray473_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray473_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray473_uint8_t) == 8); +typedef SignalType_FixedArray497_uint8_t* SignalType_MutPointer_FixedArray497_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray497_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray497_uint8_t) == 8); +typedef SignalType_FixedArray64_uint8_t* SignalType_MutPointer_FixedArray64_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray64_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray64_uint8_t) == 8); +typedef SignalType_FixedArray65_uint8_t* SignalType_MutPointer_FixedArray65_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray65_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray65_uint8_t) == 8); +typedef SignalType_FixedArray97_uint8_t* SignalType_MutPointer_FixedArray97_uint8_t; +static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray97_uint8_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_FixedArray97_uint8_t) == 8); +typedef SignalAes256GcmSiv* SignalType_MutPointer_SignalAes256GcmSiv; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalAes256GcmSiv) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalAes256GcmSiv) == 8); typedef int32_t* SignalType_MutPointer_int32_t; static_assert_64bit(sizeof(SignalType_MutPointer_int32_t) == 8); static_assert_64bit(alignof(SignalType_MutPointer_int32_t) == 8); @@ -1363,9 +1597,6 @@ typedef struct SignalAes256GcmEncryption SignalAes256GcmEncryption; typedef SignalAes256GcmEncryption* SignalType_MutPointer_SignalAes256GcmEncryption; static_assert_64bit(sizeof(SignalType_MutPointer_SignalAes256GcmEncryption) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalAes256GcmEncryption) == 8); -typedef SignalAes256GcmSiv* SignalType_MutPointer_SignalAes256GcmSiv; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalAes256GcmSiv) == 8); typedef SignalBytestringArray* SignalType_MutPointer_SignalBytestringArray; static_assert_64bit(sizeof(SignalType_MutPointer_SignalBytestringArray) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalBytestringArray) == 8); @@ -1407,6 +1638,15 @@ static_assert_64bit(alignof(SignalFfiRegisterResponseBadge) == 8); typedef SignalFfiRegisterResponseBadge* SignalType_MutPointer_SignalFfiRegisterResponseBadge; static_assert_64bit(sizeof(SignalType_MutPointer_SignalFfiRegisterResponseBadge) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalFfiRegisterResponseBadge) == 8); +typedef struct { + SignalAes256GcmSiv* raw; +} SignalMutPointerAes256GcmSiv; +static_assert_64bit(offsetof(SignalMutPointerAes256GcmSiv, raw) == 0); +static_assert_64bit(sizeof(SignalMutPointerAes256GcmSiv) == 8); +static_assert_64bit(alignof(SignalMutPointerAes256GcmSiv) == 8); +typedef SignalMutPointerAes256GcmSiv* SignalType_MutPointer_SignalMutPointerAes256GcmSiv; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerAes256GcmSiv) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerAes256GcmSiv) == 8); typedef struct { SignalPinHash* raw; } SignalMutPointerPinHash; @@ -1434,15 +1674,6 @@ static_assert_64bit(alignof(SignalMutPointerAes256GcmEncryption) == 8); typedef SignalMutPointerAes256GcmEncryption* SignalType_MutPointer_SignalMutPointerAes256GcmEncryption; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerAes256GcmEncryption) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerAes256GcmEncryption) == 8); -typedef struct { - SignalAes256GcmSiv* raw; -} SignalMutPointerAes256GcmSiv; -static_assert_64bit(offsetof(SignalMutPointerAes256GcmSiv, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalMutPointerAes256GcmSiv) == 8); -typedef SignalMutPointerAes256GcmSiv* SignalType_MutPointer_SignalMutPointerAes256GcmSiv; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerAes256GcmSiv) == 8); typedef SignalHsmEnclaveClient* SignalType_MutPointer_SignalHsmEnclaveClient; static_assert_64bit(sizeof(SignalType_MutPointer_SignalHsmEnclaveClient) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalHsmEnclaveClient) == 8); @@ -1885,6 +2116,44 @@ static_assert_64bit(alignof(SignalMutPointerServerSecretParams) == 8); typedef SignalMutPointerServerSecretParams* SignalType_MutPointer_SignalMutPointerServerSecretParams; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerServerSecretParams) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerServerSecretParams) == 8); +typedef enum { + SignalPaymentProviderFfiResultGooglePlayBilling, + SignalPaymentProviderFfiResultAppleAppStore, + SignalPaymentProviderFfiResultStripe, + SignalPaymentProviderFfiResultBraintree, +} SignalPaymentProviderFfiResult; +static_assert_64bit(sizeof(SignalPaymentProviderFfiResult) == 4); +static_assert_64bit(alignof(SignalPaymentProviderFfiResult) == 4); +typedef struct { + SignalPaymentProviderFfiResult processor; + const int8_t* code; + const int8_t* message; + const int8_t* outcome_network_status; + const int8_t* outcome_reason; + const int8_t* outcome_type; +} SignalChargeFailureFfiResult; +static_assert_64bit(offsetof(SignalChargeFailureFfiResult, processor) == 0); +static_assert_64bit(offsetof(SignalChargeFailureFfiResult, code) == 8); +static_assert_64bit(offsetof(SignalChargeFailureFfiResult, message) == 16); +static_assert_64bit(offsetof(SignalChargeFailureFfiResult, outcome_network_status) == 24); +static_assert_64bit(offsetof(SignalChargeFailureFfiResult, outcome_reason) == 32); +static_assert_64bit(offsetof(SignalChargeFailureFfiResult, outcome_type) == 40); +static_assert_64bit(sizeof(SignalChargeFailureFfiResult) == 48); +static_assert_64bit(alignof(SignalChargeFailureFfiResult) == 8); +typedef SignalChargeFailureFfiResult MaybeUninitOfChargeFailureFfiResult; +static_assert_64bit(sizeof(MaybeUninitOfChargeFailureFfiResult) == 48); +static_assert_64bit(alignof(MaybeUninitOfChargeFailureFfiResult) == 8); +typedef struct { + bool present; + MaybeUninitOfChargeFailureFfiResult value; +} SignalOptionalOfChargeFailureFfiResult; +static_assert_64bit(offsetof(SignalOptionalOfChargeFailureFfiResult, present) == 0); +static_assert_64bit(offsetof(SignalOptionalOfChargeFailureFfiResult, value) == 8); +static_assert_64bit(sizeof(SignalOptionalOfChargeFailureFfiResult) == 56); +static_assert_64bit(alignof(SignalOptionalOfChargeFailureFfiResult) == 8); +typedef SignalOptionalOfChargeFailureFfiResult* SignalType_MutPointer_SignalOptionalOfChargeFailureFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalOptionalOfChargeFailureFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalOptionalOfChargeFailureFfiResult) == 8); typedef SignalOptionalUuid* SignalType_MutPointer_SignalOptionalUuid; static_assert_64bit(sizeof(SignalType_MutPointer_SignalOptionalUuid) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalOptionalUuid) == 8); @@ -1913,9 +2182,6 @@ static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBufferOfFfiRegister typedef SignalOwnedBuffer* SignalType_MutPointer_SignalOwnedBuffer; static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBuffer) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBuffer) == 8); -typedef SignalPairOfCStringPtrCStringPtr* SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr) == 8); typedef struct { const int8_t* first; bool second; @@ -1971,11 +2237,11 @@ static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfPairOfCStringPtrOw typedef SignalUuid* SignalType_MutPointer_SignalUuid; static_assert_64bit(sizeof(SignalType_MutPointer_SignalUuid) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalUuid) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalType_FixedArray32_uint8_t_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalType_FixedArray32_uint8_t, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalType_FixedArray32_uint8_t_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalType_FixedArray32_uint8_t_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_FixedArray32_uint8_t, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalType_FixedArray32_uint8_t_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromisec_uchar32; @@ -1987,11 +2253,11 @@ static_assert_64bit(alignof(SignalCPromisec_uchar32) == 8); typedef SignalCPromisec_uchar32* SignalType_MutPointer_SignalCPromisec_uchar32; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisec_uchar32) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisec_uchar32) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_bool_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_bool, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_bool_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_bool_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_bool_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_bool, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_bool_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_bool_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_bool_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_bool_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromisebool; @@ -2003,11 +2269,27 @@ static_assert_64bit(alignof(SignalCPromisebool) == 8); typedef SignalCPromisebool* SignalType_MutPointer_SignalCPromisebool; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisebool) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisebool) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiCdsiLookupResponse_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiCdsiLookupResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiCdsiLookupResponse_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiCdsiLookupResponse_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_int32_t_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_int32_t, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_int32_t_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_int32_t_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiCdsiLookupResponse_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_int32_t_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromisei32; +static_assert_64bit(offsetof(SignalCPromisei32, complete) == 0); +static_assert_64bit(offsetof(SignalCPromisei32, context) == 8); +static_assert_64bit(offsetof(SignalCPromisei32, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromisei32) == 24); +static_assert_64bit(alignof(SignalCPromisei32) == 8); +typedef SignalCPromisei32* SignalType_MutPointer_SignalCPromisei32; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisei32) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisei32) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCdsiLookupResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiCdsiLookupResponse, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCdsiLookupResponse_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCdsiLookupResponse_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCdsiLookupResponse_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseFfiCdsiLookupResponse; @@ -2019,11 +2301,11 @@ static_assert_64bit(alignof(SignalCPromiseFfiCdsiLookupResponse) == 8); typedef SignalCPromiseFfiCdsiLookupResponse* SignalType_MutPointer_SignalCPromiseFfiCdsiLookupResponse; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiCdsiLookupResponse) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiCdsiLookupResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiChatResponse_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiChatResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiChatResponse_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiChatResponse_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiChatResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiChatResponse, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiChatResponse_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiChatResponse_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiChatResponse_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiChatResponse_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseFfiChatResponse; @@ -2035,11 +2317,11 @@ static_assert_64bit(alignof(SignalCPromiseFfiChatResponse) == 8); typedef SignalCPromiseFfiChatResponse* SignalType_MutPointer_SignalCPromiseFfiChatResponse; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiChatResponse) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiChatResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseFfiCheckSvr2CredentialsResponse; @@ -2051,11 +2333,11 @@ static_assert_64bit(alignof(SignalCPromiseFfiCheckSvr2CredentialsResponse) == 8) typedef SignalCPromiseFfiCheckSvr2CredentialsResponse* SignalType_MutPointer_SignalCPromiseFfiCheckSvr2CredentialsResponse; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiCheckSvr2CredentialsResponse) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiCheckSvr2CredentialsResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiPreKeysResponse_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiPreKeysResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiPreKeysResponse_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiPreKeysResponse_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiPreKeysResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiPreKeysResponse, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiPreKeysResponse_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiPreKeysResponse_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiPreKeysResponse_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiPreKeysResponse_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseFfiPreKeysResponse; @@ -2067,11 +2349,11 @@ static_assert_64bit(alignof(SignalCPromiseFfiPreKeysResponse) == 8); typedef SignalCPromiseFfiPreKeysResponse* SignalType_MutPointer_SignalCPromiseFfiPreKeysResponse; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiPreKeysResponse) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiPreKeysResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiUploadForm_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiUploadForm, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiUploadForm_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiUploadForm_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiUploadForm_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiUploadForm, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiUploadForm_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiUploadForm_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalFfiUploadForm_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiUploadForm_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseFfiUploadForm; @@ -2083,11 +2365,11 @@ static_assert_64bit(alignof(SignalCPromiseFfiUploadForm) == 8); typedef SignalCPromiseFfiUploadForm* SignalType_MutPointer_SignalCPromiseFfiUploadForm; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiUploadForm) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiUploadForm) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerCdsiLookup_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerCdsiLookup, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerCdsiLookup_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerCdsiLookup_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerCdsiLookup_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerCdsiLookup, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerCdsiLookup_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerCdsiLookup_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerCdsiLookup_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerCdsiLookup_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseMutPointerCdsiLookup; @@ -2099,11 +2381,11 @@ static_assert_64bit(alignof(SignalCPromiseMutPointerCdsiLookup) == 8); typedef SignalCPromiseMutPointerCdsiLookup* SignalType_MutPointer_SignalCPromiseMutPointerCdsiLookup; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerCdsiLookup) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerCdsiLookup) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerAuthenticatedChatConnection_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerAuthenticatedChatConnection_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerAuthenticatedChatConnection_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerAuthenticatedChatConnection_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseMutPointerAuthenticatedChatConnection; @@ -2115,11 +2397,11 @@ static_assert_64bit(alignof(SignalCPromiseMutPointerAuthenticatedChatConnection) typedef SignalCPromiseMutPointerAuthenticatedChatConnection* SignalType_MutPointer_SignalCPromiseMutPointerAuthenticatedChatConnection; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerAuthenticatedChatConnection) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerAuthenticatedChatConnection) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerProvisioningChatConnection_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerProvisioningChatConnection_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerProvisioningChatConnection_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerProvisioningChatConnection_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseMutPointerProvisioningChatConnection; @@ -2131,11 +2413,11 @@ static_assert_64bit(alignof(SignalCPromiseMutPointerProvisioningChatConnection) typedef SignalCPromiseMutPointerProvisioningChatConnection* SignalType_MutPointer_SignalCPromiseMutPointerProvisioningChatConnection; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerProvisioningChatConnection) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerProvisioningChatConnection) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseMutPointerUnauthenticatedChatConnection; @@ -2147,11 +2429,11 @@ static_assert_64bit(alignof(SignalCPromiseMutPointerUnauthenticatedChatConnectio typedef SignalCPromiseMutPointerUnauthenticatedChatConnection* SignalType_MutPointer_SignalCPromiseMutPointerUnauthenticatedChatConnection; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerUnauthenticatedChatConnection) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerUnauthenticatedChatConnection) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerRegistrationService_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerRegistrationService, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerRegistrationService_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerRegistrationService_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegistrationService_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerRegistrationService, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegistrationService_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegistrationService_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerRegistrationService_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegistrationService_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseMutPointerRegistrationService; @@ -2163,11 +2445,11 @@ static_assert_64bit(alignof(SignalCPromiseMutPointerRegistrationService) == 8); typedef SignalCPromiseMutPointerRegistrationService* SignalType_MutPointer_SignalCPromiseMutPointerRegistrationService; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerRegistrationService) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerRegistrationService) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupRestoreResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupRestoreResponse_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupRestoreResponse_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupRestoreResponse_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseMutPointerBackupRestoreResponse; @@ -2179,11 +2461,11 @@ static_assert_64bit(alignof(SignalCPromiseMutPointerBackupRestoreResponse) == 8) typedef SignalCPromiseMutPointerBackupRestoreResponse* SignalType_MutPointer_SignalCPromiseMutPointerBackupRestoreResponse; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerBackupRestoreResponse) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerBackupRestoreResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerBackupStoreResponse_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerBackupStoreResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerBackupStoreResponse_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerBackupStoreResponse_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupStoreResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerBackupStoreResponse, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupStoreResponse_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupStoreResponse_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerBackupStoreResponse_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupStoreResponse_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseMutPointerBackupStoreResponse; @@ -2195,11 +2477,11 @@ static_assert_64bit(alignof(SignalCPromiseMutPointerBackupStoreResponse) == 8); typedef SignalCPromiseMutPointerBackupStoreResponse* SignalType_MutPointer_SignalCPromiseMutPointerBackupStoreResponse; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerBackupStoreResponse) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerBackupStoreResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegisterAccountResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegisterAccountResponse_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegisterAccountResponse_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegisterAccountResponse_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseMutPointerRegisterAccountResponse; @@ -2211,11 +2493,11 @@ static_assert_64bit(alignof(SignalCPromiseMutPointerRegisterAccountResponse) == typedef SignalCPromiseMutPointerRegisterAccountResponse* SignalType_MutPointer_SignalCPromiseMutPointerRegisterAccountResponse; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerRegisterAccountResponse) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerRegisterAccountResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseOptionalPairOfCStringPtrc_uchar32; @@ -2227,11 +2509,11 @@ static_assert_64bit(alignof(SignalCPromiseOptionalPairOfCStringPtrc_uchar32) == typedef SignalCPromiseOptionalPairOfCStringPtrc_uchar32* SignalType_MutPointer_SignalCPromiseOptionalPairOfCStringPtrc_uchar32; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOptionalPairOfCStringPtrc_uchar32) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOptionalPairOfCStringPtrc_uchar32) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOptionalUuid_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOptionalUuid, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOptionalUuid_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOptionalUuid_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalUuid_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOptionalUuid, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalUuid_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalUuid_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOptionalUuid_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalUuid_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseOptionalUuid; @@ -2243,11 +2525,11 @@ static_assert_64bit(alignof(SignalCPromiseOptionalUuid) == 8); typedef SignalCPromiseOptionalUuid* SignalType_MutPointer_SignalCPromiseOptionalUuid; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOptionalUuid) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOptionalUuid) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfc_uchar17_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfc_uchar17_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfc_uchar17_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfc_uchar17_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseOwnedBufferOfc_uchar17; @@ -2259,11 +2541,11 @@ static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfc_uchar17) == 8); typedef SignalCPromiseOwnedBufferOfc_uchar17* SignalType_MutPointer_SignalCPromiseOwnedBufferOfc_uchar17; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfc_uchar17) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfc_uchar17) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBuffer_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBuffer, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBuffer_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBuffer_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBuffer_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBuffer, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBuffer_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBuffer_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBuffer_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBuffer_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseOwnedBuffer; @@ -2275,11 +2557,43 @@ static_assert_64bit(alignof(SignalCPromiseOwnedBuffer) == 8); typedef SignalCPromiseOwnedBuffer* SignalType_MutPointer_SignalCPromiseOwnedBuffer; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBuffer) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBuffer) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult; +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); +typedef SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); +typedef SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult; @@ -2291,11 +2605,11 @@ static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInt typedef SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfCStringPtrCStringPtr_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfCStringPtrCStringPtr_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfCStringPtrCStringPtr_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfCStringPtrCStringPtr_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromisePairOfCStringPtrCStringPtr; @@ -2307,11 +2621,11 @@ static_assert_64bit(alignof(SignalCPromisePairOfCStringPtrCStringPtr) == 8); typedef SignalCPromisePairOfCStringPtrCStringPtr* SignalType_MutPointer_SignalCPromisePairOfCStringPtrCStringPtr; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisePairOfCStringPtrCStringPtr) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisePairOfCStringPtrCStringPtr) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr; @@ -2323,11 +2637,11 @@ static_assert_64bit(alignof(SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBuff typedef SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr* SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromisePairOfOwnedBufferOwnedBuffer; @@ -2339,11 +2653,11 @@ static_assert_64bit(alignof(SignalCPromisePairOfOwnedBufferOwnedBuffer) == 8); typedef SignalCPromisePairOfOwnedBufferOwnedBuffer* SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOwnedBuffer; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOwnedBuffer) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOwnedBuffer) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalUuid_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalUuid, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalUuid_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalUuid_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalUuid_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalUuid, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalUuid_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalUuid_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalUuid_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalUuid_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseUuid; @@ -2355,11 +2669,11 @@ static_assert_64bit(alignof(SignalCPromiseUuid) == 8); typedef SignalCPromiseUuid* SignalType_MutPointer_SignalCPromiseUuid; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseUuid) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseUuid) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseBridgeMediaBackupInfoFfiResult; @@ -2371,11 +2685,11 @@ static_assert_64bit(alignof(SignalCPromiseBridgeMediaBackupInfoFfiResult) == 8); typedef SignalCPromiseBridgeMediaBackupInfoFfiResult* SignalType_MutPointer_SignalCPromiseBridgeMediaBackupInfoFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgeMediaBackupInfoFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgeMediaBackupInfoFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseBridgeMessageBackupInfoFfiResult; @@ -2387,11 +2701,43 @@ static_assert_64bit(alignof(SignalCPromiseBridgeMessageBackupInfoFfiResult) == 8 typedef SignalCPromiseBridgeMessageBackupInfoFfiResult* SignalType_MutPointer_SignalCPromiseBridgeMessageBackupInfoFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgeMessageBackupInfoFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgeMessageBackupInfoFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePendingTotpKeyFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgePendingTotpKeyFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePendingTotpKeyFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePendingTotpKeyFfiResult_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePendingTotpKeyFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseBridgePendingTotpKeyFfiResult; +static_assert_64bit(offsetof(SignalCPromiseBridgePendingTotpKeyFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseBridgePendingTotpKeyFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseBridgePendingTotpKeyFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseBridgePendingTotpKeyFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseBridgePendingTotpKeyFfiResult) == 8); +typedef SignalCPromiseBridgePendingTotpKeyFfiResult* SignalType_MutPointer_SignalCPromiseBridgePendingTotpKeyFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgePendingTotpKeyFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgePendingTotpKeyFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePreKeyCountsFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePreKeyCountsFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePreKeyCountsFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePreKeyCountsFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseBridgePreKeyCountsFfiResult; +static_assert_64bit(offsetof(SignalCPromiseBridgePreKeyCountsFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseBridgePreKeyCountsFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseBridgePreKeyCountsFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseBridgePreKeyCountsFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseBridgePreKeyCountsFfiResult) == 8); +typedef SignalCPromiseBridgePreKeyCountsFfiResult* SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseCopyBackupMediaNextChunkFfiResult; @@ -2403,11 +2749,11 @@ static_assert_64bit(alignof(SignalCPromiseCopyBackupMediaNextChunkFfiResult) == typedef SignalCPromiseCopyBackupMediaNextChunkFfiResult* SignalType_MutPointer_SignalCPromiseCopyBackupMediaNextChunkFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseCopyBackupMediaNextChunkFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseCopyBackupMediaNextChunkFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseDeleteBackupMediaNextChunkFfiResult; @@ -2419,11 +2765,43 @@ static_assert_64bit(alignof(SignalCPromiseDeleteBackupMediaNextChunkFfiResult) = typedef SignalCPromiseDeleteBackupMediaNextChunkFfiResult* SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalListMediaResponseFfiResult_SignalType_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalListMediaResponseFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalListMediaResponseFfiResult_SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalListMediaResponseFfiResult_SignalType_ConstPointer_void) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void) == 8); typedef struct { - SignalType_FunctionPointer_void_SignalType_MutPointer_SignalFfiError_SignalType_ConstPointer_SignalListMediaResponseFfiResult_SignalType_ConstPointer_void complete; + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseCurrencyConversionsInternalFfiResult; +static_assert_64bit(offsetof(SignalCPromiseCurrencyConversionsInternalFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseCurrencyConversionsInternalFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseCurrencyConversionsInternalFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseCurrencyConversionsInternalFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseCurrencyConversionsInternalFfiResult) == 8); +typedef SignalCPromiseCurrencyConversionsInternalFfiResult* SignalType_MutPointer_SignalCPromiseCurrencyConversionsInternalFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseCurrencyConversionsInternalFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseCurrencyConversionsInternalFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseGetStickerUploadFormsResponseFfiResult; +static_assert_64bit(offsetof(SignalCPromiseGetStickerUploadFormsResponseFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseGetStickerUploadFormsResponseFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseGetStickerUploadFormsResponseFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseGetStickerUploadFormsResponseFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseGetStickerUploadFormsResponseFfiResult) == 8); +typedef SignalCPromiseGetStickerUploadFormsResponseFfiResult* SignalType_MutPointer_SignalCPromiseGetStickerUploadFormsResponseFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseGetStickerUploadFormsResponseFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseGetStickerUploadFormsResponseFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalListMediaResponseFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalListMediaResponseFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalListMediaResponseFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalListMediaResponseFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalListMediaResponseFfiResult_ConstPointer_void complete; const void* context; uint64_t cancellation_id; } SignalCPromiseListMediaResponseFfiResult; @@ -2441,6 +2819,14 @@ static_assert_64bit(alignof(SignalType_MutPointer_uint16_t) == 8); typedef uint64_t* SignalType_MutPointer_uint64_t; static_assert_64bit(sizeof(SignalType_MutPointer_uint64_t) == 8); static_assert_64bit(alignof(SignalType_MutPointer_uint64_t) == 8); +static_assert_64bit(sizeof(float) == 4); +static_assert_64bit(alignof(float) == 4); +typedef float MaybeUninitOff32; +static_assert_64bit(sizeof(MaybeUninitOff32) == 4); +static_assert_64bit(alignof(MaybeUninitOff32) == 4); +typedef SignalBorrowedBuffer MaybeUninitOfBorrowedBuffer; +static_assert_64bit(sizeof(MaybeUninitOfBorrowedBuffer) == 16); +static_assert_64bit(alignof(MaybeUninitOfBorrowedBuffer) == 8); typedef enum { SignalLogLevelError = 1, SignalLogLevelWarn = 2, @@ -2450,9 +2836,9 @@ typedef enum { } SignalLogLevel; static_assert_64bit(sizeof(SignalLogLevel) == 4); static_assert_64bit(alignof(SignalLogLevel) == 4); -typedef int32_t (*SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr)(SignalType_MutPointer_void, SignalLogLevel, SignalCStringPtr, uint32_t, SignalCStringPtr); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr) == 8); +typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr)(SignalType_MutPointer_void, SignalLogLevel, SignalCStringPtr, uint32_t, SignalCStringPtr); +static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr) == 8); typedef struct { const size_t* base; size_t length; @@ -2470,13 +2856,21 @@ static_assert_64bit(offsetof(SignalBorrowedBytestringArray, lengths) == 16); static_assert_64bit(sizeof(SignalBorrowedBytestringArray) == 32); static_assert_64bit(alignof(SignalBorrowedBytestringArray) == 8); typedef struct { - const SignalType_ConstPointer_SignalType_FixedArray32_uint8_t* base; + const SignalType_ConstPointer_FixedArray32_uint8_t* base; size_t length; } SignalBorrowedSliceOfc_uchar32; static_assert_64bit(offsetof(SignalBorrowedSliceOfc_uchar32, base) == 0); static_assert_64bit(offsetof(SignalBorrowedSliceOfc_uchar32, length) == 8); static_assert_64bit(sizeof(SignalBorrowedSliceOfc_uchar32) == 16); static_assert_64bit(alignof(SignalBorrowedSliceOfc_uchar32) == 8); +typedef struct { + const SignalCStringPtr* base; + size_t length; +} SignalBorrowedSliceOfCStringPtr; +static_assert_64bit(offsetof(SignalBorrowedSliceOfCStringPtr, base) == 0); +static_assert_64bit(offsetof(SignalBorrowedSliceOfCStringPtr, length) == 8); +static_assert_64bit(sizeof(SignalBorrowedSliceOfCStringPtr) == 16); +static_assert_64bit(alignof(SignalBorrowedSliceOfCStringPtr) == 8); typedef struct { const SignalBorrowedBuffer* base; size_t length; @@ -2533,6 +2927,14 @@ static_assert_64bit(offsetof(SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfi static_assert_64bit(offsetof(SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg, length) == 8); static_assert_64bit(sizeof(SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg) == 16); static_assert_64bit(alignof(SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg) == 8); +typedef struct { + const SignalDeviceCapabilityInternalFfiArg* base; + size_t length; +} SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg; +static_assert_64bit(offsetof(SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg, base) == 0); +static_assert_64bit(offsetof(SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg, length) == 8); +static_assert_64bit(sizeof(SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg) == 16); +static_assert_64bit(alignof(SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg) == 8); typedef struct { const uint32_t* base; size_t length; @@ -2541,18 +2943,18 @@ static_assert_64bit(offsetof(SignalBorrowedSliceOfu32, base) == 0); static_assert_64bit(offsetof(SignalBorrowedSliceOfu32, length) == 8); static_assert_64bit(sizeof(SignalBorrowedSliceOfu32) == 16); static_assert_64bit(alignof(SignalBorrowedSliceOfu32) == 8); -typedef struct { - const SignalPinHash* raw; -} SignalConstPointerPinHash; -static_assert_64bit(offsetof(SignalConstPointerPinHash, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerPinHash) == 8); -static_assert_64bit(alignof(SignalConstPointerPinHash) == 8); typedef struct { const SignalAes256GcmSiv* raw; } SignalConstPointerAes256GcmSiv; static_assert_64bit(offsetof(SignalConstPointerAes256GcmSiv, raw) == 0); static_assert_64bit(sizeof(SignalConstPointerAes256GcmSiv) == 8); static_assert_64bit(alignof(SignalConstPointerAes256GcmSiv) == 8); +typedef struct { + const SignalPinHash* raw; +} SignalConstPointerPinHash; +static_assert_64bit(offsetof(SignalConstPointerPinHash, raw) == 0); +static_assert_64bit(sizeof(SignalConstPointerPinHash) == 8); +static_assert_64bit(alignof(SignalConstPointerPinHash) == 8); typedef struct { const SignalFfiConnectChatBridgeStruct* raw; } SignalConstPointerFfiConnectChatBridgeStruct; @@ -2928,16 +3330,32 @@ static_assert_64bit(offsetof(SignalOptionalBorrowedSliceOfc_uchar, present) == 0 static_assert_64bit(offsetof(SignalOptionalBorrowedSliceOfc_uchar, value) == 8); static_assert_64bit(sizeof(SignalOptionalBorrowedSliceOfc_uchar) == 24); static_assert_64bit(alignof(SignalOptionalBorrowedSliceOfc_uchar) == 8); +typedef struct { + bool present; + MaybeUninitOff32 value; +} SignalOptionalOff32; +static_assert_64bit(offsetof(SignalOptionalOff32, present) == 0); +static_assert_64bit(offsetof(SignalOptionalOff32, value) == 4); +static_assert_64bit(sizeof(SignalOptionalOff32) == 8); +static_assert_64bit(alignof(SignalOptionalOff32) == 4); +typedef struct { + bool present; + MaybeUninitOfBorrowedBuffer value; +} SignalOptionalOfBorrowedBuffer; +static_assert_64bit(offsetof(SignalOptionalOfBorrowedBuffer, present) == 0); +static_assert_64bit(offsetof(SignalOptionalOfBorrowedBuffer, value) == 8); +static_assert_64bit(sizeof(SignalOptionalOfBorrowedBuffer) == 24); +static_assert_64bit(alignof(SignalOptionalOfBorrowedBuffer) == 8); typedef struct { void* base; size_t length; size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedc_void; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedc_void, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedc_void, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedc_void, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedc_void) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedc_void) == 8); +} SignalOwnedBufferOfMaxAlignedErased; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedErased, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedErased, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedErased, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedErased) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedErased) == 8); typedef enum { SignalErrorCodeUnknownError = 1, SignalErrorCodeInvalidState = 2, @@ -3015,6 +3433,11 @@ typedef enum { SignalErrorCodeRegistrationDeviceTransferPossible = 199, SignalErrorCodeRegistrationRecoveryVerificationFailed = 200, SignalErrorCodeRegistrationLock = 201, + SignalErrorCodeRegisterAccountRequestRejected = 202, + SignalErrorCodeRegistrationRecoveryPasswordRequired = 203, + SignalErrorCodeRegistrationOneTimePasswordRequired = 204, + SignalErrorCodeRegistrationInvalidSession = 205, + SignalErrorCodeRegistrationInvalidReceipt = 206, SignalErrorCodeKeyTransparencyError = 210, SignalErrorCodeKeyTransparencyVerificationFailed = 211, SignalErrorCodeRequestUnauthorized = 220, @@ -3024,6 +3447,17 @@ typedef enum { SignalErrorCodeDeviceIdNotFound = 224, SignalErrorCodeUsernameNotAvailable = 225, SignalErrorCodeUsernameNotSet = 226, + SignalErrorCodeUsernameReservationNotFound = 227, + SignalErrorCodeInvalidReceipt = 228, + SignalErrorCodeMissingBackupId = 229, + SignalErrorCodeReceiptCredentialErrorPaymentStillProcessing = 230, + SignalErrorCodeReceiptCredentialErrorPaymentRequired = 231, + SignalErrorCodeReceiptCredentialErrorPaymentNotFound = 232, + SignalErrorCodeReceiptCredentialErrorReceiptAlreadyIssued = 233, + SignalErrorCodeTooManyTotpKeys = 234, + SignalErrorCodeTooManyMfaKeys = 235, + SignalErrorCodeOneTimePasswordNotVerified = 236, + SignalErrorCodeMfaKeyNotFound = 237, } SignalErrorCode; static_assert_64bit(sizeof(SignalErrorCode) == 4); static_assert_64bit(alignof(SignalErrorCode) == 4); @@ -3047,6 +3481,62 @@ enum SignalSvr2CredentialsResult { typedef uint8_t SignalSvr2CredentialsResult; static_assert_64bit(sizeof(SignalSvr2CredentialsResult) == 1); static_assert_64bit(alignof(SignalSvr2CredentialsResult) == 1); +typedef struct { + bool user_satisfied; + SignalBorrowedSliceOfCStringPtr call_quality_issues; + const int8_t* additional_issues_description; + const int8_t* debug_log_url; + uint64_t start_timestamp; + uint64_t end_timestamp; + const int8_t* call_type; + bool success; + const int8_t* call_end_reason; + SignalOptionalOff32 connection_rtt_median; + SignalOptionalOff32 audio_rtt_median; + SignalOptionalOff32 video_rtt_median; + SignalOptionalOff32 audio_recv_jitter_median; + SignalOptionalOff32 video_recv_jitter_median; + SignalOptionalOff32 audio_send_jitter_median; + SignalOptionalOff32 video_send_jitter_median; + SignalOptionalOff32 audio_recv_packet_loss_fraction; + SignalOptionalOff32 video_recv_packet_loss_fraction; + SignalOptionalOff32 audio_send_packet_loss_fraction; + SignalOptionalOff32 video_send_packet_loss_fraction; + SignalOptionalOfBorrowedBuffer call_telemetry; + SignalOptionalOfBorrowedBuffer call_id_hash; +} SignalCallQualitySurveyInternalFfiArg; +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, user_satisfied) == 0); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_quality_issues) == 8); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, additional_issues_description) == 24); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, debug_log_url) == 32); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, start_timestamp) == 40); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, end_timestamp) == 48); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_type) == 56); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, success) == 64); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_end_reason) == 72); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, connection_rtt_median) == 80); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_rtt_median) == 88); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_rtt_median) == 96); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_recv_jitter_median) == 104); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_recv_jitter_median) == 112); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_send_jitter_median) == 120); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_send_jitter_median) == 128); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_recv_packet_loss_fraction) == 136); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_recv_packet_loss_fraction) == 144); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_send_packet_loss_fraction) == 152); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_send_packet_loss_fraction) == 160); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_telemetry) == 168); +static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_id_hash) == 192); +static_assert_64bit(sizeof(SignalCallQualitySurveyInternalFfiArg) == 216); +static_assert_64bit(alignof(SignalCallQualitySurveyInternalFfiArg) == 8); +typedef enum { + SignalPaymentProviderFfiArgGooglePlayBilling, + SignalPaymentProviderFfiArgAppleAppStore, + SignalPaymentProviderFfiArgStripe, + SignalPaymentProviderFfiArgBraintree, +} SignalPaymentProviderFfiArg; +static_assert_64bit(sizeof(SignalPaymentProviderFfiArg) == 4); +static_assert_64bit(alignof(SignalPaymentProviderFfiArg) == 4); typedef enum { SignalCiphertextMessageTypeWhisper = 2, SignalCiphertextMessageTypePreKey = 3, @@ -3070,9 +3560,9 @@ static_assert_64bit(sizeof(SignalDirection) == 4); static_assert_64bit(alignof(SignalDirection) == 4); typedef struct { void* ctx; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr log; - SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void flush; - SignalType_FunctionPointer_void_SignalType_MutPointer_void destroy; + SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr log; + SignalType_FunctionPointer_int32_t_MutPointer_void flush; + SignalType_FunctionPointer_void_MutPointer_void destroy; } SignalFfiLoggerStruct; static_assert_64bit(offsetof(SignalFfiLoggerStruct, ctx) == 0); static_assert_64bit(offsetof(SignalFfiLoggerStruct, log) == 8); @@ -3221,6 +3711,24 @@ SignalFfiError* signal_authenticated_chat_connection_clear_registration_lock( SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat ); +SignalFfiError* signal_authenticated_chat_connection_confirm_totp_key( + SignalCPromisei32* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + int32_t one_time_password, + const int8_t* name, + uint64_t created_at, + const SignalType_FixedArray32_uint8_t* svr_key, + int64_t rng +); +SignalFfiError* signal_authenticated_chat_connection_confirm_username( + SignalCPromiseUuid* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + const int8_t* username, + SignalBorrowedBuffer username_ciphertext, + int64_t rng +); SignalFfiError* signal_authenticated_chat_connection_connect( SignalCPromiseMutPointerAuthenticatedChatConnection* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3230,6 +3738,11 @@ SignalFfiError* signal_authenticated_chat_connection_connect( bool receive_stories, SignalBorrowedBytestringArray languages ); +SignalFfiError* signal_authenticated_chat_connection_delete_account( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat +); SignalFfiError* signal_authenticated_chat_connection_delete_username_hash( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3248,11 +3761,32 @@ SignalFfiError* signal_authenticated_chat_connection_disconnect( SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat ); +SignalFfiError* signal_authenticated_chat_connection_generate_totp_key( + SignalCPromiseBridgePendingTotpKeyFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat +); +SignalFfiError* signal_authenticated_chat_connection_get_currency_conversions( + SignalCPromiseCurrencyConversionsInternalFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat +); SignalFfiError* signal_authenticated_chat_connection_get_devices( SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult* promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat ); +SignalFfiError* signal_authenticated_chat_connection_get_pre_key_count( + SignalCPromiseBridgePreKeyCountsFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat +); +SignalFfiError* signal_authenticated_chat_connection_get_sticker_upload_forms( + SignalCPromiseGetStickerUploadFormsResponseFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + int32_t number_of_stickers +); SignalFfiError* signal_authenticated_chat_connection_get_upload_form( SignalCPromiseFfiUploadForm* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3267,17 +3801,35 @@ SignalFfiError* signal_authenticated_chat_connection_init_listener( SignalConstPointerAuthenticatedChatConnection chat, SignalConstPointerFfiChatListenerStruct listener ); +SignalFfiError* signal_authenticated_chat_connection_list_mfa_keys( + SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + const SignalType_FixedArray32_uint8_t* svr_key +); SignalFfiError* signal_authenticated_chat_connection_preconnect( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerConnectionManager connection_manager ); +SignalFfiError* signal_authenticated_chat_connection_redeem_backup_receipt( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + const SignalType_FixedArray329_uint8_t* presentation +); SignalFfiError* signal_authenticated_chat_connection_remove_device( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat, uint8_t device_id ); +SignalFfiError* signal_authenticated_chat_connection_remove_mfa_key( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + int32_t key_id +); SignalFfiError* signal_authenticated_chat_connection_reserve_username_hash( SignalCPromisec_uchar32* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3303,14 +3855,6 @@ SignalFfiError* signal_authenticated_chat_connection_send_message( bool online_only, bool is_urgent ); -SignalFfiError* signal_authenticated_chat_connection_send_raw_grpc( - SignalCPromiseOwnedBuffer* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - const int8_t* service, - const int8_t* method, - SignalBorrowedBuffer payload -); SignalFfiError* signal_authenticated_chat_connection_send_sync_message( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3321,6 +3865,12 @@ SignalFfiError* signal_authenticated_chat_connection_send_sync_message( SignalBorrowedSliceOfConstPointerCiphertextMessage contents, bool is_urgent ); +SignalFfiError* signal_authenticated_chat_connection_set_capabilities( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg capabilities +); SignalFfiError* signal_authenticated_chat_connection_set_device_name( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3334,6 +3884,16 @@ SignalFfiError* signal_authenticated_chat_connection_set_discoverable_by_phone_n SignalConstPointerAuthenticatedChatConnection chat, bool discoverable ); +SignalFfiError* signal_authenticated_chat_connection_set_mfa_key_metadata( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + int32_t key_id, + const int8_t* name, + uint64_t created_at, + const SignalType_FixedArray32_uint8_t* svr_key, + int64_t rng +); SignalFfiError* signal_authenticated_chat_connection_set_push_token_apns( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3962,6 +4522,10 @@ SignalFfiError* signal_error_get_address( SignalMutPointerProtocolAddress* out, const SignalFfiError* err ); +SignalFfiError* signal_error_get_charge_failure( + SignalOptionalOfChargeFailureFfiResult* out, + const SignalFfiError* err +); SignalFfiError* signal_error_get_invalid_protocol_address( SignalPairOfCStringPtru32* out, const SignalFfiError* err @@ -4079,7 +4643,7 @@ void signal_free_outer_buffer_list_of_prekey_bundles( SignalOwnedBufferOfMutPointerPreKeyBundle buffer ); void signal_free_owned_buffer_of_max_aligned( - SignalOwnedBufferOfMaxAlignedc_void buffer + SignalOwnedBufferOfMaxAlignedErased buffer ); void signal_free_string( const int8_t* buf @@ -4535,6 +5099,16 @@ SignalFfiError* signal_message_backup_key_get_hmac_key( SignalType_FixedArray32_uint8_t* out, SignalConstPointerMessageBackupKey key ); +SignalFfiError* signal_message_backup_sizing_flush_interval( + uint64_t* out, + uint64_t uncompressed_len, + uint64_t estimated_total_uncompressed_len +); +SignalFfiError* signal_message_backup_sizing_padding_size( + uint64_t* out, + uint64_t max_interval_bytes, + uint64_t compressed_len +); SignalFfiError* signal_message_backup_validation_outcome_destroy( SignalMutPointerMessageBackupValidationOutcome p ); @@ -5050,12 +5624,24 @@ SignalFfiError* signal_register_account_request_set_identity_signed_pre_key( uint8_t identity_type, SignalFfiSignedPublicPreKey signed_pre_key ); +SignalFfiError* signal_register_account_request_set_one_time_password( + SignalConstPointerRegisterAccountRequest register_account, + uint32_t one_time_password +); SignalFfiError* signal_register_account_request_set_skip_device_transfer( SignalConstPointerRegisterAccountRequest register_account ); SignalFfiError* signal_register_account_response_destroy( SignalMutPointerRegisterAccountResponse p ); +SignalFfiError* signal_register_account_response_get_aci( + SignalUuid* out, + SignalConstPointerRegisterAccountResponse response +); +SignalFfiError* signal_register_account_response_get_auth_credential_salt( + SignalOwnedBuffer* out, + SignalConstPointerRegisterAccountResponse response +); SignalFfiError* signal_register_account_response_get_entitlement_backup_expiration_seconds( uint64_t* out, SignalConstPointerRegisterAccountResponse response @@ -5068,15 +5654,14 @@ SignalFfiError* signal_register_account_response_get_entitlement_badges( SignalOwnedBufferOfFfiRegisterResponseBadge* out, SignalConstPointerRegisterAccountResponse response ); -SignalFfiError* signal_register_account_response_get_identity( - SignalType_FixedArray17_uint8_t* out, - SignalConstPointerRegisterAccountResponse response, - uint8_t identity_type -); SignalFfiError* signal_register_account_response_get_number( SignalCStringPtr* out, SignalConstPointerRegisterAccountResponse response ); +SignalFfiError* signal_register_account_response_get_pni( + SignalOptionalUuid* out, + SignalConstPointerRegisterAccountResponse response +); SignalFfiError* signal_register_account_response_get_reregistration( bool* out, SignalConstPointerRegisterAccountResponse response @@ -5129,6 +5714,14 @@ SignalFfiError* signal_registration_service_register_account( SignalConstPointerRegisterAccountRequest register_account, SignalConstPointerRegistrationAccountAttributes account_attributes ); +SignalFfiError* signal_registration_service_register_account_without_number( + SignalCPromiseMutPointerRegisterAccountResponse* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerFfiConnectChatBridgeStruct connect_chat, + SignalBorrowedBuffer receipt_credential_presentation, + SignalConstPointerRegisterAccountRequest register_account, + SignalConstPointerRegistrationAccountAttributes account_attributes +); SignalFfiError* signal_registration_service_registration_session( SignalMutPointerRegistrationSession* out, SignalConstPointerRegistrationService service @@ -5155,6 +5748,14 @@ SignalFfiError* signal_registration_service_reregister_account( SignalConstPointerRegisterAccountRequest register_account, SignalConstPointerRegistrationAccountAttributes account_attributes ); +SignalFfiError* signal_registration_service_reregister_account_without_number( + SignalCPromiseMutPointerRegisterAccountResponse* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerFfiConnectChatBridgeStruct connect_chat, + const SignalType_FixedArray17_uint8_t* aci, + SignalConstPointerRegisterAccountRequest register_account, + SignalConstPointerRegistrationAccountAttributes account_attributes +); SignalFfiError* signal_registration_service_resume_session( SignalCPromiseMutPointerRegistrationService* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -5907,12 +6508,29 @@ SignalFfiError* signal_unauthenticated_chat_connection_backup_set_public_key( SignalConstPointerPrivateKey signing_key, int64_t rng ); +SignalFfiError* signal_unauthenticated_chat_connection_check_svr_credentials( + SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerUnauthenticatedChatConnection chat, + const int8_t* number, + SignalBorrowedSliceOfCStringPtr credentials +); SignalFfiError* signal_unauthenticated_chat_connection_connect( SignalCPromiseMutPointerUnauthenticatedChatConnection* promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerConnectionManager connection_manager, SignalBorrowedBytestringArray languages ); +SignalFfiError* signal_unauthenticated_chat_connection_create_login_receipt_credential( + SignalCPromiseOwnedBuffer* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerUnauthenticatedChatConnection chat, + SignalPaymentProviderFfiArg payment_processor, + const int8_t* purchase_identifier, + SignalBorrowedBuffer receipt_credential_request_context, + SignalConstPointerServerPublicParams server_params, + uint64_t purchase_time +); SignalFfiError* signal_unauthenticated_chat_connection_destroy( SignalMutPointerUnauthenticatedChatConnection p ); @@ -5996,13 +6614,11 @@ SignalFfiError* signal_unauthenticated_chat_connection_send_multi_recipient_mess bool online_only, bool is_urgent ); -SignalFfiError* signal_unauthenticated_chat_connection_send_raw_grpc( - SignalCPromiseOwnedBuffer* promise, +SignalFfiError* signal_unauthenticated_chat_connection_submit_call_quality_survey( + SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat, - const int8_t* service, - const int8_t* method, - SignalBorrowedBuffer payload + SignalCallQualitySurveyInternalFfiArg survey ); SignalFfiError* signal_unidentified_sender_message_content_deserialize( SignalMutPointerUnidentifiedSenderMessageContent* out, @@ -6124,10 +6740,6 @@ SignalFfiError* signal_zk_credential_public_key_check_valid_contents( SignalBorrowedBuffer public_key_bytes ); typedef SignalBytestringArray SignalStringArray; -typedef SignalCPromiseOptionalPairOfCStringPtrc_uchar32 SignalCPromiseOptionalPairOfCStringPtru832; -typedef SignalCPromiseOwnedBuffer SignalCPromiseOwnedBufferOfc_uchar; -typedef SignalCPromiseOwnedBufferOfc_uchar17 SignalCPromiseOwnedBufferOfServiceIdFixedWidthBinaryBytes; -typedef SignalCPromisePairOfOwnedBufferOwnedBuffer SignalCPromisePairOfOwnedBufferOfc_ucharOwnedBufferOfc_uchar; typedef SignalConstPointerFfiSyncInputStreamStruct SignalConstPointerFfiInputStreamStruct; typedef SignalFfiIdentityKeyStoreStruct SignalIdentityKeyStore; typedef SignalFfiKyberPreKeyStoreStruct SignalKyberPreKeyStore; @@ -6138,10 +6750,7 @@ typedef SignalFfiSignedPreKeyStoreStruct SignalSignedPreKeyStore; typedef SignalFfiSyncInputStreamStruct SignalFfiInputStreamStruct; typedef SignalFfiSyncInputStreamStruct SignalInputStream; typedef SignalFfiSyncInputStreamStruct SignalSyncInputStream; -typedef SignalOptionalPairOfCStringPtrc_uchar32 SignalOptionalPairOfCStringPtru832; typedef SignalOwnedBufferOfc_uchar17 SignalOwnedBufferOfServiceIdFixedWidthBinaryBytes; -typedef SignalOwnedLookupResponseEntryList SignalOwnedBufferOfFfiCdsiLookupResponseEntry; -typedef SignalPairOfOwnedBufferOwnedBuffer SignalPairOfOwnedBufferOfc_ucharOwnedBufferOfc_uchar; typedef SignalRegistrationAccountAttributes SignalRegistrationAccountAttributes; typedef SignalType_FixedArray16_uint8_t SignalReceiptSerialBytes; typedef SignalType_FixedArray16_uint8_t SignalUidBytes; @@ -6157,43 +6766,43 @@ typedef SignalType_FixedArray32_uint8_t SignalRandomnessBytes; typedef SignalType_FixedArray64_uint8_t SignalNotarySignatureBytes; typedef SignalType_FixedArray64_uint8_t SignalProfileKeyVersionEncodedBytes; typedef SignalType_FixedArray64_uint8_t SignalSignatureBytes; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void SignalFfiChatListenerReceivedQueueEmpty; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void SignalFfiLoggerFlush; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalBytestringArray SignalFfiChatListenerReceivedAlerts; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck SignalFfiProvisioningListenerReceivedAddress; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr SignalFfiLoggerLog; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord SignalFfiSessionStoreStoreSession; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord SignalFfiSenderKeyStoreStoreSenderKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck SignalFfiProvisioningListenerReceivedEnvelope; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck SignalFfiChatListenerReceivedIncomingMessage; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalFfiError SignalFfiChatListenerConnectionInterrupted; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalFfiError SignalFfiProvisioningListenerConnectionInterrupted; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t SignalFfiKyberPreKeyStoreLoadKyberPreKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPreKeyRecord_uint32_t SignalFfiPreKeyStoreLoadPreKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress SignalFfiIdentityKeyStoreGetIdentityKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid SignalFfiSenderKeyStoreLoadSenderKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress SignalFfiSessionStoreLoadSession; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t SignalFfiSignedPreKeyStoreLoadSignedPreKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey SignalFfiIdentityKeyStoreGetLocalIdentityKeyPair; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t SignalFfiIdentityKeyStoreIsTrustedIdentity; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_size_t_SignalBorrowedMutableBuffer SignalFfiSyncInputStreamRead; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint32_t SignalFfiIdentityKeyStoreGetLocalRegistrationId; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_SignalType_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey SignalFfiIdentityKeyStoreSaveIdentityKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t SignalFfiPreKeyStoreRemovePreKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord SignalFfiKyberPreKeyStoreStoreKyberPreKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord SignalFfiPreKeyStoreStorePreKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord SignalFfiSignedPreKeyStoreStoreSignedPreKey; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey SignalFfiKyberPreKeyStoreMarkKyberPreKeyUsed; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint64_t SignalFfiChatListenerReceivedServerTimestamp; -typedef SignalType_FunctionPointer_int32_t_SignalType_MutPointer_void_uint64_t SignalFfiSyncInputStreamSkip; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiChatListenerDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiIdentityKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiKyberPreKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiLoggerDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiPreKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiProvisioningListenerDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiSenderKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiSessionStoreDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiSignedPreKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_SignalType_MutPointer_void SignalFfiSyncInputStreamDestroy; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void SignalFfiChatListenerReceivedQueueEmpty; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void SignalFfiLoggerFlush; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError SignalFfiChatListenerConnectionInterrupted; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError SignalFfiProvisioningListenerConnectionInterrupted; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t SignalFfiKyberPreKeyStoreLoadKyberPreKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t SignalFfiPreKeyStoreLoadPreKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress SignalFfiIdentityKeyStoreGetIdentityKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid SignalFfiSenderKeyStoreLoadSenderKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress SignalFfiSessionStoreLoadSession; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t SignalFfiSignedPreKeyStoreLoadSignedPreKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey SignalFfiIdentityKeyStoreGetLocalIdentityKeyPair; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t SignalFfiIdentityKeyStoreIsTrustedIdentity; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer SignalFfiSyncInputStreamRead; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t SignalFfiIdentityKeyStoreGetLocalRegistrationId; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey SignalFfiIdentityKeyStoreSaveIdentityKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray SignalFfiChatListenerReceivedAlerts; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck SignalFfiProvisioningListenerReceivedAddress; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr SignalFfiLoggerLog; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord SignalFfiSessionStoreStoreSession; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord SignalFfiSenderKeyStoreStoreSenderKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck SignalFfiProvisioningListenerReceivedEnvelope; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck SignalFfiChatListenerReceivedIncomingMessage; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t SignalFfiPreKeyStoreRemovePreKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord SignalFfiKyberPreKeyStoreStoreKyberPreKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord SignalFfiPreKeyStoreStorePreKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord SignalFfiSignedPreKeyStoreStoreSignedPreKey; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey SignalFfiKyberPreKeyStoreMarkKyberPreKeyUsed; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t SignalFfiChatListenerReceivedServerTimestamp; +typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t SignalFfiSyncInputStreamSkip; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiChatListenerDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiIdentityKeyStoreDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiKyberPreKeyStoreDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiLoggerDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiPreKeyStoreDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiProvisioningListenerDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiSenderKeyStoreDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiSessionStoreDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiSignedPreKeyStoreDestroy; +typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiSyncInputStreamDestroy; typedef uint64_t SignalCancellationId; diff --git a/pkg/libsignalgo/logging.go b/pkg/libsignalgo/logging.go index 9fdfe65..6a35e4d 100644 --- a/pkg/libsignalgo/logging.go +++ b/pkg/libsignalgo/logging.go @@ -19,8 +19,8 @@ package libsignalgo /* #include <./libsignal-ffi.h> -extern void signal_log_callback(void *ctx, SignalLogLevel level, SignalCStringPtr file, uint32_t line, SignalCStringPtr message); -extern void signal_log_flush_callback(void *ctx); +extern int signal_log_callback(void *ctx, SignalLogLevel level, SignalCStringPtr file, uint32_t line, SignalCStringPtr message); +extern int signal_log_flush_callback(void *ctx); extern void signal_log_destroy_callback(void *ctx); */ import "C" @@ -32,13 +32,15 @@ import ( var ffiLogger Logger //export signal_log_callback -func signal_log_callback(ctx unsafe.Pointer, level C.SignalLogLevel, file C.SignalCStringPtr, line C.uint32_t, message C.SignalCStringPtr) { +func signal_log_callback(ctx unsafe.Pointer, level C.SignalLogLevel, file C.SignalCStringPtr, line C.uint32_t, message C.SignalCStringPtr) C.int { ffiLogger.Log(LogLevel(int(level)), CopyCStringToString(file), uint(line), CopyCStringToString(message)) + return 0 } //export signal_log_flush_callback -func signal_log_flush_callback(ctx unsafe.Pointer) { +func signal_log_flush_callback(ctx unsafe.Pointer) C.int { ffiLogger.Flush() + return 0 } //export signal_log_destroy_callback diff --git a/pkg/libsignalgo/message.go b/pkg/libsignalgo/message.go index 5496da9..91aa7f0 100644 --- a/pkg/libsignalgo/message.go +++ b/pkg/libsignalgo/message.go @@ -43,6 +43,7 @@ func Encrypt(ctx context.Context, plaintext []byte, forAddress, localAddress *Ad ) runtime.KeepAlive(plaintext) runtime.KeepAlive(forAddress) + runtime.KeepAlive(localAddress) if signalFfiError != nil { return nil, callbackCtx.wrapError(signalFfiError) } @@ -63,6 +64,7 @@ func Decrypt(ctx context.Context, message *Message, fromAddress, localAddress *A ) runtime.KeepAlive(message) runtime.KeepAlive(fromAddress) + runtime.KeepAlive(localAddress) if signalFfiError != nil { return nil, callbackCtx.wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/messagebackupkey.go b/pkg/libsignalgo/messagebackupkey.go index 2ca753a..0bee04c 100644 --- a/pkg/libsignalgo/messagebackupkey.go +++ b/pkg/libsignalgo/messagebackupkey.go @@ -89,6 +89,7 @@ func (bk *MessageBackupKey) GetHMACKey() ([MessageBackupKeyBytesLength]byte, err out.cFixedArray(), bk.constPtr(), ) + runtime.KeepAlive(bk) if signalFfiError != nil { return [MessageBackupKeyBytesLength]byte(out), wrapError(signalFfiError) } @@ -101,6 +102,7 @@ func (bk *MessageBackupKey) GetAESKey() ([MessageBackupKeyBytesLength]byte, erro out.cFixedArray(), bk.constPtr(), ) + runtime.KeepAlive(bk) if signalFfiError != nil { return [MessageBackupKeyBytesLength]byte(out), wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/prekey.go b/pkg/libsignalgo/prekey.go index 29e640e..e742ecd 100644 --- a/pkg/libsignalgo/prekey.go +++ b/pkg/libsignalgo/prekey.go @@ -43,6 +43,7 @@ func DecryptPreKey(ctx context.Context, preKeyMessage *PreKeyMessage, fromAddres ) runtime.KeepAlive(preKeyMessage) runtime.KeepAlive(fromAddress) + runtime.KeepAlive(localAddress) if signalFfiError != nil { return nil, callbackCtx.wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/prekeybundle.go b/pkg/libsignalgo/prekeybundle.go index 8a6fcaa..d8e2516 100644 --- a/pkg/libsignalgo/prekeybundle.go +++ b/pkg/libsignalgo/prekeybundle.go @@ -41,6 +41,7 @@ func ProcessPreKeyBundle(ctx context.Context, bundle *PreKeyBundle, forAddress, ) runtime.KeepAlive(bundle) runtime.KeepAlive(forAddress) + runtime.KeepAlive(localAddress) return callbackCtx.wrapError(signalFfiError) } @@ -118,10 +119,10 @@ func (pkb *PreKeyBundle) constPtr() C.SignalConstPointerPreKeyBundle { func (pkb *PreKeyBundle) Clone() (*PreKeyBundle, error) { var cloned C.SignalMutPointerPreKeyBundle signalFfiError := C.signal_pre_key_bundle_clone(&cloned, pkb.constPtr()) + runtime.KeepAlive(pkb) if signalFfiError != nil { return nil, wrapError(signalFfiError) } - runtime.KeepAlive(pkb) return wrapPreKeyBundle(cloned.raw), nil } @@ -137,9 +138,9 @@ func (pkb *PreKeyBundle) CancelFinalizer() { func (pkb *PreKeyBundle) GetIdentityKey() (*IdentityKey, error) { var pk C.SignalMutPointerPublicKey signalFfiError := C.signal_pre_key_bundle_get_identity_key(&pk, pkb.constPtr()) + runtime.KeepAlive(pkb) if signalFfiError != nil { return nil, wrapError(signalFfiError) } - runtime.KeepAlive(pkb) return NewIdentityKeyFromPublicKey(wrapPublicKey(pk.raw)) } diff --git a/pkg/libsignalgo/profilekey.go b/pkg/libsignalgo/profilekey.go index 007c635..0c21aff 100644 --- a/pkg/libsignalgo/profilekey.go +++ b/pkg/libsignalgo/profilekey.go @@ -25,6 +25,7 @@ import "C" import ( "encoding/base64" "errors" + "fmt" "runtime" "unsafe" @@ -163,6 +164,8 @@ func (pk *ProfileKey) DeriveAccessKey() (*AccessKey, error) { return &result, nil } +const ExpiringProfileKeyCredentialResponseLength = 497 + type ProfileKeyCredentialRequestContext [473]byte type ProfileKeyCredentialRequest = fixedArray329 type ProfileKeyCredentialResponse []byte @@ -214,6 +217,9 @@ func (p *ProfileKeyCredentialRequestContext) ProfileKeyCredentialRequestContextG } func NewExpiringProfileKeyCredentialResponse(b []byte) (*ExpiringProfileKeyCredentialResponse, error) { + if len(b) != ExpiringProfileKeyCredentialResponseLength { + return nil, fmt.Errorf("invalid expiring profile key credential response length %d (expected %d)", len(b), ExpiringProfileKeyCredentialResponseLength) + } borrowedBuffer := BytesToBuffer(b) signalFfiError := C.signal_expiring_profile_key_credential_response_check_valid_contents(borrowedBuffer) runtime.KeepAlive(b) diff --git a/pkg/libsignalgo/sealedsender.go b/pkg/libsignalgo/sealedsender.go index 84ff254..ac7a0a0 100644 --- a/pkg/libsignalgo/sealedsender.go +++ b/pkg/libsignalgo/sealedsender.go @@ -169,6 +169,19 @@ const ( UnidentifiedSenderMessageContentHintImplicit UnidentifiedSenderMessageContentHint = 2 ) +func (hint UnidentifiedSenderMessageContentHint) String() string { + switch hint { + case UnidentifiedSenderMessageContentHintDefault: + return "Default" + case UnidentifiedSenderMessageContentHintResendable: + return "Resendable" + case UnidentifiedSenderMessageContentHintImplicit: + return "Implicit" + default: + return fmt.Sprintf("Unknown(%d)", hint) + } +} + type UnidentifiedSenderMessageContent struct { nc noCopy ptr *C.SignalUnidentifiedSenderMessageContent diff --git a/pkg/libsignalgo/sendercertificate.go b/pkg/libsignalgo/sendercertificate.go index f65e880..cf39fd6 100644 --- a/pkg/libsignalgo/sendercertificate.go +++ b/pkg/libsignalgo/sendercertificate.go @@ -208,6 +208,7 @@ func (sc *SenderCertificate) Validate(trustRoots []*PublicKey, ts time.Time) (bo C.uint64_t(ts.UnixMilli()), ) runtime.KeepAlive(sc) + runtime.KeepAlive(trustRoots) runtime.KeepAlive(constRoots) if signalFfiError != nil { return false, wrapError(signalFfiError) diff --git a/pkg/libsignalgo/senderkeydistributionmessage.go b/pkg/libsignalgo/senderkeydistributionmessage.go index c9f6099..48c0226 100644 --- a/pkg/libsignalgo/senderkeydistributionmessage.go +++ b/pkg/libsignalgo/senderkeydistributionmessage.go @@ -101,6 +101,7 @@ func (sc *SenderKeyDistributionMessage) CancelFinalizer() { func (sc *SenderKeyDistributionMessage) Serialize() ([]byte, error) { var serialized C.SignalOwnedBuffer = C.SignalOwnedBuffer{} signalFfiError := C.signal_sender_key_distribution_message_serialize(&serialized, sc.constPtr()) + runtime.KeepAlive(sc) if signalFfiError != nil { return nil, wrapError(signalFfiError) } @@ -116,6 +117,7 @@ func (sc *SenderKeyDistributionMessage) Process(ctx context.Context, sender *Add callbackCtx.wrapSenderKeyStore(store), ) runtime.KeepAlive(sender) + runtime.KeepAlive(sc) if signalFfiError != nil { return callbackCtx.wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/signalversion/version.go b/pkg/libsignalgo/signalversion/version.go new file mode 100644 index 0000000..d66cd3e --- /dev/null +++ b/pkg/libsignalgo/signalversion/version.go @@ -0,0 +1,5 @@ +// Generated by update-ffi.sh; DO NOT EDIT. + +package signalversion + +const Version = "v0.102.2" diff --git a/pkg/libsignalgo/update-ffi-docker-inner.sh b/pkg/libsignalgo/update-ffi-docker-inner.sh index 5b96bbb..af8d851 100755 --- a/pkg/libsignalgo/update-ffi-docker-inner.sh +++ b/pkg/libsignalgo/update-ffi-docker-inner.sh @@ -7,4 +7,4 @@ cargo build -p libsignal-ffi --release cd .. mv libsignal/target/release/libsignal_ffi.a . cp libsignal/swift/Sources/SignalFfi/signal_ffi.h libsignal-ffi.h -chown 1000:1000 libsignal_ffi.a libsignal-ffi.h version.go +chown 1000:1000 libsignal_ffi.a libsignal-ffi.h diff --git a/pkg/libsignalgo/update-ffi-docker.sh b/pkg/libsignalgo/update-ffi-docker.sh index 5fb6dda..73f8947 100755 --- a/pkg/libsignalgo/update-ffi-docker.sh +++ b/pkg/libsignalgo/update-ffi-docker.sh @@ -1,9 +1,9 @@ #!/bin/bash docker run --rm -itv $(pwd):/data rust:1-alpine /data/update-ffi-docker-inner.sh -echo "// Generated by update-ffi.sh; DO NOT EDIT." > version.go -echo >> version.go -echo "package libsignalgo" >> version.go -echo >> version.go +echo "// Generated by update-ffi.sh; DO NOT EDIT." > signalversion/version.go +echo >> signalversion/version.go +echo "package signalversion" >> signalversion/version.go +echo >> signalversion/version.go cd libsignal -echo "const Version = \"$(git describe --tags --always)\"" >> ../version.go +echo "const Version = \"$(git describe --tags --always)\"" >> ../signalversion/version.go diff --git a/pkg/libsignalgo/update-ffi.sh b/pkg/libsignalgo/update-ffi.sh index b1061b9..d04986c 100755 --- a/pkg/libsignalgo/update-ffi.sh +++ b/pkg/libsignalgo/update-ffi.sh @@ -12,10 +12,10 @@ if [ ! -d "$LIBSIGNAL_DIRECTORY" ]; then exit 1 fi -echo "// Generated by update-ffi.sh; DO NOT EDIT." > version.go -echo >> version.go -echo "package libsignalgo" >> version.go -echo >> version.go +echo "// Generated by update-ffi.sh; DO NOT EDIT." > signalversion/version.go +echo >> signalversion/version.go +echo "package signalversion" >> signalversion/version.go +echo >> signalversion/version.go # Store the current working directory ORIGINAL_DIR="$(pwd)" @@ -23,7 +23,7 @@ ORIGINAL_DIR="$(pwd)" # Navigate to libsignal directory cd "$LIBSIGNAL_DIRECTORY" -echo "const Version = \"$(git describe --tags --always)\"" >> ../version.go +echo "const Version = \"$(git describe --tags --always)\"" >> ../signalversion/version.go # Build libsignal cargo build -p libsignal-ffi --release diff --git a/pkg/libsignalgo/version.go b/pkg/libsignalgo/version.go deleted file mode 100644 index b74b511..0000000 --- a/pkg/libsignalgo/version.go +++ /dev/null @@ -1,5 +0,0 @@ -// Generated by update-ffi.sh; DO NOT EDIT. - -package libsignalgo - -const Version = "v0.100.0" diff --git a/pkg/msgconv/from-matrix.go b/pkg/msgconv/from-matrix.go index a334afd..3c8f840 100644 --- a/pkg/msgconv/from-matrix.go +++ b/pkg/msgconv/from-matrix.go @@ -35,7 +35,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/msgconv/matrixfmt" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) func (mc *MessageConverter) ToSignal( diff --git a/pkg/msgconv/from-signal-backup.go b/pkg/msgconv/from-signal-backup.go index 978c6a6..372c9a4 100644 --- a/pkg/msgconv/from-signal-backup.go +++ b/pkg/msgconv/from-signal-backup.go @@ -23,8 +23,8 @@ import ( "go.mau.fi/util/exslices" "go.mau.fi/util/ptr" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/backuppb" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) func boolToInt(b bool) int { diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index 612bc28..3ec4fdb 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -43,7 +43,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) var ( diff --git a/pkg/msgconv/imagepack.go b/pkg/msgconv/imagepack.go index a2529af..310f810 100644 --- a/pkg/msgconv/imagepack.go +++ b/pkg/msgconv/imagepack.go @@ -35,7 +35,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) const StickerSourceID = "signal" diff --git a/pkg/msgconv/matrixfmt/convert.go b/pkg/msgconv/matrixfmt/convert.go index 5318735..ddc5cba 100644 --- a/pkg/msgconv/matrixfmt/convert.go +++ b/pkg/msgconv/matrixfmt/convert.go @@ -21,7 +21,7 @@ import ( "maunium.net/go/mautrix/event" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) func Parse(ctx context.Context, parser *HTMLParser, content *event.MessageEventContent) (string, []*signalpb.BodyRange) { diff --git a/pkg/msgconv/signalfmt/convert.go b/pkg/msgconv/signalfmt/convert.go index 412af36..d237703 100644 --- a/pkg/msgconv/signalfmt/convert.go +++ b/pkg/msgconv/signalfmt/convert.go @@ -28,7 +28,7 @@ import ( "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) type UserInfo struct { @@ -86,6 +86,9 @@ func Parse(ctx context.Context, message string, ranges []*signalpb.BodyRange, pa Start: int(*r.Start), Length: int(*r.Length), }.TruncateEnd(maxLength) + if br.Start >= maxLength { + continue + } var mentionACI uuid.UUID switch rv := r.GetAssociatedValue().(type) { case *signalpb.BodyRange_Style_: diff --git a/pkg/msgconv/signalfmt/convert_test.go b/pkg/msgconv/signalfmt/convert_test.go index eb65542..ac9f201 100644 --- a/pkg/msgconv/signalfmt/convert_test.go +++ b/pkg/msgconv/signalfmt/convert_test.go @@ -27,7 +27,7 @@ import ( "maunium.net/go/mautrix/id" "go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) var realUser = uuid.New() diff --git a/pkg/msgconv/signalfmt/tags.go b/pkg/msgconv/signalfmt/tags.go index b273e0e..4862fe9 100644 --- a/pkg/msgconv/signalfmt/tags.go +++ b/pkg/msgconv/signalfmt/tags.go @@ -21,7 +21,7 @@ import ( "github.com/google/uuid" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) type BodyRangeValue interface { diff --git a/pkg/msgconv/signalfmt/tree.go b/pkg/msgconv/signalfmt/tree.go index 5f37b1c..955b128 100644 --- a/pkg/msgconv/signalfmt/tree.go +++ b/pkg/msgconv/signalfmt/tree.go @@ -22,7 +22,7 @@ import ( "google.golang.org/protobuf/proto" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) type BodyRange struct { diff --git a/pkg/msgconv/urlpreview.go b/pkg/msgconv/urlpreview.go index 66b186a..3b3bd06 100644 --- a/pkg/msgconv/urlpreview.go +++ b/pkg/msgconv/urlpreview.go @@ -24,7 +24,7 @@ import ( "google.golang.org/protobuf/proto" "maunium.net/go/mautrix/event" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) func (mc *MessageConverter) convertURLPreviewsToBeeper(ctx context.Context, preview []*signalpb.Preview, attMap AttachmentMap) []*event.BeeperLinkPreview { diff --git a/pkg/signalmeow/attachments.go b/pkg/signalmeow/attachments.go index c091827..de89fb2 100644 --- a/pkg/signalmeow/attachments.go +++ b/pkg/signalmeow/attachments.go @@ -40,7 +40,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) diff --git a/pkg/signalmeow/client.go b/pkg/signalmeow/client.go index 57598cd..b72e33b 100644 --- a/pkg/signalmeow/client.go +++ b/pkg/signalmeow/client.go @@ -30,7 +30,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalmeow/events" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/store" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" @@ -55,6 +55,7 @@ type Client struct { AuthedWS *web.SignalWebsocket UnauthedWS *web.SignalWebsocket + GRPC *web.GRPCClient lastConnectionStatus SignalConnectionStatus loopCancel context.CancelFunc diff --git a/pkg/signalmeow/contact.go b/pkg/signalmeow/contact.go index f30f54f..616434d 100644 --- a/pkg/signalmeow/contact.go +++ b/pkg/signalmeow/contact.go @@ -31,7 +31,7 @@ import ( "github.com/rs/zerolog" "google.golang.org/protobuf/proto" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) diff --git a/pkg/signalmeow/devicename.go b/pkg/signalmeow/devicename.go index ceca1e4..03e4a9c 100644 --- a/pkg/signalmeow/devicename.go +++ b/pkg/signalmeow/devicename.go @@ -29,7 +29,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) func hmacSHA256(key, input []byte) []byte { diff --git a/pkg/signalmeow/events/message.go b/pkg/signalmeow/events/message.go index 7d3732a..475ac02 100644 --- a/pkg/signalmeow/events/message.go +++ b/pkg/signalmeow/events/message.go @@ -20,7 +20,7 @@ import ( "github.com/google/uuid" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) diff --git a/pkg/signalmeow/groups.go b/pkg/signalmeow/groups.go index f028f2b..cafe4d3 100644 --- a/pkg/signalmeow/groups.go +++ b/pkg/signalmeow/groups.go @@ -37,7 +37,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) diff --git a/pkg/signalmeow/protobuf/DeviceName.proto b/pkg/signalmeow/protobuf/DeviceName.proto deleted file mode 100644 index af14c1b..0000000 --- a/pkg/signalmeow/protobuf/DeviceName.proto +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2018 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -package signalservice; - -message DeviceName { - optional bytes ephemeralPublic = 1; - optional bytes syntheticIv = 2; - optional bytes ciphertext = 3; -} diff --git a/pkg/signalmeow/protobuf/UnidentifiedDelivery.pb.go b/pkg/signalmeow/protobuf/UnidentifiedDelivery.pb.go deleted file mode 100644 index 5979a4c..0000000 --- a/pkg/signalmeow/protobuf/UnidentifiedDelivery.pb.go +++ /dev/null @@ -1,635 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: UnidentifiedDelivery.proto - -// Copyright 2018 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -package signalpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type UnidentifiedSenderMessage_Message_Type int32 - -const ( - // Our parser does not handle reserved in enums: DESKTOP-1569 - // reserved 1; - UnidentifiedSenderMessage_Message_MESSAGE UnidentifiedSenderMessage_Message_Type = 2 - UnidentifiedSenderMessage_Message_PREKEY_MESSAGE UnidentifiedSenderMessage_Message_Type = 3 // Further cases should line up with Envelope.Type, even though old cases don't. - UnidentifiedSenderMessage_Message_SENDERKEY_MESSAGE UnidentifiedSenderMessage_Message_Type = 7 - UnidentifiedSenderMessage_Message_PLAINTEXT_CONTENT UnidentifiedSenderMessage_Message_Type = 8 -) - -// Enum value maps for UnidentifiedSenderMessage_Message_Type. -var ( - UnidentifiedSenderMessage_Message_Type_name = map[int32]string{ - 2: "MESSAGE", - 3: "PREKEY_MESSAGE", - 7: "SENDERKEY_MESSAGE", - 8: "PLAINTEXT_CONTENT", - } - UnidentifiedSenderMessage_Message_Type_value = map[string]int32{ - "MESSAGE": 2, - "PREKEY_MESSAGE": 3, - "SENDERKEY_MESSAGE": 7, - "PLAINTEXT_CONTENT": 8, - } -) - -func (x UnidentifiedSenderMessage_Message_Type) Enum() *UnidentifiedSenderMessage_Message_Type { - p := new(UnidentifiedSenderMessage_Message_Type) - *p = x - return p -} - -func (x UnidentifiedSenderMessage_Message_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (UnidentifiedSenderMessage_Message_Type) Descriptor() protoreflect.EnumDescriptor { - return file_UnidentifiedDelivery_proto_enumTypes[0].Descriptor() -} - -func (UnidentifiedSenderMessage_Message_Type) Type() protoreflect.EnumType { - return &file_UnidentifiedDelivery_proto_enumTypes[0] -} - -func (x UnidentifiedSenderMessage_Message_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *UnidentifiedSenderMessage_Message_Type) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = UnidentifiedSenderMessage_Message_Type(num) - return nil -} - -// Deprecated: Use UnidentifiedSenderMessage_Message_Type.Descriptor instead. -func (UnidentifiedSenderMessage_Message_Type) EnumDescriptor() ([]byte, []int) { - return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{2, 0, 0} -} - -type UnidentifiedSenderMessage_Message_ContentHint int32 - -const ( - // Show an error immediately; it was important but we can't retry. - UnidentifiedSenderMessage_Message_DEFAULT UnidentifiedSenderMessage_Message_ContentHint = 0 - // Sender will try to resend; delay any error UI if possible - UnidentifiedSenderMessage_Message_RESENDABLE UnidentifiedSenderMessage_Message_ContentHint = 1 - // Don't show any error UI at all; this is something sent implicitly like a typing message or a receipt - UnidentifiedSenderMessage_Message_IMPLICIT UnidentifiedSenderMessage_Message_ContentHint = 2 -) - -// Enum value maps for UnidentifiedSenderMessage_Message_ContentHint. -var ( - UnidentifiedSenderMessage_Message_ContentHint_name = map[int32]string{ - 0: "DEFAULT", - 1: "RESENDABLE", - 2: "IMPLICIT", - } - UnidentifiedSenderMessage_Message_ContentHint_value = map[string]int32{ - "DEFAULT": 0, - "RESENDABLE": 1, - "IMPLICIT": 2, - } -) - -func (x UnidentifiedSenderMessage_Message_ContentHint) Enum() *UnidentifiedSenderMessage_Message_ContentHint { - p := new(UnidentifiedSenderMessage_Message_ContentHint) - *p = x - return p -} - -func (x UnidentifiedSenderMessage_Message_ContentHint) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (UnidentifiedSenderMessage_Message_ContentHint) Descriptor() protoreflect.EnumDescriptor { - return file_UnidentifiedDelivery_proto_enumTypes[1].Descriptor() -} - -func (UnidentifiedSenderMessage_Message_ContentHint) Type() protoreflect.EnumType { - return &file_UnidentifiedDelivery_proto_enumTypes[1] -} - -func (x UnidentifiedSenderMessage_Message_ContentHint) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *UnidentifiedSenderMessage_Message_ContentHint) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = UnidentifiedSenderMessage_Message_ContentHint(num) - return nil -} - -// Deprecated: Use UnidentifiedSenderMessage_Message_ContentHint.Descriptor instead. -func (UnidentifiedSenderMessage_Message_ContentHint) EnumDescriptor() ([]byte, []int) { - return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{2, 0, 1} -} - -type ServerCertificate struct { - state protoimpl.MessageState `protogen:"open.v1"` - Certificate []byte `protobuf:"bytes,1,opt,name=certificate" json:"certificate,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ServerCertificate) Reset() { - *x = ServerCertificate{} - mi := &file_UnidentifiedDelivery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ServerCertificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerCertificate) ProtoMessage() {} - -func (x *ServerCertificate) ProtoReflect() protoreflect.Message { - mi := &file_UnidentifiedDelivery_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerCertificate.ProtoReflect.Descriptor instead. -func (*ServerCertificate) Descriptor() ([]byte, []int) { - return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{0} -} - -func (x *ServerCertificate) GetCertificate() []byte { - if x != nil { - return x.Certificate - } - return nil -} - -func (x *ServerCertificate) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type SenderCertificate struct { - state protoimpl.MessageState `protogen:"open.v1"` - Certificate []byte `protobuf:"bytes,1,opt,name=certificate" json:"certificate,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SenderCertificate) Reset() { - *x = SenderCertificate{} - mi := &file_UnidentifiedDelivery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SenderCertificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SenderCertificate) ProtoMessage() {} - -func (x *SenderCertificate) ProtoReflect() protoreflect.Message { - mi := &file_UnidentifiedDelivery_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SenderCertificate.ProtoReflect.Descriptor instead. -func (*SenderCertificate) Descriptor() ([]byte, []int) { - return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{1} -} - -func (x *SenderCertificate) GetCertificate() []byte { - if x != nil { - return x.Certificate - } - return nil -} - -func (x *SenderCertificate) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type UnidentifiedSenderMessage struct { - state protoimpl.MessageState `protogen:"open.v1"` - EphemeralPublic []byte `protobuf:"bytes,1,opt,name=ephemeralPublic" json:"ephemeralPublic,omitempty"` - EncryptedStatic []byte `protobuf:"bytes,2,opt,name=encryptedStatic" json:"encryptedStatic,omitempty"` - EncryptedMessage []byte `protobuf:"bytes,3,opt,name=encryptedMessage" json:"encryptedMessage,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UnidentifiedSenderMessage) Reset() { - *x = UnidentifiedSenderMessage{} - mi := &file_UnidentifiedDelivery_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UnidentifiedSenderMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnidentifiedSenderMessage) ProtoMessage() {} - -func (x *UnidentifiedSenderMessage) ProtoReflect() protoreflect.Message { - mi := &file_UnidentifiedDelivery_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnidentifiedSenderMessage.ProtoReflect.Descriptor instead. -func (*UnidentifiedSenderMessage) Descriptor() ([]byte, []int) { - return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{2} -} - -func (x *UnidentifiedSenderMessage) GetEphemeralPublic() []byte { - if x != nil { - return x.EphemeralPublic - } - return nil -} - -func (x *UnidentifiedSenderMessage) GetEncryptedStatic() []byte { - if x != nil { - return x.EncryptedStatic - } - return nil -} - -func (x *UnidentifiedSenderMessage) GetEncryptedMessage() []byte { - if x != nil { - return x.EncryptedMessage - } - return nil -} - -type ServerCertificate_Certificate struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ServerCertificate_Certificate) Reset() { - *x = ServerCertificate_Certificate{} - mi := &file_UnidentifiedDelivery_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ServerCertificate_Certificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerCertificate_Certificate) ProtoMessage() {} - -func (x *ServerCertificate_Certificate) ProtoReflect() protoreflect.Message { - mi := &file_UnidentifiedDelivery_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerCertificate_Certificate.ProtoReflect.Descriptor instead. -func (*ServerCertificate_Certificate) Descriptor() ([]byte, []int) { - return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *ServerCertificate_Certificate) GetId() uint32 { - if x != nil && x.Id != nil { - return *x.Id - } - return 0 -} - -func (x *ServerCertificate_Certificate) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -type SenderCertificate_Certificate struct { - state protoimpl.MessageState `protogen:"open.v1"` - SenderE164 *string `protobuf:"bytes,1,opt,name=senderE164" json:"senderE164,omitempty"` - SenderUuid *string `protobuf:"bytes,6,opt,name=senderUuid" json:"senderUuid,omitempty"` - SenderDevice *uint32 `protobuf:"varint,2,opt,name=senderDevice" json:"senderDevice,omitempty"` - Expires *uint64 `protobuf:"fixed64,3,opt,name=expires" json:"expires,omitempty"` - IdentityKey []byte `protobuf:"bytes,4,opt,name=identityKey" json:"identityKey,omitempty"` - Signer *ServerCertificate `protobuf:"bytes,5,opt,name=signer" json:"signer,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SenderCertificate_Certificate) Reset() { - *x = SenderCertificate_Certificate{} - mi := &file_UnidentifiedDelivery_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SenderCertificate_Certificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SenderCertificate_Certificate) ProtoMessage() {} - -func (x *SenderCertificate_Certificate) ProtoReflect() protoreflect.Message { - mi := &file_UnidentifiedDelivery_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SenderCertificate_Certificate.ProtoReflect.Descriptor instead. -func (*SenderCertificate_Certificate) Descriptor() ([]byte, []int) { - return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *SenderCertificate_Certificate) GetSenderE164() string { - if x != nil && x.SenderE164 != nil { - return *x.SenderE164 - } - return "" -} - -func (x *SenderCertificate_Certificate) GetSenderUuid() string { - if x != nil && x.SenderUuid != nil { - return *x.SenderUuid - } - return "" -} - -func (x *SenderCertificate_Certificate) GetSenderDevice() uint32 { - if x != nil && x.SenderDevice != nil { - return *x.SenderDevice - } - return 0 -} - -func (x *SenderCertificate_Certificate) GetExpires() uint64 { - if x != nil && x.Expires != nil { - return *x.Expires - } - return 0 -} - -func (x *SenderCertificate_Certificate) GetIdentityKey() []byte { - if x != nil { - return x.IdentityKey - } - return nil -} - -func (x *SenderCertificate_Certificate) GetSigner() *ServerCertificate { - if x != nil { - return x.Signer - } - return nil -} - -type UnidentifiedSenderMessage_Message struct { - state protoimpl.MessageState `protogen:"open.v1"` - Type *UnidentifiedSenderMessage_Message_Type `protobuf:"varint,1,opt,name=type,enum=signalservice.UnidentifiedSenderMessage_Message_Type" json:"type,omitempty"` - SenderCertificate *SenderCertificate `protobuf:"bytes,2,opt,name=senderCertificate" json:"senderCertificate,omitempty"` - Content []byte `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"` - ContentHint *UnidentifiedSenderMessage_Message_ContentHint `protobuf:"varint,4,opt,name=contentHint,enum=signalservice.UnidentifiedSenderMessage_Message_ContentHint" json:"contentHint,omitempty"` - GroupId []byte `protobuf:"bytes,5,opt,name=groupId" json:"groupId,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UnidentifiedSenderMessage_Message) Reset() { - *x = UnidentifiedSenderMessage_Message{} - mi := &file_UnidentifiedDelivery_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UnidentifiedSenderMessage_Message) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnidentifiedSenderMessage_Message) ProtoMessage() {} - -func (x *UnidentifiedSenderMessage_Message) ProtoReflect() protoreflect.Message { - mi := &file_UnidentifiedDelivery_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnidentifiedSenderMessage_Message.ProtoReflect.Descriptor instead. -func (*UnidentifiedSenderMessage_Message) Descriptor() ([]byte, []int) { - return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *UnidentifiedSenderMessage_Message) GetType() UnidentifiedSenderMessage_Message_Type { - if x != nil && x.Type != nil { - return *x.Type - } - return UnidentifiedSenderMessage_Message_MESSAGE -} - -func (x *UnidentifiedSenderMessage_Message) GetSenderCertificate() *SenderCertificate { - if x != nil { - return x.SenderCertificate - } - return nil -} - -func (x *UnidentifiedSenderMessage_Message) GetContent() []byte { - if x != nil { - return x.Content - } - return nil -} - -func (x *UnidentifiedSenderMessage_Message) GetContentHint() UnidentifiedSenderMessage_Message_ContentHint { - if x != nil && x.ContentHint != nil { - return *x.ContentHint - } - return UnidentifiedSenderMessage_Message_DEFAULT -} - -func (x *UnidentifiedSenderMessage_Message) GetGroupId() []byte { - if x != nil { - return x.GroupId - } - return nil -} - -var File_UnidentifiedDelivery_proto protoreflect.FileDescriptor - -const file_UnidentifiedDelivery_proto_rawDesc = "" + - "\n" + - "\x1aUnidentifiedDelivery.proto\x12\rsignalservice\"\x84\x01\n" + - "\x11ServerCertificate\x12 \n" + - "\vcertificate\x18\x01 \x01(\fR\vcertificate\x12\x1c\n" + - "\tsignature\x18\x02 \x01(\fR\tsignature\x1a/\n" + - "\vCertificate\x12\x0e\n" + - "\x02id\x18\x01 \x01(\rR\x02id\x12\x10\n" + - "\x03key\x18\x02 \x01(\fR\x03key\"\xbd\x02\n" + - "\x11SenderCertificate\x12 \n" + - "\vcertificate\x18\x01 \x01(\fR\vcertificate\x12\x1c\n" + - "\tsignature\x18\x02 \x01(\fR\tsignature\x1a\xe7\x01\n" + - "\vCertificate\x12\x1e\n" + - "\n" + - "senderE164\x18\x01 \x01(\tR\n" + - "senderE164\x12\x1e\n" + - "\n" + - "senderUuid\x18\x06 \x01(\tR\n" + - "senderUuid\x12\"\n" + - "\fsenderDevice\x18\x02 \x01(\rR\fsenderDevice\x12\x18\n" + - "\aexpires\x18\x03 \x01(\x06R\aexpires\x12 \n" + - "\videntityKey\x18\x04 \x01(\fR\videntityKey\x128\n" + - "\x06signer\x18\x05 \x01(\v2 .signalservice.ServerCertificateR\x06signer\"\xe7\x04\n" + - "\x19UnidentifiedSenderMessage\x12(\n" + - "\x0fephemeralPublic\x18\x01 \x01(\fR\x0fephemeralPublic\x12(\n" + - "\x0fencryptedStatic\x18\x02 \x01(\fR\x0fencryptedStatic\x12*\n" + - "\x10encryptedMessage\x18\x03 \x01(\fR\x10encryptedMessage\x1a\xc9\x03\n" + - "\aMessage\x12I\n" + - "\x04type\x18\x01 \x01(\x0e25.signalservice.UnidentifiedSenderMessage.Message.TypeR\x04type\x12N\n" + - "\x11senderCertificate\x18\x02 \x01(\v2 .signalservice.SenderCertificateR\x11senderCertificate\x12\x18\n" + - "\acontent\x18\x03 \x01(\fR\acontent\x12^\n" + - "\vcontentHint\x18\x04 \x01(\x0e2<.signalservice.UnidentifiedSenderMessage.Message.ContentHintR\vcontentHint\x12\x18\n" + - "\agroupId\x18\x05 \x01(\fR\agroupId\"U\n" + - "\x04Type\x12\v\n" + - "\aMESSAGE\x10\x02\x12\x12\n" + - "\x0ePREKEY_MESSAGE\x10\x03\x12\x15\n" + - "\x11SENDERKEY_MESSAGE\x10\a\x12\x15\n" + - "\x11PLAINTEXT_CONTENT\x10\b\"8\n" + - "\vContentHint\x12\v\n" + - "\aDEFAULT\x10\x00\x12\x0e\n" + - "\n" + - "RESENDABLE\x10\x01\x12\f\n" + - "\bIMPLICIT\x10\x02B6\n" + - "%org.whispersystems.libsignal.protocolB\rWhisperProtos" - -var ( - file_UnidentifiedDelivery_proto_rawDescOnce sync.Once - file_UnidentifiedDelivery_proto_rawDescData []byte -) - -func file_UnidentifiedDelivery_proto_rawDescGZIP() []byte { - file_UnidentifiedDelivery_proto_rawDescOnce.Do(func() { - file_UnidentifiedDelivery_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_UnidentifiedDelivery_proto_rawDesc), len(file_UnidentifiedDelivery_proto_rawDesc))) - }) - return file_UnidentifiedDelivery_proto_rawDescData -} - -var file_UnidentifiedDelivery_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_UnidentifiedDelivery_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_UnidentifiedDelivery_proto_goTypes = []any{ - (UnidentifiedSenderMessage_Message_Type)(0), // 0: signalservice.UnidentifiedSenderMessage.Message.Type - (UnidentifiedSenderMessage_Message_ContentHint)(0), // 1: signalservice.UnidentifiedSenderMessage.Message.ContentHint - (*ServerCertificate)(nil), // 2: signalservice.ServerCertificate - (*SenderCertificate)(nil), // 3: signalservice.SenderCertificate - (*UnidentifiedSenderMessage)(nil), // 4: signalservice.UnidentifiedSenderMessage - (*ServerCertificate_Certificate)(nil), // 5: signalservice.ServerCertificate.Certificate - (*SenderCertificate_Certificate)(nil), // 6: signalservice.SenderCertificate.Certificate - (*UnidentifiedSenderMessage_Message)(nil), // 7: signalservice.UnidentifiedSenderMessage.Message -} -var file_UnidentifiedDelivery_proto_depIdxs = []int32{ - 2, // 0: signalservice.SenderCertificate.Certificate.signer:type_name -> signalservice.ServerCertificate - 0, // 1: signalservice.UnidentifiedSenderMessage.Message.type:type_name -> signalservice.UnidentifiedSenderMessage.Message.Type - 3, // 2: signalservice.UnidentifiedSenderMessage.Message.senderCertificate:type_name -> signalservice.SenderCertificate - 1, // 3: signalservice.UnidentifiedSenderMessage.Message.contentHint:type_name -> signalservice.UnidentifiedSenderMessage.Message.ContentHint - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_UnidentifiedDelivery_proto_init() } -func file_UnidentifiedDelivery_proto_init() { - if File_UnidentifiedDelivery_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_UnidentifiedDelivery_proto_rawDesc), len(file_UnidentifiedDelivery_proto_rawDesc)), - NumEnums: 2, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_UnidentifiedDelivery_proto_goTypes, - DependencyIndexes: file_UnidentifiedDelivery_proto_depIdxs, - EnumInfos: file_UnidentifiedDelivery_proto_enumTypes, - MessageInfos: file_UnidentifiedDelivery_proto_msgTypes, - }.Build() - File_UnidentifiedDelivery_proto = out.File - file_UnidentifiedDelivery_proto_goTypes = nil - file_UnidentifiedDelivery_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/UnidentifiedDelivery.proto b/pkg/signalmeow/protobuf/UnidentifiedDelivery.proto deleted file mode 100644 index 255ab6e..0000000 --- a/pkg/signalmeow/protobuf/UnidentifiedDelivery.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2018 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -package signalservice; - -option java_package = "org.whispersystems.libsignal.protocol"; -option java_outer_classname = "WhisperProtos"; - -message ServerCertificate { - message Certificate { - optional uint32 id = 1; - optional bytes key = 2; - } - - optional bytes certificate = 1; - optional bytes signature = 2; -} - -message SenderCertificate { - message Certificate { - optional string senderE164 = 1; - optional string senderUuid = 6; - optional uint32 senderDevice = 2; - optional fixed64 expires = 3; - optional bytes identityKey = 4; - optional ServerCertificate signer = 5; - } - - optional bytes certificate = 1; - optional bytes signature = 2; -} - -message UnidentifiedSenderMessage { - - message Message { - enum Type { - // Our parser does not handle reserved in enums: DESKTOP-1569 - // reserved 1; - MESSAGE = 2; - PREKEY_MESSAGE = 3; - // Further cases should line up with Envelope.Type, even though old cases don't. - - // reserved 3 to 6; - - SENDERKEY_MESSAGE = 7; - PLAINTEXT_CONTENT = 8; - } - - enum ContentHint { - // Show an error immediately; it was important but we can't retry. - DEFAULT = 0; - - // Sender will try to resend; delay any error UI if possible - RESENDABLE = 1; - - // Don't show any error UI at all; this is something sent implicitly like a typing message or a receipt - IMPLICIT = 2; - } - - optional Type type = 1; - optional SenderCertificate senderCertificate = 2; - optional bytes content = 3; - optional ContentHint contentHint = 4; - optional bytes groupId = 5; - } - - optional bytes ephemeralPublic = 1; - optional bytes encryptedStatic = 2; - optional bytes encryptedMessage = 3; -} diff --git a/pkg/signalmeow/protobuf/backuppb/Backup.pb.go b/pkg/signalmeow/protobuf/backuppb/Backup.pb.go index 975fd50..bcff3bd 100644 --- a/pkg/signalmeow/protobuf/backuppb/Backup.pb.go +++ b/pkg/signalmeow/protobuf/backuppb/Backup.pb.go @@ -482,6 +482,55 @@ func (AccountData_AutoDownloadSettings_AutoDownloadOption) EnumDescriptor() ([]b return file_backuppb_Backup_proto_rawDescGZIP(), []int{2, 1, 0} } +type AccountData_AccountSettings_UnreadBadgeType int32 + +const ( + AccountData_AccountSettings_UNKNOWN_BADGE_TYPE AccountData_AccountSettings_UnreadBadgeType = 0 // Interpret as "Unread messages" + AccountData_AccountSettings_UNREAD_MESSAGES AccountData_AccountSettings_UnreadBadgeType = 1 + AccountData_AccountSettings_UNREAD_CHATS AccountData_AccountSettings_UnreadBadgeType = 2 +) + +// Enum value maps for AccountData_AccountSettings_UnreadBadgeType. +var ( + AccountData_AccountSettings_UnreadBadgeType_name = map[int32]string{ + 0: "UNKNOWN_BADGE_TYPE", + 1: "UNREAD_MESSAGES", + 2: "UNREAD_CHATS", + } + AccountData_AccountSettings_UnreadBadgeType_value = map[string]int32{ + "UNKNOWN_BADGE_TYPE": 0, + "UNREAD_MESSAGES": 1, + "UNREAD_CHATS": 2, + } +) + +func (x AccountData_AccountSettings_UnreadBadgeType) Enum() *AccountData_AccountSettings_UnreadBadgeType { + p := new(AccountData_AccountSettings_UnreadBadgeType) + *p = x + return p +} + +func (x AccountData_AccountSettings_UnreadBadgeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccountData_AccountSettings_UnreadBadgeType) Descriptor() protoreflect.EnumDescriptor { + return file_backuppb_Backup_proto_enumTypes[8].Descriptor() +} + +func (AccountData_AccountSettings_UnreadBadgeType) Type() protoreflect.EnumType { + return &file_backuppb_Backup_proto_enumTypes[8] +} + +func (x AccountData_AccountSettings_UnreadBadgeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccountData_AccountSettings_UnreadBadgeType.Descriptor instead. +func (AccountData_AccountSettings_UnreadBadgeType) EnumDescriptor() ([]byte, []int) { + return file_backuppb_Backup_proto_rawDescGZIP(), []int{2, 2, 0} +} + type AccountData_AndroidSpecificSettings_NavigationBarSize int32 const ( @@ -515,11 +564,11 @@ func (x AccountData_AndroidSpecificSettings_NavigationBarSize) String() string { } func (AccountData_AndroidSpecificSettings_NavigationBarSize) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[8].Descriptor() + return file_backuppb_Backup_proto_enumTypes[9].Descriptor() } func (AccountData_AndroidSpecificSettings_NavigationBarSize) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[8] + return &file_backuppb_Backup_proto_enumTypes[9] } func (x AccountData_AndroidSpecificSettings_NavigationBarSize) Number() protoreflect.EnumNumber { @@ -564,11 +613,11 @@ func (x Contact_IdentityState) String() string { } func (Contact_IdentityState) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[9].Descriptor() + return file_backuppb_Backup_proto_enumTypes[10].Descriptor() } func (Contact_IdentityState) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[9] + return &file_backuppb_Backup_proto_enumTypes[10] } func (x Contact_IdentityState) Number() protoreflect.EnumNumber { @@ -613,11 +662,11 @@ func (x Contact_Visibility) String() string { } func (Contact_Visibility) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[10].Descriptor() + return file_backuppb_Backup_proto_enumTypes[11].Descriptor() } func (Contact_Visibility) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[10] + return &file_backuppb_Backup_proto_enumTypes[11] } func (x Contact_Visibility) Number() protoreflect.EnumNumber { @@ -662,11 +711,11 @@ func (x Group_StorySendMode) String() string { } func (Group_StorySendMode) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[11].Descriptor() + return file_backuppb_Backup_proto_enumTypes[12].Descriptor() } func (Group_StorySendMode) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[11] + return &file_backuppb_Backup_proto_enumTypes[12] } func (x Group_StorySendMode) Number() protoreflect.EnumNumber { @@ -711,11 +760,11 @@ func (x Group_Member_Role) String() string { } func (Group_Member_Role) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[12].Descriptor() + return file_backuppb_Backup_proto_enumTypes[13].Descriptor() } func (Group_Member_Role) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[12] + return &file_backuppb_Backup_proto_enumTypes[13] } func (x Group_Member_Role) Number() protoreflect.EnumNumber { @@ -766,11 +815,11 @@ func (x Group_AccessControl_AccessRequired) String() string { } func (Group_AccessControl_AccessRequired) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[13].Descriptor() + return file_backuppb_Backup_proto_enumTypes[14].Descriptor() } func (Group_AccessControl_AccessRequired) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[13] + return &file_backuppb_Backup_proto_enumTypes[14] } func (x Group_AccessControl_AccessRequired) Number() protoreflect.EnumNumber { @@ -815,11 +864,11 @@ func (x CallLink_Restrictions) String() string { } func (CallLink_Restrictions) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[14].Descriptor() + return file_backuppb_Backup_proto_enumTypes[15].Descriptor() } func (CallLink_Restrictions) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[14] + return &file_backuppb_Backup_proto_enumTypes[15] } func (x CallLink_Restrictions) Number() protoreflect.EnumNumber { @@ -861,11 +910,11 @@ func (x AdHocCall_State) String() string { } func (AdHocCall_State) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[15].Descriptor() + return file_backuppb_Backup_proto_enumTypes[16].Descriptor() } func (AdHocCall_State) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[15] + return &file_backuppb_Backup_proto_enumTypes[16] } func (x AdHocCall_State) Number() protoreflect.EnumNumber { @@ -913,11 +962,11 @@ func (x DistributionList_PrivacyMode) String() string { } func (DistributionList_PrivacyMode) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[16].Descriptor() + return file_backuppb_Backup_proto_enumTypes[17].Descriptor() } func (DistributionList_PrivacyMode) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[16] + return &file_backuppb_Backup_proto_enumTypes[17] } func (x DistributionList_PrivacyMode) Number() protoreflect.EnumNumber { @@ -962,11 +1011,11 @@ func (x SendStatus_Failed_FailureReason) String() string { } func (SendStatus_Failed_FailureReason) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[17].Descriptor() + return file_backuppb_Backup_proto_enumTypes[18].Descriptor() } func (SendStatus_Failed_FailureReason) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[17] + return &file_backuppb_Backup_proto_enumTypes[18] } func (x SendStatus_Failed_FailureReason) Number() protoreflect.EnumNumber { @@ -1011,11 +1060,11 @@ func (x PaymentNotification_TransactionDetails_FailedTransaction_FailureReason) } func (PaymentNotification_TransactionDetails_FailedTransaction_FailureReason) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[18].Descriptor() + return file_backuppb_Backup_proto_enumTypes[19].Descriptor() } func (PaymentNotification_TransactionDetails_FailedTransaction_FailureReason) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[18] + return &file_backuppb_Backup_proto_enumTypes[19] } func (x PaymentNotification_TransactionDetails_FailedTransaction_FailureReason) Number() protoreflect.EnumNumber { @@ -1060,11 +1109,11 @@ func (x PaymentNotification_TransactionDetails_Transaction_Status) String() stri } func (PaymentNotification_TransactionDetails_Transaction_Status) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[19].Descriptor() + return file_backuppb_Backup_proto_enumTypes[20].Descriptor() } func (PaymentNotification_TransactionDetails_Transaction_Status) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[19] + return &file_backuppb_Backup_proto_enumTypes[20] } func (x PaymentNotification_TransactionDetails_Transaction_Status) Number() protoreflect.EnumNumber { @@ -1112,11 +1161,11 @@ func (x GiftBadge_State) String() string { } func (GiftBadge_State) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[20].Descriptor() + return file_backuppb_Backup_proto_enumTypes[21].Descriptor() } func (GiftBadge_State) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[20] + return &file_backuppb_Backup_proto_enumTypes[21] } func (x GiftBadge_State) Number() protoreflect.EnumNumber { @@ -1167,11 +1216,11 @@ func (x ContactAttachment_Phone_Type) String() string { } func (ContactAttachment_Phone_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[21].Descriptor() + return file_backuppb_Backup_proto_enumTypes[22].Descriptor() } func (ContactAttachment_Phone_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[21] + return &file_backuppb_Backup_proto_enumTypes[22] } func (x ContactAttachment_Phone_Type) Number() protoreflect.EnumNumber { @@ -1222,11 +1271,11 @@ func (x ContactAttachment_Email_Type) String() string { } func (ContactAttachment_Email_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[22].Descriptor() + return file_backuppb_Backup_proto_enumTypes[23].Descriptor() } func (ContactAttachment_Email_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[22] + return &file_backuppb_Backup_proto_enumTypes[23] } func (x ContactAttachment_Email_Type) Number() protoreflect.EnumNumber { @@ -1274,11 +1323,11 @@ func (x ContactAttachment_PostalAddress_Type) String() string { } func (ContactAttachment_PostalAddress_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[23].Descriptor() + return file_backuppb_Backup_proto_enumTypes[24].Descriptor() } func (ContactAttachment_PostalAddress_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[23] + return &file_backuppb_Backup_proto_enumTypes[24] } func (x ContactAttachment_PostalAddress_Type) Number() protoreflect.EnumNumber { @@ -1329,11 +1378,11 @@ func (x MessageAttachment_Flag) String() string { } func (MessageAttachment_Flag) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[24].Descriptor() + return file_backuppb_Backup_proto_enumTypes[25].Descriptor() } func (MessageAttachment_Flag) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[24] + return &file_backuppb_Backup_proto_enumTypes[25] } func (x MessageAttachment_Flag) Number() protoreflect.EnumNumber { @@ -1384,11 +1433,11 @@ func (x Quote_Type) String() string { } func (Quote_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[25].Descriptor() + return file_backuppb_Backup_proto_enumTypes[26].Descriptor() } func (Quote_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[25] + return &file_backuppb_Backup_proto_enumTypes[26] } func (x Quote_Type) Number() protoreflect.EnumNumber { @@ -1442,11 +1491,11 @@ func (x BodyRange_Style) String() string { } func (BodyRange_Style) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[26].Descriptor() + return file_backuppb_Backup_proto_enumTypes[27].Descriptor() } func (BodyRange_Style) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[26] + return &file_backuppb_Backup_proto_enumTypes[27] } func (x BodyRange_Style) Number() protoreflect.EnumNumber { @@ -1491,11 +1540,11 @@ func (x IndividualCall_Type) String() string { } func (IndividualCall_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[27].Descriptor() + return file_backuppb_Backup_proto_enumTypes[28].Descriptor() } func (IndividualCall_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[27] + return &file_backuppb_Backup_proto_enumTypes[28] } func (x IndividualCall_Type) Number() protoreflect.EnumNumber { @@ -1540,11 +1589,11 @@ func (x IndividualCall_Direction) String() string { } func (IndividualCall_Direction) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[28].Descriptor() + return file_backuppb_Backup_proto_enumTypes[29].Descriptor() } func (IndividualCall_Direction) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[28] + return &file_backuppb_Backup_proto_enumTypes[29] } func (x IndividualCall_Direction) Number() protoreflect.EnumNumber { @@ -1599,11 +1648,11 @@ func (x IndividualCall_State) String() string { } func (IndividualCall_State) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[29].Descriptor() + return file_backuppb_Backup_proto_enumTypes[30].Descriptor() } func (IndividualCall_State) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[29] + return &file_backuppb_Backup_proto_enumTypes[30] } func (x IndividualCall_State) Number() protoreflect.EnumNumber { @@ -1675,11 +1724,11 @@ func (x GroupCall_State) String() string { } func (GroupCall_State) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[30].Descriptor() + return file_backuppb_Backup_proto_enumTypes[31].Descriptor() } func (GroupCall_State) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[30] + return &file_backuppb_Backup_proto_enumTypes[31] } func (x GroupCall_State) Number() protoreflect.EnumNumber { @@ -1766,11 +1815,11 @@ func (x SimpleChatUpdate_Type) String() string { } func (SimpleChatUpdate_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[31].Descriptor() + return file_backuppb_Backup_proto_enumTypes[32].Descriptor() } func (SimpleChatUpdate_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[31] + return &file_backuppb_Backup_proto_enumTypes[32] } func (x SimpleChatUpdate_Type) Number() protoreflect.EnumNumber { @@ -1872,11 +1921,11 @@ func (x ChatStyle_WallpaperPreset) String() string { } func (ChatStyle_WallpaperPreset) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[32].Descriptor() + return file_backuppb_Backup_proto_enumTypes[33].Descriptor() } func (ChatStyle_WallpaperPreset) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[32] + return &file_backuppb_Backup_proto_enumTypes[33] } func (x ChatStyle_WallpaperPreset) Number() protoreflect.EnumNumber { @@ -1981,11 +2030,11 @@ func (x ChatStyle_BubbleColorPreset) String() string { } func (ChatStyle_BubbleColorPreset) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[33].Descriptor() + return file_backuppb_Backup_proto_enumTypes[34].Descriptor() } func (ChatStyle_BubbleColorPreset) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[33] + return &file_backuppb_Backup_proto_enumTypes[34] } func (x ChatStyle_BubbleColorPreset) Number() protoreflect.EnumNumber { @@ -2045,11 +2094,11 @@ func (x NotificationProfile_DayOfWeek) String() string { } func (NotificationProfile_DayOfWeek) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[34].Descriptor() + return file_backuppb_Backup_proto_enumTypes[35].Descriptor() } func (NotificationProfile_DayOfWeek) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[34] + return &file_backuppb_Backup_proto_enumTypes[35] } func (x NotificationProfile_DayOfWeek) Number() protoreflect.EnumNumber { @@ -2095,11 +2144,11 @@ func (x ChatFolder_FolderType) String() string { } func (ChatFolder_FolderType) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[35].Descriptor() + return file_backuppb_Backup_proto_enumTypes[36].Descriptor() } func (ChatFolder_FolderType) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[35] + return &file_backuppb_Backup_proto_enumTypes[36] } func (x ChatFolder_FolderType) Number() protoreflect.EnumNumber { @@ -2716,6 +2765,7 @@ type Contact struct { SystemNickname string `protobuf:"bytes,20,opt,name=systemNickname,proto3" json:"systemNickname,omitempty"` AvatarColor *AvatarColor `protobuf:"varint,21,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` KeyTransparencyData []byte `protobuf:"bytes,22,opt,name=keyTransparencyData,proto3,oneof" json:"keyTransparencyData,omitempty"` + BlockedAtTimestamp uint64 `protobuf:"varint,23,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // if `blocked` is true, 0 means unknown block time unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2915,6 +2965,13 @@ func (x *Contact) GetKeyTransparencyData() []byte { return nil } +func (x *Contact) GetBlockedAtTimestamp() uint64 { + if x != nil { + return x.BlockedAtTimestamp + } + return 0 +} + type isContact_Registration interface { isContact_Registration() } @@ -2932,16 +2989,17 @@ func (*Contact_Registered_) isContact_Registration() {} func (*Contact_NotRegistered_) isContact_Registration() {} type Group struct { - state protoimpl.MessageState `protogen:"open.v1"` - MasterKey []byte `protobuf:"bytes,1,opt,name=masterKey,proto3" json:"masterKey,omitempty"` - Whitelisted bool `protobuf:"varint,2,opt,name=whitelisted,proto3" json:"whitelisted,omitempty"` - HideStory bool `protobuf:"varint,3,opt,name=hideStory,proto3" json:"hideStory,omitempty"` - StorySendMode Group_StorySendMode `protobuf:"varint,4,opt,name=storySendMode,proto3,enum=signal.backup.Group_StorySendMode" json:"storySendMode,omitempty"` - Snapshot *Group_GroupSnapshot `protobuf:"bytes,5,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - Blocked bool `protobuf:"varint,6,opt,name=blocked,proto3" json:"blocked,omitempty"` - AvatarColor *AvatarColor `protobuf:"varint,7,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + MasterKey []byte `protobuf:"bytes,1,opt,name=masterKey,proto3" json:"masterKey,omitempty"` + Whitelisted bool `protobuf:"varint,2,opt,name=whitelisted,proto3" json:"whitelisted,omitempty"` + HideStory bool `protobuf:"varint,3,opt,name=hideStory,proto3" json:"hideStory,omitempty"` + StorySendMode Group_StorySendMode `protobuf:"varint,4,opt,name=storySendMode,proto3,enum=signal.backup.Group_StorySendMode" json:"storySendMode,omitempty"` + Snapshot *Group_GroupSnapshot `protobuf:"bytes,5,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + Blocked bool `protobuf:"varint,6,opt,name=blocked,proto3" json:"blocked,omitempty"` + AvatarColor *AvatarColor `protobuf:"varint,7,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` + BlockedAtTimestamp uint64 `protobuf:"varint,8,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // if `blocked` is true, 0 means unknown block time + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Group) Reset() { @@ -3023,6 +3081,13 @@ func (x *Group) GetAvatarColor() AvatarColor { return AvatarColor_A100 } +func (x *Group) GetBlockedAtTimestamp() uint64 { + if x != nil { + return x.BlockedAtTimestamp + } + return 0 +} + type Self struct { state protoimpl.MessageState `protogen:"open.v1"` AvatarColor *AvatarColor `protobuf:"varint,1,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` @@ -3112,9 +3177,13 @@ type Chat struct { ExpirationTimerMs *uint64 `protobuf:"varint,5,opt,name=expirationTimerMs,proto3,oneof" json:"expirationTimerMs,omitempty"` MuteUntilMs *uint64 `protobuf:"varint,6,opt,name=muteUntilMs,proto3,oneof" json:"muteUntilMs,omitempty"` // INT64_MAX (2^63 - 1) = "always muted". MarkedUnread bool `protobuf:"varint,7,opt,name=markedUnread,proto3" json:"markedUnread,omitempty"` - DontNotifyForMentionsIfMuted bool `protobuf:"varint,8,opt,name=dontNotifyForMentionsIfMuted,proto3" json:"dontNotifyForMentionsIfMuted,omitempty"` + DontNotifyForMentionsIfMuted bool `protobuf:"varint,8,opt,name=dontNotifyForMentionsIfMuted,proto3" json:"dontNotifyForMentionsIfMuted,omitempty"` // will be deprecated in favor of [notifyForMentionsIfMuted] Style *ChatStyle `protobuf:"bytes,9,opt,name=style,proto3" json:"style,omitempty"` ExpireTimerVersion uint32 `protobuf:"varint,10,opt,name=expireTimerVersion,proto3" json:"expireTimerVersion,omitempty"` + NotifyForCallsIfMuted *bool `protobuf:"varint,11,opt,name=notifyForCallsIfMuted,proto3,oneof" json:"notifyForCallsIfMuted,omitempty"` // If unset, use default global settings + NotifyForMentionsIfMuted *bool `protobuf:"varint,12,opt,name=notifyForMentionsIfMuted,proto3,oneof" json:"notifyForMentionsIfMuted,omitempty"` // If unset, use default global settings. Only for groups. If [dontNotifyForMentionsIfMuted] is true, this should be initialized to false. + NotifyForRepliesIfMuted *bool `protobuf:"varint,13,opt,name=notifyForRepliesIfMuted,proto3,oneof" json:"notifyForRepliesIfMuted,omitempty"` // If unset, use default global settings. Only for groups. + ShowUnreadReminders *bool `protobuf:"varint,14,opt,name=showUnreadReminders,proto3,oneof" json:"showUnreadReminders,omitempty"` // If unset, use default global settings unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3219,6 +3288,34 @@ func (x *Chat) GetExpireTimerVersion() uint32 { return 0 } +func (x *Chat) GetNotifyForCallsIfMuted() bool { + if x != nil && x.NotifyForCallsIfMuted != nil { + return *x.NotifyForCallsIfMuted + } + return false +} + +func (x *Chat) GetNotifyForMentionsIfMuted() bool { + if x != nil && x.NotifyForMentionsIfMuted != nil { + return *x.NotifyForMentionsIfMuted + } + return false +} + +func (x *Chat) GetNotifyForRepliesIfMuted() bool { + if x != nil && x.NotifyForRepliesIfMuted != nil { + return *x.NotifyForRepliesIfMuted + } + return false +} + +func (x *Chat) GetShowUnreadReminders() bool { + if x != nil && x.ShowUnreadReminders != nil { + return *x.ShowUnreadReminders + } + return false +} + // * // Call Links have some associated data including a call, but unlike other recipients // are not tied to threads because they do not have messages associated with them. @@ -8656,16 +8753,24 @@ type AccountData_AccountSettings struct { CustomChatColors []*ChatStyle_CustomChatColor `protobuf:"bytes,19,rep,name=customChatColors,proto3" json:"customChatColors,omitempty"` OptimizeOnDeviceStorage bool `protobuf:"varint,20,opt,name=optimizeOnDeviceStorage,proto3" json:"optimizeOnDeviceStorage,omitempty"` // See zkgroup for integer particular values. Unset if backups are not enabled. - BackupTier *uint64 `protobuf:"varint,21,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` - DefaultSentMediaQuality AccountData_SentMediaQuality `protobuf:"varint,23,opt,name=defaultSentMediaQuality,proto3,enum=signal.backup.AccountData_SentMediaQuality" json:"defaultSentMediaQuality,omitempty"` - AutoDownloadSettings *AccountData_AutoDownloadSettings `protobuf:"bytes,24,opt,name=autoDownloadSettings,proto3" json:"autoDownloadSettings,omitempty"` - ScreenLockTimeoutMinutes *uint32 `protobuf:"varint,26,opt,name=screenLockTimeoutMinutes,proto3,oneof" json:"screenLockTimeoutMinutes,omitempty"` // If unset, consider screen lock to be disabled. - PinReminders *bool `protobuf:"varint,27,opt,name=pinReminders,proto3,oneof" json:"pinReminders,omitempty"` // If unset, consider pin reminders to be enabled. - AppTheme AccountData_AppTheme `protobuf:"varint,28,opt,name=appTheme,proto3,enum=signal.backup.AccountData_AppTheme" json:"appTheme,omitempty"` // If unset, treat the same as "Unknown" case - CallsUseLessDataSetting AccountData_CallsUseLessDataSetting `protobuf:"varint,29,opt,name=callsUseLessDataSetting,proto3,enum=signal.backup.AccountData_CallsUseLessDataSetting" json:"callsUseLessDataSetting,omitempty"` // If unset, treat the same as "Unknown" case - AllowSealedSenderFromAnyone bool `protobuf:"varint,30,opt,name=allowSealedSenderFromAnyone,proto3" json:"allowSealedSenderFromAnyone,omitempty"` - AllowAutomaticKeyVerification bool `protobuf:"varint,31,opt,name=allowAutomaticKeyVerification,proto3" json:"allowAutomaticKeyVerification,omitempty"` - HasSeenAdminDeleteEducationDialog bool `protobuf:"varint,32,opt,name=hasSeenAdminDeleteEducationDialog,proto3" json:"hasSeenAdminDeleteEducationDialog,omitempty"` + BackupTier *uint64 `protobuf:"varint,21,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` + DefaultSentMediaQuality AccountData_SentMediaQuality `protobuf:"varint,23,opt,name=defaultSentMediaQuality,proto3,enum=signal.backup.AccountData_SentMediaQuality" json:"defaultSentMediaQuality,omitempty"` + AutoDownloadSettings *AccountData_AutoDownloadSettings `protobuf:"bytes,24,opt,name=autoDownloadSettings,proto3" json:"autoDownloadSettings,omitempty"` + ScreenLockTimeoutMinutes *uint32 `protobuf:"varint,26,opt,name=screenLockTimeoutMinutes,proto3,oneof" json:"screenLockTimeoutMinutes,omitempty"` // If unset, consider screen lock to be disabled. + PinReminders *bool `protobuf:"varint,27,opt,name=pinReminders,proto3,oneof" json:"pinReminders,omitempty"` // If unset, consider pin reminders to be enabled. + AppTheme AccountData_AppTheme `protobuf:"varint,28,opt,name=appTheme,proto3,enum=signal.backup.AccountData_AppTheme" json:"appTheme,omitempty"` // If unset, treat the same as "Unknown" case + CallsUseLessDataSetting AccountData_CallsUseLessDataSetting `protobuf:"varint,29,opt,name=callsUseLessDataSetting,proto3,enum=signal.backup.AccountData_CallsUseLessDataSetting" json:"callsUseLessDataSetting,omitempty"` // If unset, treat the same as "Unknown" case + AllowSealedSenderFromAnyone bool `protobuf:"varint,30,opt,name=allowSealedSenderFromAnyone,proto3" json:"allowSealedSenderFromAnyone,omitempty"` + AllowAutomaticKeyVerification bool `protobuf:"varint,31,opt,name=allowAutomaticKeyVerification,proto3" json:"allowAutomaticKeyVerification,omitempty"` + HasSeenAdminDeleteEducationDialog bool `protobuf:"varint,32,opt,name=hasSeenAdminDeleteEducationDialog,proto3" json:"hasSeenAdminDeleteEducationDialog,omitempty"` + UnreadBadgeType AccountData_AccountSettings_UnreadBadgeType `protobuf:"varint,33,opt,name=unreadBadgeType,proto3,enum=signal.backup.AccountData_AccountSettings_UnreadBadgeType" json:"unreadBadgeType,omitempty"` // Only used in ios/desktop + IncludeMutedChatsInBadge *bool `protobuf:"varint,34,opt,name=includeMutedChatsInBadge,proto3,oneof" json:"includeMutedChatsInBadge,omitempty"` // Only used in ios/desktop. If unset, consider this disabled + ReactionNotifications *bool `protobuf:"varint,35,opt,name=reactionNotifications,proto3,oneof" json:"reactionNotifications,omitempty"` // If unset, consider this enabled + NotifyForCallsIfMuted *bool `protobuf:"varint,36,opt,name=notifyForCallsIfMuted,proto3,oneof" json:"notifyForCallsIfMuted,omitempty"` // If unset, consider this disabled + NotifyForMentionsIfMuted *bool `protobuf:"varint,37,opt,name=notifyForMentionsIfMuted,proto3,oneof" json:"notifyForMentionsIfMuted,omitempty"` // If unset, consider this enabled + NotifyForRepliesIfMuted *bool `protobuf:"varint,38,opt,name=notifyForRepliesIfMuted,proto3,oneof" json:"notifyForRepliesIfMuted,omitempty"` // If unset, consider this enabled + ShowUnreadReminders *bool `protobuf:"varint,39,opt,name=showUnreadReminders,proto3,oneof" json:"showUnreadReminders,omitempty"` // If unset, consider this enabled + NotifyWhenContactJoins *bool `protobuf:"varint,40,opt,name=notifyWhenContactJoins,proto3,oneof" json:"notifyWhenContactJoins,omitempty"` // If unset, consider this disabled unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -8910,6 +9015,62 @@ func (x *AccountData_AccountSettings) GetHasSeenAdminDeleteEducationDialog() boo return false } +func (x *AccountData_AccountSettings) GetUnreadBadgeType() AccountData_AccountSettings_UnreadBadgeType { + if x != nil { + return x.UnreadBadgeType + } + return AccountData_AccountSettings_UNKNOWN_BADGE_TYPE +} + +func (x *AccountData_AccountSettings) GetIncludeMutedChatsInBadge() bool { + if x != nil && x.IncludeMutedChatsInBadge != nil { + return *x.IncludeMutedChatsInBadge + } + return false +} + +func (x *AccountData_AccountSettings) GetReactionNotifications() bool { + if x != nil && x.ReactionNotifications != nil { + return *x.ReactionNotifications + } + return false +} + +func (x *AccountData_AccountSettings) GetNotifyForCallsIfMuted() bool { + if x != nil && x.NotifyForCallsIfMuted != nil { + return *x.NotifyForCallsIfMuted + } + return false +} + +func (x *AccountData_AccountSettings) GetNotifyForMentionsIfMuted() bool { + if x != nil && x.NotifyForMentionsIfMuted != nil { + return *x.NotifyForMentionsIfMuted + } + return false +} + +func (x *AccountData_AccountSettings) GetNotifyForRepliesIfMuted() bool { + if x != nil && x.NotifyForRepliesIfMuted != nil { + return *x.NotifyForRepliesIfMuted + } + return false +} + +func (x *AccountData_AccountSettings) GetShowUnreadReminders() bool { + if x != nil && x.ShowUnreadReminders != nil { + return *x.ShowUnreadReminders + } + return false +} + +func (x *AccountData_AccountSettings) GetNotifyWhenContactJoins() bool { + if x != nil && x.NotifyWhenContactJoins != nil { + return *x.NotifyWhenContactJoins + } + return false +} + type AccountData_SubscriberData struct { state protoimpl.MessageState `protogen:"open.v1"` SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` @@ -12256,7 +12417,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "chatFolder\x18\b \x01(\v2\x19.signal.backup.ChatFolderH\x00R\n" + "chatFolderB\x06\n" + - "\x04item\"\xfe\"\n" + + "\x04item\"\x9e)\n" + "\vAccountData\x12\x1e\n" + "\n" + "profileKey\x18\x01 \x01(\fR\n" + @@ -12301,7 +12462,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\aUNKNOWN\x10\x00\x12\t\n" + "\x05NEVER\x10\x01\x12\b\n" + "\x04WIFI\x10\x02\x12\x15\n" + - "\x11WIFI_AND_CELLULAR\x10\x03\x1a\x97\x10\n" + + "\x11WIFI_AND_CELLULAR\x10\x03\x1a\xb7\x16\n" + "\x0fAccountSettings\x12\"\n" + "\freadReceipts\x18\x01 \x01(\bR\freadReceipts\x126\n" + "\x16sealedSenderIndicators\x18\x02 \x01(\bR\x16sealedSenderIndicators\x12*\n" + @@ -12335,11 +12496,31 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x17callsUseLessDataSetting\x18\x1d \x01(\x0e22.signal.backup.AccountData.CallsUseLessDataSettingR\x17callsUseLessDataSetting\x12@\n" + "\x1ballowSealedSenderFromAnyone\x18\x1e \x01(\bR\x1ballowSealedSenderFromAnyone\x12D\n" + "\x1dallowAutomaticKeyVerification\x18\x1f \x01(\bR\x1dallowAutomaticKeyVerification\x12L\n" + - "!hasSeenAdminDeleteEducationDialog\x18 \x01(\bR!hasSeenAdminDeleteEducationDialogB\x1b\n" + + "!hasSeenAdminDeleteEducationDialog\x18 \x01(\bR!hasSeenAdminDeleteEducationDialog\x12d\n" + + "\x0funreadBadgeType\x18! \x01(\x0e2:.signal.backup.AccountData.AccountSettings.UnreadBadgeTypeR\x0funreadBadgeType\x12?\n" + + "\x18includeMutedChatsInBadge\x18\" \x01(\bH\x04R\x18includeMutedChatsInBadge\x88\x01\x01\x129\n" + + "\x15reactionNotifications\x18# \x01(\bH\x05R\x15reactionNotifications\x88\x01\x01\x129\n" + + "\x15notifyForCallsIfMuted\x18$ \x01(\bH\x06R\x15notifyForCallsIfMuted\x88\x01\x01\x12?\n" + + "\x18notifyForMentionsIfMuted\x18% \x01(\bH\aR\x18notifyForMentionsIfMuted\x88\x01\x01\x12=\n" + + "\x17notifyForRepliesIfMuted\x18& \x01(\bH\bR\x17notifyForRepliesIfMuted\x88\x01\x01\x125\n" + + "\x13showUnreadReminders\x18' \x01(\bH\tR\x13showUnreadReminders\x88\x01\x01\x12;\n" + + "\x16notifyWhenContactJoins\x18( \x01(\bH\n" + + "R\x16notifyWhenContactJoins\x88\x01\x01\"P\n" + + "\x0fUnreadBadgeType\x12\x16\n" + + "\x12UNKNOWN_BADGE_TYPE\x10\x00\x12\x13\n" + + "\x0fUNREAD_MESSAGES\x10\x01\x12\x10\n" + + "\fUNREAD_CHATS\x10\x02B\x1b\n" + "\x19_storyViewReceiptsEnabledB\r\n" + "\v_backupTierB\x1b\n" + "\x19_screenLockTimeoutMinutesB\x0f\n" + - "\r_pinRemindersJ\x04\b\x16\x10\x17J\x04\b\x19\x10\x1a\x1a\x86\x01\n" + + "\r_pinRemindersB\x1b\n" + + "\x19_includeMutedChatsInBadgeB\x18\n" + + "\x16_reactionNotificationsB\x18\n" + + "\x16_notifyForCallsIfMutedB\x1b\n" + + "\x19_notifyForMentionsIfMutedB\x1a\n" + + "\x18_notifyForRepliesIfMutedB\x16\n" + + "\x14_showUnreadRemindersB\x19\n" + + "\x17_notifyWhenContactJoinsJ\x04\b\x16\x10\x17J\x04\b\x19\x10\x1a\x1a\x86\x01\n" + "\x0eSubscriberData\x12\"\n" + "\fsubscriberId\x18\x01 \x01(\fR\fsubscriberId\x12\"\n" + "\fcurrencyCode\x18\x02 \x01(\tR\fcurrencyCode\x12,\n" + @@ -12387,7 +12568,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x04self\x18\x05 \x01(\v2\x13.signal.backup.SelfH\x00R\x04self\x12A\n" + "\freleaseNotes\x18\x06 \x01(\v2\x1b.signal.backup.ReleaseNotesH\x00R\freleaseNotes\x125\n" + "\bcallLink\x18\a \x01(\v2\x17.signal.backup.CallLinkH\x00R\bcallLinkB\r\n" + - "\vdestination\"\x9a\v\n" + + "\vdestination\"\xca\v\n" + "\aContact\x12\x15\n" + "\x03aci\x18\x01 \x01(\fH\x01R\x03aci\x88\x01\x01\x12\x15\n" + "\x03pni\x18\x02 \x01(\fH\x02R\x03pni\x88\x01\x01\x12\x1f\n" + @@ -12418,7 +12599,8 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x0esystemNickname\x18\x14 \x01(\tR\x0esystemNickname\x12A\n" + "\vavatarColor\x18\x15 \x01(\x0e2\x1a.signal.backup.AvatarColorH\tR\vavatarColor\x88\x01\x01\x125\n" + "\x13keyTransparencyData\x18\x16 \x01(\fH\n" + - "R\x13keyTransparencyData\x88\x01\x01\x1a\f\n" + + "R\x13keyTransparencyData\x88\x01\x01\x12.\n" + + "\x12blockedAtTimestamp\x18\x17 \x01(\x04R\x12blockedAtTimestamp\x1a\f\n" + "\n" + "Registered\x1aE\n" + "\rNotRegistered\x124\n" + @@ -12447,7 +12629,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x12_profileFamilyNameB\x0e\n" + "\f_identityKeyB\x0e\n" + "\f_avatarColorB\x16\n" + - "\x14_keyTransparencyData\"\xc6\x13\n" + + "\x14_keyTransparencyData\"\xf6\x13\n" + "\x05Group\x12\x1c\n" + "\tmasterKey\x18\x01 \x01(\fR\tmasterKey\x12 \n" + "\vwhitelisted\x18\x02 \x01(\bR\vwhitelisted\x12\x1c\n" + @@ -12455,7 +12637,8 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\rstorySendMode\x18\x04 \x01(\x0e2\".signal.backup.Group.StorySendModeR\rstorySendMode\x12>\n" + "\bsnapshot\x18\x05 \x01(\v2\".signal.backup.Group.GroupSnapshotR\bsnapshot\x12\x18\n" + "\ablocked\x18\x06 \x01(\bR\ablocked\x12A\n" + - "\vavatarColor\x18\a \x01(\x0e2\x1a.signal.backup.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x1a\xe5\x06\n" + + "\vavatarColor\x18\a \x01(\x0e2\x1a.signal.backup.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x12.\n" + + "\x12blockedAtTimestamp\x18\b \x01(\x04R\x12blockedAtTimestamp\x1a\xe5\x06\n" + "\rGroupSnapshot\x12=\n" + "\x05title\x18\x02 \x01(\v2'.signal.backup.Group.GroupAttributeBlobR\x05title\x12I\n" + "\vdescription\x18\v \x01(\v2'.signal.backup.Group.GroupAttributeBlobR\vdescription\x12\x1c\n" + @@ -12523,7 +12706,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x04Self\x12A\n" + "\vavatarColor\x18\x01 \x01(\x0e2\x1a.signal.backup.AvatarColorH\x00R\vavatarColor\x88\x01\x01B\x0e\n" + "\f_avatarColor\"\x0e\n" + - "\fReleaseNotes\"\xd3\x03\n" + + "\fReleaseNotes\"\xb0\x06\n" + "\x04Chat\x12\x0e\n" + "\x02id\x18\x01 \x01(\x04R\x02id\x12 \n" + "\vrecipientId\x18\x02 \x01(\x04R\vrecipientId\x12\x1a\n" + @@ -12535,10 +12718,18 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x1cdontNotifyForMentionsIfMuted\x18\b \x01(\bR\x1cdontNotifyForMentionsIfMuted\x12.\n" + "\x05style\x18\t \x01(\v2\x18.signal.backup.ChatStyleR\x05style\x12.\n" + "\x12expireTimerVersion\x18\n" + - " \x01(\rR\x12expireTimerVersionB\x0e\n" + + " \x01(\rR\x12expireTimerVersion\x129\n" + + "\x15notifyForCallsIfMuted\x18\v \x01(\bH\x03R\x15notifyForCallsIfMuted\x88\x01\x01\x12?\n" + + "\x18notifyForMentionsIfMuted\x18\f \x01(\bH\x04R\x18notifyForMentionsIfMuted\x88\x01\x01\x12=\n" + + "\x17notifyForRepliesIfMuted\x18\r \x01(\bH\x05R\x17notifyForRepliesIfMuted\x88\x01\x01\x125\n" + + "\x13showUnreadReminders\x18\x0e \x01(\bH\x06R\x13showUnreadReminders\x88\x01\x01B\x0e\n" + "\f_pinnedOrderB\x14\n" + "\x12_expirationTimerMsB\x0e\n" + - "\f_muteUntilMs\"\x95\x02\n" + + "\f_muteUntilMsB\x18\n" + + "\x16_notifyForCallsIfMutedB\x1b\n" + + "\x19_notifyForMentionsIfMutedB\x1a\n" + + "\x18_notifyForRepliesIfMutedB\x16\n" + + "\x14_showUnreadReminders\"\x95\x02\n" + "\bCallLink\x12\x18\n" + "\arootKey\x18\x01 \x01(\fR\arootKey\x12\x1f\n" + "\badminKey\x18\x02 \x01(\fH\x00R\badminKey\x88\x01\x01\x12\x12\n" + @@ -13426,7 +13617,7 @@ func file_backuppb_Backup_proto_rawDescGZIP() []byte { return file_backuppb_Backup_proto_rawDescData } -var file_backuppb_Backup_proto_enumTypes = make([]protoimpl.EnumInfo, 36) +var file_backuppb_Backup_proto_enumTypes = make([]protoimpl.EnumInfo, 37) var file_backuppb_Backup_proto_msgTypes = make([]protoimpl.MessageInfo, 131) var file_backuppb_Backup_proto_goTypes = []any{ (AvatarColor)(0), // 0: signal.backup.AvatarColor @@ -13437,367 +13628,369 @@ var file_backuppb_Backup_proto_goTypes = []any{ (AccountData_CallsUseLessDataSetting)(0), // 5: signal.backup.AccountData.CallsUseLessDataSetting (AccountData_UsernameLink_Color)(0), // 6: signal.backup.AccountData.UsernameLink.Color (AccountData_AutoDownloadSettings_AutoDownloadOption)(0), // 7: signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - (AccountData_AndroidSpecificSettings_NavigationBarSize)(0), // 8: signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize - (Contact_IdentityState)(0), // 9: signal.backup.Contact.IdentityState - (Contact_Visibility)(0), // 10: signal.backup.Contact.Visibility - (Group_StorySendMode)(0), // 11: signal.backup.Group.StorySendMode - (Group_Member_Role)(0), // 12: signal.backup.Group.Member.Role - (Group_AccessControl_AccessRequired)(0), // 13: signal.backup.Group.AccessControl.AccessRequired - (CallLink_Restrictions)(0), // 14: signal.backup.CallLink.Restrictions - (AdHocCall_State)(0), // 15: signal.backup.AdHocCall.State - (DistributionList_PrivacyMode)(0), // 16: signal.backup.DistributionList.PrivacyMode - (SendStatus_Failed_FailureReason)(0), // 17: signal.backup.SendStatus.Failed.FailureReason - (PaymentNotification_TransactionDetails_FailedTransaction_FailureReason)(0), // 18: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason - (PaymentNotification_TransactionDetails_Transaction_Status)(0), // 19: signal.backup.PaymentNotification.TransactionDetails.Transaction.Status - (GiftBadge_State)(0), // 20: signal.backup.GiftBadge.State - (ContactAttachment_Phone_Type)(0), // 21: signal.backup.ContactAttachment.Phone.Type - (ContactAttachment_Email_Type)(0), // 22: signal.backup.ContactAttachment.Email.Type - (ContactAttachment_PostalAddress_Type)(0), // 23: signal.backup.ContactAttachment.PostalAddress.Type - (MessageAttachment_Flag)(0), // 24: signal.backup.MessageAttachment.Flag - (Quote_Type)(0), // 25: signal.backup.Quote.Type - (BodyRange_Style)(0), // 26: signal.backup.BodyRange.Style - (IndividualCall_Type)(0), // 27: signal.backup.IndividualCall.Type - (IndividualCall_Direction)(0), // 28: signal.backup.IndividualCall.Direction - (IndividualCall_State)(0), // 29: signal.backup.IndividualCall.State - (GroupCall_State)(0), // 30: signal.backup.GroupCall.State - (SimpleChatUpdate_Type)(0), // 31: signal.backup.SimpleChatUpdate.Type - (ChatStyle_WallpaperPreset)(0), // 32: signal.backup.ChatStyle.WallpaperPreset - (ChatStyle_BubbleColorPreset)(0), // 33: signal.backup.ChatStyle.BubbleColorPreset - (NotificationProfile_DayOfWeek)(0), // 34: signal.backup.NotificationProfile.DayOfWeek - (ChatFolder_FolderType)(0), // 35: signal.backup.ChatFolder.FolderType - (*BackupInfo)(nil), // 36: signal.backup.BackupInfo - (*Frame)(nil), // 37: signal.backup.Frame - (*AccountData)(nil), // 38: signal.backup.AccountData - (*Recipient)(nil), // 39: signal.backup.Recipient - (*Contact)(nil), // 40: signal.backup.Contact - (*Group)(nil), // 41: signal.backup.Group - (*Self)(nil), // 42: signal.backup.Self - (*ReleaseNotes)(nil), // 43: signal.backup.ReleaseNotes - (*Chat)(nil), // 44: signal.backup.Chat - (*CallLink)(nil), // 45: signal.backup.CallLink - (*AdHocCall)(nil), // 46: signal.backup.AdHocCall - (*DistributionListItem)(nil), // 47: signal.backup.DistributionListItem - (*DistributionList)(nil), // 48: signal.backup.DistributionList - (*ChatItem)(nil), // 49: signal.backup.ChatItem - (*SendStatus)(nil), // 50: signal.backup.SendStatus - (*Text)(nil), // 51: signal.backup.Text - (*StandardMessage)(nil), // 52: signal.backup.StandardMessage - (*ContactMessage)(nil), // 53: signal.backup.ContactMessage - (*DirectStoryReplyMessage)(nil), // 54: signal.backup.DirectStoryReplyMessage - (*PaymentNotification)(nil), // 55: signal.backup.PaymentNotification - (*GiftBadge)(nil), // 56: signal.backup.GiftBadge - (*ViewOnceMessage)(nil), // 57: signal.backup.ViewOnceMessage - (*ContactAttachment)(nil), // 58: signal.backup.ContactAttachment - (*StickerMessage)(nil), // 59: signal.backup.StickerMessage - (*RemoteDeletedMessage)(nil), // 60: signal.backup.RemoteDeletedMessage - (*Sticker)(nil), // 61: signal.backup.Sticker - (*LinkPreview)(nil), // 62: signal.backup.LinkPreview - (*MessageAttachment)(nil), // 63: signal.backup.MessageAttachment - (*FilePointer)(nil), // 64: signal.backup.FilePointer - (*Quote)(nil), // 65: signal.backup.Quote - (*BodyRange)(nil), // 66: signal.backup.BodyRange - (*Reaction)(nil), // 67: signal.backup.Reaction - (*Poll)(nil), // 68: signal.backup.Poll - (*AdminDeletedMessage)(nil), // 69: signal.backup.AdminDeletedMessage - (*ChatUpdateMessage)(nil), // 70: signal.backup.ChatUpdateMessage - (*IndividualCall)(nil), // 71: signal.backup.IndividualCall - (*GroupCall)(nil), // 72: signal.backup.GroupCall - (*SimpleChatUpdate)(nil), // 73: signal.backup.SimpleChatUpdate - (*ExpirationTimerChatUpdate)(nil), // 74: signal.backup.ExpirationTimerChatUpdate - (*ProfileChangeChatUpdate)(nil), // 75: signal.backup.ProfileChangeChatUpdate - (*LearnedProfileChatUpdate)(nil), // 76: signal.backup.LearnedProfileChatUpdate - (*ThreadMergeChatUpdate)(nil), // 77: signal.backup.ThreadMergeChatUpdate - (*SessionSwitchoverChatUpdate)(nil), // 78: signal.backup.SessionSwitchoverChatUpdate - (*GroupChangeChatUpdate)(nil), // 79: signal.backup.GroupChangeChatUpdate - (*GenericGroupUpdate)(nil), // 80: signal.backup.GenericGroupUpdate - (*GroupCreationUpdate)(nil), // 81: signal.backup.GroupCreationUpdate - (*GroupNameUpdate)(nil), // 82: signal.backup.GroupNameUpdate - (*GroupAvatarUpdate)(nil), // 83: signal.backup.GroupAvatarUpdate - (*GroupDescriptionUpdate)(nil), // 84: signal.backup.GroupDescriptionUpdate - (*GroupMembershipAccessLevelChangeUpdate)(nil), // 85: signal.backup.GroupMembershipAccessLevelChangeUpdate - (*GroupAttributesAccessLevelChangeUpdate)(nil), // 86: signal.backup.GroupAttributesAccessLevelChangeUpdate - (*GroupMemberLabelAccessLevelChangeUpdate)(nil), // 87: signal.backup.GroupMemberLabelAccessLevelChangeUpdate - (*GroupTerminateChangeUpdate)(nil), // 88: signal.backup.GroupTerminateChangeUpdate - (*GroupAnnouncementOnlyChangeUpdate)(nil), // 89: signal.backup.GroupAnnouncementOnlyChangeUpdate - (*GroupAdminStatusUpdate)(nil), // 90: signal.backup.GroupAdminStatusUpdate - (*GroupMemberLeftUpdate)(nil), // 91: signal.backup.GroupMemberLeftUpdate - (*GroupMemberRemovedUpdate)(nil), // 92: signal.backup.GroupMemberRemovedUpdate - (*SelfInvitedToGroupUpdate)(nil), // 93: signal.backup.SelfInvitedToGroupUpdate - (*SelfInvitedOtherUserToGroupUpdate)(nil), // 94: signal.backup.SelfInvitedOtherUserToGroupUpdate - (*GroupUnknownInviteeUpdate)(nil), // 95: signal.backup.GroupUnknownInviteeUpdate - (*GroupInvitationAcceptedUpdate)(nil), // 96: signal.backup.GroupInvitationAcceptedUpdate - (*GroupInvitationDeclinedUpdate)(nil), // 97: signal.backup.GroupInvitationDeclinedUpdate - (*GroupMemberJoinedUpdate)(nil), // 98: signal.backup.GroupMemberJoinedUpdate - (*GroupMemberAddedUpdate)(nil), // 99: signal.backup.GroupMemberAddedUpdate - (*GroupSelfInvitationRevokedUpdate)(nil), // 100: signal.backup.GroupSelfInvitationRevokedUpdate - (*GroupInvitationRevokedUpdate)(nil), // 101: signal.backup.GroupInvitationRevokedUpdate - (*GroupJoinRequestUpdate)(nil), // 102: signal.backup.GroupJoinRequestUpdate - (*GroupJoinRequestApprovalUpdate)(nil), // 103: signal.backup.GroupJoinRequestApprovalUpdate - (*GroupJoinRequestCanceledUpdate)(nil), // 104: signal.backup.GroupJoinRequestCanceledUpdate - (*GroupSequenceOfRequestsAndCancelsUpdate)(nil), // 105: signal.backup.GroupSequenceOfRequestsAndCancelsUpdate - (*GroupInviteLinkResetUpdate)(nil), // 106: signal.backup.GroupInviteLinkResetUpdate - (*GroupInviteLinkEnabledUpdate)(nil), // 107: signal.backup.GroupInviteLinkEnabledUpdate - (*GroupInviteLinkAdminApprovalUpdate)(nil), // 108: signal.backup.GroupInviteLinkAdminApprovalUpdate - (*GroupInviteLinkDisabledUpdate)(nil), // 109: signal.backup.GroupInviteLinkDisabledUpdate - (*GroupMemberJoinedByLinkUpdate)(nil), // 110: signal.backup.GroupMemberJoinedByLinkUpdate - (*GroupV2MigrationUpdate)(nil), // 111: signal.backup.GroupV2MigrationUpdate - (*GroupV2MigrationSelfInvitedUpdate)(nil), // 112: signal.backup.GroupV2MigrationSelfInvitedUpdate - (*GroupV2MigrationInvitedMembersUpdate)(nil), // 113: signal.backup.GroupV2MigrationInvitedMembersUpdate - (*GroupV2MigrationDroppedMembersUpdate)(nil), // 114: signal.backup.GroupV2MigrationDroppedMembersUpdate - (*GroupExpirationTimerUpdate)(nil), // 115: signal.backup.GroupExpirationTimerUpdate - (*PollTerminateUpdate)(nil), // 116: signal.backup.PollTerminateUpdate - (*PinMessageUpdate)(nil), // 117: signal.backup.PinMessageUpdate - (*StickerPack)(nil), // 118: signal.backup.StickerPack - (*ChatStyle)(nil), // 119: signal.backup.ChatStyle - (*NotificationProfile)(nil), // 120: signal.backup.NotificationProfile - (*ChatFolder)(nil), // 121: signal.backup.ChatFolder - (*AccountData_UsernameLink)(nil), // 122: signal.backup.AccountData.UsernameLink - (*AccountData_AutoDownloadSettings)(nil), // 123: signal.backup.AccountData.AutoDownloadSettings - (*AccountData_AccountSettings)(nil), // 124: signal.backup.AccountData.AccountSettings - (*AccountData_SubscriberData)(nil), // 125: signal.backup.AccountData.SubscriberData - (*AccountData_IAPSubscriberData)(nil), // 126: signal.backup.AccountData.IAPSubscriberData - (*AccountData_AndroidSpecificSettings)(nil), // 127: signal.backup.AccountData.AndroidSpecificSettings - (*Contact_Registered)(nil), // 128: signal.backup.Contact.Registered - (*Contact_NotRegistered)(nil), // 129: signal.backup.Contact.NotRegistered - (*Contact_Name)(nil), // 130: signal.backup.Contact.Name - (*Group_GroupSnapshot)(nil), // 131: signal.backup.Group.GroupSnapshot - (*Group_GroupAttributeBlob)(nil), // 132: signal.backup.Group.GroupAttributeBlob - (*Group_Member)(nil), // 133: signal.backup.Group.Member - (*Group_MemberPendingProfileKey)(nil), // 134: signal.backup.Group.MemberPendingProfileKey - (*Group_MemberPendingAdminApproval)(nil), // 135: signal.backup.Group.MemberPendingAdminApproval - (*Group_MemberBanned)(nil), // 136: signal.backup.Group.MemberBanned - (*Group_AccessControl)(nil), // 137: signal.backup.Group.AccessControl - (*ChatItem_IncomingMessageDetails)(nil), // 138: signal.backup.ChatItem.IncomingMessageDetails - (*ChatItem_OutgoingMessageDetails)(nil), // 139: signal.backup.ChatItem.OutgoingMessageDetails - (*ChatItem_DirectionlessMessageDetails)(nil), // 140: signal.backup.ChatItem.DirectionlessMessageDetails - (*ChatItem_PinDetails)(nil), // 141: signal.backup.ChatItem.PinDetails - (*SendStatus_Pending)(nil), // 142: signal.backup.SendStatus.Pending - (*SendStatus_Sent)(nil), // 143: signal.backup.SendStatus.Sent - (*SendStatus_Delivered)(nil), // 144: signal.backup.SendStatus.Delivered - (*SendStatus_Read)(nil), // 145: signal.backup.SendStatus.Read - (*SendStatus_Viewed)(nil), // 146: signal.backup.SendStatus.Viewed - (*SendStatus_Skipped)(nil), // 147: signal.backup.SendStatus.Skipped - (*SendStatus_Failed)(nil), // 148: signal.backup.SendStatus.Failed - (*DirectStoryReplyMessage_TextReply)(nil), // 149: signal.backup.DirectStoryReplyMessage.TextReply - (*PaymentNotification_TransactionDetails)(nil), // 150: signal.backup.PaymentNotification.TransactionDetails - (*PaymentNotification_TransactionDetails_MobileCoinTxoIdentification)(nil), // 151: signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification - (*PaymentNotification_TransactionDetails_FailedTransaction)(nil), // 152: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction - (*PaymentNotification_TransactionDetails_Transaction)(nil), // 153: signal.backup.PaymentNotification.TransactionDetails.Transaction - (*ContactAttachment_Name)(nil), // 154: signal.backup.ContactAttachment.Name - (*ContactAttachment_Phone)(nil), // 155: signal.backup.ContactAttachment.Phone - (*ContactAttachment_Email)(nil), // 156: signal.backup.ContactAttachment.Email - (*ContactAttachment_PostalAddress)(nil), // 157: signal.backup.ContactAttachment.PostalAddress - (*FilePointer_LocatorInfo)(nil), // 158: signal.backup.FilePointer.LocatorInfo - (*Quote_QuotedAttachment)(nil), // 159: signal.backup.Quote.QuotedAttachment - (*Poll_PollOption)(nil), // 160: signal.backup.Poll.PollOption - (*Poll_PollOption_PollVote)(nil), // 161: signal.backup.Poll.PollOption.PollVote - (*GroupChangeChatUpdate_Update)(nil), // 162: signal.backup.GroupChangeChatUpdate.Update - (*GroupInvitationRevokedUpdate_Invitee)(nil), // 163: signal.backup.GroupInvitationRevokedUpdate.Invitee - (*ChatStyle_Gradient)(nil), // 164: signal.backup.ChatStyle.Gradient - (*ChatStyle_CustomChatColor)(nil), // 165: signal.backup.ChatStyle.CustomChatColor - (*ChatStyle_AutomaticBubbleColor)(nil), // 166: signal.backup.ChatStyle.AutomaticBubbleColor + (AccountData_AccountSettings_UnreadBadgeType)(0), // 8: signal.backup.AccountData.AccountSettings.UnreadBadgeType + (AccountData_AndroidSpecificSettings_NavigationBarSize)(0), // 9: signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize + (Contact_IdentityState)(0), // 10: signal.backup.Contact.IdentityState + (Contact_Visibility)(0), // 11: signal.backup.Contact.Visibility + (Group_StorySendMode)(0), // 12: signal.backup.Group.StorySendMode + (Group_Member_Role)(0), // 13: signal.backup.Group.Member.Role + (Group_AccessControl_AccessRequired)(0), // 14: signal.backup.Group.AccessControl.AccessRequired + (CallLink_Restrictions)(0), // 15: signal.backup.CallLink.Restrictions + (AdHocCall_State)(0), // 16: signal.backup.AdHocCall.State + (DistributionList_PrivacyMode)(0), // 17: signal.backup.DistributionList.PrivacyMode + (SendStatus_Failed_FailureReason)(0), // 18: signal.backup.SendStatus.Failed.FailureReason + (PaymentNotification_TransactionDetails_FailedTransaction_FailureReason)(0), // 19: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason + (PaymentNotification_TransactionDetails_Transaction_Status)(0), // 20: signal.backup.PaymentNotification.TransactionDetails.Transaction.Status + (GiftBadge_State)(0), // 21: signal.backup.GiftBadge.State + (ContactAttachment_Phone_Type)(0), // 22: signal.backup.ContactAttachment.Phone.Type + (ContactAttachment_Email_Type)(0), // 23: signal.backup.ContactAttachment.Email.Type + (ContactAttachment_PostalAddress_Type)(0), // 24: signal.backup.ContactAttachment.PostalAddress.Type + (MessageAttachment_Flag)(0), // 25: signal.backup.MessageAttachment.Flag + (Quote_Type)(0), // 26: signal.backup.Quote.Type + (BodyRange_Style)(0), // 27: signal.backup.BodyRange.Style + (IndividualCall_Type)(0), // 28: signal.backup.IndividualCall.Type + (IndividualCall_Direction)(0), // 29: signal.backup.IndividualCall.Direction + (IndividualCall_State)(0), // 30: signal.backup.IndividualCall.State + (GroupCall_State)(0), // 31: signal.backup.GroupCall.State + (SimpleChatUpdate_Type)(0), // 32: signal.backup.SimpleChatUpdate.Type + (ChatStyle_WallpaperPreset)(0), // 33: signal.backup.ChatStyle.WallpaperPreset + (ChatStyle_BubbleColorPreset)(0), // 34: signal.backup.ChatStyle.BubbleColorPreset + (NotificationProfile_DayOfWeek)(0), // 35: signal.backup.NotificationProfile.DayOfWeek + (ChatFolder_FolderType)(0), // 36: signal.backup.ChatFolder.FolderType + (*BackupInfo)(nil), // 37: signal.backup.BackupInfo + (*Frame)(nil), // 38: signal.backup.Frame + (*AccountData)(nil), // 39: signal.backup.AccountData + (*Recipient)(nil), // 40: signal.backup.Recipient + (*Contact)(nil), // 41: signal.backup.Contact + (*Group)(nil), // 42: signal.backup.Group + (*Self)(nil), // 43: signal.backup.Self + (*ReleaseNotes)(nil), // 44: signal.backup.ReleaseNotes + (*Chat)(nil), // 45: signal.backup.Chat + (*CallLink)(nil), // 46: signal.backup.CallLink + (*AdHocCall)(nil), // 47: signal.backup.AdHocCall + (*DistributionListItem)(nil), // 48: signal.backup.DistributionListItem + (*DistributionList)(nil), // 49: signal.backup.DistributionList + (*ChatItem)(nil), // 50: signal.backup.ChatItem + (*SendStatus)(nil), // 51: signal.backup.SendStatus + (*Text)(nil), // 52: signal.backup.Text + (*StandardMessage)(nil), // 53: signal.backup.StandardMessage + (*ContactMessage)(nil), // 54: signal.backup.ContactMessage + (*DirectStoryReplyMessage)(nil), // 55: signal.backup.DirectStoryReplyMessage + (*PaymentNotification)(nil), // 56: signal.backup.PaymentNotification + (*GiftBadge)(nil), // 57: signal.backup.GiftBadge + (*ViewOnceMessage)(nil), // 58: signal.backup.ViewOnceMessage + (*ContactAttachment)(nil), // 59: signal.backup.ContactAttachment + (*StickerMessage)(nil), // 60: signal.backup.StickerMessage + (*RemoteDeletedMessage)(nil), // 61: signal.backup.RemoteDeletedMessage + (*Sticker)(nil), // 62: signal.backup.Sticker + (*LinkPreview)(nil), // 63: signal.backup.LinkPreview + (*MessageAttachment)(nil), // 64: signal.backup.MessageAttachment + (*FilePointer)(nil), // 65: signal.backup.FilePointer + (*Quote)(nil), // 66: signal.backup.Quote + (*BodyRange)(nil), // 67: signal.backup.BodyRange + (*Reaction)(nil), // 68: signal.backup.Reaction + (*Poll)(nil), // 69: signal.backup.Poll + (*AdminDeletedMessage)(nil), // 70: signal.backup.AdminDeletedMessage + (*ChatUpdateMessage)(nil), // 71: signal.backup.ChatUpdateMessage + (*IndividualCall)(nil), // 72: signal.backup.IndividualCall + (*GroupCall)(nil), // 73: signal.backup.GroupCall + (*SimpleChatUpdate)(nil), // 74: signal.backup.SimpleChatUpdate + (*ExpirationTimerChatUpdate)(nil), // 75: signal.backup.ExpirationTimerChatUpdate + (*ProfileChangeChatUpdate)(nil), // 76: signal.backup.ProfileChangeChatUpdate + (*LearnedProfileChatUpdate)(nil), // 77: signal.backup.LearnedProfileChatUpdate + (*ThreadMergeChatUpdate)(nil), // 78: signal.backup.ThreadMergeChatUpdate + (*SessionSwitchoverChatUpdate)(nil), // 79: signal.backup.SessionSwitchoverChatUpdate + (*GroupChangeChatUpdate)(nil), // 80: signal.backup.GroupChangeChatUpdate + (*GenericGroupUpdate)(nil), // 81: signal.backup.GenericGroupUpdate + (*GroupCreationUpdate)(nil), // 82: signal.backup.GroupCreationUpdate + (*GroupNameUpdate)(nil), // 83: signal.backup.GroupNameUpdate + (*GroupAvatarUpdate)(nil), // 84: signal.backup.GroupAvatarUpdate + (*GroupDescriptionUpdate)(nil), // 85: signal.backup.GroupDescriptionUpdate + (*GroupMembershipAccessLevelChangeUpdate)(nil), // 86: signal.backup.GroupMembershipAccessLevelChangeUpdate + (*GroupAttributesAccessLevelChangeUpdate)(nil), // 87: signal.backup.GroupAttributesAccessLevelChangeUpdate + (*GroupMemberLabelAccessLevelChangeUpdate)(nil), // 88: signal.backup.GroupMemberLabelAccessLevelChangeUpdate + (*GroupTerminateChangeUpdate)(nil), // 89: signal.backup.GroupTerminateChangeUpdate + (*GroupAnnouncementOnlyChangeUpdate)(nil), // 90: signal.backup.GroupAnnouncementOnlyChangeUpdate + (*GroupAdminStatusUpdate)(nil), // 91: signal.backup.GroupAdminStatusUpdate + (*GroupMemberLeftUpdate)(nil), // 92: signal.backup.GroupMemberLeftUpdate + (*GroupMemberRemovedUpdate)(nil), // 93: signal.backup.GroupMemberRemovedUpdate + (*SelfInvitedToGroupUpdate)(nil), // 94: signal.backup.SelfInvitedToGroupUpdate + (*SelfInvitedOtherUserToGroupUpdate)(nil), // 95: signal.backup.SelfInvitedOtherUserToGroupUpdate + (*GroupUnknownInviteeUpdate)(nil), // 96: signal.backup.GroupUnknownInviteeUpdate + (*GroupInvitationAcceptedUpdate)(nil), // 97: signal.backup.GroupInvitationAcceptedUpdate + (*GroupInvitationDeclinedUpdate)(nil), // 98: signal.backup.GroupInvitationDeclinedUpdate + (*GroupMemberJoinedUpdate)(nil), // 99: signal.backup.GroupMemberJoinedUpdate + (*GroupMemberAddedUpdate)(nil), // 100: signal.backup.GroupMemberAddedUpdate + (*GroupSelfInvitationRevokedUpdate)(nil), // 101: signal.backup.GroupSelfInvitationRevokedUpdate + (*GroupInvitationRevokedUpdate)(nil), // 102: signal.backup.GroupInvitationRevokedUpdate + (*GroupJoinRequestUpdate)(nil), // 103: signal.backup.GroupJoinRequestUpdate + (*GroupJoinRequestApprovalUpdate)(nil), // 104: signal.backup.GroupJoinRequestApprovalUpdate + (*GroupJoinRequestCanceledUpdate)(nil), // 105: signal.backup.GroupJoinRequestCanceledUpdate + (*GroupSequenceOfRequestsAndCancelsUpdate)(nil), // 106: signal.backup.GroupSequenceOfRequestsAndCancelsUpdate + (*GroupInviteLinkResetUpdate)(nil), // 107: signal.backup.GroupInviteLinkResetUpdate + (*GroupInviteLinkEnabledUpdate)(nil), // 108: signal.backup.GroupInviteLinkEnabledUpdate + (*GroupInviteLinkAdminApprovalUpdate)(nil), // 109: signal.backup.GroupInviteLinkAdminApprovalUpdate + (*GroupInviteLinkDisabledUpdate)(nil), // 110: signal.backup.GroupInviteLinkDisabledUpdate + (*GroupMemberJoinedByLinkUpdate)(nil), // 111: signal.backup.GroupMemberJoinedByLinkUpdate + (*GroupV2MigrationUpdate)(nil), // 112: signal.backup.GroupV2MigrationUpdate + (*GroupV2MigrationSelfInvitedUpdate)(nil), // 113: signal.backup.GroupV2MigrationSelfInvitedUpdate + (*GroupV2MigrationInvitedMembersUpdate)(nil), // 114: signal.backup.GroupV2MigrationInvitedMembersUpdate + (*GroupV2MigrationDroppedMembersUpdate)(nil), // 115: signal.backup.GroupV2MigrationDroppedMembersUpdate + (*GroupExpirationTimerUpdate)(nil), // 116: signal.backup.GroupExpirationTimerUpdate + (*PollTerminateUpdate)(nil), // 117: signal.backup.PollTerminateUpdate + (*PinMessageUpdate)(nil), // 118: signal.backup.PinMessageUpdate + (*StickerPack)(nil), // 119: signal.backup.StickerPack + (*ChatStyle)(nil), // 120: signal.backup.ChatStyle + (*NotificationProfile)(nil), // 121: signal.backup.NotificationProfile + (*ChatFolder)(nil), // 122: signal.backup.ChatFolder + (*AccountData_UsernameLink)(nil), // 123: signal.backup.AccountData.UsernameLink + (*AccountData_AutoDownloadSettings)(nil), // 124: signal.backup.AccountData.AutoDownloadSettings + (*AccountData_AccountSettings)(nil), // 125: signal.backup.AccountData.AccountSettings + (*AccountData_SubscriberData)(nil), // 126: signal.backup.AccountData.SubscriberData + (*AccountData_IAPSubscriberData)(nil), // 127: signal.backup.AccountData.IAPSubscriberData + (*AccountData_AndroidSpecificSettings)(nil), // 128: signal.backup.AccountData.AndroidSpecificSettings + (*Contact_Registered)(nil), // 129: signal.backup.Contact.Registered + (*Contact_NotRegistered)(nil), // 130: signal.backup.Contact.NotRegistered + (*Contact_Name)(nil), // 131: signal.backup.Contact.Name + (*Group_GroupSnapshot)(nil), // 132: signal.backup.Group.GroupSnapshot + (*Group_GroupAttributeBlob)(nil), // 133: signal.backup.Group.GroupAttributeBlob + (*Group_Member)(nil), // 134: signal.backup.Group.Member + (*Group_MemberPendingProfileKey)(nil), // 135: signal.backup.Group.MemberPendingProfileKey + (*Group_MemberPendingAdminApproval)(nil), // 136: signal.backup.Group.MemberPendingAdminApproval + (*Group_MemberBanned)(nil), // 137: signal.backup.Group.MemberBanned + (*Group_AccessControl)(nil), // 138: signal.backup.Group.AccessControl + (*ChatItem_IncomingMessageDetails)(nil), // 139: signal.backup.ChatItem.IncomingMessageDetails + (*ChatItem_OutgoingMessageDetails)(nil), // 140: signal.backup.ChatItem.OutgoingMessageDetails + (*ChatItem_DirectionlessMessageDetails)(nil), // 141: signal.backup.ChatItem.DirectionlessMessageDetails + (*ChatItem_PinDetails)(nil), // 142: signal.backup.ChatItem.PinDetails + (*SendStatus_Pending)(nil), // 143: signal.backup.SendStatus.Pending + (*SendStatus_Sent)(nil), // 144: signal.backup.SendStatus.Sent + (*SendStatus_Delivered)(nil), // 145: signal.backup.SendStatus.Delivered + (*SendStatus_Read)(nil), // 146: signal.backup.SendStatus.Read + (*SendStatus_Viewed)(nil), // 147: signal.backup.SendStatus.Viewed + (*SendStatus_Skipped)(nil), // 148: signal.backup.SendStatus.Skipped + (*SendStatus_Failed)(nil), // 149: signal.backup.SendStatus.Failed + (*DirectStoryReplyMessage_TextReply)(nil), // 150: signal.backup.DirectStoryReplyMessage.TextReply + (*PaymentNotification_TransactionDetails)(nil), // 151: signal.backup.PaymentNotification.TransactionDetails + (*PaymentNotification_TransactionDetails_MobileCoinTxoIdentification)(nil), // 152: signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification + (*PaymentNotification_TransactionDetails_FailedTransaction)(nil), // 153: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction + (*PaymentNotification_TransactionDetails_Transaction)(nil), // 154: signal.backup.PaymentNotification.TransactionDetails.Transaction + (*ContactAttachment_Name)(nil), // 155: signal.backup.ContactAttachment.Name + (*ContactAttachment_Phone)(nil), // 156: signal.backup.ContactAttachment.Phone + (*ContactAttachment_Email)(nil), // 157: signal.backup.ContactAttachment.Email + (*ContactAttachment_PostalAddress)(nil), // 158: signal.backup.ContactAttachment.PostalAddress + (*FilePointer_LocatorInfo)(nil), // 159: signal.backup.FilePointer.LocatorInfo + (*Quote_QuotedAttachment)(nil), // 160: signal.backup.Quote.QuotedAttachment + (*Poll_PollOption)(nil), // 161: signal.backup.Poll.PollOption + (*Poll_PollOption_PollVote)(nil), // 162: signal.backup.Poll.PollOption.PollVote + (*GroupChangeChatUpdate_Update)(nil), // 163: signal.backup.GroupChangeChatUpdate.Update + (*GroupInvitationRevokedUpdate_Invitee)(nil), // 164: signal.backup.GroupInvitationRevokedUpdate.Invitee + (*ChatStyle_Gradient)(nil), // 165: signal.backup.ChatStyle.Gradient + (*ChatStyle_CustomChatColor)(nil), // 166: signal.backup.ChatStyle.CustomChatColor + (*ChatStyle_AutomaticBubbleColor)(nil), // 167: signal.backup.ChatStyle.AutomaticBubbleColor } var file_backuppb_Backup_proto_depIdxs = []int32{ - 38, // 0: signal.backup.Frame.account:type_name -> signal.backup.AccountData - 39, // 1: signal.backup.Frame.recipient:type_name -> signal.backup.Recipient - 44, // 2: signal.backup.Frame.chat:type_name -> signal.backup.Chat - 49, // 3: signal.backup.Frame.chatItem:type_name -> signal.backup.ChatItem - 118, // 4: signal.backup.Frame.stickerPack:type_name -> signal.backup.StickerPack - 46, // 5: signal.backup.Frame.adHocCall:type_name -> signal.backup.AdHocCall - 120, // 6: signal.backup.Frame.notificationProfile:type_name -> signal.backup.NotificationProfile - 121, // 7: signal.backup.Frame.chatFolder:type_name -> signal.backup.ChatFolder - 122, // 8: signal.backup.AccountData.usernameLink:type_name -> signal.backup.AccountData.UsernameLink - 125, // 9: signal.backup.AccountData.donationSubscriberData:type_name -> signal.backup.AccountData.SubscriberData - 124, // 10: signal.backup.AccountData.accountSettings:type_name -> signal.backup.AccountData.AccountSettings - 126, // 11: signal.backup.AccountData.backupsSubscriberData:type_name -> signal.backup.AccountData.IAPSubscriberData - 127, // 12: signal.backup.AccountData.androidSpecificSettings:type_name -> signal.backup.AccountData.AndroidSpecificSettings - 40, // 13: signal.backup.Recipient.contact:type_name -> signal.backup.Contact - 41, // 14: signal.backup.Recipient.group:type_name -> signal.backup.Group - 47, // 15: signal.backup.Recipient.distributionList:type_name -> signal.backup.DistributionListItem - 42, // 16: signal.backup.Recipient.self:type_name -> signal.backup.Self - 43, // 17: signal.backup.Recipient.releaseNotes:type_name -> signal.backup.ReleaseNotes - 45, // 18: signal.backup.Recipient.callLink:type_name -> signal.backup.CallLink - 10, // 19: signal.backup.Contact.visibility:type_name -> signal.backup.Contact.Visibility - 128, // 20: signal.backup.Contact.registered:type_name -> signal.backup.Contact.Registered - 129, // 21: signal.backup.Contact.notRegistered:type_name -> signal.backup.Contact.NotRegistered - 9, // 22: signal.backup.Contact.identityState:type_name -> signal.backup.Contact.IdentityState - 130, // 23: signal.backup.Contact.nickname:type_name -> signal.backup.Contact.Name + 39, // 0: signal.backup.Frame.account:type_name -> signal.backup.AccountData + 40, // 1: signal.backup.Frame.recipient:type_name -> signal.backup.Recipient + 45, // 2: signal.backup.Frame.chat:type_name -> signal.backup.Chat + 50, // 3: signal.backup.Frame.chatItem:type_name -> signal.backup.ChatItem + 119, // 4: signal.backup.Frame.stickerPack:type_name -> signal.backup.StickerPack + 47, // 5: signal.backup.Frame.adHocCall:type_name -> signal.backup.AdHocCall + 121, // 6: signal.backup.Frame.notificationProfile:type_name -> signal.backup.NotificationProfile + 122, // 7: signal.backup.Frame.chatFolder:type_name -> signal.backup.ChatFolder + 123, // 8: signal.backup.AccountData.usernameLink:type_name -> signal.backup.AccountData.UsernameLink + 126, // 9: signal.backup.AccountData.donationSubscriberData:type_name -> signal.backup.AccountData.SubscriberData + 125, // 10: signal.backup.AccountData.accountSettings:type_name -> signal.backup.AccountData.AccountSettings + 127, // 11: signal.backup.AccountData.backupsSubscriberData:type_name -> signal.backup.AccountData.IAPSubscriberData + 128, // 12: signal.backup.AccountData.androidSpecificSettings:type_name -> signal.backup.AccountData.AndroidSpecificSettings + 41, // 13: signal.backup.Recipient.contact:type_name -> signal.backup.Contact + 42, // 14: signal.backup.Recipient.group:type_name -> signal.backup.Group + 48, // 15: signal.backup.Recipient.distributionList:type_name -> signal.backup.DistributionListItem + 43, // 16: signal.backup.Recipient.self:type_name -> signal.backup.Self + 44, // 17: signal.backup.Recipient.releaseNotes:type_name -> signal.backup.ReleaseNotes + 46, // 18: signal.backup.Recipient.callLink:type_name -> signal.backup.CallLink + 11, // 19: signal.backup.Contact.visibility:type_name -> signal.backup.Contact.Visibility + 129, // 20: signal.backup.Contact.registered:type_name -> signal.backup.Contact.Registered + 130, // 21: signal.backup.Contact.notRegistered:type_name -> signal.backup.Contact.NotRegistered + 10, // 22: signal.backup.Contact.identityState:type_name -> signal.backup.Contact.IdentityState + 131, // 23: signal.backup.Contact.nickname:type_name -> signal.backup.Contact.Name 0, // 24: signal.backup.Contact.avatarColor:type_name -> signal.backup.AvatarColor - 11, // 25: signal.backup.Group.storySendMode:type_name -> signal.backup.Group.StorySendMode - 131, // 26: signal.backup.Group.snapshot:type_name -> signal.backup.Group.GroupSnapshot + 12, // 25: signal.backup.Group.storySendMode:type_name -> signal.backup.Group.StorySendMode + 132, // 26: signal.backup.Group.snapshot:type_name -> signal.backup.Group.GroupSnapshot 0, // 27: signal.backup.Group.avatarColor:type_name -> signal.backup.AvatarColor 0, // 28: signal.backup.Self.avatarColor:type_name -> signal.backup.AvatarColor - 119, // 29: signal.backup.Chat.style:type_name -> signal.backup.ChatStyle - 14, // 30: signal.backup.CallLink.restrictions:type_name -> signal.backup.CallLink.Restrictions - 15, // 31: signal.backup.AdHocCall.state:type_name -> signal.backup.AdHocCall.State - 48, // 32: signal.backup.DistributionListItem.distributionList:type_name -> signal.backup.DistributionList - 16, // 33: signal.backup.DistributionList.privacyMode:type_name -> signal.backup.DistributionList.PrivacyMode - 49, // 34: signal.backup.ChatItem.revisions:type_name -> signal.backup.ChatItem - 138, // 35: signal.backup.ChatItem.incoming:type_name -> signal.backup.ChatItem.IncomingMessageDetails - 139, // 36: signal.backup.ChatItem.outgoing:type_name -> signal.backup.ChatItem.OutgoingMessageDetails - 140, // 37: signal.backup.ChatItem.directionless:type_name -> signal.backup.ChatItem.DirectionlessMessageDetails - 52, // 38: signal.backup.ChatItem.standardMessage:type_name -> signal.backup.StandardMessage - 53, // 39: signal.backup.ChatItem.contactMessage:type_name -> signal.backup.ContactMessage - 59, // 40: signal.backup.ChatItem.stickerMessage:type_name -> signal.backup.StickerMessage - 60, // 41: signal.backup.ChatItem.remoteDeletedMessage:type_name -> signal.backup.RemoteDeletedMessage - 70, // 42: signal.backup.ChatItem.updateMessage:type_name -> signal.backup.ChatUpdateMessage - 55, // 43: signal.backup.ChatItem.paymentNotification:type_name -> signal.backup.PaymentNotification - 56, // 44: signal.backup.ChatItem.giftBadge:type_name -> signal.backup.GiftBadge - 57, // 45: signal.backup.ChatItem.viewOnceMessage:type_name -> signal.backup.ViewOnceMessage - 54, // 46: signal.backup.ChatItem.directStoryReplyMessage:type_name -> signal.backup.DirectStoryReplyMessage - 68, // 47: signal.backup.ChatItem.poll:type_name -> signal.backup.Poll - 69, // 48: signal.backup.ChatItem.adminDeletedMessage:type_name -> signal.backup.AdminDeletedMessage - 141, // 49: signal.backup.ChatItem.pinDetails:type_name -> signal.backup.ChatItem.PinDetails - 142, // 50: signal.backup.SendStatus.pending:type_name -> signal.backup.SendStatus.Pending - 143, // 51: signal.backup.SendStatus.sent:type_name -> signal.backup.SendStatus.Sent - 144, // 52: signal.backup.SendStatus.delivered:type_name -> signal.backup.SendStatus.Delivered - 145, // 53: signal.backup.SendStatus.read:type_name -> signal.backup.SendStatus.Read - 146, // 54: signal.backup.SendStatus.viewed:type_name -> signal.backup.SendStatus.Viewed - 147, // 55: signal.backup.SendStatus.skipped:type_name -> signal.backup.SendStatus.Skipped - 148, // 56: signal.backup.SendStatus.failed:type_name -> signal.backup.SendStatus.Failed - 66, // 57: signal.backup.Text.bodyRanges:type_name -> signal.backup.BodyRange - 65, // 58: signal.backup.StandardMessage.quote:type_name -> signal.backup.Quote - 51, // 59: signal.backup.StandardMessage.text:type_name -> signal.backup.Text - 63, // 60: signal.backup.StandardMessage.attachments:type_name -> signal.backup.MessageAttachment - 62, // 61: signal.backup.StandardMessage.linkPreview:type_name -> signal.backup.LinkPreview - 64, // 62: signal.backup.StandardMessage.longText:type_name -> signal.backup.FilePointer - 67, // 63: signal.backup.StandardMessage.reactions:type_name -> signal.backup.Reaction - 58, // 64: signal.backup.ContactMessage.contact:type_name -> signal.backup.ContactAttachment - 67, // 65: signal.backup.ContactMessage.reactions:type_name -> signal.backup.Reaction - 149, // 66: signal.backup.DirectStoryReplyMessage.textReply:type_name -> signal.backup.DirectStoryReplyMessage.TextReply - 67, // 67: signal.backup.DirectStoryReplyMessage.reactions:type_name -> signal.backup.Reaction - 150, // 68: signal.backup.PaymentNotification.transactionDetails:type_name -> signal.backup.PaymentNotification.TransactionDetails - 20, // 69: signal.backup.GiftBadge.state:type_name -> signal.backup.GiftBadge.State - 63, // 70: signal.backup.ViewOnceMessage.attachment:type_name -> signal.backup.MessageAttachment - 67, // 71: signal.backup.ViewOnceMessage.reactions:type_name -> signal.backup.Reaction - 154, // 72: signal.backup.ContactAttachment.name:type_name -> signal.backup.ContactAttachment.Name - 155, // 73: signal.backup.ContactAttachment.number:type_name -> signal.backup.ContactAttachment.Phone - 156, // 74: signal.backup.ContactAttachment.email:type_name -> signal.backup.ContactAttachment.Email - 157, // 75: signal.backup.ContactAttachment.address:type_name -> signal.backup.ContactAttachment.PostalAddress - 64, // 76: signal.backup.ContactAttachment.avatar:type_name -> signal.backup.FilePointer - 61, // 77: signal.backup.StickerMessage.sticker:type_name -> signal.backup.Sticker - 67, // 78: signal.backup.StickerMessage.reactions:type_name -> signal.backup.Reaction - 64, // 79: signal.backup.Sticker.data:type_name -> signal.backup.FilePointer - 64, // 80: signal.backup.LinkPreview.image:type_name -> signal.backup.FilePointer - 64, // 81: signal.backup.MessageAttachment.pointer:type_name -> signal.backup.FilePointer - 24, // 82: signal.backup.MessageAttachment.flag:type_name -> signal.backup.MessageAttachment.Flag - 158, // 83: signal.backup.FilePointer.locatorInfo:type_name -> signal.backup.FilePointer.LocatorInfo - 51, // 84: signal.backup.Quote.text:type_name -> signal.backup.Text - 159, // 85: signal.backup.Quote.attachments:type_name -> signal.backup.Quote.QuotedAttachment - 25, // 86: signal.backup.Quote.type:type_name -> signal.backup.Quote.Type - 26, // 87: signal.backup.BodyRange.style:type_name -> signal.backup.BodyRange.Style - 160, // 88: signal.backup.Poll.options:type_name -> signal.backup.Poll.PollOption - 67, // 89: signal.backup.Poll.reactions:type_name -> signal.backup.Reaction - 73, // 90: signal.backup.ChatUpdateMessage.simpleUpdate:type_name -> signal.backup.SimpleChatUpdate - 79, // 91: signal.backup.ChatUpdateMessage.groupChange:type_name -> signal.backup.GroupChangeChatUpdate - 74, // 92: signal.backup.ChatUpdateMessage.expirationTimerChange:type_name -> signal.backup.ExpirationTimerChatUpdate - 75, // 93: signal.backup.ChatUpdateMessage.profileChange:type_name -> signal.backup.ProfileChangeChatUpdate - 77, // 94: signal.backup.ChatUpdateMessage.threadMerge:type_name -> signal.backup.ThreadMergeChatUpdate - 78, // 95: signal.backup.ChatUpdateMessage.sessionSwitchover:type_name -> signal.backup.SessionSwitchoverChatUpdate - 71, // 96: signal.backup.ChatUpdateMessage.individualCall:type_name -> signal.backup.IndividualCall - 72, // 97: signal.backup.ChatUpdateMessage.groupCall:type_name -> signal.backup.GroupCall - 76, // 98: signal.backup.ChatUpdateMessage.learnedProfileChange:type_name -> signal.backup.LearnedProfileChatUpdate - 116, // 99: signal.backup.ChatUpdateMessage.pollTerminate:type_name -> signal.backup.PollTerminateUpdate - 117, // 100: signal.backup.ChatUpdateMessage.pinMessage:type_name -> signal.backup.PinMessageUpdate - 27, // 101: signal.backup.IndividualCall.type:type_name -> signal.backup.IndividualCall.Type - 28, // 102: signal.backup.IndividualCall.direction:type_name -> signal.backup.IndividualCall.Direction - 29, // 103: signal.backup.IndividualCall.state:type_name -> signal.backup.IndividualCall.State - 30, // 104: signal.backup.GroupCall.state:type_name -> signal.backup.GroupCall.State - 31, // 105: signal.backup.SimpleChatUpdate.type:type_name -> signal.backup.SimpleChatUpdate.Type - 162, // 106: signal.backup.GroupChangeChatUpdate.updates:type_name -> signal.backup.GroupChangeChatUpdate.Update + 120, // 29: signal.backup.Chat.style:type_name -> signal.backup.ChatStyle + 15, // 30: signal.backup.CallLink.restrictions:type_name -> signal.backup.CallLink.Restrictions + 16, // 31: signal.backup.AdHocCall.state:type_name -> signal.backup.AdHocCall.State + 49, // 32: signal.backup.DistributionListItem.distributionList:type_name -> signal.backup.DistributionList + 17, // 33: signal.backup.DistributionList.privacyMode:type_name -> signal.backup.DistributionList.PrivacyMode + 50, // 34: signal.backup.ChatItem.revisions:type_name -> signal.backup.ChatItem + 139, // 35: signal.backup.ChatItem.incoming:type_name -> signal.backup.ChatItem.IncomingMessageDetails + 140, // 36: signal.backup.ChatItem.outgoing:type_name -> signal.backup.ChatItem.OutgoingMessageDetails + 141, // 37: signal.backup.ChatItem.directionless:type_name -> signal.backup.ChatItem.DirectionlessMessageDetails + 53, // 38: signal.backup.ChatItem.standardMessage:type_name -> signal.backup.StandardMessage + 54, // 39: signal.backup.ChatItem.contactMessage:type_name -> signal.backup.ContactMessage + 60, // 40: signal.backup.ChatItem.stickerMessage:type_name -> signal.backup.StickerMessage + 61, // 41: signal.backup.ChatItem.remoteDeletedMessage:type_name -> signal.backup.RemoteDeletedMessage + 71, // 42: signal.backup.ChatItem.updateMessage:type_name -> signal.backup.ChatUpdateMessage + 56, // 43: signal.backup.ChatItem.paymentNotification:type_name -> signal.backup.PaymentNotification + 57, // 44: signal.backup.ChatItem.giftBadge:type_name -> signal.backup.GiftBadge + 58, // 45: signal.backup.ChatItem.viewOnceMessage:type_name -> signal.backup.ViewOnceMessage + 55, // 46: signal.backup.ChatItem.directStoryReplyMessage:type_name -> signal.backup.DirectStoryReplyMessage + 69, // 47: signal.backup.ChatItem.poll:type_name -> signal.backup.Poll + 70, // 48: signal.backup.ChatItem.adminDeletedMessage:type_name -> signal.backup.AdminDeletedMessage + 142, // 49: signal.backup.ChatItem.pinDetails:type_name -> signal.backup.ChatItem.PinDetails + 143, // 50: signal.backup.SendStatus.pending:type_name -> signal.backup.SendStatus.Pending + 144, // 51: signal.backup.SendStatus.sent:type_name -> signal.backup.SendStatus.Sent + 145, // 52: signal.backup.SendStatus.delivered:type_name -> signal.backup.SendStatus.Delivered + 146, // 53: signal.backup.SendStatus.read:type_name -> signal.backup.SendStatus.Read + 147, // 54: signal.backup.SendStatus.viewed:type_name -> signal.backup.SendStatus.Viewed + 148, // 55: signal.backup.SendStatus.skipped:type_name -> signal.backup.SendStatus.Skipped + 149, // 56: signal.backup.SendStatus.failed:type_name -> signal.backup.SendStatus.Failed + 67, // 57: signal.backup.Text.bodyRanges:type_name -> signal.backup.BodyRange + 66, // 58: signal.backup.StandardMessage.quote:type_name -> signal.backup.Quote + 52, // 59: signal.backup.StandardMessage.text:type_name -> signal.backup.Text + 64, // 60: signal.backup.StandardMessage.attachments:type_name -> signal.backup.MessageAttachment + 63, // 61: signal.backup.StandardMessage.linkPreview:type_name -> signal.backup.LinkPreview + 65, // 62: signal.backup.StandardMessage.longText:type_name -> signal.backup.FilePointer + 68, // 63: signal.backup.StandardMessage.reactions:type_name -> signal.backup.Reaction + 59, // 64: signal.backup.ContactMessage.contact:type_name -> signal.backup.ContactAttachment + 68, // 65: signal.backup.ContactMessage.reactions:type_name -> signal.backup.Reaction + 150, // 66: signal.backup.DirectStoryReplyMessage.textReply:type_name -> signal.backup.DirectStoryReplyMessage.TextReply + 68, // 67: signal.backup.DirectStoryReplyMessage.reactions:type_name -> signal.backup.Reaction + 151, // 68: signal.backup.PaymentNotification.transactionDetails:type_name -> signal.backup.PaymentNotification.TransactionDetails + 21, // 69: signal.backup.GiftBadge.state:type_name -> signal.backup.GiftBadge.State + 64, // 70: signal.backup.ViewOnceMessage.attachment:type_name -> signal.backup.MessageAttachment + 68, // 71: signal.backup.ViewOnceMessage.reactions:type_name -> signal.backup.Reaction + 155, // 72: signal.backup.ContactAttachment.name:type_name -> signal.backup.ContactAttachment.Name + 156, // 73: signal.backup.ContactAttachment.number:type_name -> signal.backup.ContactAttachment.Phone + 157, // 74: signal.backup.ContactAttachment.email:type_name -> signal.backup.ContactAttachment.Email + 158, // 75: signal.backup.ContactAttachment.address:type_name -> signal.backup.ContactAttachment.PostalAddress + 65, // 76: signal.backup.ContactAttachment.avatar:type_name -> signal.backup.FilePointer + 62, // 77: signal.backup.StickerMessage.sticker:type_name -> signal.backup.Sticker + 68, // 78: signal.backup.StickerMessage.reactions:type_name -> signal.backup.Reaction + 65, // 79: signal.backup.Sticker.data:type_name -> signal.backup.FilePointer + 65, // 80: signal.backup.LinkPreview.image:type_name -> signal.backup.FilePointer + 65, // 81: signal.backup.MessageAttachment.pointer:type_name -> signal.backup.FilePointer + 25, // 82: signal.backup.MessageAttachment.flag:type_name -> signal.backup.MessageAttachment.Flag + 159, // 83: signal.backup.FilePointer.locatorInfo:type_name -> signal.backup.FilePointer.LocatorInfo + 52, // 84: signal.backup.Quote.text:type_name -> signal.backup.Text + 160, // 85: signal.backup.Quote.attachments:type_name -> signal.backup.Quote.QuotedAttachment + 26, // 86: signal.backup.Quote.type:type_name -> signal.backup.Quote.Type + 27, // 87: signal.backup.BodyRange.style:type_name -> signal.backup.BodyRange.Style + 161, // 88: signal.backup.Poll.options:type_name -> signal.backup.Poll.PollOption + 68, // 89: signal.backup.Poll.reactions:type_name -> signal.backup.Reaction + 74, // 90: signal.backup.ChatUpdateMessage.simpleUpdate:type_name -> signal.backup.SimpleChatUpdate + 80, // 91: signal.backup.ChatUpdateMessage.groupChange:type_name -> signal.backup.GroupChangeChatUpdate + 75, // 92: signal.backup.ChatUpdateMessage.expirationTimerChange:type_name -> signal.backup.ExpirationTimerChatUpdate + 76, // 93: signal.backup.ChatUpdateMessage.profileChange:type_name -> signal.backup.ProfileChangeChatUpdate + 78, // 94: signal.backup.ChatUpdateMessage.threadMerge:type_name -> signal.backup.ThreadMergeChatUpdate + 79, // 95: signal.backup.ChatUpdateMessage.sessionSwitchover:type_name -> signal.backup.SessionSwitchoverChatUpdate + 72, // 96: signal.backup.ChatUpdateMessage.individualCall:type_name -> signal.backup.IndividualCall + 73, // 97: signal.backup.ChatUpdateMessage.groupCall:type_name -> signal.backup.GroupCall + 77, // 98: signal.backup.ChatUpdateMessage.learnedProfileChange:type_name -> signal.backup.LearnedProfileChatUpdate + 117, // 99: signal.backup.ChatUpdateMessage.pollTerminate:type_name -> signal.backup.PollTerminateUpdate + 118, // 100: signal.backup.ChatUpdateMessage.pinMessage:type_name -> signal.backup.PinMessageUpdate + 28, // 101: signal.backup.IndividualCall.type:type_name -> signal.backup.IndividualCall.Type + 29, // 102: signal.backup.IndividualCall.direction:type_name -> signal.backup.IndividualCall.Direction + 30, // 103: signal.backup.IndividualCall.state:type_name -> signal.backup.IndividualCall.State + 31, // 104: signal.backup.GroupCall.state:type_name -> signal.backup.GroupCall.State + 32, // 105: signal.backup.SimpleChatUpdate.type:type_name -> signal.backup.SimpleChatUpdate.Type + 163, // 106: signal.backup.GroupChangeChatUpdate.updates:type_name -> signal.backup.GroupChangeChatUpdate.Update 1, // 107: signal.backup.GroupMembershipAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel 1, // 108: signal.backup.GroupAttributesAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel 1, // 109: signal.backup.GroupMemberLabelAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel - 163, // 110: signal.backup.GroupInvitationRevokedUpdate.invitees:type_name -> signal.backup.GroupInvitationRevokedUpdate.Invitee - 32, // 111: signal.backup.ChatStyle.wallpaperPreset:type_name -> signal.backup.ChatStyle.WallpaperPreset - 64, // 112: signal.backup.ChatStyle.wallpaperPhoto:type_name -> signal.backup.FilePointer - 166, // 113: signal.backup.ChatStyle.autoBubbleColor:type_name -> signal.backup.ChatStyle.AutomaticBubbleColor - 33, // 114: signal.backup.ChatStyle.bubbleColorPreset:type_name -> signal.backup.ChatStyle.BubbleColorPreset - 34, // 115: signal.backup.NotificationProfile.scheduleDaysEnabled:type_name -> signal.backup.NotificationProfile.DayOfWeek - 35, // 116: signal.backup.ChatFolder.folderType:type_name -> signal.backup.ChatFolder.FolderType + 164, // 110: signal.backup.GroupInvitationRevokedUpdate.invitees:type_name -> signal.backup.GroupInvitationRevokedUpdate.Invitee + 33, // 111: signal.backup.ChatStyle.wallpaperPreset:type_name -> signal.backup.ChatStyle.WallpaperPreset + 65, // 112: signal.backup.ChatStyle.wallpaperPhoto:type_name -> signal.backup.FilePointer + 167, // 113: signal.backup.ChatStyle.autoBubbleColor:type_name -> signal.backup.ChatStyle.AutomaticBubbleColor + 34, // 114: signal.backup.ChatStyle.bubbleColorPreset:type_name -> signal.backup.ChatStyle.BubbleColorPreset + 35, // 115: signal.backup.NotificationProfile.scheduleDaysEnabled:type_name -> signal.backup.NotificationProfile.DayOfWeek + 36, // 116: signal.backup.ChatFolder.folderType:type_name -> signal.backup.ChatFolder.FolderType 6, // 117: signal.backup.AccountData.UsernameLink.color:type_name -> signal.backup.AccountData.UsernameLink.Color 7, // 118: signal.backup.AccountData.AutoDownloadSettings.images:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption 7, // 119: signal.backup.AccountData.AutoDownloadSettings.audio:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption 7, // 120: signal.backup.AccountData.AutoDownloadSettings.video:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption 7, // 121: signal.backup.AccountData.AutoDownloadSettings.documents:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption 2, // 122: signal.backup.AccountData.AccountSettings.phoneNumberSharingMode:type_name -> signal.backup.AccountData.PhoneNumberSharingMode - 119, // 123: signal.backup.AccountData.AccountSettings.defaultChatStyle:type_name -> signal.backup.ChatStyle - 165, // 124: signal.backup.AccountData.AccountSettings.customChatColors:type_name -> signal.backup.ChatStyle.CustomChatColor + 120, // 123: signal.backup.AccountData.AccountSettings.defaultChatStyle:type_name -> signal.backup.ChatStyle + 166, // 124: signal.backup.AccountData.AccountSettings.customChatColors:type_name -> signal.backup.ChatStyle.CustomChatColor 3, // 125: signal.backup.AccountData.AccountSettings.defaultSentMediaQuality:type_name -> signal.backup.AccountData.SentMediaQuality - 123, // 126: signal.backup.AccountData.AccountSettings.autoDownloadSettings:type_name -> signal.backup.AccountData.AutoDownloadSettings + 124, // 126: signal.backup.AccountData.AccountSettings.autoDownloadSettings:type_name -> signal.backup.AccountData.AutoDownloadSettings 4, // 127: signal.backup.AccountData.AccountSettings.appTheme:type_name -> signal.backup.AccountData.AppTheme 5, // 128: signal.backup.AccountData.AccountSettings.callsUseLessDataSetting:type_name -> signal.backup.AccountData.CallsUseLessDataSetting - 8, // 129: signal.backup.AccountData.AndroidSpecificSettings.navigationBarSize:type_name -> signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize - 132, // 130: signal.backup.Group.GroupSnapshot.title:type_name -> signal.backup.Group.GroupAttributeBlob - 132, // 131: signal.backup.Group.GroupSnapshot.description:type_name -> signal.backup.Group.GroupAttributeBlob - 132, // 132: signal.backup.Group.GroupSnapshot.disappearingMessagesTimer:type_name -> signal.backup.Group.GroupAttributeBlob - 137, // 133: signal.backup.Group.GroupSnapshot.accessControl:type_name -> signal.backup.Group.AccessControl - 133, // 134: signal.backup.Group.GroupSnapshot.members:type_name -> signal.backup.Group.Member - 134, // 135: signal.backup.Group.GroupSnapshot.membersPendingProfileKey:type_name -> signal.backup.Group.MemberPendingProfileKey - 135, // 136: signal.backup.Group.GroupSnapshot.membersPendingAdminApproval:type_name -> signal.backup.Group.MemberPendingAdminApproval - 136, // 137: signal.backup.Group.GroupSnapshot.members_banned:type_name -> signal.backup.Group.MemberBanned - 12, // 138: signal.backup.Group.Member.role:type_name -> signal.backup.Group.Member.Role - 133, // 139: signal.backup.Group.MemberPendingProfileKey.member:type_name -> signal.backup.Group.Member - 13, // 140: signal.backup.Group.AccessControl.attributes:type_name -> signal.backup.Group.AccessControl.AccessRequired - 13, // 141: signal.backup.Group.AccessControl.members:type_name -> signal.backup.Group.AccessControl.AccessRequired - 13, // 142: signal.backup.Group.AccessControl.addFromInviteLink:type_name -> signal.backup.Group.AccessControl.AccessRequired - 13, // 143: signal.backup.Group.AccessControl.memberLabel:type_name -> signal.backup.Group.AccessControl.AccessRequired - 50, // 144: signal.backup.ChatItem.OutgoingMessageDetails.sendStatus:type_name -> signal.backup.SendStatus - 17, // 145: signal.backup.SendStatus.Failed.reason:type_name -> signal.backup.SendStatus.Failed.FailureReason - 51, // 146: signal.backup.DirectStoryReplyMessage.TextReply.text:type_name -> signal.backup.Text - 64, // 147: signal.backup.DirectStoryReplyMessage.TextReply.longText:type_name -> signal.backup.FilePointer - 153, // 148: signal.backup.PaymentNotification.TransactionDetails.transaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction - 152, // 149: signal.backup.PaymentNotification.TransactionDetails.failedTransaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction - 18, // 150: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.reason:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason - 19, // 151: signal.backup.PaymentNotification.TransactionDetails.Transaction.status:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction.Status - 151, // 152: signal.backup.PaymentNotification.TransactionDetails.Transaction.mobileCoinIdentification:type_name -> signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification - 21, // 153: signal.backup.ContactAttachment.Phone.type:type_name -> signal.backup.ContactAttachment.Phone.Type - 22, // 154: signal.backup.ContactAttachment.Email.type:type_name -> signal.backup.ContactAttachment.Email.Type - 23, // 155: signal.backup.ContactAttachment.PostalAddress.type:type_name -> signal.backup.ContactAttachment.PostalAddress.Type - 63, // 156: signal.backup.Quote.QuotedAttachment.thumbnail:type_name -> signal.backup.MessageAttachment - 161, // 157: signal.backup.Poll.PollOption.votes:type_name -> signal.backup.Poll.PollOption.PollVote - 80, // 158: signal.backup.GroupChangeChatUpdate.Update.genericGroupUpdate:type_name -> signal.backup.GenericGroupUpdate - 81, // 159: signal.backup.GroupChangeChatUpdate.Update.groupCreationUpdate:type_name -> signal.backup.GroupCreationUpdate - 82, // 160: signal.backup.GroupChangeChatUpdate.Update.groupNameUpdate:type_name -> signal.backup.GroupNameUpdate - 83, // 161: signal.backup.GroupChangeChatUpdate.Update.groupAvatarUpdate:type_name -> signal.backup.GroupAvatarUpdate - 84, // 162: signal.backup.GroupChangeChatUpdate.Update.groupDescriptionUpdate:type_name -> signal.backup.GroupDescriptionUpdate - 85, // 163: signal.backup.GroupChangeChatUpdate.Update.groupMembershipAccessLevelChangeUpdate:type_name -> signal.backup.GroupMembershipAccessLevelChangeUpdate - 86, // 164: signal.backup.GroupChangeChatUpdate.Update.groupAttributesAccessLevelChangeUpdate:type_name -> signal.backup.GroupAttributesAccessLevelChangeUpdate - 89, // 165: signal.backup.GroupChangeChatUpdate.Update.groupAnnouncementOnlyChangeUpdate:type_name -> signal.backup.GroupAnnouncementOnlyChangeUpdate - 90, // 166: signal.backup.GroupChangeChatUpdate.Update.groupAdminStatusUpdate:type_name -> signal.backup.GroupAdminStatusUpdate - 91, // 167: signal.backup.GroupChangeChatUpdate.Update.groupMemberLeftUpdate:type_name -> signal.backup.GroupMemberLeftUpdate - 92, // 168: signal.backup.GroupChangeChatUpdate.Update.groupMemberRemovedUpdate:type_name -> signal.backup.GroupMemberRemovedUpdate - 93, // 169: signal.backup.GroupChangeChatUpdate.Update.selfInvitedToGroupUpdate:type_name -> signal.backup.SelfInvitedToGroupUpdate - 94, // 170: signal.backup.GroupChangeChatUpdate.Update.selfInvitedOtherUserToGroupUpdate:type_name -> signal.backup.SelfInvitedOtherUserToGroupUpdate - 95, // 171: signal.backup.GroupChangeChatUpdate.Update.groupUnknownInviteeUpdate:type_name -> signal.backup.GroupUnknownInviteeUpdate - 96, // 172: signal.backup.GroupChangeChatUpdate.Update.groupInvitationAcceptedUpdate:type_name -> signal.backup.GroupInvitationAcceptedUpdate - 97, // 173: signal.backup.GroupChangeChatUpdate.Update.groupInvitationDeclinedUpdate:type_name -> signal.backup.GroupInvitationDeclinedUpdate - 98, // 174: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedUpdate:type_name -> signal.backup.GroupMemberJoinedUpdate - 99, // 175: signal.backup.GroupChangeChatUpdate.Update.groupMemberAddedUpdate:type_name -> signal.backup.GroupMemberAddedUpdate - 100, // 176: signal.backup.GroupChangeChatUpdate.Update.groupSelfInvitationRevokedUpdate:type_name -> signal.backup.GroupSelfInvitationRevokedUpdate - 101, // 177: signal.backup.GroupChangeChatUpdate.Update.groupInvitationRevokedUpdate:type_name -> signal.backup.GroupInvitationRevokedUpdate - 102, // 178: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestUpdate:type_name -> signal.backup.GroupJoinRequestUpdate - 103, // 179: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestApprovalUpdate:type_name -> signal.backup.GroupJoinRequestApprovalUpdate - 104, // 180: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestCanceledUpdate:type_name -> signal.backup.GroupJoinRequestCanceledUpdate - 106, // 181: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkResetUpdate:type_name -> signal.backup.GroupInviteLinkResetUpdate - 107, // 182: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkEnabledUpdate:type_name -> signal.backup.GroupInviteLinkEnabledUpdate - 108, // 183: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkAdminApprovalUpdate:type_name -> signal.backup.GroupInviteLinkAdminApprovalUpdate - 109, // 184: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkDisabledUpdate:type_name -> signal.backup.GroupInviteLinkDisabledUpdate - 110, // 185: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedByLinkUpdate:type_name -> signal.backup.GroupMemberJoinedByLinkUpdate - 111, // 186: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationUpdate:type_name -> signal.backup.GroupV2MigrationUpdate - 112, // 187: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationSelfInvitedUpdate:type_name -> signal.backup.GroupV2MigrationSelfInvitedUpdate - 113, // 188: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationInvitedMembersUpdate:type_name -> signal.backup.GroupV2MigrationInvitedMembersUpdate - 114, // 189: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationDroppedMembersUpdate:type_name -> signal.backup.GroupV2MigrationDroppedMembersUpdate - 105, // 190: signal.backup.GroupChangeChatUpdate.Update.groupSequenceOfRequestsAndCancelsUpdate:type_name -> signal.backup.GroupSequenceOfRequestsAndCancelsUpdate - 115, // 191: signal.backup.GroupChangeChatUpdate.Update.groupExpirationTimerUpdate:type_name -> signal.backup.GroupExpirationTimerUpdate - 87, // 192: signal.backup.GroupChangeChatUpdate.Update.groupMemberLabelAccessLevelChangeUpdate:type_name -> signal.backup.GroupMemberLabelAccessLevelChangeUpdate - 88, // 193: signal.backup.GroupChangeChatUpdate.Update.groupTerminateChangeUpdate:type_name -> signal.backup.GroupTerminateChangeUpdate - 164, // 194: signal.backup.ChatStyle.CustomChatColor.gradient:type_name -> signal.backup.ChatStyle.Gradient - 195, // [195:195] is the sub-list for method output_type - 195, // [195:195] is the sub-list for method input_type - 195, // [195:195] is the sub-list for extension type_name - 195, // [195:195] is the sub-list for extension extendee - 0, // [0:195] is the sub-list for field type_name + 8, // 129: signal.backup.AccountData.AccountSettings.unreadBadgeType:type_name -> signal.backup.AccountData.AccountSettings.UnreadBadgeType + 9, // 130: signal.backup.AccountData.AndroidSpecificSettings.navigationBarSize:type_name -> signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize + 133, // 131: signal.backup.Group.GroupSnapshot.title:type_name -> signal.backup.Group.GroupAttributeBlob + 133, // 132: signal.backup.Group.GroupSnapshot.description:type_name -> signal.backup.Group.GroupAttributeBlob + 133, // 133: signal.backup.Group.GroupSnapshot.disappearingMessagesTimer:type_name -> signal.backup.Group.GroupAttributeBlob + 138, // 134: signal.backup.Group.GroupSnapshot.accessControl:type_name -> signal.backup.Group.AccessControl + 134, // 135: signal.backup.Group.GroupSnapshot.members:type_name -> signal.backup.Group.Member + 135, // 136: signal.backup.Group.GroupSnapshot.membersPendingProfileKey:type_name -> signal.backup.Group.MemberPendingProfileKey + 136, // 137: signal.backup.Group.GroupSnapshot.membersPendingAdminApproval:type_name -> signal.backup.Group.MemberPendingAdminApproval + 137, // 138: signal.backup.Group.GroupSnapshot.members_banned:type_name -> signal.backup.Group.MemberBanned + 13, // 139: signal.backup.Group.Member.role:type_name -> signal.backup.Group.Member.Role + 134, // 140: signal.backup.Group.MemberPendingProfileKey.member:type_name -> signal.backup.Group.Member + 14, // 141: signal.backup.Group.AccessControl.attributes:type_name -> signal.backup.Group.AccessControl.AccessRequired + 14, // 142: signal.backup.Group.AccessControl.members:type_name -> signal.backup.Group.AccessControl.AccessRequired + 14, // 143: signal.backup.Group.AccessControl.addFromInviteLink:type_name -> signal.backup.Group.AccessControl.AccessRequired + 14, // 144: signal.backup.Group.AccessControl.memberLabel:type_name -> signal.backup.Group.AccessControl.AccessRequired + 51, // 145: signal.backup.ChatItem.OutgoingMessageDetails.sendStatus:type_name -> signal.backup.SendStatus + 18, // 146: signal.backup.SendStatus.Failed.reason:type_name -> signal.backup.SendStatus.Failed.FailureReason + 52, // 147: signal.backup.DirectStoryReplyMessage.TextReply.text:type_name -> signal.backup.Text + 65, // 148: signal.backup.DirectStoryReplyMessage.TextReply.longText:type_name -> signal.backup.FilePointer + 154, // 149: signal.backup.PaymentNotification.TransactionDetails.transaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction + 153, // 150: signal.backup.PaymentNotification.TransactionDetails.failedTransaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction + 19, // 151: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.reason:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason + 20, // 152: signal.backup.PaymentNotification.TransactionDetails.Transaction.status:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction.Status + 152, // 153: signal.backup.PaymentNotification.TransactionDetails.Transaction.mobileCoinIdentification:type_name -> signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification + 22, // 154: signal.backup.ContactAttachment.Phone.type:type_name -> signal.backup.ContactAttachment.Phone.Type + 23, // 155: signal.backup.ContactAttachment.Email.type:type_name -> signal.backup.ContactAttachment.Email.Type + 24, // 156: signal.backup.ContactAttachment.PostalAddress.type:type_name -> signal.backup.ContactAttachment.PostalAddress.Type + 64, // 157: signal.backup.Quote.QuotedAttachment.thumbnail:type_name -> signal.backup.MessageAttachment + 162, // 158: signal.backup.Poll.PollOption.votes:type_name -> signal.backup.Poll.PollOption.PollVote + 81, // 159: signal.backup.GroupChangeChatUpdate.Update.genericGroupUpdate:type_name -> signal.backup.GenericGroupUpdate + 82, // 160: signal.backup.GroupChangeChatUpdate.Update.groupCreationUpdate:type_name -> signal.backup.GroupCreationUpdate + 83, // 161: signal.backup.GroupChangeChatUpdate.Update.groupNameUpdate:type_name -> signal.backup.GroupNameUpdate + 84, // 162: signal.backup.GroupChangeChatUpdate.Update.groupAvatarUpdate:type_name -> signal.backup.GroupAvatarUpdate + 85, // 163: signal.backup.GroupChangeChatUpdate.Update.groupDescriptionUpdate:type_name -> signal.backup.GroupDescriptionUpdate + 86, // 164: signal.backup.GroupChangeChatUpdate.Update.groupMembershipAccessLevelChangeUpdate:type_name -> signal.backup.GroupMembershipAccessLevelChangeUpdate + 87, // 165: signal.backup.GroupChangeChatUpdate.Update.groupAttributesAccessLevelChangeUpdate:type_name -> signal.backup.GroupAttributesAccessLevelChangeUpdate + 90, // 166: signal.backup.GroupChangeChatUpdate.Update.groupAnnouncementOnlyChangeUpdate:type_name -> signal.backup.GroupAnnouncementOnlyChangeUpdate + 91, // 167: signal.backup.GroupChangeChatUpdate.Update.groupAdminStatusUpdate:type_name -> signal.backup.GroupAdminStatusUpdate + 92, // 168: signal.backup.GroupChangeChatUpdate.Update.groupMemberLeftUpdate:type_name -> signal.backup.GroupMemberLeftUpdate + 93, // 169: signal.backup.GroupChangeChatUpdate.Update.groupMemberRemovedUpdate:type_name -> signal.backup.GroupMemberRemovedUpdate + 94, // 170: signal.backup.GroupChangeChatUpdate.Update.selfInvitedToGroupUpdate:type_name -> signal.backup.SelfInvitedToGroupUpdate + 95, // 171: signal.backup.GroupChangeChatUpdate.Update.selfInvitedOtherUserToGroupUpdate:type_name -> signal.backup.SelfInvitedOtherUserToGroupUpdate + 96, // 172: signal.backup.GroupChangeChatUpdate.Update.groupUnknownInviteeUpdate:type_name -> signal.backup.GroupUnknownInviteeUpdate + 97, // 173: signal.backup.GroupChangeChatUpdate.Update.groupInvitationAcceptedUpdate:type_name -> signal.backup.GroupInvitationAcceptedUpdate + 98, // 174: signal.backup.GroupChangeChatUpdate.Update.groupInvitationDeclinedUpdate:type_name -> signal.backup.GroupInvitationDeclinedUpdate + 99, // 175: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedUpdate:type_name -> signal.backup.GroupMemberJoinedUpdate + 100, // 176: signal.backup.GroupChangeChatUpdate.Update.groupMemberAddedUpdate:type_name -> signal.backup.GroupMemberAddedUpdate + 101, // 177: signal.backup.GroupChangeChatUpdate.Update.groupSelfInvitationRevokedUpdate:type_name -> signal.backup.GroupSelfInvitationRevokedUpdate + 102, // 178: signal.backup.GroupChangeChatUpdate.Update.groupInvitationRevokedUpdate:type_name -> signal.backup.GroupInvitationRevokedUpdate + 103, // 179: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestUpdate:type_name -> signal.backup.GroupJoinRequestUpdate + 104, // 180: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestApprovalUpdate:type_name -> signal.backup.GroupJoinRequestApprovalUpdate + 105, // 181: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestCanceledUpdate:type_name -> signal.backup.GroupJoinRequestCanceledUpdate + 107, // 182: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkResetUpdate:type_name -> signal.backup.GroupInviteLinkResetUpdate + 108, // 183: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkEnabledUpdate:type_name -> signal.backup.GroupInviteLinkEnabledUpdate + 109, // 184: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkAdminApprovalUpdate:type_name -> signal.backup.GroupInviteLinkAdminApprovalUpdate + 110, // 185: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkDisabledUpdate:type_name -> signal.backup.GroupInviteLinkDisabledUpdate + 111, // 186: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedByLinkUpdate:type_name -> signal.backup.GroupMemberJoinedByLinkUpdate + 112, // 187: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationUpdate:type_name -> signal.backup.GroupV2MigrationUpdate + 113, // 188: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationSelfInvitedUpdate:type_name -> signal.backup.GroupV2MigrationSelfInvitedUpdate + 114, // 189: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationInvitedMembersUpdate:type_name -> signal.backup.GroupV2MigrationInvitedMembersUpdate + 115, // 190: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationDroppedMembersUpdate:type_name -> signal.backup.GroupV2MigrationDroppedMembersUpdate + 106, // 191: signal.backup.GroupChangeChatUpdate.Update.groupSequenceOfRequestsAndCancelsUpdate:type_name -> signal.backup.GroupSequenceOfRequestsAndCancelsUpdate + 116, // 192: signal.backup.GroupChangeChatUpdate.Update.groupExpirationTimerUpdate:type_name -> signal.backup.GroupExpirationTimerUpdate + 88, // 193: signal.backup.GroupChangeChatUpdate.Update.groupMemberLabelAccessLevelChangeUpdate:type_name -> signal.backup.GroupMemberLabelAccessLevelChangeUpdate + 89, // 194: signal.backup.GroupChangeChatUpdate.Update.groupTerminateChangeUpdate:type_name -> signal.backup.GroupTerminateChangeUpdate + 165, // 195: signal.backup.ChatStyle.CustomChatColor.gradient:type_name -> signal.backup.ChatStyle.Gradient + 196, // [196:196] is the sub-list for method output_type + 196, // [196:196] is the sub-list for method input_type + 196, // [196:196] is the sub-list for extension type_name + 196, // [196:196] is the sub-list for extension extendee + 0, // [0:196] is the sub-list for field type_name } func init() { file_backuppb_Backup_proto_init() } @@ -14003,7 +14196,7 @@ func file_backuppb_Backup_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_backuppb_Backup_proto_rawDesc), len(file_backuppb_Backup_proto_rawDesc)), - NumEnums: 36, + NumEnums: 37, NumMessages: 131, NumExtensions: 0, NumServices: 0, diff --git a/pkg/signalmeow/protobuf/backuppb/Backup.pb.raw b/pkg/signalmeow/protobuf/backuppb/Backup.pb.raw deleted file mode 100644 index c72802f..0000000 Binary files a/pkg/signalmeow/protobuf/backuppb/Backup.pb.raw and /dev/null differ diff --git a/pkg/signalmeow/protobuf/backuppb/Backup.proto b/pkg/signalmeow/protobuf/backuppb/Backup.proto index 512bdaf..32b3ac3 100644 --- a/pkg/signalmeow/protobuf/backuppb/Backup.proto +++ b/pkg/signalmeow/protobuf/backuppb/Backup.proto @@ -103,6 +103,12 @@ message AccountData { } message AccountSettings { + enum UnreadBadgeType { + UNKNOWN_BADGE_TYPE = 0; // Interpret as "Unread messages" + UNREAD_MESSAGES = 1; + UNREAD_CHATS = 2; + } + bool readReceipts = 1; bool sealedSenderIndicators = 2; bool typingIndicators = 3; @@ -136,6 +142,14 @@ message AccountData { bool allowSealedSenderFromAnyone = 30; bool allowAutomaticKeyVerification = 31; bool hasSeenAdminDeleteEducationDialog = 32; + UnreadBadgeType unreadBadgeType = 33; // Only used in ios/desktop + optional bool includeMutedChatsInBadge = 34; // Only used in ios/desktop. If unset, consider this disabled + optional bool reactionNotifications = 35; // If unset, consider this enabled + optional bool notifyForCallsIfMuted = 36; // If unset, consider this disabled + optional bool notifyForMentionsIfMuted = 37; // If unset, consider this enabled + optional bool notifyForRepliesIfMuted = 38; // If unset, consider this enabled + optional bool showUnreadReminders = 39; // If unset, consider this enabled + optional bool notifyWhenContactJoins = 40; // If unset, consider this disabled } message SubscriberData { @@ -272,6 +286,7 @@ message Contact { string systemNickname = 20; optional AvatarColor avatarColor = 21; optional bytes keyTransparencyData = 22; + uint64 blockedAtTimestamp = 23; // if `blocked` is true, 0 means unknown block time } message Group { @@ -288,6 +303,7 @@ message Group { GroupSnapshot snapshot = 5; bool blocked = 6; optional AvatarColor avatarColor = 7; + uint64 blockedAtTimestamp = 8; // if `blocked` is true, 0 means unknown block time // These are simply plaintext copies of the groups proto from Groups.proto. // They should be kept completely in-sync with Groups.proto. @@ -385,9 +401,13 @@ message Chat { optional uint64 expirationTimerMs = 5; optional uint64 muteUntilMs = 6; // INT64_MAX (2^63 - 1) = "always muted". bool markedUnread = 7; - bool dontNotifyForMentionsIfMuted = 8; + bool dontNotifyForMentionsIfMuted = 8; // will be deprecated in favor of [notifyForMentionsIfMuted] ChatStyle style = 9; uint32 expireTimerVersion = 10; + optional bool notifyForCallsIfMuted = 11; // If unset, use default global settings + optional bool notifyForMentionsIfMuted = 12; // If unset, use default global settings. Only for groups. If [dontNotifyForMentionsIfMuted] is true, this should be initialized to false. + optional bool notifyForRepliesIfMuted = 13; // If unset, use default global settings. Only for groups. + optional bool showUnreadReminders = 14; // If unset, use default global settings } /** diff --git a/pkg/signalmeow/protobuf/build-protos.sh b/pkg/signalmeow/protobuf/build-protos.sh index 372b791..5a34136 100755 --- a/pkg/signalmeow/protobuf/build-protos.sh +++ b/pkg/signalmeow/protobuf/build-protos.sh @@ -1,19 +1,18 @@ -#!/bin/sh -PKG_IMPORT_PATH="go.mau.fi/mautrix-signal/pkg/signalmeow/signalpb" -for file in *.proto -do - # Requires https://go-review.googlesource.com/c/protobuf/+/369634 - protoc --go_out=. \ - --go_opt=M${file}=$PKG_IMPORT_PATH \ - --go_opt=paths=source_relative \ - $file +#!/bin/bash +cd $(dirname "$0") +BASE_IMPORT_PATH="go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" +opts=() +for file in */*.proto; do + opts+=("--go_opt=M${file}=${BASE_IMPORT_PATH}/$(dirname "$file")") + opts+=("--go-grpc_opt=M${file}=${BASE_IMPORT_PATH}/$(dirname "$file")") done -protoc --go_out=. \ - --go_opt=Mbackuppb/Backup.proto=$PKG_IMPORT_PATH/backuppb \ - --go_opt=paths=source_relative \ - backuppb/Backup.proto -protoc --go_out=. \ - --go_opt=Mcds2pb/cds2.proto=$PKG_IMPORT_PATH/cds2pb \ - --go_opt=paths=source_relative \ - cds2pb/cds2.proto +for file in org/signal/chat/*.proto; do + file_without_ext=$(basename "$file" .proto) + opts+=("--go_opt=M${file}=${BASE_IMPORT_PATH}/rpc/${file_without_ext}") + opts+=("--go-grpc_opt=M${file}=${BASE_IMPORT_PATH}/rpc/${file_without_ext}") +done +protoc --go_out=. --go-grpc_out=. \ + --go_opt=module=$BASE_IMPORT_PATH \ + --go-grpc_opt=module=$BASE_IMPORT_PATH "${opts[@]}" \ + */*.proto org/signal/chat/*.proto pre-commit run -a diff --git a/pkg/signalmeow/protobuf/org/signal/chat/account.proto b/pkg/signalmeow/protobuf/org/signal/chat/account.proto new file mode 100644 index 0000000..c12755b --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/account.proto @@ -0,0 +1,608 @@ +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.account; + +import "google/protobuf/empty.proto"; + +import "org/signal/chat/common.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/messages.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/tag.proto"; + +// Provides methods for working with Signal accounts. +service Accounts { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Returns basic identifiers for the authenticated account. + rpc GetAccountIdentity(GetAccountIdentityRequest) returns (GetAccountIdentityResponse) {} + + // Returns entitlements for the authenticated account. + rpc GetEntitlements(GetEntitlementsRequest) returns (GetEntitlementsResponse) {} + + // Deletes the authenticated account, purging all associated data in the + // process. + rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse) {} + + // Sets the registration lock secret for the authenticated account. To remove + // a registration lock, please use `ClearRegistrationLock`. + rpc SetRegistrationLock(SetRegistrationLockRequest) returns (SetRegistrationLockResponse) {} + + // Removes any registration lock credentials from the authenticated account. + rpc ClearRegistrationLock(ClearRegistrationLockRequest) returns (ClearRegistrationLockResponse) {} + + // Attempts to reserve one of multiple given username hashes. Reserved + // usernames may be claimed later via `ConfirmUsernameHash`. + rpc ReserveUsernameHash(ReserveUsernameHashRequest) returns (ReserveUsernameHashResponse) {} + + // Sets the username hash/encrypted username to a previously-reserved value + // (see `ReserveUsernameHash`). + rpc ConfirmUsernameHash(ConfirmUsernameHashRequest) returns (ConfirmUsernameHashResponse) {} + + // Clears the current username hash, ciphertext, and link for the + // authenticated user. + rpc DeleteUsernameHash(DeleteUsernameHashRequest) returns (DeleteUsernameHashResponse) {} + + // Associates the given username ciphertext with the account, replacing any + // previously stored ciphertext. A new link handle will optionally be created, + // and the link handle to use will be returned in any event. + rpc SetUsernameLink(SetUsernameLinkRequest) returns (SetUsernameLinkResponse) {} + + // Clears any username link associated with the authenticated account. + rpc DeleteUsernameLink(DeleteUsernameLinkRequest) returns (DeleteUsernameLinkResponse) {} + + // Configures "unidentified access" keys and preferences for the authenticated + // account. Other users permitted to interact with this account anonymously + // may take actions like fetching pre-keys and profiles for this account or + // sending sealed-sender messages without providing identifying credentials. + rpc ConfigureUnidentifiedAccess(ConfigureUnidentifiedAccessRequest) returns (ConfigureUnidentifiedAccessResponse) {} + + // Sets whether the authenticated account may be discovered by phone number + // via the Contact Discovery Service (CDS). + rpc SetDiscoverableByPhoneNumber(SetDiscoverableByPhoneNumberRequest) returns (SetDiscoverableByPhoneNumberResponse) {} + + // Sets the registration recovery password for the authenticated account. + rpc SetRegistrationRecoveryPassword(SetRegistrationRecoveryPasswordRequest) returns (SetRegistrationRecoveryPasswordResponse) {} + + // Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account. + rpc SetZkCredentialKey(SetZkCredentialKeyRequest) returns (SetZkCredentialKeyResponse) {} + + // Changes the phone number associated with the authenticated account. + rpc ChangeNumber(ChangeNumberRequest) returns (ChangeNumberResponse) {} + + // Produces a report of non-ephemeral account data stored by the service + rpc GetAccountDataReport(GetAccountDataReportRequest) returns (GetAccountDataReportResponse) {} + + // Gets the capabilities for the authenticated account. + rpc GetCapabilities(GetCapabilitiesRequest) returns (GetCapabilitiesResponse) {} + + // Generates and stores a pending TOTP key for the authenticated account. + // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. + rpc GenerateTotpKey(GenerateTotpKeyRequest) returns (GenerateTotpKeyResponse) {} + + // Confirms that the caller has stored and can derive one-time passwords from + // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the + // key for the caller's account + rpc ConfirmTotpKey(ConfirmTotpKeyRequest) returns (ConfirmTotpKeyResponse) {} + + // Returns a list of confirmed TOTP keys for the authenticated account + rpc ListTotpKeys(ListTotpKeysRequest) returns (ListTotpKeysResponse) {} + + // Updates encrypted, user-supplied metadata (e.g. a human-readable name and + // creation timestamp) for an existing, confirmed TOTP key + rpc SetTotpKeyMetadata(SetTotpKeyMetadataRequest) returns (SetTotpKeyMetadataResponse) {} + + // Removes a TOTP from the authenticated account + rpc RemoveTotpKey(RemoveTotpKeyRequest) returns (RemoveTotpKeyResponse) {} +} + +// Provides methods for looking up Signal accounts. Callers must not provide +// identifying credentials when calling methods in this service. +service AccountsAnonymous { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Checks whether an account with the given service identifier exists. + rpc CheckAccountExistence(CheckAccountExistenceRequest) returns (CheckAccountExistenceResponse) {} + + // Finds the service identifier of the account associated with the given + // username hash. + rpc LookupUsernameHash(LookupUsernameHashRequest) returns (LookupUsernameHashResponse) {} + + // Finds the encrypted username identified by a given username link handle. + rpc LookupUsernameLink(LookupUsernameLinkRequest) returns (LookupUsernameLinkResponse) {} + + // Gets the publicly-visible capabilities enabled on the account identified by + // the provided ACI. + rpc GetCapabilities(GetCapabilitiesAnonymousRequest) returns (GetCapabilitiesAnonymousResponse) {} +} + +message GetAccountIdentityRequest { +} + +message GetAccountIdentityResponse { + // The identifiers for the authenticated account. + common.AccountIdentifiers account_identifiers = 1; +} + +message GetEntitlementsRequest { +} + +message GetEntitlementsResponse { + message BadgeEntitlement { + // The id of the badge the account is entitled. Metadata to display for + // badges may be obtained by cross-referencing badge ids with + // RemoteConfiguration.GetBadges. + string badge_id = 1; + // When the badge expires, in number of seconds since epoch + uint64 expiration_epoch_seconds = 2; + // Whether the badge is currently configured to be visible + bool visible = 3; + } + + message BackupEntitlement { + // The backup level of the account + uint64 level = 1; + // When the backup entitlement expires, in number of seconds since epoch + uint64 expiration_epoch_seconds = 2; + } + + // Active badges added via Donations.redeemReceipt + repeated BadgeEntitlement badges = 1; + + // If present, the backup level set via Backups.redeemReceipt + BackupEntitlement backup = 2; +} + +message DeleteAccountRequest { +} + +message DeleteAccountResponse { +} + +message SetRegistrationLockRequest { + // The new registration lock secret for the authenticated account. + bytes registration_lock = 1 [(require.exactlySize) = 32]; +} + +message SetRegistrationLockResponse { +} + +message ClearRegistrationLockRequest { +} + +message ClearRegistrationLockResponse { +} + +message ReserveUsernameHashRequest { + // A prioritized list of username hashes to attempt to reserve. + repeated bytes username_hashes = 1 [(require.size) = {min: 1, max: 20}, (require.each) = {exactlySize: 32}]; +} + +message UsernameNotAvailable {} + +message ReserveUsernameHashResponse { + oneof response { + // The first username hash that was available (and actually reserved). + bytes username_hash = 1; + + // Indicates that, of all of the candidate hashes provided, none were + // available. Callers may generate a new set of hashes and and retry. + UsernameNotAvailable username_not_available = 2 [(tag.reason) = "username_not_available"]; + } +} + +message ConfirmUsernameHashRequest { + // The username hash to claim for the authenticated account. + bytes username_hash = 1 [(require.exactlySize) = 32]; + + // A zero-knowledge proof that the given username hash was generated by the + // Signal username algorithm. + bytes zk_proof = 2 [(require.nonEmpty) = true]; + + // The ciphertext of the chosen username for use in public-facing contexts + // (e.g. links and QR codes). + bytes username_ciphertext = 3 [(require.size) = {min: 1, max: 128}]; +} + +message ConfirmUsernameHashResponse { + message ConfirmedUsernameHash { + reserved 1; // username_hash + + // The server-generated username link handle for the newly-confirmed username. + bytes username_link_handle = 2; + } + + oneof response { + // The details of the successfully confirmed username. + ConfirmedUsernameHash confirmed_username_hash = 1; + + // The provided hash was not reserved for the account. + errors.FailedPrecondition reservation_not_found = 2 [(tag.reason) = "reservation_not_found"]; + + // The reservation has lapsed and the requested username has been claimed by + // another caller. + UsernameNotAvailable username_not_available = 3 [(tag.reason) = "username_not_available"]; + } +} + +message DeleteUsernameHashRequest { +} + +message DeleteUsernameHashResponse { +} + +message SetUsernameLinkRequest { + // The username ciphertext for which to generate a new link handle. + bytes username_ciphertext = 1 [(require.size) = {min: 1, max: 128}]; + + // If true and the account already had an encrypted username stored, the + // existing link handle will be reused. Otherwise a new link handle will be + // created. + bool keep_link_handle = 2; +} + + +message SetUsernameLinkResponse { + oneof response { + // A new link handle for the given username ciphertext. + bytes username_link_handle = 1; + + // The authenticated account did not have a username set. + errors.FailedPrecondition no_username_set = 2 [(tag.reason) = "no_username_set"]; + + } +} + +message DeleteUsernameLinkRequest { +} + +message DeleteUsernameLinkResponse { +} + +message ConfigureUnidentifiedAccessRequest { + oneof configuration { + // The key that other users must provide to interact with this account + // anonymously (i.e. to retrieve keys or profiles or to send messages) unless + // unrestricted unidentified access is permitted. Must be present if + // unrestricted unidentified access is not allowed. + bytes unidentified_access_key = 1 [(require.exactlySize) = 16]; + + // If set, any user may interact with this account anonymously without + // providing an unidentified access key. Otherwise, users must provide the + // given unidentified access key to interact with this account anonymously. + // Setting unrestricted unidentified access will clear any existing + // unidentified_access_key + google.protobuf.Empty allow_unrestricted_unidentified_access = 2; + } +} + +message ConfigureUnidentifiedAccessResponse { +} + +message SetDiscoverableByPhoneNumberRequest { + // If true, the authenticated account may be discovered by phone number via + // the Contact Discovery Service (CDS). Otherwise, other users must discover + // this account by other means (i.e. by username). + bool discoverable_by_phone_number = 1; +} + +message SetDiscoverableByPhoneNumberResponse { +} + +message SetRegistrationRecoveryPasswordRequest { + // The new registration recovery password for the authenticated account. + bytes registration_recovery_password = 1 [(require.exactlySize) = 32]; +} + +message SetRegistrationRecoveryPasswordResponse { +} + +message CheckAccountExistenceRequest { + // The service identifier of an account that may or may not exist. + common.ServiceIdentifier service_identifier = 1; +} + +message CheckAccountExistenceResponse { + // True if an account exists with the given service identifier or false if no + // account was found. + bool account_exists = 1; +} + +message LookupUsernameHashRequest { + // A 32-byte username hash for which to find an account. + bytes username_hash = 1 [(require.exactlySize) = 32]; +} + +message LookupUsernameHashResponse { + oneof response { + // The service identifier associated with the provided username hash. + common.ServiceIdentifier service_identifier = 1; + + // No account was found for the provided username hash. + errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; + } +} + +message LookupUsernameLinkRequest { + // The link handle for which to find an encrypted username. Link handles are + // 16-byte representations of UUIDs. + bytes username_link_handle = 1 [(require.exactlySize) = 16]; +} + +message LookupUsernameLinkResponse { + oneof response { + // The ciphertext of the username identified by the provided link handle. + bytes username_ciphertext = 1; + + + // No username was found for the provided link handle. + errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; + } +} + +message SetZkCredentialKeyRequest { + // A serialized libsignal ZkCredentialPublicKey + bytes public_key = 1 [(require.exactlySize) = 33]; +} + +message SetZkCredentialKeyResponse { + // A random, non-zero, value that must be included in credential requests using the key. + // + // This value allows the server to ratchet the resulting binding identity, + // as reverting to the previous key will result in a new rotation ID. + uint64 rotation_id = 1; +} + +message ChangeNumberRequest { + // A means of authenticating the change-number request for the new phone + // number. Exactly one must be provided. + oneof verification { + // A verified registration session ID (as returned by the registration + // service) for the new phone number. + bytes session_id = 1 [(require.nonEmpty) = true]; + + // A registration recovery password for the new phone number. + bytes recovery_password = 2 [(require.exactlySize) = 32]; + } + + // The new phone number for the authenticated account. + string number = 3 [(require.e164) = true]; + + // The registration lock secret for the new phone number, if the account + // associated with the new phone number has a registration lock configured. + bytes registration_lock = 4 [(require.exactlySize) = 0, (require.exactlySize) = 32]; + + // The new public identity key to use for the phone-number identity (PNI) + // associated with the new phone number. + bytes pni_identity_key = 5 [(require.nonEmpty) = true]; + + // Synchronization messages to send to companion devices to supply the private + // keys associated with the new identity key and their new pre-keys. Exactly + // one message must be supplied for each device other than the sending + // (primary) device. May be omitted if no companion devices are linked to the + // account. + messages.IndividualRecipientMessageBundle device_messages = 6; + + // A new signed EC pre-key for each device on the account, including the + // sending device, keyed by device ID. Each must be accompanied by a valid + // signature from the identity key in this request. + map device_pni_signed_pre_keys = 7; + + // A new signed post-quantum last-resort pre-key for each device on the + // account, including the sending device, keyed by device ID. Each must be + // accompanied by a valid signature from the identity key in this request. + map device_pni_pq_last_resort_pre_keys = 8; + + // The new phone-number-identity registration ID for each device on the + // account, including the sending device, keyed by device ID. + map pni_registration_ids = 9; +} + +message ChangeNumberResponse { + oneof response { + // The identifiers of the account after the successful + // number change. + common.AccountIdentifiers account_identifiers = 1; + + // Mismatched number of devices or device ids in 'devices to notify' list + messages.MismatchedDevices mismatched_devices = 2 [(tag.reason) = "mismatched_devices"]; + + // The account associated with the new phone number has a registration lock, + // and the provided registration lock secret was missing or incorrect. + RegistrationLockFailure registration_lock_failure = 3 [(tag.reason) = "registration_lock_failure"]; + + // Mismatched registration ids in 'devices to notify' list + StaleDevices stale_devices = 4 [(tag.reason) = "stale_devices"]; + + // One or more device messages was too large + errors.FailedPrecondition message_too_large = 5 [(tag.reason) = "message_too_large"]; + + // The registration session is unverified + errors.FailedPrecondition unverified_registration_session = 6 [(tag.reason) = "unverified_registration_session"]; + + // The number does not match the registration session, or the registration session is invalid + errors.FailedPrecondition invalid_registration_session = 7 [(tag.reason) = "invalid_registration_session"]; + + errors.FailedPrecondition recovery_password_verification_failed = 8 [(tag.reason) = "recovery_password_verification_failed"]; + } +} + +// Information about the current Registration lock and SVR credentials. With a correct PIN, the credentials can +// be used to recover the secret used to derive the registration lock password. +message RegistrationLockFailure { + // Time remaining in milliseconds before the existing registration lock expires + uint64 time_remaining_millis = 1; + + // Credentials that can be used with SVR2 + ExternalServiceCredentials svr2_credentials = 2; +} + +// A username/password pair for authenticating with an external service. +message ExternalServiceCredentials { + // A username that can be presented to authenticate with the external service. + string username = 1; + + // A password that can be presented to authenticate with the external service. + string password = 2; +} + +// A list of devices that are linked to the account but presented a stale +// registration ID (indicating the device has likely been replaced by another +// device). +message StaleDevices { + // The IDs of devices that are no longer active. + repeated uint32 stale_devices = 1 [(require.each) = {range: {max: 0x7f}}]; +} + +message GetAccountDataReportRequest { +} + +message GetAccountDataReportResponse { + // The JSON representation of the data report + string json = 3; + // A plaintext representation of the data report + string text = 4; +} + +message GetCapabilitiesRequest { +} + +message Capabilities { + // A list of capabilities enabled on the account. + repeated common.DeviceCapability capabilities = 1; +} + +message GetCapabilitiesResponse { + // A list of capabilities enabled on the account. + Capabilities capabilities = 1; +} + +message GetCapabilitiesAnonymousRequest { + // The ACI of the account for which to get capabilities. + common.ServiceIdentifier account_identifier = 1 [(require.present) = true, (require.identityType) = IDENTITY_TYPE_ACI]; + + oneof authentication { + // The unidentified access key for the targeted account. + bytes unidentified_access_key = 2 [(require.exactlySize) = 16]; + + // A group send endorsement token for the targeted account. + bytes group_send_token = 3 [(require.nonEmpty) = true]; + } +} + +message GetCapabilitiesAnonymousResponse { + oneof response { + // A list of capabilities enabled on the account. + Capabilities capabilities = 1; + errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; + errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; + } +} + +message TotpParameters { + // The HMAC algorithm (e.g. "HmacSHA256") used by the TOTP generator + string algorithm = 1; + + // The length of one-time passwords (in decimal digits) produced and expected + // by the TOTP generator + uint32 password_length = 2; + + // The time step (in seconds) used by the TOTP generator + uint32 time_step_seconds = 3; +} + +message GenerateTotpKeyRequest { +} + +message GenerateTotpKeyResponse { + message KeyGenerated { + // The raw TOTP key + bytes key = 1; + + // The TOTP parameters associated with the generated key + TotpParameters totp_parameters = 2; + } + + oneof response { + // A new, pending TOTP key has been generated and added to the authenticated + // account + KeyGenerated key_generated = 1; + + // The authenticated account already has too many TOTP keys, and the caller + // must remove one before adding more + errors.FailedPrecondition too_many_totp_keys = 2 [(tag.reason) = "too_many_totp_keys"]; + } +} + +message ConfirmTotpKeyRequest { + // A one-time password derived from the current pending TOTP key + uint32 one_time_password = 1; + + // The ciphertext of user-provided metadata (presumably including a + // human-readable name and creation timestamp) to be attached to the + // newly-confirmed key + bytes metadata_ciphertext = 2 [(require.exactlySize) = 160]; +} + +message ConfirmTotpKeyResponse { + message KeyConfirmed { + // The account-specific identifier for the newly-confirmed TOTP key + uint32 key_id = 1; + } + + oneof response { + // The provided one-time password was accepted and the pending TOTP key was + // stored with the provided name ciphertext + KeyConfirmed key_confirmed = 1; + + // The provided one-time password was not valid for any reason (including + // incorrect passwords, misaligned clocks, or missing account records) + errors.FailedPrecondition one_time_password_not_verified = 2 [(tag.reason) = "one_time_password_not_verified"]; + } +} + +message ListTotpKeysRequest {} + +message ListTotpKeysResponse { + message TotpKeyMetadata { + // The user-provided ciphertext for metadata associated with this TOTP key + bytes metadata_ciphertext = 1; + + // The TOTP parameters associated with this key + TotpParameters totp_parameters = 2; + } + + map keys = 1; +} + +message SetTotpKeyMetadataRequest { + // The account-specific identifier of the TOTP key to modify + uint32 key_id = 1; + + // The ciphertext of the new user-provided metadata to be attached to the + // identified key + bytes metadata_ciphertext = 2 [(require.exactlySize) = 160]; +} + +message SetTotpKeyMetadataResponse { + message MetadataUpdated { + } + + oneof response { + // New metadata was stored for the identified TOTP key + MetadataUpdated metadata_updated = 1; + + // No TOTP was found with the given ID + errors.NotFound key_not_found = 2 [(tag.reason) = "key_not_found"]; + } +} + +message RemoveTotpKeyRequest { + // The account-specific identifier of the TOTP key to remove + uint32 key_id = 1; +} + +message RemoveTotpKeyResponse { +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/attachments.proto b/pkg/signalmeow/protobuf/org/signal/chat/attachments.proto new file mode 100644 index 0000000..b51ed13 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/attachments.proto @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.attachments; + +import "org/signal/chat/common.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/tag.proto"; + +service Attachments { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Retrieve an upload form that can be used to perform a resumable upload + rpc GetUploadForm(GetUploadFormRequest) returns (GetUploadFormResponse) {} + + // Retrieve an upload form that can be used to upload a sticker pack + rpc GetStickerUploadForm(GetStickerUploadFormRequest) returns (GetStickerUploadFormResponse) {} +} + +message GetUploadFormRequest { + // The length of the attachment for the requested upload form. Uploads + // performed with this form will be limited to the provided length. + uint64 uploadLength = 1 [(require.range) = {min: 1}]; +} + +message GetUploadFormResponse { + oneof outcome { + common.UploadForm upload_form = 1; + + // The request size was larger than the maximum supported upload size. The + // maximum upload size is subject to change and is governed by + // `global.attachments.maxBytes` + errors.FailedPrecondition exceeds_max_upload_length = 2 [(tag.reason) = "oversize_upload"]; + } +} + +message GetStickerUploadFormRequest { + // The number of stickers in the sticker pack to upload + uint32 sticker_count = 1 [(require.range) = {min: 1, max: 201}]; +} + +message GetStickerUploadFormResponse { + // A randomly-generated ID for the new sticker pack + string pack_id = 1; + + // An upload form clients must use to upload a manifest for the sticker pack + common.S3UploadForm manifest_upload_form = 2; + + // Upload forms for individual stickers within the sticker pack + repeated common.S3UploadForm sticker_upload_forms = 3; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/backups.proto b/pkg/signalmeow/protobuf/org/signal/chat/backups.proto new file mode 100644 index 0000000..92b7506 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/backups.proto @@ -0,0 +1,554 @@ +/* + * Copyright 2024 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.backup; + +import "google/protobuf/empty.proto"; +import "org/signal/chat/common.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/tag.proto"; + +// Service for backup operations that require account authentication. +// +// Most actual backup operations operate on the backup-id and cannot be linked +// to the caller's account, but setting up anonymous credentials and changing +// backup tier requires account authentication. +service Backups { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Set (blinded) backup-id(s) for the account. + // + // Each account may have a single active backup-id for each credential type + // that can be used to store and retrieve backups. Once the backup-id is set, + // BackupAuthCredentials can be generated using GetBackupAuthCredentials. + // + // The blinded backup-id and the key-pair used to blind it must be derived + // from a recoverable secret. + // + // At least one of the credential types must be set on the request. + // Only the primary device can set a blinded backup-id. + rpc SetBackupId(SetBackupIdRequest) returns (SetBackupIdResponse) {} + + // Redeem a receipt acquired from /v1/subscription/{subscriberId}/receipt_credentials + // to mark the account as eligible for the paid backup tier. + // + // After successful redemption, subsequent requests to + // GetBackupAuthCredentials will return credentials with the level on the + // provided receipt until the expiration time on the receipt. + rpc RedeemReceipt(RedeemReceiptRequest) returns (RedeemReceiptResponse) {} + + // After setting a blinded backup-id with PUT /v1/archives/, this fetches + // credentials that can be used to perform operations against that backup-id. + // Clients may (and should) request up to 7 days of credentials at a time. + // + // The redemption_start and redemption_end seconds must be UTC day aligned, and + // must not span more than 7 days. + // + // Each credential contains a receipt level which indicates the backup level + // the credential is good for. If the account has paid backup access that + // expires at some point in the provided redemption window, credentials with + // redemption times after the expiration may be on a lower backup level. + // + // Clients must validate the receipt level on the credential matches a known + // receipt level before using it. + rpc GetBackupAuthCredentials(GetBackupAuthCredentialsRequest) returns (GetBackupAuthCredentialsResponse) {} +} + +message SetBackupIdRequest { + // A BackupAuthCredentialRequest containing a blinded encrypted backup-id, + // encoded in standard padded base64. This backup-id should be used for + // message backups only, and must have the message backup type set on the + // credential. If absent, the message credential request will not be updated. + bytes messages_backup_auth_credential_request = 1; + + // A BackupAuthCredentialRequest containing a blinded encrypted backup-id, + // encoded in standard padded base64. This backup-id should be used for + // media only, and must have the media type set on the credential. If absent, + // the media credential request will not be updated. + bytes media_backup_auth_credential_request = 2; +} + +message SetBackupIdResponse {} + + +message RedeemReceiptRequest { + // Presentation for a previously acquired receipt, serialized with libsignal + bytes presentation = 1; +} + +message RedeemReceiptResponse { + oneof response { + // The receipt was successfully redeemed + google.protobuf.Empty success = 1; + + // The target account does not have a backup-id commitment + errors.FailedPrecondition account_missing_commitment = 2 [(tag.reason) = "account_missing_commitment"]; + + // The provided receipt presentation was malformed or expired + errors.FailedPrecondition invalid_receipt = 3 [(tag.reason) = "invalid_receipt"]; + } +} + +message GetBackupAuthCredentialsRequest { + // The redemption time for the first credential. This must be a day-aligned + // seconds since epoch in UTC. + int64 redemption_start = 1 [(require.range).min = 1]; + + // The redemption time for the last credential. This must be a day-aligned + // seconds since epoch in UTC. The span between redemptionStart and + // redemptionEnd must not exceed 7 days. + int64 redemption_stop = 2 [(require.range).min = 1]; +} + +message GetBackupAuthCredentialsResponse { + message Credentials { + // The requested message backup ZkCredentials indexed by the start of their + // validity period. The smallest key should be for the requested + // redemption_start, the largest for the requested redemption_end. + map message_credentials = 1; + + // The requested media backup ZkCredentials indexed by the start of their + // validity period. The smallest key should be for the requested + // redemption_start, the largest for the requested redemption_end. + map media_credentials = 2; + } + + // The requested credentials. If absent, there was no existing blinded + // backup id associated with the provided account. + Credentials credentials = 1; +} + +// Service for backup operations with anonymous credentials +// +// This service never requires account authentication. It instead requires a +// backup-id authenticated with an anonymous credential that cannot be linked +// to the account. +// +// To register an anonymous credential: +// +// 1. Set a backup-id on the authenticated channel via Backups::SetBackupId +// 2. Retrieve BackupAuthCredentials via Backups::GetBackupAuthCredentials +// 3. Generate a key pair and set the public key via +// BackupsAnonymous::SetPublicKey +// +// Unless otherwise noted, requests for this service require a +// SignedPresentation, which includes: +// +// - a presentation generated from a BackupAuthCredential issued by +// GetBackupAuthCredentials +// - a signature of that presentation using the private key of a key pair +// previously set with SetPublicKey. +service BackupsAnonymous { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Retrieve credentials used to read objects stored on the backup cdn + rpc GetCdnCredentials(GetCdnCredentialsRequest) returns (GetCdnCredentialsResponse) {} + + // Retrieve credentials used to interact with the SecureValueRecoveryB service + rpc GetSvrBCredentials(GetSvrBCredentialsRequest) returns (GetSvrBCredentialsResponse) {} + + // Retrieve information about the currently stored message backup + rpc GetMessageBackupInfo(GetBackupInfoRequest) returns (GetMessageBackupInfoResponse) {} + + // Retrieve information about the currently stored media backup + rpc GetMediaBackupInfo(GetBackupInfoRequest) returns (GetMediaBackupInfoResponse) {} + + // Permanently set the public key of an ED25519 key-pair for the backup-id. + // All requests (including this one!) must sign their BackupAuthCredential + // presentations with the private key corresponding to the provided public key. + rpc SetPublicKey(SetPublicKeyRequest) returns (SetPublicKeyResponse) {} + + // Refresh the backup, indicating that the backup is still active. Clients + // must periodically upload new backups or perform a refresh. If a backup has + // not been active for 30 days, it may be deleted. + rpc Refresh(RefreshRequest) returns (RefreshResponse) {} + + // Retrieve an upload form that can be used to perform a resumable upload + rpc GetUploadForm(GetUploadFormRequest) returns (GetUploadFormResponse) {} + + // Copy and re-encrypt media from the attachments cdn into the backup cdn. + // The original, already encrypted, attachments will be encrypted with the + // provided key material before being copied. + // + // The copy operation is not atomic and responses will be returned as copy + // operations complete with detailed information about the outcome. If an + // error is encountered, not all requests may be reflected in the responses. + // + // On retries, a particular destination media id must not be reused with a + // different source media id or different encryption parameters. + // + // The response stream may be closed with STREAM_CLOSED error reason. In this + // case, a BackupStreamClosed message will be present in the error details. + rpc CopyMedia(CopyMediaRequest) returns (stream CopyMediaResponse) {} + + // Retrieve a page of media objects stored for this backup-id. A client may + // have previously stored media objects that are no longer referenced in their + // current backup. To reclaim storage space used by these orphaned objects, + // perform a list operation and remove any unreferenced media objects + // via DeleteMedia. + rpc ListMedia(ListMediaRequest) returns (ListMediaResponse) {} + + // Delete media objects stored with this backup-id. Streams the locations of + // media items back when the item has successfully been removed. + // + // The response stream may be closed with STREAM_CLOSED error reason. In this + // case, a BackupStreamClosed message will be present in the error details. + rpc DeleteMedia(DeleteMediaRequest) returns (stream DeleteMediaResponse) {} + + // Delete all backup metadata, objects, and stored public key. To use + // backups again, a public key must be resupplied. + rpc DeleteAll(DeleteAllRequest) returns (DeleteAllResponse) {} +} + +message SignedPresentation { + // Presentation of a BackupAuthCredential previously retrieved from + // GetBackupAuthCredentials on the authenticated channel + bytes presentation = 1 [(require.nonEmpty) = true]; + + // The presentation signed with the private key corresponding to the public + // key set with SetPublicKey + bytes presentation_signature = 2 [(require.nonEmpty) = true]; +} + +message SetPublicKeyRequest { + SignedPresentation signed_presentation = 1; + + // The public key, serialized in libsignal's elliptic-curve public key format. + bytes public_key = 2 [(require.nonEmpty) = true]; +} + +message SetPublicKeyResponse { + oneof response { + // The public key was successfully set + google.protobuf.Empty success = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + // + // This may also be returned if there was an existing public key and the + // provided public key did not match. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + } +} + +message GetCdnCredentialsRequest { + SignedPresentation signed_presentation = 1; + uint32 cdn = 2; +} +message GetCdnCredentialsResponse { + message CdnCredentials { + map headers = 1; + } + oneof response { + // Headers to include with requests to the read from the backup CDN. Includes + // time limited read-only credentials. + CdnCredentials cdn_credentials = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + } +} + +message GetSvrBCredentialsRequest { + SignedPresentation signed_presentation = 1; +} + +message GetSvrBCredentialsResponse { + message SvrBCredentials { + // A username that can be presented to authenticate with SVRB + string username = 1; + + // A password that can be presented to authenticate with SVRB + string password = 2; + } + + oneof response { + SvrBCredentials svrb_credentials = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + } +} + +message GetBackupInfoRequest { + SignedPresentation signed_presentation = 1; +} +message GetMessageBackupInfoResponse { + message MessageBackupInfo { + // The base directory of your backup data on the cdn. Always non-empty, even + // if a backup has not actually been stored to the cdn. If a backup was + // previously uploaded and has not expired, it can be found in the returned + // cdn at /backup_dir/backup_name. + string backup_dir = 1; + + // The CDN type where the message backup is stored. Media may be stored + // elsewhere. + uint32 cdn = 2; + + // The location of the message backup on the cdn. Always non-empty, even + // if a backup has not actually been stored to the cdn. If a backup was + // previously uploaded and has not expired, it can be found in the returned + // cdn at /backup_dir/backup_name. + string backup_name = 3; + } + + oneof response { + MessageBackupInfo backup_info = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + } +} +message GetMediaBackupInfoResponse { + message MediaBackupInfo { + // The base directory of your backup data on the cdn. Always non-empty, even + // if no media has been stored to the cdn or the credential is for a tier + // that does not support media. + string backup_dir = 1; + + // The prefix path component for media objects on a cdn. Stored media for a + // media_id can be found at /backup_dir/media_dir/media_id, where the + // media_id is encoded in unpadded url-safe base64. Always non-empty, even + // if no media has been stored to the cdn or the credential is for a tier + // that does not support media. + string media_dir = 2; + + // The amount of space used to store media + uint64 used_space = 3; + } + + oneof response { + MediaBackupInfo backup_info = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + } +} + +message RefreshRequest { + SignedPresentation signed_presentation = 1; +} +message RefreshResponse { + oneof response { + // The backup was successfully refreshed + google.protobuf.Empty success = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + } +} + +message GetUploadFormRequest { + SignedPresentation signed_presentation = 1; + + message MessagesUploadType {} + message MediaUploadType {} + oneof upload_type { + // Retrieve an upload form that can be used to perform a resumable upload of + // a message backup. The finished upload will be available on the backup cdn. + MessagesUploadType messages = 2; + + // Retrieve an upload form for a temporary location that can be used to + // perform a resumable upload of an attachment. After uploading, the + // attachment can be copied into the backup via CopyMedia. + // + // Behaves identically to the account authenticated version at /attachments. + MediaUploadType media = 3; + } + + // The length of the attachment for the requested upload form. Uploads + // performed with this form will be limited to the provided length. + uint64 uploadLength = 4 [(require.range) = {min: 1}]; +} +message GetUploadFormResponse { + oneof response { + common.UploadForm upload_form = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + + // The request size was larger than the maximum supported upload size. The + // maximum upload size is subject to change and is governed by + // `global.attachments.maxBytes` + errors.FailedPrecondition exceeds_max_upload_length = 3 [(tag.reason) = "oversize_upload"]; + } +} + +message CopyMediaItem { + // The attachment cdn of the object to copy into the backup + uint32 source_attachment_cdn = 1 [(require.range).min = 1, (require.range).max = 3]; + + // The attachment key of the object to copy into the backup + string source_key = 2 [(require.nonEmpty) = true, (require.base64url) = true]; + + // The length of the source attachment before the encryption applied by the + // copy operation + uint64 object_length = 3; + + // media_id to copy on to the backup CDN + bytes media_id = 4 [(require.exactlySize) = 15]; + + // A 32-byte key for the MAC + bytes hmac_key = 5 [(require.exactlySize) = 32]; + + // A 32-byte encryption key for AES + bytes encryption_key = 6 [(require.exactlySize) = 32]; +} + +message CopyMediaRequest { + SignedPresentation signed_presentation = 1; + + // Items to copy + repeated CopyMediaItem items = 2 [(require.size) = {min: 1, max: 1000}]; +} + +message CopyMediaResponse { + message SourceNotFound {} + message WrongSourceLength {} + message OutOfSpace {} + message CopySuccess { + // The backup cdn where this media object is stored + uint32 cdn = 1; + } + + // The 15-byte media_id from the corresponding CopyMediaItem in the request + bytes media_id = 1; + + oneof response { + // The media item was successfully copied into the backup + CopySuccess success = 2; + + // The source object was not found + SourceNotFound source_not_found = 3 [(tag.reason) = "source_not_found"]; + + // The provided object length was incorrect + WrongSourceLength wrong_source_length = 4 [(tag.reason) = "wrong_source_length"]; + + // All media capacity has been consumed. Free some space to continue. + OutOfSpace out_of_space = 5 [(tag.reason) = "out_of_space"]; + } +} + +// The reason why a media stream RPC is being prematurely closed by the server. +message BackupStreamClosed { + oneof reason { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 1 [(tag.reason) = "failed_authentication"]; + } +} + +message ListMediaRequest { + SignedPresentation signed_presentation = 1; + + // A cursor returned by a previous call to ListMedia, absent on the first call + optional string cursor = 2; + + // If provided, the maximum number of entries to return in a page. If absent, + // a server-chosen default is used. + optional uint32 limit = 3 [(require.range) = {min: 1, max: 10000}]; +} + +message ListMediaResponse { + message ListEntry { + // The backup cdn where this media object is stored + uint32 cdn = 1; + // The media_id of the object + bytes media_id = 2; + // The length of the object in bytes + uint64 length = 3; + } + + message ListResult { + + // A page of media objects stored for this backup ID + repeated ListEntry page = 1; + + // The base directory of the backup data on the cdn. The stored media can be + // found at /backup_dir/media_dir/media_id, where the media_id is encoded with + // unpadded url-safe base64. + string backup_dir = 2; + + // The prefix path component for the media objects. The stored media for + // media_id can be found at /backup_dir/media_dir/media_id, where the media_id + // is encoded with unpadded url-safe base64. + string media_dir = 3; + + // If set, the cursor value to pass to the next list request to continue + // listing. If absent, all objects have been listed + optional string cursor = 4; + } + + oneof response { + ListResult list_result = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + } +} + +message DeleteAllRequest { + SignedPresentation signed_presentation = 1; +} +message DeleteAllResponse { + oneof response { + // The backup was successfully scheduled for deletion + google.protobuf.Empty success = 1; + + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + } +} + +message DeleteMediaItem { + // The backup cdn where this media object is stored + uint32 cdn = 1; + + // The media_id of the object to delete + bytes media_id = 2 [(require.exactlySize) = 15]; +} + +message DeleteMediaRequest { + SignedPresentation signed_presentation = 1; + + repeated DeleteMediaItem items = 2 [(require.size) = {min: 1, max: 1000}]; +} + +message DeleteMediaResponse { + DeleteMediaItem deleted_item = 1; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/call_quality.proto b/pkg/signalmeow/protobuf/org/signal/chat/call_quality.proto new file mode 100644 index 0000000..4438c5f --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/call_quality.proto @@ -0,0 +1,118 @@ +/* + * Copyright 2025 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.calling.quality; + +import "org/signal/chat/require.proto"; + +// Provides methods for submitting call quality surveys +service CallQuality { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Submits a call quality survey response. + rpc SubmitCallQualitySurvey(SubmitCallQualitySurveyRequest) returns (SubmitCallQualitySurveyResponse) {} +} + +message SubmitCallQualitySurveyRequest { + // Indicates whether the caller was generally satisfied with the quality of + // the call + bool user_satisfied = 1; + + // A list of call quality issues selected by the caller + repeated string call_quality_issues = 2; + + // A free-form description of any additional issues as written by the caller + optional string additional_issues_description = 3; + + // A URL for a set of debug logs associated with the call if the caller chose + // to submit debug logs + optional string debug_log_url = 4; + + // The time at which the call started in milliseconds since the epoch + int64 start_timestamp = 5; + + // The time at which the call ended in milliseconds since the epoch + int64 end_timestamp = 6; + + // The type of call; note that direct voice calls can become video calls and + // vice versa, and this field indicates which mode was selected at call + // initiation time. At the time of writing, expected call types are + // "direct_voice", "direct_video", "group", and "call_link". + string call_type = 7; + + // Indicates whether the call completed without error or if it terminated + // abnormally + bool success = 8; + + // A client-defined, but human-readable reason for call termination + string call_end_reason = 9; + + // The median round-trip time, measured in milliseconds, for STUN/ICE packets + // (i.e. connection maintenance and establishment) + optional float connection_rtt_median = 10; + + // The median round-trip time, measured in milliseconds, for RTP/RTCP packets + // for audio streams + optional float audio_rtt_median = 11; + + // The median round-trip time, measured in milliseconds, for RTP/RTCP packets + // for video streams + optional float video_rtt_median = 12; + + // The median jitter for audio streams, measured in milliseconds, for the + // duration of the call as measured by the client submitting the survey + optional float audio_recv_jitter_median = 13; + + // The median jitter for video streams, measured in milliseconds, for the + // duration of the call as measured by the client submitting the survey + optional float video_recv_jitter_median = 14; + + // The median jitter for audio streams, measured in milliseconds, for the + // duration of the call as measured by the remote endpoint in the call (either + // the peer of the client submitting the survey in a direct call or the SFU in + // a group call) + optional float audio_send_jitter_median = 15; + + // The median jitter for video streams, measured in milliseconds, for the + // duration of the call as measured by the remote endpoint in the call (either + // the peer of the client submitting the survey in a direct call or the SFU in + // a group call) + optional float video_send_jitter_median = 16; + + // The fraction of audio packets lost over the duration of the call as + // measured by the client submitting the survey + optional float audio_recv_packet_loss_fraction = 17; + + // The fraction of video packets lost over the duration of the call as + // measured by the client submitting the survey + optional float video_recv_packet_loss_fraction = 18; + + // The fraction of audio packets lost over the duration of the call as + // measured by the remote endpoint in the call (either the peer of the client + // submitting the survey in a direct call or the SFU in a group call) + optional float audio_send_packet_loss_fraction = 19; + + // The fraction of video packets lost over the duration of the call as + // measured by the remote endpoint in the call (either the peer of the client + // submitting the survey in a direct call or the SFU in a group call) + optional float video_send_packet_loss_fraction = 20; + + // Machine-generated telemetry from the call; this is a serialized protobuf + // entity generated (and, critically, explained to the user!) by the calling + // library + optional bytes call_telemetry = 21; + + // A hash of a call ID (shared between clients and never sent to the calling + // server) that can be used to correlate survey responses from multiple + // participants in a call + optional bytes call_id_hash = 22; +} + +message SubmitCallQualitySurveyResponse { +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/calling.proto b/pkg/signalmeow/protobuf/org/signal/chat/calling.proto new file mode 100644 index 0000000..afe6972 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/calling.proto @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.calling; + +import "org/signal/chat/require.proto"; + +// Provides methods for getting credentials and relay options for one-on-one +// calls. +service Calling { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Retrieves TURN credentials and relay options for one-on-one calls. + rpc GetCallingRelays(GetCallingRelaysRequest) returns (GetCallingRelaysResponse) {} +} + +message GetCallingRelaysRequest {} + +message GetCallingRelaysResponse { + message HostnameUrlList { + // A collection of hostname-based TURN, TURNS, or STUN URLs a client can use + // to connect to a relay. + repeated string urls = 1; + } + + message IpUrlList { + // A collection of IP-based TURN, TURNS, or STUN URLs a client can use to + // connect to a relay. + repeated string urls = 1; + + // A hostname clients must use to validate the relay's TLS certificate when + // connecting via an IP-based TURNS URL. May not be specified if `urls` + // contains no TURNS URLs. + optional string hostname = 2; + } + + message Relay { + // A username that can be presented to authenticate with a TURN server. + string username = 1; + + // A password that can be presented to authenticate with a TURN server. + string password = 2; + + // The duration, in seconds, after which the included username and password + // will no longer be valid. + uint64 credential_ttl_seconds = 3; + + // A collection of hostname-based URLs clients may use to connect to this + // relay. + optional HostnameUrlList hostname_urls = 4; + + // A collection of IP-based URLs clients may use to connect to this relay. + optional IpUrlList ip_urls = 5; + } + + // A collection of calling relays a client may use for one-on-one calls. + repeated Relay relays = 1; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto b/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto new file mode 100644 index 0000000..a3eef30 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.challenge; + +import "org/signal/chat/require.proto"; + +service Challenge { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + // Submit proof of a challenge completion + + // Some server endpoints (the "send message" endpoint, for example) may return + // a response indicating the client must complete a challenge before continuing. + // Clients may use this endpoint to provide proof of a completed challenge. + // If successful, the client may then continue their original operation. + rpc HandleChallengeResponse(AnswerChallengeRequest) returns (AnswerChallengeResponse) {} +} + +message AnswerChallengeRequest { + + message AnswerPushChallengeRequest { + // The challenge string provided to the client via a push payload + string challenge = 1 [(require.nonEmpty) = true]; + } + + message AnswerCaptchaChallengeRequest { + // A string representing a solved captcha + // Example: signal-hcaptcha.30b01b46-d8c9-4c30-bbd7-9719acfe0c10.challenge.abcdefg1345 + string captcha = 1 [(require.nonEmpty) = true]; + } + + // The opaque token id from the ChallengeRequired response returned by the + // server endpoint that requested the challenge + string token = 1 [(require.nonEmpty) = true]; + + oneof request { + AnswerPushChallengeRequest push = 2; + AnswerCaptchaChallengeRequest captcha = 3; + } + +} + +message AnswerChallengeResponse { + // Whether the challenge proof was accepted + bool success = 1; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/common.proto b/pkg/signalmeow/protobuf/org/signal/chat/common.proto new file mode 100644 index 0000000..a2cf057 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/common.proto @@ -0,0 +1,176 @@ +/* + * Copyright 2023 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.common; + +import "org/signal/chat/require.proto"; + +enum IdentityType { + IDENTITY_TYPE_UNSPECIFIED = 0; + IDENTITY_TYPE_ACI = 1; + IDENTITY_TYPE_PNI = 2; +} + +message ServiceIdentifier { + // The type of identity represented by this service identifier. + IdentityType identity_type = 1 [(require.specified) = true]; + + // The UUID of the identity represented by this service identifier. + bytes uuid = 2 [(require.exactlySize) = 16]; +} + +// All identifiers associated with an account. +message AccountIdentifiers { + // A list of service identifiers for the identified account. Always includes + // exactly one ACI service identifier and at most one PNI service identifier. + repeated ServiceIdentifier service_identifiers = 1; + + // The phone number associated with the identified account. May be empty if + // the given account does not have a phone number. + string e164 = 2 [(org.signal.chat.require.e164) = true]; + + // The username hash (if any) associated with the identified account. May be + // empty if no username is associated with the identified account. + bytes username_hash = 3 [(org.signal.chat.require.exactlySize) = 0, (org.signal.chat.require.exactlySize) = 32]; + + // The username link handle UUID associated with the identified account. + // May be empty if no username is associated with the identified account. + bytes username_link_handle = 4 [(org.signal.chat.require.exactlySize) = 0, (org.signal.chat.require.exactlySize) = 16]; +} + +message EcPreKey { + // A locally-unique identifier for this key, which will be provided by + // peers using this key to encrypt messages so the private key can be looked + // up. + int32 key_id = 1 [(require.range).min = 0]; + + // The public key, serialized in libsignal's elliptic-curve public key format. + bytes public_key = 2 [(require.nonEmpty) = true]; +} + +message EcSignedPreKey { + // A locally-unique identifier for this key, which will be provided by + // peers using this key to encrypt messages so the private key can be looked + // up. + int32 key_id = 1 [(require.range).min = 0]; + + // The public key, serialized in libsignal's elliptic-curve public key format. + bytes public_key = 2 [(require.nonEmpty) = true]; + + // A signature of the public key, verifiable with the identity key for the + // account/identity associated with this pre-key. + bytes signature = 3 [(require.nonEmpty) = true]; +} + +message KemSignedPreKey { + // An locally-unique identifier for this key, which will be provided by peers + // using this key to encrypt messages so the private key can be looked up. + int32 key_id = 1 [(require.range).min = 0]; + + // The public key, serialized in libsignal's Kyber1024 public key format. + bytes public_key = 2 [(require.nonEmpty) = true]; + + // A signature of the public key, verifiable with the identity key for the + // account/identity associated with this pre-key. + bytes signature = 3 [(require.nonEmpty) = true]; +} + +enum DeviceCapability { + DEVICE_CAPABILITY_UNSPECIFIED = 0; + DEVICE_CAPABILITY_STORAGE = 1; + DEVICE_CAPABILITY_TRANSFER = 2; + reserved 3; + reserved 4; + reserved 5; + DEVICE_CAPABILITY_ATTACHMENT_BACKFILL = 6; + DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET = 7; + DEVICE_CAPABILITY_PROFILES_V2 = 8; + DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE = 9; + DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER = 10; +} + +message ZkCredential { + /* + * Day on which this credential can be redeemed, in UTC seconds since epoch + */ + int64 redemption_time = 1; + + /* + * The ZK credential, using libsignal's serialization + */ + bytes credential = 2 [(require.nonEmpty) = true]; +} + +// An upload location and credentials which may be used to upload an object +// to an external CDN +message UploadForm { + // Indicates the CDN type. 3 indicates resumable uploads using TUS + uint32 cdn = 1; + + // The location within the specified cdn where the finished upload can be found + string key = 2; + + // A map of headers to include with all upload requests. Potentially contains + // time-limited upload credentials + map headers = 3; + + // The URL to upload to with the appropriate protocol + string signed_upload_location = 4; +} + +// An upload location, credentials, and metadata which may be used to upload an +// object to AWS S3 +message S3UploadForm { + // The S3 key (i.e. path and filename) for the uploaded file. + string key = 1; + + // A scoped credential. Includes the AWS access key, date, region targeted, + // and AWS service. + string credential = 2; + + // The type of access control for the uploaded file. + string acl = 3; + + // The algorithm used to calculate a signature on the S3 policy. + string algorithm = 4; + + // The timestamp (formatted as "yyyyMMdd'T'HHmmssX") at which the S3 policy + // and signature were generated. + string date = 5; + + // The S3 policy (as a base64-encoded JSON string) used to upload the file. + string policy = 6; + + // A digital signature (formatted as a hex string) on the S3 policy. + string signature = 7; +} + +message BadgeSvg { + // File name of the scalable vector graphic for light mode. + string light = 1; + // File name of the scalable vector graphic for dark mode. + string dark = 2; +} + +message Badge { + // An ID that uniquely identifies the badge. + string id = 1; + // The category the badge falls in ("donor" or "other"). + string category = 2; + // The badge name. + string name = 3; + // The badge description. + string description = 4; + // Different size badge SVG files. + repeated string sprites6 = 5; + // File name of the scalable vector graphic representing this badge. + string svg = 6; + // Pairs of light/dark SVG files designed for display at different sizes. + repeated BadgeSvg svgs = 7; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto b/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto new file mode 100644 index 0000000..fa9dce7 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto @@ -0,0 +1,166 @@ +/* + * Copyright 2023 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +import "org/signal/chat/require.proto"; + +package org.signal.chat.credentials; + +// Provides methods for obtaining and verifying credentials that allow an +// authenticated user to authenticate in another service or context without +// revealing their identity. +service Credentials { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Generates and returns an external service credentials for the caller. + rpc GetExternalServiceCredentials(GetExternalServiceCredentialsRequest) + returns (GetExternalServiceCredentialsResponse) {} + + // Generates a pair of delivery certificates that the holder can include to + // identify themselves to a message recipient (but not the server) in a + // sealed-sender message. + rpc GetDeliveryCertificate(GetDeliveryCertificateRequest) + returns (GetDeliveryCertificateResponse) {} + + // Generates a set of zero-knowledge credentials for various group-related + // actions. + rpc GetGroupCredentials(GetGroupCredentialsRequest) + returns (GetGroupCredentialsResponse) {} + + // Generates zero-knowledge credentials for creating call links. + rpc GetCreateCallLinkCredentials(GetCreateCallLinkCredentialsRequest) + returns (GetCreateCallLinkCredentialsResponse) {} +} + +// Provides methods for working with previously-generated credentials without +// revealing an association between the credentials and the caller's identity to +// the server. +service CredentialsAnonymous { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Given a list of secure value recovery (SVR) service credentials and a phone + // number, checks and returns which of the provided credentials were generated + // by the user with the given phone number and have not yet expired. + rpc CheckSvrCredentials(CheckSvrCredentialsRequest) + returns (CheckSvrCredentialsResponse) {} +} + +enum ExternalServiceType { + EXTERNAL_SERVICE_TYPE_UNSPECIFIED = 0; + EXTERNAL_SERVICE_TYPE_DIRECTORY = 1; + EXTERNAL_SERVICE_TYPE_PAYMENTS = 2; + EXTERNAL_SERVICE_TYPE_STORAGE = 3; + EXTERNAL_SERVICE_TYPE_SVR = 4; +} + +message GetExternalServiceCredentialsRequest { + // A service to request credentials for. + ExternalServiceType externalService = 1; +} + +message GetExternalServiceCredentialsResponse { + // A username that can be presented to authenticate with the external service. + string username = 1; + + // A password that can be presented to authenticate with the external service. + string password = 2; +} + +enum AuthCheckResult { + AUTH_CHECK_RESULT_UNSPECIFIED = 0; + // The credentials could be used to make a call to SVR service by the user + // associated with the `CheckSvrCredentialsRequest.number` phone number. + AUTH_CHECK_RESULT_MATCH = 1; + // The credentials were generated by a different user. + AUTH_CHECK_RESULT_NO_MATCH = 2; + // This status indicates that the corresponding credentials token should no longer be used. + // This may be because it has expired or invalid, but it can also mean that there is a more + // recent token in the request which should be used instead. + AUTH_CHECK_RESULT_INVALID = 3; +} + +message CheckSvrCredentialsRequest { + // A phone number in the E164 format to check the passwords against. + // Only passwords generated for the user associated with the given number will be marked as `AUTH_CHECK_RESULT_MATCH`. + string number = 1; + + // A list of credentials from previously made calls to `ExternalServiceCredentials.GetExternalServiceCredentials()` + // for `EXTERNAL_SERVICE_TYPE_SVR`. This list may contain credentials generated by different users. Up to 10 credentials + // can be checked. + repeated string passwords = 2 [(require.nonEmpty) = true, (require.size) = {max: 10}]; +} + +// For each of the credentials tokens in the `CheckSvrCredentialsRequest` contains the result of the check. +message CheckSvrCredentialsResponse { + + map matches = 1; +} + +message GetDeliveryCertificateRequest { +} + +// A pair of message delivery certificates. The response unconditionally +// includes certificates with and without the caller's phone number so the +// server never learns anything about the caller's intent to share their phone +// number with their contacts. +message GetDeliveryCertificateResponse { + // A delivery receipt that includes the caller's phone number; may be empty if + // the authenticated account does not have a phone number + bytes certificate_with_e164 = 1; + + // A delivery receipt that does not include the caller's phone number + bytes certificate_without_e164 = 2; +} + +message GetGroupCredentialsRequest { + // The earliest time for which to issue group credentials; must be aligned to + // a UTC day boundary and may be no more than one day in the past at the time + // of the call. + uint64 redemption_start_seconds = 1; + + // The latest time for which to issue group credentials; must be aligned to a + // UTC day boundary and no more than seven days in the future at the time of + // the call. + uint64 redemption_end_seconds = 2; +} + +message GetGroupCredentialsResponse { + // A zero-knowledge credential that may be redeemed at or up to one day after + // the given redemption time + message CredentialAndRedemptionTime { + bytes credential = 1; + uint64 redemption_time_seconds = 2; + } + + // A collection of credentials allowing the holder to anonymously + // authenticate themselves for group-related actions + repeated CredentialAndRedemptionTime group_credentials = 1; + + // A collection of credentials allowing the holder to read, update, and delete + // group call links + repeated CredentialAndRedemptionTime call_link_auth_credentials = 2; + + // The phone number identifier for which the included credentials were + // generated. Empty if the account does not have a phone number. + bytes pni = 3; +} + +message GetCreateCallLinkCredentialsRequest { + // A zero-knowledge credential request + bytes credential_request = 1; +} + +message GetCreateCallLinkCredentialsResponse { + // A zero-knowledge credential that may be redeemed at or up to one day after + // the given redemption time + bytes credential = 1; + + // The earliest time, in seconds since the epoch, at which the associated + // credential may be redeemed + uint64 redemption_time_seconds = 2; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/device.proto b/pkg/signalmeow/protobuf/org/signal/chat/device.proto new file mode 100644 index 0000000..06ad70d --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/device.proto @@ -0,0 +1,138 @@ +/* + * Copyright 2023 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.device; + +import "google/protobuf/empty.proto"; + +import "org/signal/chat/common.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/tag.proto"; + +// Provides methods for working with devices attached to a Signal account. +service Devices { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Returns a list of devices associated with the caller's account. + rpc GetDevices(GetDevicesRequest) returns (GetDevicesResponse) {} + + // Removes a linked device from the caller's account. + // + // Linked devices may only remove themselves. Primary devices may remove + // any device other than themselves. + rpc RemoveDevice(RemoveDeviceRequest) returns (RemoveDeviceResponse) {} + + // Sets the encrypted human-readable name for a specific devices. Primary + // devices may change the name of any device associated with their account, + // but linked devices may only change their own name. The response will + // indicate if the target device was not found. + rpc SetDeviceName(SetDeviceNameRequest) returns (SetDeviceNameResponse) {} + + // Sets the token(s) the server should use to send new message notifications + // to the authenticated device. + rpc SetPushToken(SetPushTokenRequest) returns (SetPushTokenResponse) {} + + // Removes any push tokens associated with the authenticated device. After + // calling this method, the server will assume that the authenticated device + // will periodically poll for new messages. + rpc ClearPushToken(ClearPushTokenRequest) returns (ClearPushTokenResponse) {} + + // Declares that the authenticated device supports certain features. + rpc SetCapabilities(SetCapabilitiesRequest) returns (SetCapabilitiesResponse) {} +} + +message GetDevicesRequest {} + +message GetDevicesResponse { + message LinkedDevice { + // The identifier for the device within an account. + uint32 id = 1; + + // A sequence of bytes that encodes an encrypted human-readable name for + // this device. + bytes name = 2; + + // The approximate time, in milliseconds since the epoch, at which this + // device last connected to the server. + uint64 last_seen = 3; + + // The registration ID of the given device. + uint32 registration_id = 4 [(require.range).max = 0x3fff]; + + // A sequence of bytes that encodes the time, + // in milliseconds since the epoch, at which this device was + // attached to its parent account. + bytes created_at_ciphertext = 5; + } + + // A list of devices linked to the authenticated account. + repeated LinkedDevice devices = 1; +} + +message RemoveDeviceRequest { + // The identifier for the device to remove from the authenticated account. The + // identifier must not be for the primary device. + uint32 id = 1; +} + +message SetDeviceNameRequest { + // A sequence of bytes that encodes an encrypted human-readable name for this + // device. + bytes name = 1 [(require.size) = {min: 1, max: 225}]; + + // The identifier for the device for which to set a name. + uint32 id = 2; +} + +message SetDeviceNameResponse { + oneof response { + // The device name was successfully set + google.protobuf.Empty success = 1; + + // No device with the provided identifier was found on the account + errors.NotFound target_device_not_found = 2 [(tag.reason) = "not_found"]; + } +} + +message RemoveDeviceResponse {} + +message SetPushTokenRequest { + message ApnsTokenRequest { + // A "standard" APNs device token. + string apns_token = 1 [(require.nonEmpty) = true]; + } + + message FcmTokenRequest { + // An FCM push token. + string fcm_token = 1 [(require.nonEmpty) = true]; + } + + oneof token_request { + // If present, specifies the APNs device token(s) the server will use to + // send new message notifications to the authenticated device. + ApnsTokenRequest apns_token_request = 1; + + // If present, specifies the FCM push token the server will use to send new + // message notifications to the authenticated device. + FcmTokenRequest fcm_token_request = 2; + } +} + +message SetPushTokenResponse {} + +message ClearPushTokenRequest {} + +message ClearPushTokenResponse {} + +message SetCapabilitiesRequest { + repeated common.DeviceCapability capabilities = 1; +} + +message SetCapabilitiesResponse {} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/donations.proto b/pkg/signalmeow/protobuf/org/signal/chat/donations.proto new file mode 100644 index 0000000..0ea3022 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/donations.proto @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.donations; + +import "google/protobuf/empty.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/tag.proto"; + +service Donations { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials + // to add a badge to the account. After successful redemption, profile + // responses will include the corresponding badge (if configured as visible) + // until the expiration time on the receipt. + rpc RedeemReceipt(RedeemReceiptRequest) returns (RedeemReceiptResponse) {} + + // Generate a set of anonymous, single-use, permits for use with /v1/subscription endpoints. + // + // If rate limited, reduce requested permit count and/or try again after the prescribed delay. + rpc CreateDonationPermit(CreateDonationPermitRequest) returns (CreateDonationPermitResponse) {} +} + +message RedeemReceiptRequest { + // Presentation of the ZK receipt acquired when the subscription was created + bytes receiptCredentialPresentation = 1 [(require.exactlySize) = 329]; + // If true, the corresponding badge should be visible on the profile + bool visible = 2; + // If true, and the new badge is visible, it should be the primary badge on the profile + bool primary = 3; +} + +message RedeemReceiptResponse { + oneof response { + // The receipt was successfully redeemed + google.protobuf.Empty success = 1; + // The provided presentation is invalid + errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; + // The receipt was already redeemed for a different account + errors.FailedPrecondition already_redeemed = 3 [(tag.reason) = "already_redeemed"]; + } +} + +message CreateDonationPermitRequest { + // a serialized libsignal DonationPermitRequest + bytes donation_permit_request = 1 [(require.nonEmpty) = true]; +} + +message CreateDonationPermitResponse { + // a serialized libsignal DonationPermitResponse + bytes donation_permit_response = 1; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/errors.proto b/pkg/signalmeow/protobuf/org/signal/chat/errors.proto new file mode 100644 index 0000000..356f8aa --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/errors.proto @@ -0,0 +1,34 @@ +/* + * Copyright 2025 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.errors; + +// Response message that indicates a particular resource was not found. +message NotFound {} + +// Response message that indicates that some precondition of the request was not +// met. For example, if there was a request to update foo, but foo had not been +// set, this would be an appropriate error. +message FailedPrecondition { + // An optional description indicating what precondition failed. + string description = 1; +} + +// Response message that authentication via an anonymous credential failed. +message FailedZkAuthentication { + // An optional description with additional information about the failure. + string description = 1; +} + +// Response message that indicates authorization to perform an unidentified +// operation via an endorsement or access key failed +message FailedUnidentifiedAuthorization { + // An optional description with additional information about the failure. + string description = 1; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/keys.proto b/pkg/signalmeow/protobuf/org/signal/chat/keys.proto new file mode 100644 index 0000000..ca79c7c --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/keys.proto @@ -0,0 +1,236 @@ +/* + * Copyright 2023 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.keys; + +import "google/protobuf/empty.proto"; + +import "org/signal/chat/common.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/tag.proto"; + +// Provides methods for working with pre-keys. +service Keys { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Retrieves an approximate count of the number of the various kinds of + // pre-keys stored for the authenticated device. + rpc GetPreKeyCount (GetPreKeyCountRequest) returns (GetPreKeyCountResponse) {} + + // Retrieves a set of pre-keys for establishing a session with the targeted + // device or devices. Note that callers with an unidentified access key for + // the targeted account should use the version of this method in + // `KeysAnonymous` instead. + rpc GetPreKeys(GetPreKeysRequest) returns (GetPreKeysResponse) {} + + // Uploads a new set of one-time EC pre-keys for the authenticated device, + // clearing any previously-stored pre-keys. Note that all keys submitted via + // a single call to this method _must_ have the same identity type (i.e. if + // the first key has an ACI identity type, then all other keys in the same + // stream must also have an ACI identity type). The provided list of pre-keys + // must be non-empty. + rpc SetOneTimeEcPreKeys (SetOneTimeEcPreKeysRequest) returns (SetPreKeyResponse) {} + + // Uploads a new set of one-time KEM pre-keys for the authenticated device, + // clearing any previously-stored pre-keys. Note that all keys submitted via + // a single call to this method _must_ have the same identity type (i.e. if + // the first key has an ACI identity type, then all other keys in the same + // stream must also have an ACI identity type). The provided list of pre-keys + // must be non-empty. + rpc SetOneTimeKemSignedPreKeys (SetOneTimeKemSignedPreKeysRequest) returns (SetPreKeyResponse) {} + + // Sets the signed EC pre-key for one identity (i.e. ACI or PNI) associated + // with the authenticated device. + rpc SetEcSignedPreKey (SetEcSignedPreKeyRequest) returns (SetPreKeyResponse) {} + + // Sets the last-resort KEM pre-key for one identity (i.e. ACI or PNI) + // associated with the authenticated device. + rpc SetKemLastResortPreKey (SetKemLastResortPreKeyRequest) returns (SetPreKeyResponse) {} +} + +// Provides methods for working with pre-keys using "unidentified access" +// credentials. +service KeysAnonymous { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Retrieves a set of pre-keys for establishing a session with the targeted + // device or devices. Callers must not submit any self-identifying credentials + // when calling this method and must instead present the targeted account's + // unidentified access key as an anonymous authentication mechanism. Callers + // without an unidentified access key should use the equivalent, authenticated + // method in `Keys` instead. + rpc GetPreKeys(GetPreKeysAnonymousRequest) returns (GetPreKeysAnonymousResponse) {} + + // Checks identity key fingerprints of the target accounts. + // + // Returns a stream of elements, each one representing an account that had a mismatched + // identity key fingerprint with the server and the corresponding identity key stored by the server. + rpc CheckIdentityKeys(stream CheckIdentityKeyRequest) returns (stream CheckIdentityKeyResponse) {} +} + +message GetPreKeyCountRequest { +} + +message GetPreKeyCountResponse { + // The approximate number of one-time EC pre-keys stored for the + // authenticated device and associated with the caller's ACI. + uint32 aci_ec_pre_key_count = 1; + + // The approximate number of one-time Kyber pre-keys stored for the + // authenticated device and associated with the caller's ACI. + uint32 aci_kem_pre_key_count = 2; + + // The approximate number of one-time EC pre-keys stored for the + // authenticated device and associated with the caller's PNI. 0 if + // the account does not possess a phone number. + uint32 pni_ec_pre_key_count = 3; + + // The approximate number of one-time KEM pre-keys stored for the + // authenticated device and associated with the caller's PNI. 0 if + // the account does not possess a phone number. + uint32 pni_kem_pre_key_count = 4; +} + +message GetPreKeysRequest { + // The service identifier of the account for which to retrieve pre-keys. + common.ServiceIdentifier target_identifier = 1; + + // The ID of the device associated with the targeted account for which to + // retrieve pre-keys. If not set, pre-keys are returned for all devices + // associated with the targeted account. + optional uint32 device_id = 2; +} + +message GetPreKeysAnonymousRequest { + // The request to retrieve pre-keys for a specific account/device(s). + GetPreKeysRequest request = 1; + + // A means to authorize the request. + oneof authorization { + // The unidentified access key (UAK) for the targeted account. + bytes unidentified_access_key = 2; + + // A group send endorsement token for the targeted account. + bytes group_send_token = 3; + + // The destination account allows unrestricted unidentified access + google.protobuf.Empty unrestricted_access = 4; + } +} + +message DevicePreKeyBundle { + // The EC signed pre-key associated with the targeted + // account/device/identity. + common.EcSignedPreKey ec_signed_pre_key = 1; + + // A one-time EC pre-key for the targeted account/device/identity. May not + // be set if no one-time EC pre-keys are available. + common.EcPreKey ec_one_time_pre_key = 2; + + // A one-time KEM pre-key (or a last-resort KEM pre-key) for the targeted + // account/device/identity. + common.KemSignedPreKey kem_one_time_pre_key = 3; + + // The registration ID for the targeted account/device/identity. + uint32 registration_id = 4; +} + +message AccountPreKeyBundles { + // The identity key associated with the targeted account/identity. + bytes identity_key = 1; + + // A map of device IDs to pre-key "bundles" for the targeted account. + map device_pre_keys = 2; + + // Whether the account has enabled sealed sender from anyone. Always false + // if the request was for a PNI, which does not allow any unidentified access. + bool unrestricted_unidentified_access = 3; + + // If the target supports unidentified access and has an unidentified access + // key, a fingerprint of the target's UAK. This may be used to detect a change + // in the UAK that the sender has for the target before actually sending a message. Otherwise, empty. + bytes unidentified_access_key_fingerprint = 4; +} + +message GetPreKeysResponse { + oneof response { + // The requested pre-key bundles + AccountPreKeyBundles pre_keys = 1; + + // Either the target account was not found, no active device with the given + // ID (if specified) was found on the target account. + errors.NotFound target_not_found = 2 [(tag.reason) = "not_found"]; + } +} + +message GetPreKeysAnonymousResponse { + oneof response { + // The requested pre-key bundles + AccountPreKeyBundles pre_keys = 1; + + // Either the target account was not found, no active device with the given + // ID (if specified) was found on the target account. + errors.NotFound target_not_found = 2 [(tag.reason) = "not_found"]; + + // The provided unidentified authorization credential was invalid + errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; + } +} + +message SetOneTimeEcPreKeysRequest { + // The identity type (i.e. ACI/PNI) with which the keys in this request are + // associated. + common.IdentityType identity_type = 1; + + // The unsigned EC pre-keys to be stored. + repeated common.EcPreKey pre_keys = 2 [(require.size) = {min: 1, max: 100}]; +} + +message SetOneTimeKemSignedPreKeysRequest { + // The identity type (i.e. ACI/PNI) with which the keys in this request are + // associated. + common.IdentityType identity_type = 1; + + // The KEM pre-keys to be stored. + repeated common.KemSignedPreKey pre_keys = 2 [(require.size) = {min: 1, max: 100}]; +} + +message SetEcSignedPreKeyRequest { + // The identity type (i.e. ACI/PNI) with which this key is associated. + common.IdentityType identity_type = 1; + + // The signed EC pre-key itself. + common.EcSignedPreKey signed_pre_key = 2 [(require.present) = true]; +} + +message SetKemLastResortPreKeyRequest { + // The identity type (i.e. ACI/PNI) with which this key is associated. + common.IdentityType identity_type = 1; + + // The signed KEM pre-key itself. + common.KemSignedPreKey signed_pre_key = 2 [(require.present) = true]; +} + +message SetPreKeyResponse { +} + +message CheckIdentityKeyRequest { + // The service identifier of the account for which we want to check the associated identity key fingerprint. + common.ServiceIdentifier target_identifier = 1; + // The most significant 4 bytes of the SHA-256 hash of the identity key associated with the target account/identity type. + bytes fingerprint = 2 [(require.exactlySize) = 4]; +} + +message CheckIdentityKeyResponse { + // The service identifier of the account for which there is a mismatch between the client and server identity key fingerprints. + common.ServiceIdentifier target_identifier = 1; + // The identity key that is stored by the server for the target account/identity type. + bytes identity_key = 2; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/login_purchase.proto b/pkg/signalmeow/protobuf/org/signal/chat/login_purchase.proto new file mode 100644 index 0000000..236deb5 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/login_purchase.proto @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.purchase; + +import "org/signal/chat/require.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/tag.proto"; +import "org/signal/chat/subscriptions.proto"; + +// Service for one-time purchases of logins +service LoginPurchase { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Obtain a ZK receipt credential for a completed one-time login payment. + // + // The receipt credential can then be presented at registration + rpc CreateLoginReceiptCredential(CreateLoginReceiptCredentialRequest) returns (CreateLoginReceiptCredentialResponse) {} +} + +message CreateLoginReceiptCredentialRequest { + // The payment processor. Currently, only GOOGLE_PLAY_BILLING and + // APPLE_APP_STORE are supported. + PaymentProvider processor = 1 [(require.specified) = true]; + + // The identifier of a completed purchase for a signal login within the + // payment provider + string purchase_identifier = 2 [(require.nonEmpty) = true]; + + // The receipt credential request. Subsequent retries to create a login + // credential for the same purchase_identifier must use an identical + // receipt_credential_request. + // + // Callers must validate that the generated receipt credential has the + // following properties: + // + // - Level == 300 (The login level) + // - ExpirationTime % 86400 == 0 + // - ExpirationTime == PurchaseTime + (5 * 366 * 86400) +/- (7 * 86400) + bytes receipt_credential_request = 3 [(require.nonEmpty) = true]; +} + +message CreateLoginReceiptCredentialResponse { + message CreateLoginReceiptCredentialResult { + bytes receipt_credential_response = 1; + } + + oneof response { + CreateLoginReceiptCredentialResult result = 1; + // The purchase is still pending with the payment provider. The client may retry later. + errors.FailedPrecondition payment_still_processing = 2 [(tag.reason) = "payment_still_processing"]; + // The purchase did not complete successfully. + PaymentRequired payment_required = 3 [(tag.reason) = "payment_required"]; + // The payment provider has no purchase with the provided purchase_identifier + errors.NotFound payment_not_found = 4 [(tag.reason) = "payment_not_found"]; + // The purchase was already redeemed for a receipt credential, but with a different receipt credential request + errors.FailedPrecondition receipt_already_issued = 5 [(tag.reason) = "receipt_already_issued"]; + } +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/messages.proto b/pkg/signalmeow/protobuf/org/signal/chat/messages.proto new file mode 100644 index 0000000..b6bb6a7 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/messages.proto @@ -0,0 +1,437 @@ +/* + * Copyright 2025 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.messages; + +import "google/protobuf/empty.proto"; + +import "org/signal/chat/common.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/tag.proto"; + +import "signalpb/SignalService.proto"; + +// Provides methods for sending "unsealed sender" messages. +service Messages { + + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Sends an "unsealed sender" message to all devices linked to a single + // destination account. + // + // The destination account must not be the same as the authenticated caller. + // Callers should use `SendSyncMessage` to send messages to themselves. + rpc SendMessage(SendAuthenticatedSenderMessageRequest) returns (SendMessageAuthenticatedSenderResponse) {} + + // Sends a "sync" message to all other devices linked to the authenticated + // sender's account. + rpc SendSyncMessage(SendSyncMessageRequest) returns (SendMessageAuthenticatedSenderResponse) {} + + // Retrieve messages for the authenticated device. When the caller receives + // and successfully processes a message returned in a GetMessagesResponse they + // must send a corresponding GetMessagesRequest indicating that the message + // has been processed (an ack). Acks should only be sent for messages + // delivered via the currently open RPC. + // + // Only the first GetMessagesRequest may contain request parameters that + // configure the stream. The first request must not contain an ack. + // + // The server will keep the stream open until the client disconnects. Only + // one GetMessages stream may be open per device. If a second GetMessages + // stream is opened, the server may terminate any of the streams with + // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be + // present in the error details. + rpc GetMessages(stream GetMessagesRequest) returns (stream GetMessagesResponse) {} +} + +message GetMessagesRequest { + message GetMessageOptions { + // If present and true, the server will not deliver any messages with the + // story flag set. This flag may only be set on the first GetMessagesRequest + // sent from the client to the server in an RPC stream. + bool drop_stories = 1; + } + oneof request { + // Configuration options for the message stream. Required for the first + // request of the stream, forbidden on subsequent reqeusts. + GetMessageOptions options = 1; + + // The server_guid of an envelope previously returned in a + // GetMessagesResponse that has been successfully processed by the caller. + // Forbidden on the first request of the stream, required on subsequent + // requests. + bytes server_guid_ack = 2; + } +} + +// The reason why a GetMessages RPC is being closed by the server. +message GetMessagesStreamClosed { + oneof reason { + // Another caller has opened a GetMessages stream for the same device. + google.protobuf.Empty conflicting_stream = 1; + } +} + +message GetMessagesResponse { + oneof response { + // A message. On successful receipt of an envelope the caller should ack + // the envelope by sending a GetMessagesRequest with the envelope's server + // guid. Acks should only be sent for envelopes received on the currently + // open RPC. + signalservice.Envelope envelope = 1; + + // An indicator that all outstanding messages for the device have been + // drained and acked by the client. The stream will remain open and continue + // to deliver newly arrived messages. + google.protobuf.Empty queue_empty = 2; + } +} + +// Provides methods for sending "sealed sender" messages. +service MessagesAnonymous { + + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Sends a "sealed sender" message to all devices linked to a single + // destination account. + // + // If this RPC is authorized with an unidentified access key, it will fail + // with an authorization failure if the credential is invalid OR if the + // destination account was not found. If it is authorized using a group send + // token, it will fail with an authorization failure if the credential is + // invalid and with an destination not found error if the account does not + // exist + rpc SendSingleRecipientMessage(SendSealedSenderMessageRequest) returns (SendMessageResponse) {} + + // Sends a "sealed sender" message with a common payload to all devices linked + // to multiple destination accounts. + rpc SendMultiRecipientMessage(SendMultiRecipientMessageRequest) returns (SendMultiRecipientMessageResponse) {} + + // Sends a story message to devices linked to a single destination account. + rpc SendStory(SendStoryMessageRequest) returns (SendMessageResponse) {} + + // Sends a story message with a common payload to devices linked to devices + // linked to multiple destination accounts. + rpc SendMultiRecipientStory(SendMultiRecipientStoryRequest) returns (SendMultiRecipientMessageResponse) {} +} + +message IndividualRecipientMessageBundle { + + // A message for an individual device linked to a destination account. + message Message { + + // The registration ID for the destination device. + uint32 registration_id = 1 [(require.range).max = 0x3fff]; + + // The content of the message to deliver to the destination device. + bytes payload = 2 [(require.size) = {min: 1, max: 262144}]; // 256 KiB + + // The message type of the message. If this message is part of an + // unidentified send, this must be UNIDENTIFIED_SENDER + SendMessageType type = 3; + } + + // The time, in milliseconds since the epoch, at which this message was + // originally sent from the perspective of the sender. Note that the maximum + // allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date + // for additional details and discussion. + uint64 timestamp = 1 [(require.range).min = 1, (require.range).max = 8640000000000000]; + + // A map of device IDs to individual messages. Generally, callers must include + // one message for each device linked to the destination account. In cases of + // "sync messages" where a sender is distributing information to other devices + // linked to the sender's account, senders may omit a message for the sending + // device. + map messages = 2 [(require.nonEmpty) = true]; +} + +enum SendMessageType { + UNSPECIFIED = 0; + + // A double-ratchet message represents a "normal," "unsealed-sender" message + // encrypted using the Double Ratchet within an established Signal session. + DOUBLE_RATCHET = 1; + + // A prekey message begins a new Signal session. The `content` of a prekey + // message is a superset of a double-ratchet message's `content` and + // contains the sender's identity public key and information identifying the + // pre-keys used in the message's ciphertext. + PREKEY_MESSAGE = 2; + + // A plaintext message is used solely to convey encryption error receipts + // and never contains encrypted message content. Encryption error receipts + // must be delivered in plaintext because encryption/decryption of a prior + // message failed and there is no reason to believe that + // encryption/decryption of subsequent messages with the same key material + // would succeed. + // + // Critically, plaintext messages never have "real" message content + // generated by users. Plaintext messages include sender information. + PLAINTEXT_CONTENT = 3; + + // An unidentified sender message is an encrypted message. No other + // information about the type of the encrypted message is known to the server. + // + // Unidenitfied sender messages require an unidentified access token or a + // group send endorsement token to prove the unidentified sender is authorized + // to send messages to the destination. + UNIDENTIFIED_SENDER = 4; +} + +message SendAuthenticatedSenderMessageRequest { + + // The service identifier of the account to which to deliver the message. + common.ServiceIdentifier destination = 1; + + // If true, this message will only be delivered to destination devices that + // have an active message delivery channel with a Signal server. + bool ephemeral = 2; + + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + bool urgent = 3; + + // The messages to send to the destination account. + IndividualRecipientMessageBundle messages = 4; +} + +message SendMessageAuthenticatedSenderResponse { + + // The outcome of the message delivery + oneof response { + + // The message was successfully delivered to all destination devices + google.protobuf.Empty success = 1; + + // A list of discrepancies between the destination devices identified in a + // request to send a message and the devices that are actually linked to an + // account. + MismatchedDevices mismatched_devices = 2 [(tag.reason) = "mismatched_devices"]; + + // A description of a challenge callers must complete before sending + // additional messages. + ChallengeRequired challenge_required = 3 [(tag.reason) = "challenge_required"]; + + // The destination account did not exist + errors.NotFound destination_not_found = 4 [(tag.reason) = "destination_not_found"]; + + } +} + + +message SendSyncMessageRequest { + + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + bool urgent = 1; + + // The messages to send to the destination account. + IndividualRecipientMessageBundle messages = 2; +} + +message SendSealedSenderMessageRequest { + + // The service identifier of the account to which to deliver the message. + common.ServiceIdentifier destination = 1; + + // If true, this message will only be delivered to destination devices that + // have an active message delivery channel with a Signal server. + bool ephemeral = 2; + + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + bool urgent = 3; + + // The messages to send to the destination account. + IndividualRecipientMessageBundle messages = 4; + + // A means to authorize the request. + oneof authorization { + + // The unidentified access key (UAK) for the destination account. + bytes unidentified_access_key = 5 [(require.exactlySize) = 16]; + + // A group send endorsement token for the destination account. + bytes group_send_token = 6; + + // The destination account allows unrestricted unidentified access + google.protobuf.Empty unrestricted_access = 7; + } +} + +message SendStoryMessageRequest { + + // The service identifier of the account to which to deliver the message. + common.ServiceIdentifier destination = 1; + + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + bool urgent = 2; + + // The messages to send to the destination account. + IndividualRecipientMessageBundle messages = 3; +} + +message SendMessageResponse { + + // The outcome of the message delivery + oneof response { + + // The message was successfully delivered to all destination devices + google.protobuf.Empty success = 1; + + // A list of discrepancies between the destination devices identified in a + // request to send a message and the devices that are actually linked to an + // account. + MismatchedDevices mismatched_devices = 2 [(tag.reason) = "mismatched_devices"]; + + // The provided unidentified authorization credential was invalid + errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; + + // The destination account did not exist + errors.NotFound destination_not_found = 4 [(tag.reason) = "destination_not_found"]; + + } +} + +message MultiRecipientMessage { + + // The time, in milliseconds since the epoch, at which this message was + // originally sent from the perspective of the sender. Note that the maximum + // allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date + // for additional details and discussion. + uint64 timestamp = 1 [(require.range).min = 1, (require.range).max = 8640000000000000]; + + // The serialized multi-recipient message payload. + bytes payload = 2 [(require.size).max = 762144]; // 256 KiB payload + (5000 * 100) of overhead +} + +message SendMultiRecipientMessageRequest { + + // If true, this message will only be delivered to destination devices that + // have an active message delivery channel with a Signal server. + bool ephemeral = 1; + + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + bool urgent = 2; + + // The multi-recipient message to send to all destination accounts and + // devices. + MultiRecipientMessage message = 3; + + // A group send endorsement token for the destination account. + bytes group_send_token = 4 [(require.nonEmpty) = true]; +} + +message SendMultiRecipientStoryRequest { + + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + bool urgent = 1; + + // The multi-recipient story message to send to all destination accounts and + // devices. + MultiRecipientMessage message = 2; +} + +message MultiRecipientSuccess { + // A list of destination service identifiers that could not be resolved to + // registered Signal accounts. The message in the original request was sent + // to all service identifiers/devices in the original request except for the + // destination devices associated with the service identifiers in this list. + repeated common.ServiceIdentifier unresolved_recipients = 1; +} + +message SendMultiRecipientMessageResponse { + + // The outcome of the message delivery + oneof response { + // The message was sent to at least some of the destination accounts/devices + // identified in the original request. + MultiRecipientSuccess success = 1; + + // A list of sets of discrepancies between the destination devices + // identified in a request to send a message and the devices that are + // actually linked to a destination account. + MultiRecipientMismatchedDevices mismatched_devices = 2 [(tag.reason) = "mismatched_devices"]; + + // The provided unidentified authorization credential was invalid + errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; + } +} + +message MismatchedDevices { + + // The service identifier to which the devices named in this object are + // linked. + common.ServiceIdentifier service_identifier = 1; + + // A list of device IDs that are linked to the destination account, but were + // not included in the collection of messages bound for the destination + // account. + repeated uint32 missing_devices = 2 [(require.each) = {range: {max: 0x7f}}]; + + // A list of device IDs that were included in the collection of messages bound + // for the destination account, but are not currently linked to the + // destination account. + repeated uint32 extra_devices = 3 [(require.each) = {range: {max: 0x7f}}]; + + // A list of device IDs that present in the collection of messages bound for + // the destination account and are linked to the destination account, but have + // a different registration ID than the registration ID presented by the + // sender (indicating that the destination device has likely been replaced by + // another device). + repeated uint32 stale_devices = 4 [(require.each) = {range: {max: 0x7f}}]; +} + +message MultiRecipientMismatchedDevices { + + // A list of sets of discrepancies between the destination devices identified + // in a request to send a message and the devices that are actually linked to + // a destination account. + repeated MismatchedDevices mismatched_devices = 1; +} + +message ChallengeRequired { + + enum ChallengeType { + UNSPECIFIED = 0; + + // A challenge that callers can fulfill by completing a captcha. + CAPTCHA = 1; + + // A challenge that callers can fulfill by supplying a token delivered via + // push notification. + PUSH_CHALLENGE = 2; + }; + + // An opaque token identifying this challenge request. Clients must generally + // submit this token when submitting a challenge response. + string token = 1; + + // A list of challenge types callers may choose to complete to resolve the + // challenge requirement. May be empty, in which case callers cannot resolve + // the challenge by any means other than waiting. + repeated ChallengeType challenge_options = 2; + + // A duration (in seconds) after which the challenge requirement may be + // resolved by simply waiting. May not be set if the challenge cannot be + // resolved by waiting. + optional uint64 retry_after_seconds = 3; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto b/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto new file mode 100644 index 0000000..11e53ab --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto @@ -0,0 +1,169 @@ +/* + * Copyright 2026 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.purchase; + +import "org/signal/chat/require.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/tag.proto"; +import "org/signal/chat/subscriptions.proto"; + +// Service for making one-time donation payments (boost and gift) +// +// Configuration for one-time donations can be found in ProductConfiguration. +service OneTimeDonations { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Create a Stripe payment intent and return a client secret that can be used to complete the payment. + // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials + rpc CreateBoost(CreateBoostRequest) returns (CreateBoostResponse) {} + + // Create a PayPal one-time payment. + // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token + rpc CreatePayPalBoost(CreatePayPalBoostRequest) returns (CreatePayPalBoostResponse) {} + + // Confirm a PayPal one-time payment + rpc ConfirmPayPalBoost(ConfirmPayPalBoostRequest) returns (ConfirmPayPalBoostResponse) {} + + // Obtain a ZK receipt credential for a completed one-time donation payment. + // The receipt credential can then be used to redeem the one-time donation entitlement + // via Donations.RedeemReceipt + rpc CreateBoostReceiptCredentials(CreateBoostReceiptCredentialsRequest) returns (CreateBoostReceiptCredentialsResponse) {} +} + +// The amount is below the minimum for the currency. +message AmountBelowMinimumError { + // The minimum amount for the currency + string minimum = 1; +} + +// The SEPA Direct Debit amount exceeds the allowed maximum. +message AmountAboveSepaLimitError { + // The maximum amount for a SEPA transaction + string maximum = 1; +} + +message CreateBoostRequest { + // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") + string currency = 1 [(require.exactlySize) = 3]; + // The amount to pay in the [currency's minor unit](https://docs.stripe.com/currencies#minor-units) + uint64 amount = 2 [(require.range).min = 1]; + // The level for the boost payment + uint64 level = 3 [(require.range).min = 1]; + // The payment method + PaymentMethod payment_method = 4 [(require.specified) = true]; + // A donation permit retrieved from Donations.createDonationPermit + bytes donation_permit = 5 [(require.nonEmpty) = true]; +} + +message CreateBoostResponse { + oneof response { + // A client secret that can be used to complete a stripe PaymentIntent + string client_secret = 1; + // The amount is below the minimum for the currency + AmountBelowMinimumError amount_below_minimum = 2 [(tag.reason) = "amount_below_minimum"]; + // The amount exceeds the maximum for SEPA Direct Debit + AmountAboveSepaLimitError amount_above_sepa_limit = 3 [(tag.reason) = "amount_above_sepa_limit"]; + // The requested currency is not supported for the given payment method + errors.FailedPrecondition unsupported_currency = 4 [(tag.reason) = "unsupported_currency"]; + // The requested level is not a valid one-time donation level + errors.FailedPrecondition unsupported_level = 5 [(tag.reason) = "unsupported_level"]; + // Donation permit was invalid or already spent + errors.FailedZkAuthentication permit_rejected = 6 [(tag.reason) = "permit_rejected"]; + // The amount in the specified currency is not supported by the payment provider + errors.FailedPrecondition invalid_amount = 7 [(tag.reason) = "invalid_amount"]; + } +} + +message CreatePayPalBoostRequest { + // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") + string currency = 1 [(require.exactlySize) = 3]; + // Amount in the currency's minor unit (e.g. cents for USD), must be >= 1 + uint64 amount = 2 [(require.range).min = 1]; + // Donation level. + uint64 level = 3 [(require.range).min = 1]; + // URL to redirect the user to after PayPal approval + string return_url = 4 [(require.nonEmpty) = true]; + // URL to redirect the user to if they cancel + string cancel_url = 5 [(require.nonEmpty) = true]; +} + +message CreatePayPalBoostResponse { + message CreatePayPalBoostResult { + string approval_url = 1; + string payment_id = 2; + } + oneof response { + CreatePayPalBoostResult result = 1; + // The amount is below the minimum for the currency + AmountBelowMinimumError amount_below_minimum = 2 [(tag.reason) = "amount_below_minimum"]; + // The requested currency is not supported for PayPal + errors.FailedPrecondition unsupported_currency = 3 [(tag.reason) = "unsupported_currency"]; + // The requested level is not a valid one-time donation level + errors.FailedPrecondition unsupported_level = 4 [(tag.reason) = "unsupported_level"]; + } +} + +message ConfirmPayPalBoostRequest { + // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") + string currency = 1 [(require.exactlySize) = 3]; + // Amount in the currency's minor unit, must be >= 1 + uint64 amount = 2 [(require.range).min = 1]; + // Donation level. + uint64 level = 3 [(require.range).min = 1]; + // PayPal payer ID from the approval redirect + string payer_id = 4 [(require.nonEmpty) = true]; + // PayPal payment ID (PAYID-…) from CreatePayPalBoost + string payment_id = 5 [(require.nonEmpty) = true]; + // PayPal payment token (EC-…) from the approval redirect + string payment_token = 6 [(require.nonEmpty) = true]; +} + +message ConfirmPayPalBoostResponse { + message ConfirmPayPalBoostResult { + string payment_id = 1; + } + oneof response { + ConfirmPayPalBoostResult result = 1; + // The amount is below the minimum for the currency + AmountBelowMinimumError amount_below_minimum = 2 [(tag.reason) = "amount_below_minimum"]; + // The requested currency is not supported for PayPal + errors.FailedPrecondition unsupported_currency = 3 [(tag.reason) = "unsupported_currency"]; + // The requested level is not a valid one-time donation level + errors.FailedPrecondition unsupported_level = 4 [(tag.reason) = "unsupported_level"]; + // The payment failed; see charge failure details + ChargeFailure charge_failure = 5 [(tag.reason) = "charge_failure"]; + } +} + +message CreateBoostReceiptCredentialsRequest { + // a payment ID from the processor + string payment_intent_id = 1 [(require.nonEmpty) = true]; + // ZK blind-signature receipt credential request bytes + bytes receipt_credential_request = 2 [(require.nonEmpty) = true]; + // The processor that handled the payment + PaymentProvider processor = 3 [(require.specified) = true]; +} + +message CreateBoostReceiptCredentialsResponse { + message CreateBoostReceiptCredentialsResult { + bytes receipt_credential_response = 1; + } + oneof response { + CreateBoostReceiptCredentialsResult result = 1; + // Payment is still processing; client should retry + errors.FailedPrecondition payment_still_processing = 2 [(tag.reason) = "payment_still_processing"]; + // Payment failed + PaymentRequired payment_required = 3 [(tag.reason) = "payment_required"]; + // Payment intent not found + errors.NotFound payment_not_found = 4 [(tag.reason) = "payment_not_found"]; + // A receipt credential was already issued for this payment + errors.FailedPrecondition receipt_already_issued = 5 [(tag.reason) = "receipt_already_issued"]; + } +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/payments.proto b/pkg/signalmeow/protobuf/org/signal/chat/payments.proto new file mode 100644 index 0000000..79e9455 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/payments.proto @@ -0,0 +1,37 @@ +/* + * Copyright 2023 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.payments; + +import "org/signal/chat/require.proto"; + +// Provides methods for working with payments. +service Payments { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + + rpc GetCurrencyConversions(GetCurrencyConversionsRequest) returns (GetCurrencyConversionsResponse) {} +} + +message GetCurrencyConversionsRequest { +} + +message GetCurrencyConversionsResponse { + + message CurrencyConversionEntity { + + string base = 1; + + map conversions = 2; + } + + uint64 timestamp = 1; + + repeated CurrencyConversionEntity currencies = 2; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto b/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto new file mode 100644 index 0000000..c9e894e --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto @@ -0,0 +1,95 @@ +/* + * Copyright 2026 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.purchase; + +import "org/signal/chat/require.proto"; +import "org/signal/chat/subscriptions.proto"; + +// Retrieve product metadata for one-time donations, subscriptions, and backups +service ProductConfiguration { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Returns configuration for donation subscriptions, backup subscriptions, and one-time donation ( + // "boost" and "gift") minimum and suggested amounts. Badges are referenced by ID only; resolve those + // IDs to full badge details via RemoteConfiguration.GetBadges. + rpc GetConfiguration(GetConfigurationRequest) returns (GetConfigurationResponse) {} +} + +message GetConfigurationRequest {} + +message GetConfigurationResponse { + // Map of lower-cased ISO 3 currency codes to currency-specific configuration + map currencies = 1; + // Map of numeric donation level IDs to level-specific badge configuration + map badge_levels = 2; + // Configuration for backup subscription options + BackupConfiguration backup = 3; + // Maximum value of a one-time SEPA donation + string sepa_maximum_euros = 4; + // Configuration for one-time Signal Login purchases + LoginConfiguration login = 5; +} + +message AmountList { + // NOTE: this is a string instead of a numeric type because it is intended + // for display purposes only + repeated string amounts = 1; +} + +message CurrencyConfiguration { + // Minimum one-time donation + // NOTE: this is a string instead of a numeric type because it is intended + // for display purposes only + string minimum = 1; + // Map of one-time donation level IDs to suggested amounts + map one_time = 2; + // Map of subscription level IDs to the amount charged + map subscription = 3; + // Map of backup subscription level IDs to the amount charged + map backup_subscription = 4; + repeated PaymentMethod supported_payment_methods = 5; +} + +message LevelConfiguration { + // The ID of the badge awarded at this level. Resolve to full badge details + // via RemoteConfiguration.GetBadges. + string badge_id = 1; + + // The duration for which a badge is valid. Present only for + // one-time (boost, gift) badges + optional uint64 badge_duration_seconds = 2; +} + +// Configuration for a backup level - use to present appropriate client interfaces +message BackupLevelConfiguration { + // The amount of media storage in bytes that a paying subscriber may store + uint64 storage_allowance_bytes = 1; + // The play billing productID associated with this backup level + string play_product_id = 2; + // The duration, in days, for which your backed up media is retained on the server after you stop refreshing with a paid credential + uint64 media_ttl_days = 3; +} + +message BackupConfiguration { + // A map of numeric backup level IDs to level-specific backup configuration + map levels = 1; + // The number of days of media a free tier backup user gets + uint64 free_tier_media_days = 2; +} + +// Configuration for one-time Signal Login purchases +message LoginConfiguration { + // The receipt level associated with a Signal Login purchase + uint64 level = 1; + // The play billing productID associated with a Signal Login purchase + string play_product_id = 2; + // The App Store productID associated with a Signal Login purchase + string app_store_product_id = 3; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/profile.proto b/pkg/signalmeow/protobuf/org/signal/chat/profile.proto new file mode 100644 index 0000000..78d4370 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/profile.proto @@ -0,0 +1,406 @@ +/* + * Copyright 2023 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.profile; + +import "google/protobuf/empty.proto"; + +import "org/signal/chat/common.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/tag.proto"; + +// Provides methods for working with profiles and profile-related data. +service Profile { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. + rpc SetProfile(SetProfileRequest) returns (SetProfileResponse) {} + + // Retrieves profile data. Callers with an unidentified access key for the account + // should use the version of this method in `ProfileAnonymous` instead. + rpc GetProfile(GetProfileRequest) returns (GetProfileResponse) {} + + // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous + // + // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC + rpc GetAvatarCredentials(GetAvatarCredentialsRequest) returns (GetAvatarCredentialsResponse) {} +} + +// Provides methods for working with profiles and profile-related data using "unidentified access" +// credentials. Callers must not submit any self-identifying credentials +// when calling methods in this service and must instead present the targeted account's +// unidentified access key as an anonymous authentication mechanism. Callers +// without an unidentified access key should use the equivalent, authenticated +// methods in `Profile` instead. +service ProfileAnonymous { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + + // Retrieves profile data. + rpc GetProfile(GetProfileAnonymousRequest) returns (GetProfileAnonymousResponse) {} + + // Retrieves a profile key credential. + rpc GetExpiringProfileKeyCredential(GetExpiringProfileKeyCredentialAnonymousRequest) returns (GetExpiringProfileKeyCredentialAnonymousResponse) {} + + // Returns credentials to upload a v2 avatar. After uploading the avatar, the client + // must call SetProfile with the new avatar URL in the encrypted `data`. + // + // Because avatars are uploaded anonymously, they have an expiration equal to the + // idle account expiration. Clients must periodically (recommended: every 90 days) + // call ExtendAvatarTTL to extend the TTl. + // + // Note: any existing avatar associated with these credentials will be deleted immediately + rpc GetAvatarUploadForm(GetAvatarUploadFormRequest) returns (GetAvatarUploadFormResponse) {} + + // Extends the TTL of the avatar currently associated with the request’s avatar auth credential + rpc ExtendAvatarTTL(ExtendAvatarTTLRequest) returns (ExtendAvatarTTLResponse) {} + + // Deletes the avatar currently associated with the request’s avatar auth credential. + // + // Clients must also call SetProfile to remove the avatar from the encrypted `data`. + rpc DeleteAvatar(DeleteAvatarRequest) returns (DeleteAvatarResponse) {} +} + +message SetProfileV1Request { + enum AvatarChange { + AVATAR_CHANGE_UNCHANGED = 0; + AVATAR_CHANGE_CLEAR = 1; + AVATAR_CHANGE_UPDATE = 2; + } + + // The ciphertext of a name that users must set on the profile. + bytes name = 1 [(require.exactlySize) = 81, (require.exactlySize) = 285]; + + // An enum to indicate what change, if any, is made to the avatar with this request. + AvatarChange avatar_change = 2; + + // The ciphertext of an emoji that users can set on their profile. + bytes about_emoji = 3 [(require.exactlySize) = 0, (require.exactlySize) = 60]; + + // The ciphertext of a description that users can set on their profile. + bytes about = 4 [(require.exactlySize) = 0, (require.exactlySize) = 156, (require.exactlySize) = 282, (require.exactlySize) = 540]; + + // The ciphertext of the phone-number sharing setting on the profile. 29-byte encrypted boolean. + bytes phone_number_sharing = 6 [(require.exactlySize) = 29]; +} + +message SetProfileRequest { + + // The profile version. Required. + bytes version = 1 [(require.exactlySize) = 32]; + + // The ciphertext of a serialized Profile protobuf. Required. + // 937 max length = 909 plaintext serialization + 28 bytes encryption overhead + bytes data = 2 [(require.nonEmpty) = true, (require.size).max = 937]; + + // The SHA-256 hash of the Profile ciphertext being replaced. + // This is used an optimistic lock against concurrent changes. + // + // Optional, if this is the initial request to create a version. + bytes expected_current_data_hash = 3 [(require.exactlySize) = 0, (require.exactlySize) = 32]; + + // The current profile version being updated. + // This is used as an optimistic lock against concurrent changes. + // + // Optional, if there is no current profile version for the account. + bytes expected_current_version = 4 [(require.exactlySize) = 0, (require.exactlySize) = 32]; + + // The ciphertext of the MobileCoin wallet ID on the profile. + bytes payment_address = 5 [(require.exactlySize) = 0, (require.exactlySize) = 582]; + + // A list of badge IDs associated with the profile. + repeated string badge_ids = 6; + + // The profile key commitment. Used to issue a profile key credential response. + // + // Required during the v1 -> v2 migration period. Afterwards will be optional, if this is an update to an existing version. + bytes commitment = 7 [(require.exactlySize) = 0, (require.exactlySize) = 97]; + + // An embedded v1 request. Required during the v1 -> v2 migration period. + // + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + SetProfileV1Request v1Request = 15 [(require.present) = true]; + + // next: 8 +} + +// Indicates that the account is not permitted to set a payment address, +// due to a disallowed country prefix on the account's phone number. +message PaymentsForbiddenInRegion {} + +// Indicates that the account does not have the Profiles v2 capability, which +// is required to call Profiles.SetProfile +message ProfilesV2CapabilityRequired {} + + +message SetProfileResult { + // If the request included a v1 avatar change, this field contains the policy + // and credential used by clients to upload an avatar to the CDN. + // + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + optional common.S3UploadForm v1_avatar_upload_form = 15; + + // next: 1 +} + +message SetProfileResponse { + oneof response { + SetProfileResult result = 1; + // The current data hash did not match the request's expectation, indicating + // another device on the account may have written an update the caller does not know about. + errors.FailedPrecondition expected_data_write_conflict = 2 [(tag.reason) = "expected_data_write_conflict"]; + // Payments are not permitted in the account's region, based on its phone + // number or the caller's IP address if the account does not have a phone + // number. The request should be retried without `payment_address. + PaymentsForbiddenInRegion payments_forbidden_in_region = 3 [(tag.reason) = "payments_forbidden_in_region"]; + // The current version did not match the request's expectation, indicating + // another device on the account may have created a new version the caller does not know about. + errors.FailedPrecondition expected_version_write_conflict = 4 [(tag.reason) = "expected_version_write_conflict"]; + + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + ProfilesV2CapabilityRequired profiles_v2_capability_required = 15 [(tag.reason) = "profiles_v2_capability_required"]; + + // next: 4 + } +} + +message GetProfileRequest { + // The ACI of the account for which to get profile data. + common.ServiceIdentifier account_identifier = 1 [(require.present) = true, (require.identityType) = IDENTITY_TYPE_ACI]; + // The profile version to retrieve. + bytes version = 2 [(require.exactlySize) = 32]; + + // The `etag` from the previous request for this Profile version. If + // unchanged, the response will omit `profile` and `etag_matched` will be + // `true`. + bytes etag = 3 [(require.exactlySize) = 0, (require.exactlySize) = 10]; +} + +message GetProfileAnonymousRequest { + // Contains the data necessary to request a profile. + GetProfileRequest request = 1 [(require.present) = true]; + oneof authentication { + // The unidentified access key for the targeted account. + bytes unidentified_access_key = 2 [(require.exactlySize) = 16]; + + // A group send endorsement token for the targeted account. + bytes group_send_token = 3 [(require.nonEmpty) = true]; + } +} + +message AccountInfo { + // The account identity key of the targeted account. + bytes identity_key = 1; + + // A checksum of the unidentified access key for the targeted account. + bytes unidentified_access_key_fingerprint = 2; + + // Whether the account has enabled sealed sender from anyone. + bool unrestricted_unidentified_access = 3; + + // A list of the badges ids associated with the account. Metadata to display + // badges may be obtained by cross-referencing badge ids with + // RemoteConfiguration.GetBadges. + repeated string badge_ids = 4; +} + +message ProfileResult { + // The ciphertext of the requested version of the profile + bytes data = 1; + + // The ciphertext of the MobileCoin wallet ID on the profile. + bytes payment_address = 2; + + // Information about the targeted account + AccountInfo account_info = 3; + + // An entity tag for the profile. This may be used in subsequent requests + // for this profile version to optimize bandwidth. + // + // Note that this hash will not match the expected_data_hash used on + // SetProfile for concurrency control. + // + // Clients may validate that the value has been correctly calculated by + // calculating a 10-byte truncated TupleHash256 as follows: + // + // ``` + // TupleHash256(S = "ProfileETag/v1", L = 80 bits, tuple = [ + // data, + // payment_address, + // account_info.identity_key, + // account_info.unidentified_access_key_fingerprint, + // account_info.unrestricted_unidentified_access ? 0x01 : 0x00, + // uint32BE(count(account_info.badge_ids)), + // utf8(id) for each id in sortLexAscendingByUtf8Bytes(account_info.badge_ids), + // ]) + //``` + // + // Absent/empty fields contribute an empty element (not zero bytes omitted): + // a missing payment_address is still a present, zero-length tuple element. + // + // This etag will always exclusively cover the documented fields. If fields + // are added in the future, a new etag field must be introduced. + bytes etag = 4; +} + +message LegacyProfileResult { + + // The ciphertext of the name on the profile. + bytes name = 1; + // The ciphertext of the description on the profile. + bytes about = 2; + // The ciphertext of the emoji on the profile. + bytes about_emoji = 3; + // The cdn0 path of the avatar on the profile. + string avatar = 4; + // The ciphertext of the phone-number sharing setting on the profile. + bytes phone_number_sharing = 5; + // The ciphertext of the MobileCoin wallet ID on the profile. + bytes payment_address = 6; + // Information about the targeted account + AccountInfo account_info = 7; +} + + +message GetProfileResponse { + oneof response { + // The full profile data. The current profile did not match the provided + // etag (or no etag was provided). + ProfileResult profile = 1; + + // The current profile matched the provided etag. If present, this will always be true. + bool etag_matched = 2 [(tag.reason) = "etag_match"]; + + errors.NotFound not_found = 3 [(tag.reason) = "not_found"]; + + // Will be present if there is no v2 Profile data for this version. + // + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + LegacyProfileResult legacy_profile = 15 [(tag.reason) = "legacy_profile"]; + } + // next: 4 +} + +message GetProfileAnonymousResponse { + oneof response { + // The full profile data. The current profile did not match the provided + // etag (or no etag was provided). + ProfileResult profile = 1; + + // The current profile matched the provided etag. If present, this will always be true. + bool etag_matched = 2 [(tag.reason) = "etag_match"]; + + errors.NotFound not_found = 3 [(tag.reason) = "not_found"]; + errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 4 [(tag.reason) = "failed_unidentified_authorization"]; + + // Will be present if there is no v2 Profile data for this version. + // + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + LegacyProfileResult profile_v1 = 15 [(tag.reason) = "profile_v1"]; + } + // next: 5 +} + +message GetExpiringProfileKeyCredentialRequest { + // The ACI of the account for which to get a profile key credential. + common.ServiceIdentifier account_identifier = 1 [(require.present) = true, (require.identityType) = IDENTITY_TYPE_ACI]; + // A zkgroup request for a profile key credential. + bytes credential_request = 2 [(require.nonEmpty) = true]; + // The type of credential being requested. + CredentialType credential_type = 3 [(require.specified) = true]; + // The profile version for which to generate a profile key credential. + bytes version = 4 [(require.exactlySize) = 32]; +} + +message GetExpiringProfileKeyCredentialAnonymousRequest { + // Contains the data necessary to request an expiring profile key credential. + GetExpiringProfileKeyCredentialRequest request = 1 [(require.present) = true]; + // The unidentified access key for the targeted account. + bytes unidentified_access_key = 2 [(require.exactlySize) = 16]; +} + +message GetExpiringProfileKeyCredentialResult { + // A zkgroup credential used by a client to prove that it has the profile key + // of a targeted account. + bytes profile_key_credential = 1; +} + +message GetExpiringProfileKeyCredentialAnonymousResponse { + oneof response { + GetExpiringProfileKeyCredentialResult result = 1; + errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; + errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; + } +} + +enum CredentialType { + CREDENTIAL_TYPE_UNSPECIFIED = 0; + CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY = 1; +} + +// avatar auth + +message GetAvatarCredentialsRequest { + bytes avatar_credentials_request = 1; +} + +message GetAvatarCredentialsResponse { + oneof response { + bytes avatar_credentials = 1; + + // the client must call Accounts.SetZkCredentialKey to call this method + errors.FailedPrecondition missing_zk_credential_key = 2 [(tag.reason) = "missing_zk_credential_key"]; + } +} + +message GetAvatarUploadFormRequest { + bytes avatar_credentials_presentation = 1; + + // The length of the attachment for the requested upload form. Uploads + // performed with this form will be limited to the provided length. + uint32 upload_length = 2 [(require.range) = {min: 1, max: 10485760 /* 10 MiB */}]; +} + +message GetAvatarUploadFormResponse { + oneof response { + common.S3UploadForm avatar_upload_form = 1; + + errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; + } +} + +message ExtendAvatarTTLRequest { + bytes avatar_credentials_presentation = 1; +} + +message ExtendAvatarTTLResponse { + oneof response { + // The avatar that was extended. May be used as a check against state de-synchronization. + string path = 1; + errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; + // the identity does not have an active avatar + errors.NotFound not_found = 3 [(tag.reason) = "no_active_avatar"]; + } +} + +message DeleteAvatarRequest { + bytes avatar_credentials_presentation = 1; +} + +message DeleteAvatarResponse { + oneof response { + google.protobuf.Empty success = 1; + errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; + } +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/remote_configuration.proto b/pkg/signalmeow/protobuf/org/signal/chat/remote_configuration.proto new file mode 100644 index 0000000..ffbfbcd --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/remote_configuration.proto @@ -0,0 +1,96 @@ +/* + * Copyright 2026 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.remoteconfiguration; + +import "org/signal/chat/common.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/tag.proto"; + +// Provides remote configuration applicable to the authenticated user +service RemoteConfiguration { + option (require.auth) = AUTH_ONLY_AUTHENTICATED; + + // Fetches the configuration for the authenticated user. Returned + // values are based on the authenticated account and caller's client platform, + // which is derived from the "User-Agent" header. + rpc GetConfiguration(GetConfigurationRequest) returns (GetConfigurationResponse) {} + + // Returns detailed information for all configured badges, keyed by badge ID. + // + // Badge descriptions may contain localized strings. Callers should set their + // language preferences via an "Accept-Language" header on the request + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 + // + // Callers may cache a badges result for up to 1 day before checking (via + // etag) if there are any new updates. + rpc GetBadges(GetBadgesRequest) returns (GetBadgesResponse) {} +} + +message GetConfigurationRequest { + // If present, the etag from a prior GetConfigurationResponse. If the + // provided etag matches the current configuration etag, the server may elide + // the configuration response. + bytes etag = 1; +} + +message GetConfigurationResponse { + oneof response { + // The full configuration and corresponding etag. + TaggedConfiguration tagged_configuration = 1; + + // The etag in the request matched the current configuration etag. + bool etag_matched = 2 [(tag.reason) = "etag_match"]; + } +} + +message Configuration { + // A map of namespaced configuration keys to their resolved values. All + // configuration values are represented as strings. boolean values are + // represented as the strings "true" or "false". + map configuration = 1; +} + +message TaggedConfiguration { + Configuration configuration = 1; + + // An entity tag for `configuration`. This may be supplied in a + // subsequent request to optimize bandwidth when the configuration has not + // changed. + bytes etag = 2; +} + +message GetBadgesRequest { + // If present, the etag from a prior GetBadgesResponse. If the provided etag + // matches the current badge etag, the server may elide the badge response. + bytes etag = 1; +} + +message GetBadgesResponse { + oneof response { + // The full set of badges and corresponding etag. + TaggedBadges tagged_badges = 1; + + // The etag in the request matched the current badge etag. + bool etag_matched = 2 [(tag.reason) = "etag_match"]; + } +} + +message Badges { + // A map of badge ID to the detailed information for that badge. + map badges = 1; +} + +message TaggedBadges { + Badges badges = 1; + + // An entity tag for `badges`. This may be supplied in a subsequent request + // to optimize bandwidth when the set of badges has not changed. + bytes etag = 2; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/require.proto b/pkg/signalmeow/protobuf/org/signal/chat/require.proto new file mode 100644 index 0000000..868a3fe --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/require.proto @@ -0,0 +1,258 @@ +/* + * Copyright 2023 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.require; + +import "google/protobuf/descriptor.proto"; + +extend google.protobuf.FieldOptions { + /* + * Requires a field to have content of non-zero size/length. + * Applies to both `optional` and regular fields, i.e. if the field is not set + * or has a default value, it's considered to be empty. This does not apply + * to fields that are contained in a `oneof`. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * message Data { + * string nonEmptyString = 1 [(require.nonEmpty) = true]; + * bytes nonEmptyBytes = 2 [(require.nonEmpty) = true]; + * optional string nonEmptyStringOptional = 3 [(require.nonEmpty) = true]; + * optional bytes nonEmptyBytesOptional = 4 [(require.nonEmpty) = true]; + * repeated string nonEmptyList = 5 [(require.nonEmpty) = true]; + * } + * ``` + * + * Applicable to fields of type `string`, `byte`, and `repeated` fields. + */ + optional bool nonEmpty = 70001; + + /* + * Requires a enum field to have value with an index greater than zero. + * Applies to both `optional` and regular fields, i.e. if the field is not set or has a default value, + * its index will be <= 0. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * message Data { + * Color color = 1 [(require.specified) = true]; + * } + * + * enum Color { + * COLOR_UNSPECIFIED = 0; + * COLOR_RED = 1; + * COLOR_GREEN = 2; + * COLOR_BLUE = 3; + * } + * ``` + */ + optional bool specified = 70002; + + /* + * Requires a size/length of a field to be within certain boundaries. + * Applies to both `optional` and regular fields, i.e. if the field is not set + * or has a default value, its size considered to be zero. However, if the + * field is contained in a `oneof` and is not set, this annotation does not + * apply. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * message Data { + * + * string name = 1 [(require.size) = {min: 3, max: 8}]; + * + * optional string address = 2 [(require.size) = {min: 3, max: 8}]; + * } + * ``` + * + * Applicable to fields of type `string`, `byte`, and `repeated` fields. + */ + optional SizeConstraint size = 70003; + + /* + * Requires a size/length of a field to be within certain boundaries. + * Applies to both `optional` and regular fields, i.e. if the field is not set + * or has a default value, its size considered to be zero. However, if the + * field is contained in a `oneof` and is not set, this annotation does not + * apply. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * message Data { + * + * string zip = 1 [(require.exactlySize) = 5]; + * + * optional string exactlySizeVariants = 2 [(require.exactlySize) = 2, (require.exactlySize) = 4]; + * } + * ``` + * + * Applicable to fields of type `string`, `byte`, and `repeated` fields. + */ + repeated uint32 exactlySize = 70004; + + /* + * Requires a value of a string field to be a valid E164-normalized phone number. + * If the field is `optional`, this check allows a value to be not set. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * message Data { + * string number = 1 [(require.e164)]; + * } + * ``` + */ + optional bool e164 = 70005; + + /* + * Requires an integer value to be within a certain range. The range boundaries are specified + * with the values of type `int32`, which should be enough for all practical purposes. + * + * If the field is `optional`, this check allows a value to be not set. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * message Data { + * int32 byte = 1 [(require.range) = {min: -128, max: 127}]; + * uint32 unsignedByte = 2 [(require.range).max = 255]; + * } + * ``` + */ + optional ValueRangeConstraint range = 70006; + + /* + * Require a value of a message field to be present. + * + * Applies to both `optional` and regular fields (both of which have explicit + * presence for the message type anyways). This does not apply to fields that + * are contained in a `oneof`. + * + * ``` + * import "org/signal/chat/require.proto"; + * message Data { + * message MyMessage {} + * MyMessage myMessage = 1 [(require.present) = true]; + * } + *```` + */ + optional bool present = 70007; + + /* + * Requires a value of a string field to be a valid base64 URL string. The + * string may be padded or unpadded. If the field is `optional`, this check + * allows a value to be not set. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * message Data { + * string myString = 1 [(require.base64url) = true]; + * } + * ``` + */ + optional bool base64url = 70008; + + /* + * Requires a common.ServiceIdentifier field to have its IdentityType + * be the given type (`aci` or `pni`). + * + * ``` + * import "org/signal/chat/require.proto"; + * import "org/signal/chat/common.proto"; + * + * message Data { + * common.ServiceIdentifier accountIdentifier = 1 [(require.identityType) = IDENTITY_TYPE_ACI]; + * } + * ``` + */ + optional IdentityType identityType = 70009; + + /* + * Applies element-wise constraints to the elements of a `repeated` field. + * Top-level `require.*` annotations on a `repeated` field constrain the + * collection itself (e.g. element count), `each` constrains the + * individual elements. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * message Data { + * // 1-20 username hashes, each exactly 32 bytes + * repeated bytes username_hashes = 1 [ + * (require.size) = {min: 1, max: 20}, + * (require.each) = { exactlySize: 32 } + * ]; + * } + * ``` + * + * Applicable only to `repeated` fields. + */ + optional ElementConstraint each = 70010; + + // next 70011 +} + +message ElementConstraint { + optional bool nonEmpty = 1; + optional SizeConstraint size = 2; + repeated uint32 exactlySize = 3; + optional bool e164 = 4; + optional bool base64url = 5; + optional ValueRangeConstraint range = 6; + optional IdentityType identityType = 7; + optional bool specified = 8; +} + +message SizeConstraint { + optional uint32 min = 1; + optional uint32 max = 2; +} + +message ValueRangeConstraint { + optional int64 min = 1; + optional int64 max = 2; +} + +extend google.protobuf.ServiceOptions { + /* + * Indicates that all methods in a given service require a certain kind of authentication. + * + * ``` + * import "org/signal/chat/require.proto"; + * + * service AuthService { + * option (require.auth) = AUTH_ONLY_AUTHENTICATED; + * + * rpc AuthenticatedMethod (google.protobuf.Empty) returns (google.protobuf.Empty) {} + * } + * ``` + */ + optional Auth auth = 71001; +} + +enum Auth { + AUTH_UNSPECIFIED = 0; + AUTH_ONLY_AUTHENTICATED = 1; + AUTH_ONLY_ANONYMOUS = 2; +} + +// This is duplicated from common.proto because: +// +// 1. importing would be a circular dependency +// 2. the canonical declaration belongs there +enum IdentityType { + IDENTITY_TYPE_UNSPECIFIED = 0; + IDENTITY_TYPE_ACI = 1; + IDENTITY_TYPE_PNI = 2; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto b/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto new file mode 100644 index 0000000..a820bac --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto @@ -0,0 +1,441 @@ +/* + * Copyright 2026 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.purchase; + +import "google/protobuf/empty.proto"; +import "org/signal/chat/common.proto"; +import "org/signal/chat/require.proto"; +import "org/signal/chat/errors.proto"; +import "org/signal/chat/tag.proto"; + +// Service for creating donation subscriptions +// +// Configuration for subscription levels can be found in ProductConfiguration. +service Subscriptions { + option (require.auth) = AUTH_ONLY_ANONYMOUS; + // Creates a subscriber record if it does not exist, otherwise refreshes its last access time. + + // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers + // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended + // period of time will result in the subscription being canceled. + rpc UpdateSubscriber(UpdateSubscriberRequest) returns (UpdateSubscriberResponse) {} + + // Cancels any current subscription at the end of the current subscription period. + // + // Note: Apple IAP subscriptions do not support server-side cancellation, so this method should only be called after + // cancelling a subscription from storekit to keep server data up to date. + rpc DeleteSubscriber(DeleteSubscriberRequest) returns (DeleteSubscriberResponse) {} + + // Returns a client secret that can be used to set up a new payment method with the payment processor. + rpc CreatePaymentMethod(CreatePaymentMethodRequest) returns (CreatePaymentMethodResponse) {} + + // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. + rpc CreatePayPalPaymentMethod(CreatePayPalPaymentMethodRequest) returns (CreatePayPalPaymentMethodResponse) {} + + // Sets the default payment method for a subscriber. + rpc SetDefaultPaymentMethod(SetDefaultPaymentMethodRequest) returns (SetDefaultPaymentMethodResponse) {} + + // Sets the subscription level and currency for a subscriber. + rpc SetSubscriptionLevel(SetSubscriptionLevelRequest) returns (SetSubscriptionLevelResponse) {} + + // Returns information about the current subscription associated with the provided subscriberId if one exists. + // + // Although it uses [Stripe's values](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses), + // the status field in the response is generic, with [Braintree-specific values](https://developer.paypal.com/braintree/docs/guides/recurring-billing/overview#subscription-statuses) mapped + // to Stripe's. Since we don't support trials or unpaid subscriptions, the associated statuses will never be returned + // by the API. + rpc GetSubscriptionInformation(GetSubscriptionInformationRequest) returns (GetSubscriptionInformationResponse) {} + + // Create a receipt from a valid payment invoice that can be used to obtain an entitlement + // + // This request is repeatable so long as the ReceiptCredentialRequest remains the same. Clients should use the same + // ReceiptCredentialRequest value until they attempt to redeem the resulting ReceiptCredentialPresentation. After + // this point, the ReceiptCredentialRequest MUST NOT be reused or you may not be able to redeem a valid payment + // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until + // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation + // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same + // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. + // + // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this + // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the + // latest invoice, so it will have the latest expiration possible and no entitlement time will be lost. The important + // thing is not to reuse ReceiptCredentialRequest after you have started attempting to redeem the associated + // ReceiptCredentialPresentation. Then you may produce a ReceiptCredentialPresentation for a later invoice that + // cannot be redeemed. + // + // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. + rpc GetReceiptCredentials(GetReceiptCredentialsRequest) returns (GetReceiptCredentialsResponse) {} + + // Set a token that represents an IAP subscription made with App Store/Google Play Billing. + // + // To set up an App Store subscription: + // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) + // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store + // directly via StoreKit and obtain a originalTransactionId. + // 3. Call this RPC with the originalTransactionId + // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // entitlement + // + // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. + // + // To set up a subscription with Google Play Billing: + // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) + // 2. [Create a subscription](https://developer.android.com/google/play/billing/integrate) with Google Play Billing + // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) + // the purchaseToken. + // 3. Call this RPC with the purchaseToken + // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // entitlement + // + // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling + // this method to ensure their payment is tracked. + // + // Once a purchaseToken to is posted to a subscriberId, the same subscriberId must not be used with another payment + // method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription + // associated with the old purchaseToken will be cancelled. + rpc SetIapSubscription(SetIapSubscriptionRequest) returns (SetIapSubscriptionResponse) {} + + // Returns a localized bank mandate for the specified bank transfer type + rpc GetBankMandate(GetBankMandateRequest) returns (GetBankMandateResponse) {} +} + +message UpdateSubscriberRequest { + bytes subscriber_id = 1 [(require.exactlySize) = 32]; + // A libsignal DonationPermit from rpc Donations.CreateDonationPermit. + // Not required if the subscriber already exists. + bytes donation_permit = 2; +} + +message UpdateSubscriberResponse { + oneof response { + google.protobuf.Empty success = 1; + // subscriberId authentication failure + errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 2 [(tag.reason) = "subscriber_id_mismatch"]; + // The donation permit was expired or already spent + errors.FailedZkAuthentication permit_rejected = 3 [(tag.reason) = "permit_rejected"]; + } +} + +message DeleteSubscriberRequest { + bytes subscriberId = 1 [(require.exactlySize) = 32]; +} + +message DeleteSubscriberResponse { + oneof response { + google.protobuf.Empty success = 1; + errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; + // The associated subscription is not a type that can be cancelled by the server. Cancel client-side, and then retry. + errors.FailedPrecondition cannot_cancel_subscription = 3 [(tag.reason) = "cannot_cancel_subscription"]; + } +} + +enum PaymentProvider { + PAYMENT_PROVIDER_UNKNOWN = 0; + PAYMENT_PROVIDER_STRIPE = 1; + PAYMENT_PROVIDER_BRAINTREE = 2; + PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING = 3; + PAYMENT_PROVIDER_APPLE_APP_STORE = 4; +} + +enum PaymentMethod { + PAYMENT_METHOD_UNKNOWN = 0; + // A credit card or debit card, including those from Apple Pay and Google Pay + PAYMENT_METHOD_CARD = 1; + // A SEPA debit account + PAYMENT_METHOD_SEPA_DEBIT = 2; + // An iDEAL account + PAYMENT_METHOD_IDEAL = 3; + // A PayPal account + PAYMENT_METHOD_PAYPAL = 4; + PAYMENT_METHOD_GOOGLE_PLAY_BILLING = 5; + PAYMENT_METHOD_APPLE_APP_STORE = 6; +} + +enum SubscriptionStatus { + SUBSCRIPTION_STATUS_UNKNOWN = 0; + // The subscription is in good standing and the most recent payment was successful. + SUBSCRIPTION_STATUS_ACTIVE = 1; + // Payment failed when creating the subscription, or the subscription's start date is in the future. + SUBSCRIPTION_STATUS_INCOMPLETE = 2; + // Payment on the latest renewal failed but there are processor retries left, or payment wasn't attempted. + SUBSCRIPTION_STATUS_PAST_DUE = 3; + // The subscription has been canceled. + SUBSCRIPTION_STATUS_CANCELED = 4; + // The latest renewal hasn't been paid but the subscription remains in place. + SUBSCRIPTION_STATUS_UNPAID = 5; +} + +message CreatePaymentMethodRequest { + // Only PAYMENT_METHOD_CARD, PAYMENT_METHOD_SEPA_DEBIT, and PAYMENT_METHOD_IDEAL are supported; + // other values will result in an INVALID_ARGUMENT error. + bytes subscriber_id = 1 [(require.exactlySize) = 32]; + PaymentMethod payment_method = 2 [(require.specified) = true]; + // a libsignal DonationPermit from rpc Donations.CreateDonationPermit + bytes donation_permit = 3 [(require.nonEmpty) = true]; +} + +message CreatePaymentMethodResponse { + message CreatePaymentMethodResult { + string clientSecret = 1; + PaymentProvider paymentProvider = 2; + } + + oneof response { + CreatePaymentMethodResult result = 1; + errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; + // subscriberId authentication failure + errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; + // New payment processor does not match existing processor associated with the subscription + errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; + // The donation permit was expired or already spent + errors.FailedZkAuthentication permit_rejected = 5 [(tag.reason) = "permit_rejected"]; + } +} + +message CreatePayPalPaymentMethodRequest { + bytes subscriberId = 1 [(require.exactlySize) = 32]; + // a callback URL (e.g. an in-client URL handler) for when the user approved the payment + string returnUrl = 2; + // a callback URL (e.g. an in-client URL handler) for when the user did not approve the payment + string cancelUrl = 3; +} + +message CreatePayPalPaymentMethodResponse { + message CreatePayPalPaymentMethodResult { + // a URL to open where the user may approve the payment + string approvalUrl = 1; + // an opaque PayPal payment identifier to use with SetDefaultPaymentMethodRequest + string token = 2; + } + + oneof response { + CreatePayPalPaymentMethodResult result = 1; + errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; + // subscriberId authentication failure + errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; + // New payment processor does not match existing processor associated with the subscription + errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; + } +} + +message SetDefaultPaymentMethodRequest { + message StripePaymentMethod { + string paymentMethodToken = 1 [(require.nonEmpty) = true]; + } + message BraintreePaymentMethod { + string paymentMethodToken = 1 [(require.nonEmpty) = true]; + } + message SepaPaymentMethod { + string setupIntentId = 1 [(require.nonEmpty) = true]; + } + + bytes subscriberId = 1 [(require.exactlySize) = 32]; + oneof request { + StripePaymentMethod stripe = 2; + BraintreePaymentMethod braintree = 3; + SepaPaymentMethod sepa = 4; + } +} + +message SetDefaultPaymentMethodResponse { + oneof response { + google.protobuf.Empty success = 1; + errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; + // subscriberId authentication failure + errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; + errors.FailedPrecondition payment_method_not_set_up = 4 [(tag.reason) = "payment_method_not_set_up"]; + // Payment processor does not match existing processor associated with the subscription + errors.FailedPrecondition subscription_processor_conflict = 5 [(tag.reason) = "subscription_processor_conflict"]; + } +} + +message SetSubscriptionLevelRequest { + bytes subscriberId = 1 [(require.exactlySize) = 32]; + uint64 level = 2; + string currency = 3; + string idempotencyKey = 4; +} + +// Information about a charge failure. + +// Meaningfully interpreting chargeFailure response fields requires inspecting the processor field first. +// +// For Stripe, code will be one of the [codes defined here](https://stripe.com/docs/api/charges/object#charge_object-failure_code), +// while message [may contain a further textual description](https://stripe.com/docs/api/charges/object#charge_object-failure_message). +// The outcome fields are optional, but present values will directly map to Stripe [response properties](https://stripe.com/docs/api/charges/object#charge_object-outcome-network_status) +// +// For Braintree, the outcome fields will be null. The code and message will contain one of +// - a processor decline code (as a string) in code, and associated text in message, as defined this [table](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses) +// - `gateway` in code, with a [reason](https://developer.paypal.com/braintree/articles/control-panel/transactions/gateway-rejections) in message +// - `code` = "unknown", message = "unknown" +// +// IAP payment processors will never include charge failure information, and detailed order information should be +// retrieved from the payment processor directly +message ChargeFailure { + PaymentProvider processor = 1; + // See [Stripe failure codes](https://stripe.com/docs/api/charges/object#charge_object-failure_code) or + // [Braintree decline codes](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses#decline-codes) + // depending on which processor was used + string code = 2; + // See [Stripe failure codes](https://stripe.com/docs/api/charges/object#charge_object-failure_code) or + // [Braintree decline codes](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses#decline-codes) + // depending on which processor was used + string message = 3; + // See [Outcome Network Status](https://stripe.com/docs/api/charges/object#charge_object-outcome-network_status) + optional string outcome_network_status = 4; + // See [Outcome Reason](https://stripe.com/docs/api/charges/object#charge_object-outcome-reason) + optional string outcome_reason = 5; + // See [Outcome Type](https://stripe.com/docs/api/charges/object#charge_object-outcome-type) + optional string outcome_type = 6; +} + +message PaymentRequired { + optional ChargeFailure charge_failure = 1; +} + +message SetSubscriptionLevelResponse { + message SetSubscriptionLevelResult { + uint64 level = 1; + } + + oneof response { + SetSubscriptionLevelResult success = 1; + errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; + // subscriberId authentication failure + errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; + // New payment processor does not match existing processor associated with the subscription + errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; + errors.FailedPrecondition payment_method_not_set_up = 5 [(tag.reason) = "payment_method_not_set_up"]; + // The payment processor does not support this operation + errors.FailedPrecondition unsupported_operation = 6 [(tag.reason) = "unsupported_operation"]; + // The requested level was invalid + errors.FailedPrecondition unsupported_level = 7 [(tag.reason) = "unsupported_level"]; + // The requested currency was invalid + errors.FailedPrecondition unsupported_currency = 8 [(tag.reason) = "unsupported_currency"]; + // The card could not be charged + errors.FailedPrecondition payment_requires_action = 9 [(tag.reason) = "payment_requires_action"]; + // Cannot transition from existing level to the requested level + errors.FailedPrecondition invalid_level_transition = 10 [(tag.reason) = "invalid_level_transition"]; + // The idempotency key was invalid or re-used with a modified request + errors.FailedPrecondition invalid_idempotency_key = 11 [(tag.reason) = "invalid_idempotency_key"]; + // The payment failed; see charge failure details + ChargeFailure charge_failure = 12 [(tag.reason) = "charge_failure"]; + } +} + +message SetIapSubscriptionRequest { + message AppStorePurchase { + string original_transaction_id = 1 [(require.nonEmpty) = true]; + } + message PlayBillingPurchase { + string purchase_token = 1 [(require.nonEmpty) = true]; + } + + bytes subscriberId = 1 [(require.exactlySize) = 32]; + oneof request { + AppStorePurchase app_store = 2; + PlayBillingPurchase play_billing = 3; + } +} + +message SetIapSubscriptionResponse { + message SetIapSubscriptionResult { + uint64 level = 1; + } + + oneof response { + SetIapSubscriptionResult success = 1; + errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; + // subscriberId authentication failure + errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; + // New payment processor does not match existing processor associated with the subscription + errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; + errors.FailedPrecondition payment_required = 5 [(tag.reason) = "payment_required"]; + errors.FailedPrecondition invalid_transaction = 6 [(tag.reason) = "invalid_transaction"]; + } +} + +message GetReceiptCredentialsRequest { + bytes subscriberId = 1 [(require.exactlySize) = 32]; + bytes receiptCredentialRequest = 2 [(require.exactlySize) = 97]; +} + +message GetReceiptCredentialsResponse { + message GetReceiptCredentialsResult { + bytes receiptCredentialResponse = 1; + } + + oneof response { + GetReceiptCredentialsResult success = 1; + errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; + // subscriberId authentication failure + errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; + // No invoice has been issued for this subscription OR invoice is in 'draft' or 'open' state + errors.FailedPrecondition no_paid_invoice = 4 [(tag.reason) = "no_paid_invoice"]; + // Invoice is in any state other than 'draft', 'open', or 'paid'; Charge failure details may be present + PaymentRequired payment_required = 5 [(tag.reason) = "payment_required"]; + // Latest paid receipt on subscription was already redeemed for a receipt credential but with a different GetReceiptCredentialRequest + errors.FailedPrecondition already_redeemed = 6 [(tag.reason) = "already_redeemed"]; + } +} + +message GetSubscriptionInformationRequest { + bytes subscriberId = 1 [(require.exactlySize) = 32]; +} + +message GetSubscriptionInformationResponse { + message Subscription { + // The subscription level + uint64 level = 1; + // If present, UNIX Epoch Timestamp in seconds, can be used to calculate next billing date. + optional uint64 billing_cycle_anchor = 2; + // UNIX Epoch Timestamp in seconds, when the current subscription period ends + uint64 end_of_current_period = 3; + // Whether there is a currently active subscription + bool active = 4; + // If true, an active subscription will not auto-renew at the end of the current period + bool cancel_at_period_end = 5; + // A three-letter ISO 4217 currency code for currency used in the subscription + string currency = 6; + // The amount paid for the subscription in the currency's smallest unit + uint64 amount = 7; + // The subscription's status, mapped to Stripe's statuses. trialing will never be returned + SubscriptionStatus status = 8; + // The payment provider associated with the subscription + PaymentProvider processor = 9; + // The payment method associated with the subscription + PaymentMethod payment_method = 10; + // Whether the latest charge for the subscription is in a non-terminal state + bool payment_processing = 11; + // if present, contains information that may be interpreted to help the user fix a failure + optional ChargeFailure charge_failure = 12; + } + + oneof response { + Subscription success = 1; + google.protobuf.Empty no_subscription = 2; + errors.NotFound subscriber_not_found = 3 [(tag.reason) = "subscriber_not_found"]; + // subscriberId authentication failure + errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 4 [(tag.reason) = "subscriber_id_mismatch"]; + } +} + +enum BankTransferType { + BANK_TRANSFER_TYPE_UNKNOWN = 0; + BANK_TRANSFER_TYPE_SEPA_DEBIT = 1; +} + +message GetBankMandateRequest { + BankTransferType bank_transfer_type = 1 [(require.specified) = true]; +} + +message GetBankMandateResponse { + string mandate = 1; +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/tag.proto b/pkg/signalmeow/protobuf/org/signal/chat/tag.proto new file mode 100644 index 0000000..507a805 --- /dev/null +++ b/pkg/signalmeow/protobuf/org/signal/chat/tag.proto @@ -0,0 +1,38 @@ +/* + * Copyright 2025 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only + */ + +syntax = "proto3"; + +option java_multiple_files = true; + +package org.signal.chat.tag; + +import "google/protobuf/descriptor.proto"; + +extend google.protobuf.FieldOptions { + // Indicate that a message which includes this field (directly or indirectly) + // was generated for a particular reason. + // + // ``` + // import "org/signal/chat/tag.proto" + // + // message LookupThingResponse { + // oneof response { + // string thing = 1; + // Error not_found = 2 [(tag.reason) = "not_found"]; + // Error forbidden = 3 [(tag.reason) = "forbidden"]; + // } + // } + // ``` + // + // Metrics middleware may then inspect `LookupThingResponse` and tag responses + // with the provided reason. This is useful when multiple outcomes are + // potentially represented with a status = "OK" RPC response. + // + // Valid messages should only have a single reason set. If a message has + // multiple fields present that have a reason option set, no guarantees are + // made about the reason that is selected. + optional string reason = 71000; +} diff --git a/pkg/signalmeow/protobuf/rpc/account/account.pb.go b/pkg/signalmeow/protobuf/rpc/account/account.pb.go new file mode 100644 index 0000000..9b9e4ae --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/account/account.pb.go @@ -0,0 +1,4186 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/account.proto + +package account + +import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + messages "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/messages" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetAccountIdentityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountIdentityRequest) Reset() { + *x = GetAccountIdentityRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountIdentityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountIdentityRequest) ProtoMessage() {} + +func (x *GetAccountIdentityRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountIdentityRequest.ProtoReflect.Descriptor instead. +func (*GetAccountIdentityRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{0} +} + +type GetAccountIdentityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifiers for the authenticated account. + AccountIdentifiers *common.AccountIdentifiers `protobuf:"bytes,1,opt,name=account_identifiers,json=accountIdentifiers,proto3" json:"account_identifiers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountIdentityResponse) Reset() { + *x = GetAccountIdentityResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountIdentityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountIdentityResponse) ProtoMessage() {} + +func (x *GetAccountIdentityResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountIdentityResponse.ProtoReflect.Descriptor instead. +func (*GetAccountIdentityResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{1} +} + +func (x *GetAccountIdentityResponse) GetAccountIdentifiers() *common.AccountIdentifiers { + if x != nil { + return x.AccountIdentifiers + } + return nil +} + +type GetEntitlementsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetEntitlementsRequest) Reset() { + *x = GetEntitlementsRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetEntitlementsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEntitlementsRequest) ProtoMessage() {} + +func (x *GetEntitlementsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEntitlementsRequest.ProtoReflect.Descriptor instead. +func (*GetEntitlementsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{2} +} + +type GetEntitlementsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Active badges added via Donations.redeemReceipt + Badges []*GetEntitlementsResponse_BadgeEntitlement `protobuf:"bytes,1,rep,name=badges,proto3" json:"badges,omitempty"` + // If present, the backup level set via Backups.redeemReceipt + Backup *GetEntitlementsResponse_BackupEntitlement `protobuf:"bytes,2,opt,name=backup,proto3" json:"backup,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetEntitlementsResponse) Reset() { + *x = GetEntitlementsResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetEntitlementsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEntitlementsResponse) ProtoMessage() {} + +func (x *GetEntitlementsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEntitlementsResponse.ProtoReflect.Descriptor instead. +func (*GetEntitlementsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{3} +} + +func (x *GetEntitlementsResponse) GetBadges() []*GetEntitlementsResponse_BadgeEntitlement { + if x != nil { + return x.Badges + } + return nil +} + +func (x *GetEntitlementsResponse) GetBackup() *GetEntitlementsResponse_BackupEntitlement { + if x != nil { + return x.Backup + } + return nil +} + +type DeleteAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAccountRequest) Reset() { + *x = DeleteAccountRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountRequest) ProtoMessage() {} + +func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAccountRequest.ProtoReflect.Descriptor instead. +func (*DeleteAccountRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{4} +} + +type DeleteAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAccountResponse) Reset() { + *x = DeleteAccountResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountResponse) ProtoMessage() {} + +func (x *DeleteAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAccountResponse.ProtoReflect.Descriptor instead. +func (*DeleteAccountResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{5} +} + +type SetRegistrationLockRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The new registration lock secret for the authenticated account. + RegistrationLock []byte `protobuf:"bytes,1,opt,name=registration_lock,json=registrationLock,proto3" json:"registration_lock,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetRegistrationLockRequest) Reset() { + *x = SetRegistrationLockRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetRegistrationLockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRegistrationLockRequest) ProtoMessage() {} + +func (x *SetRegistrationLockRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRegistrationLockRequest.ProtoReflect.Descriptor instead. +func (*SetRegistrationLockRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{6} +} + +func (x *SetRegistrationLockRequest) GetRegistrationLock() []byte { + if x != nil { + return x.RegistrationLock + } + return nil +} + +type SetRegistrationLockResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetRegistrationLockResponse) Reset() { + *x = SetRegistrationLockResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetRegistrationLockResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRegistrationLockResponse) ProtoMessage() {} + +func (x *SetRegistrationLockResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRegistrationLockResponse.ProtoReflect.Descriptor instead. +func (*SetRegistrationLockResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{7} +} + +type ClearRegistrationLockRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClearRegistrationLockRequest) Reset() { + *x = ClearRegistrationLockRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClearRegistrationLockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClearRegistrationLockRequest) ProtoMessage() {} + +func (x *ClearRegistrationLockRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClearRegistrationLockRequest.ProtoReflect.Descriptor instead. +func (*ClearRegistrationLockRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{8} +} + +type ClearRegistrationLockResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClearRegistrationLockResponse) Reset() { + *x = ClearRegistrationLockResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClearRegistrationLockResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClearRegistrationLockResponse) ProtoMessage() {} + +func (x *ClearRegistrationLockResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClearRegistrationLockResponse.ProtoReflect.Descriptor instead. +func (*ClearRegistrationLockResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{9} +} + +type ReserveUsernameHashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A prioritized list of username hashes to attempt to reserve. + UsernameHashes [][]byte `protobuf:"bytes,1,rep,name=username_hashes,json=usernameHashes,proto3" json:"username_hashes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReserveUsernameHashRequest) Reset() { + *x = ReserveUsernameHashRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReserveUsernameHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReserveUsernameHashRequest) ProtoMessage() {} + +func (x *ReserveUsernameHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReserveUsernameHashRequest.ProtoReflect.Descriptor instead. +func (*ReserveUsernameHashRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{10} +} + +func (x *ReserveUsernameHashRequest) GetUsernameHashes() [][]byte { + if x != nil { + return x.UsernameHashes + } + return nil +} + +type UsernameNotAvailable struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UsernameNotAvailable) Reset() { + *x = UsernameNotAvailable{} + mi := &file_org_signal_chat_account_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UsernameNotAvailable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UsernameNotAvailable) ProtoMessage() {} + +func (x *UsernameNotAvailable) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UsernameNotAvailable.ProtoReflect.Descriptor instead. +func (*UsernameNotAvailable) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{11} +} + +type ReserveUsernameHashResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *ReserveUsernameHashResponse_UsernameHash + // *ReserveUsernameHashResponse_UsernameNotAvailable + Response isReserveUsernameHashResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReserveUsernameHashResponse) Reset() { + *x = ReserveUsernameHashResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReserveUsernameHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReserveUsernameHashResponse) ProtoMessage() {} + +func (x *ReserveUsernameHashResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReserveUsernameHashResponse.ProtoReflect.Descriptor instead. +func (*ReserveUsernameHashResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{12} +} + +func (x *ReserveUsernameHashResponse) GetResponse() isReserveUsernameHashResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *ReserveUsernameHashResponse) GetUsernameHash() []byte { + if x != nil { + if x, ok := x.Response.(*ReserveUsernameHashResponse_UsernameHash); ok { + return x.UsernameHash + } + } + return nil +} + +func (x *ReserveUsernameHashResponse) GetUsernameNotAvailable() *UsernameNotAvailable { + if x != nil { + if x, ok := x.Response.(*ReserveUsernameHashResponse_UsernameNotAvailable); ok { + return x.UsernameNotAvailable + } + } + return nil +} + +type isReserveUsernameHashResponse_Response interface { + isReserveUsernameHashResponse_Response() +} + +type ReserveUsernameHashResponse_UsernameHash struct { + // The first username hash that was available (and actually reserved). + UsernameHash []byte `protobuf:"bytes,1,opt,name=username_hash,json=usernameHash,proto3,oneof"` +} + +type ReserveUsernameHashResponse_UsernameNotAvailable struct { + // Indicates that, of all of the candidate hashes provided, none were + // available. Callers may generate a new set of hashes and and retry. + UsernameNotAvailable *UsernameNotAvailable `protobuf:"bytes,2,opt,name=username_not_available,json=usernameNotAvailable,proto3,oneof"` +} + +func (*ReserveUsernameHashResponse_UsernameHash) isReserveUsernameHashResponse_Response() {} + +func (*ReserveUsernameHashResponse_UsernameNotAvailable) isReserveUsernameHashResponse_Response() {} + +type ConfirmUsernameHashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The username hash to claim for the authenticated account. + UsernameHash []byte `protobuf:"bytes,1,opt,name=username_hash,json=usernameHash,proto3" json:"username_hash,omitempty"` + // A zero-knowledge proof that the given username hash was generated by the + // Signal username algorithm. + ZkProof []byte `protobuf:"bytes,2,opt,name=zk_proof,json=zkProof,proto3" json:"zk_proof,omitempty"` + // The ciphertext of the chosen username for use in public-facing contexts + // (e.g. links and QR codes). + UsernameCiphertext []byte `protobuf:"bytes,3,opt,name=username_ciphertext,json=usernameCiphertext,proto3" json:"username_ciphertext,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmUsernameHashRequest) Reset() { + *x = ConfirmUsernameHashRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmUsernameHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmUsernameHashRequest) ProtoMessage() {} + +func (x *ConfirmUsernameHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmUsernameHashRequest.ProtoReflect.Descriptor instead. +func (*ConfirmUsernameHashRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{13} +} + +func (x *ConfirmUsernameHashRequest) GetUsernameHash() []byte { + if x != nil { + return x.UsernameHash + } + return nil +} + +func (x *ConfirmUsernameHashRequest) GetZkProof() []byte { + if x != nil { + return x.ZkProof + } + return nil +} + +func (x *ConfirmUsernameHashRequest) GetUsernameCiphertext() []byte { + if x != nil { + return x.UsernameCiphertext + } + return nil +} + +type ConfirmUsernameHashResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *ConfirmUsernameHashResponse_ConfirmedUsernameHash_ + // *ConfirmUsernameHashResponse_ReservationNotFound + // *ConfirmUsernameHashResponse_UsernameNotAvailable + Response isConfirmUsernameHashResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmUsernameHashResponse) Reset() { + *x = ConfirmUsernameHashResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmUsernameHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmUsernameHashResponse) ProtoMessage() {} + +func (x *ConfirmUsernameHashResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmUsernameHashResponse.ProtoReflect.Descriptor instead. +func (*ConfirmUsernameHashResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{14} +} + +func (x *ConfirmUsernameHashResponse) GetResponse() isConfirmUsernameHashResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *ConfirmUsernameHashResponse) GetConfirmedUsernameHash() *ConfirmUsernameHashResponse_ConfirmedUsernameHash { + if x != nil { + if x, ok := x.Response.(*ConfirmUsernameHashResponse_ConfirmedUsernameHash_); ok { + return x.ConfirmedUsernameHash + } + } + return nil +} + +func (x *ConfirmUsernameHashResponse) GetReservationNotFound() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ConfirmUsernameHashResponse_ReservationNotFound); ok { + return x.ReservationNotFound + } + } + return nil +} + +func (x *ConfirmUsernameHashResponse) GetUsernameNotAvailable() *UsernameNotAvailable { + if x != nil { + if x, ok := x.Response.(*ConfirmUsernameHashResponse_UsernameNotAvailable); ok { + return x.UsernameNotAvailable + } + } + return nil +} + +type isConfirmUsernameHashResponse_Response interface { + isConfirmUsernameHashResponse_Response() +} + +type ConfirmUsernameHashResponse_ConfirmedUsernameHash_ struct { + // The details of the successfully confirmed username. + ConfirmedUsernameHash *ConfirmUsernameHashResponse_ConfirmedUsernameHash `protobuf:"bytes,1,opt,name=confirmed_username_hash,json=confirmedUsernameHash,proto3,oneof"` +} + +type ConfirmUsernameHashResponse_ReservationNotFound struct { + // The provided hash was not reserved for the account. + ReservationNotFound *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=reservation_not_found,json=reservationNotFound,proto3,oneof"` +} + +type ConfirmUsernameHashResponse_UsernameNotAvailable struct { + // The reservation has lapsed and the requested username has been claimed by + // another caller. + UsernameNotAvailable *UsernameNotAvailable `protobuf:"bytes,3,opt,name=username_not_available,json=usernameNotAvailable,proto3,oneof"` +} + +func (*ConfirmUsernameHashResponse_ConfirmedUsernameHash_) isConfirmUsernameHashResponse_Response() {} + +func (*ConfirmUsernameHashResponse_ReservationNotFound) isConfirmUsernameHashResponse_Response() {} + +func (*ConfirmUsernameHashResponse_UsernameNotAvailable) isConfirmUsernameHashResponse_Response() {} + +type DeleteUsernameHashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteUsernameHashRequest) Reset() { + *x = DeleteUsernameHashRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteUsernameHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUsernameHashRequest) ProtoMessage() {} + +func (x *DeleteUsernameHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteUsernameHashRequest.ProtoReflect.Descriptor instead. +func (*DeleteUsernameHashRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{15} +} + +type DeleteUsernameHashResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteUsernameHashResponse) Reset() { + *x = DeleteUsernameHashResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteUsernameHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUsernameHashResponse) ProtoMessage() {} + +func (x *DeleteUsernameHashResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteUsernameHashResponse.ProtoReflect.Descriptor instead. +func (*DeleteUsernameHashResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{16} +} + +type SetUsernameLinkRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The username ciphertext for which to generate a new link handle. + UsernameCiphertext []byte `protobuf:"bytes,1,opt,name=username_ciphertext,json=usernameCiphertext,proto3" json:"username_ciphertext,omitempty"` + // If true and the account already had an encrypted username stored, the + // existing link handle will be reused. Otherwise a new link handle will be + // created. + KeepLinkHandle bool `protobuf:"varint,2,opt,name=keep_link_handle,json=keepLinkHandle,proto3" json:"keep_link_handle,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetUsernameLinkRequest) Reset() { + *x = SetUsernameLinkRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetUsernameLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetUsernameLinkRequest) ProtoMessage() {} + +func (x *SetUsernameLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetUsernameLinkRequest.ProtoReflect.Descriptor instead. +func (*SetUsernameLinkRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{17} +} + +func (x *SetUsernameLinkRequest) GetUsernameCiphertext() []byte { + if x != nil { + return x.UsernameCiphertext + } + return nil +} + +func (x *SetUsernameLinkRequest) GetKeepLinkHandle() bool { + if x != nil { + return x.KeepLinkHandle + } + return false +} + +type SetUsernameLinkResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SetUsernameLinkResponse_UsernameLinkHandle + // *SetUsernameLinkResponse_NoUsernameSet + Response isSetUsernameLinkResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetUsernameLinkResponse) Reset() { + *x = SetUsernameLinkResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetUsernameLinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetUsernameLinkResponse) ProtoMessage() {} + +func (x *SetUsernameLinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetUsernameLinkResponse.ProtoReflect.Descriptor instead. +func (*SetUsernameLinkResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{18} +} + +func (x *SetUsernameLinkResponse) GetResponse() isSetUsernameLinkResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SetUsernameLinkResponse) GetUsernameLinkHandle() []byte { + if x != nil { + if x, ok := x.Response.(*SetUsernameLinkResponse_UsernameLinkHandle); ok { + return x.UsernameLinkHandle + } + } + return nil +} + +func (x *SetUsernameLinkResponse) GetNoUsernameSet() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetUsernameLinkResponse_NoUsernameSet); ok { + return x.NoUsernameSet + } + } + return nil +} + +type isSetUsernameLinkResponse_Response interface { + isSetUsernameLinkResponse_Response() +} + +type SetUsernameLinkResponse_UsernameLinkHandle struct { + // A new link handle for the given username ciphertext. + UsernameLinkHandle []byte `protobuf:"bytes,1,opt,name=username_link_handle,json=usernameLinkHandle,proto3,oneof"` +} + +type SetUsernameLinkResponse_NoUsernameSet struct { + // The authenticated account did not have a username set. + NoUsernameSet *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=no_username_set,json=noUsernameSet,proto3,oneof"` +} + +func (*SetUsernameLinkResponse_UsernameLinkHandle) isSetUsernameLinkResponse_Response() {} + +func (*SetUsernameLinkResponse_NoUsernameSet) isSetUsernameLinkResponse_Response() {} + +type DeleteUsernameLinkRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteUsernameLinkRequest) Reset() { + *x = DeleteUsernameLinkRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteUsernameLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUsernameLinkRequest) ProtoMessage() {} + +func (x *DeleteUsernameLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteUsernameLinkRequest.ProtoReflect.Descriptor instead. +func (*DeleteUsernameLinkRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{19} +} + +type DeleteUsernameLinkResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteUsernameLinkResponse) Reset() { + *x = DeleteUsernameLinkResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteUsernameLinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUsernameLinkResponse) ProtoMessage() {} + +func (x *DeleteUsernameLinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteUsernameLinkResponse.ProtoReflect.Descriptor instead. +func (*DeleteUsernameLinkResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{20} +} + +type ConfigureUnidentifiedAccessRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Configuration: + // + // *ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey + // *ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess + Configuration isConfigureUnidentifiedAccessRequest_Configuration `protobuf_oneof:"configuration"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfigureUnidentifiedAccessRequest) Reset() { + *x = ConfigureUnidentifiedAccessRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfigureUnidentifiedAccessRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigureUnidentifiedAccessRequest) ProtoMessage() {} + +func (x *ConfigureUnidentifiedAccessRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigureUnidentifiedAccessRequest.ProtoReflect.Descriptor instead. +func (*ConfigureUnidentifiedAccessRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{21} +} + +func (x *ConfigureUnidentifiedAccessRequest) GetConfiguration() isConfigureUnidentifiedAccessRequest_Configuration { + if x != nil { + return x.Configuration + } + return nil +} + +func (x *ConfigureUnidentifiedAccessRequest) GetUnidentifiedAccessKey() []byte { + if x != nil { + if x, ok := x.Configuration.(*ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey); ok { + return x.UnidentifiedAccessKey + } + } + return nil +} + +func (x *ConfigureUnidentifiedAccessRequest) GetAllowUnrestrictedUnidentifiedAccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Configuration.(*ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess); ok { + return x.AllowUnrestrictedUnidentifiedAccess + } + } + return nil +} + +type isConfigureUnidentifiedAccessRequest_Configuration interface { + isConfigureUnidentifiedAccessRequest_Configuration() +} + +type ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey struct { + // The key that other users must provide to interact with this account + // anonymously (i.e. to retrieve keys or profiles or to send messages) unless + // unrestricted unidentified access is permitted. Must be present if + // unrestricted unidentified access is not allowed. + UnidentifiedAccessKey []byte `protobuf:"bytes,1,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` +} + +type ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess struct { + // If set, any user may interact with this account anonymously without + // providing an unidentified access key. Otherwise, users must provide the + // given unidentified access key to interact with this account anonymously. + // Setting unrestricted unidentified access will clear any existing + // unidentified_access_key + AllowUnrestrictedUnidentifiedAccess *emptypb.Empty `protobuf:"bytes,2,opt,name=allow_unrestricted_unidentified_access,json=allowUnrestrictedUnidentifiedAccess,proto3,oneof"` +} + +func (*ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey) isConfigureUnidentifiedAccessRequest_Configuration() { +} + +func (*ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess) isConfigureUnidentifiedAccessRequest_Configuration() { +} + +type ConfigureUnidentifiedAccessResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfigureUnidentifiedAccessResponse) Reset() { + *x = ConfigureUnidentifiedAccessResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfigureUnidentifiedAccessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigureUnidentifiedAccessResponse) ProtoMessage() {} + +func (x *ConfigureUnidentifiedAccessResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigureUnidentifiedAccessResponse.ProtoReflect.Descriptor instead. +func (*ConfigureUnidentifiedAccessResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{22} +} + +type SetDiscoverableByPhoneNumberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If true, the authenticated account may be discovered by phone number via + // the Contact Discovery Service (CDS). Otherwise, other users must discover + // this account by other means (i.e. by username). + DiscoverableByPhoneNumber bool `protobuf:"varint,1,opt,name=discoverable_by_phone_number,json=discoverableByPhoneNumber,proto3" json:"discoverable_by_phone_number,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDiscoverableByPhoneNumberRequest) Reset() { + *x = SetDiscoverableByPhoneNumberRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDiscoverableByPhoneNumberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDiscoverableByPhoneNumberRequest) ProtoMessage() {} + +func (x *SetDiscoverableByPhoneNumberRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDiscoverableByPhoneNumberRequest.ProtoReflect.Descriptor instead. +func (*SetDiscoverableByPhoneNumberRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{23} +} + +func (x *SetDiscoverableByPhoneNumberRequest) GetDiscoverableByPhoneNumber() bool { + if x != nil { + return x.DiscoverableByPhoneNumber + } + return false +} + +type SetDiscoverableByPhoneNumberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDiscoverableByPhoneNumberResponse) Reset() { + *x = SetDiscoverableByPhoneNumberResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDiscoverableByPhoneNumberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDiscoverableByPhoneNumberResponse) ProtoMessage() {} + +func (x *SetDiscoverableByPhoneNumberResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDiscoverableByPhoneNumberResponse.ProtoReflect.Descriptor instead. +func (*SetDiscoverableByPhoneNumberResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{24} +} + +type SetRegistrationRecoveryPasswordRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The new registration recovery password for the authenticated account. + RegistrationRecoveryPassword []byte `protobuf:"bytes,1,opt,name=registration_recovery_password,json=registrationRecoveryPassword,proto3" json:"registration_recovery_password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetRegistrationRecoveryPasswordRequest) Reset() { + *x = SetRegistrationRecoveryPasswordRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetRegistrationRecoveryPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRegistrationRecoveryPasswordRequest) ProtoMessage() {} + +func (x *SetRegistrationRecoveryPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRegistrationRecoveryPasswordRequest.ProtoReflect.Descriptor instead. +func (*SetRegistrationRecoveryPasswordRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{25} +} + +func (x *SetRegistrationRecoveryPasswordRequest) GetRegistrationRecoveryPassword() []byte { + if x != nil { + return x.RegistrationRecoveryPassword + } + return nil +} + +type SetRegistrationRecoveryPasswordResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetRegistrationRecoveryPasswordResponse) Reset() { + *x = SetRegistrationRecoveryPasswordResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetRegistrationRecoveryPasswordResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRegistrationRecoveryPasswordResponse) ProtoMessage() {} + +func (x *SetRegistrationRecoveryPasswordResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRegistrationRecoveryPasswordResponse.ProtoReflect.Descriptor instead. +func (*SetRegistrationRecoveryPasswordResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{26} +} + +type CheckAccountExistenceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier of an account that may or may not exist. + ServiceIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3" json:"service_identifier,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckAccountExistenceRequest) Reset() { + *x = CheckAccountExistenceRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckAccountExistenceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckAccountExistenceRequest) ProtoMessage() {} + +func (x *CheckAccountExistenceRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckAccountExistenceRequest.ProtoReflect.Descriptor instead. +func (*CheckAccountExistenceRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{27} +} + +func (x *CheckAccountExistenceRequest) GetServiceIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.ServiceIdentifier + } + return nil +} + +type CheckAccountExistenceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // True if an account exists with the given service identifier or false if no + // account was found. + AccountExists bool `protobuf:"varint,1,opt,name=account_exists,json=accountExists,proto3" json:"account_exists,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckAccountExistenceResponse) Reset() { + *x = CheckAccountExistenceResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckAccountExistenceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckAccountExistenceResponse) ProtoMessage() {} + +func (x *CheckAccountExistenceResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckAccountExistenceResponse.ProtoReflect.Descriptor instead. +func (*CheckAccountExistenceResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{28} +} + +func (x *CheckAccountExistenceResponse) GetAccountExists() bool { + if x != nil { + return x.AccountExists + } + return false +} + +type LookupUsernameHashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A 32-byte username hash for which to find an account. + UsernameHash []byte `protobuf:"bytes,1,opt,name=username_hash,json=usernameHash,proto3" json:"username_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LookupUsernameHashRequest) Reset() { + *x = LookupUsernameHashRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LookupUsernameHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupUsernameHashRequest) ProtoMessage() {} + +func (x *LookupUsernameHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupUsernameHashRequest.ProtoReflect.Descriptor instead. +func (*LookupUsernameHashRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{29} +} + +func (x *LookupUsernameHashRequest) GetUsernameHash() []byte { + if x != nil { + return x.UsernameHash + } + return nil +} + +type LookupUsernameHashResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *LookupUsernameHashResponse_ServiceIdentifier + // *LookupUsernameHashResponse_NotFound + Response isLookupUsernameHashResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LookupUsernameHashResponse) Reset() { + *x = LookupUsernameHashResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LookupUsernameHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupUsernameHashResponse) ProtoMessage() {} + +func (x *LookupUsernameHashResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupUsernameHashResponse.ProtoReflect.Descriptor instead. +func (*LookupUsernameHashResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{30} +} + +func (x *LookupUsernameHashResponse) GetResponse() isLookupUsernameHashResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *LookupUsernameHashResponse) GetServiceIdentifier() *common.ServiceIdentifier { + if x != nil { + if x, ok := x.Response.(*LookupUsernameHashResponse_ServiceIdentifier); ok { + return x.ServiceIdentifier + } + } + return nil +} + +func (x *LookupUsernameHashResponse) GetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*LookupUsernameHashResponse_NotFound); ok { + return x.NotFound + } + } + return nil +} + +type isLookupUsernameHashResponse_Response interface { + isLookupUsernameHashResponse_Response() +} + +type LookupUsernameHashResponse_ServiceIdentifier struct { + // The service identifier associated with the provided username hash. + ServiceIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3,oneof"` +} + +type LookupUsernameHashResponse_NotFound struct { + // No account was found for the provided username hash. + NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` +} + +func (*LookupUsernameHashResponse_ServiceIdentifier) isLookupUsernameHashResponse_Response() {} + +func (*LookupUsernameHashResponse_NotFound) isLookupUsernameHashResponse_Response() {} + +type LookupUsernameLinkRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The link handle for which to find an encrypted username. Link handles are + // 16-byte representations of UUIDs. + UsernameLinkHandle []byte `protobuf:"bytes,1,opt,name=username_link_handle,json=usernameLinkHandle,proto3" json:"username_link_handle,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LookupUsernameLinkRequest) Reset() { + *x = LookupUsernameLinkRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LookupUsernameLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupUsernameLinkRequest) ProtoMessage() {} + +func (x *LookupUsernameLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupUsernameLinkRequest.ProtoReflect.Descriptor instead. +func (*LookupUsernameLinkRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{31} +} + +func (x *LookupUsernameLinkRequest) GetUsernameLinkHandle() []byte { + if x != nil { + return x.UsernameLinkHandle + } + return nil +} + +type LookupUsernameLinkResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *LookupUsernameLinkResponse_UsernameCiphertext + // *LookupUsernameLinkResponse_NotFound + Response isLookupUsernameLinkResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LookupUsernameLinkResponse) Reset() { + *x = LookupUsernameLinkResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LookupUsernameLinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupUsernameLinkResponse) ProtoMessage() {} + +func (x *LookupUsernameLinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupUsernameLinkResponse.ProtoReflect.Descriptor instead. +func (*LookupUsernameLinkResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{32} +} + +func (x *LookupUsernameLinkResponse) GetResponse() isLookupUsernameLinkResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *LookupUsernameLinkResponse) GetUsernameCiphertext() []byte { + if x != nil { + if x, ok := x.Response.(*LookupUsernameLinkResponse_UsernameCiphertext); ok { + return x.UsernameCiphertext + } + } + return nil +} + +func (x *LookupUsernameLinkResponse) GetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*LookupUsernameLinkResponse_NotFound); ok { + return x.NotFound + } + } + return nil +} + +type isLookupUsernameLinkResponse_Response interface { + isLookupUsernameLinkResponse_Response() +} + +type LookupUsernameLinkResponse_UsernameCiphertext struct { + // The ciphertext of the username identified by the provided link handle. + UsernameCiphertext []byte `protobuf:"bytes,1,opt,name=username_ciphertext,json=usernameCiphertext,proto3,oneof"` +} + +type LookupUsernameLinkResponse_NotFound struct { + // No username was found for the provided link handle. + NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` +} + +func (*LookupUsernameLinkResponse_UsernameCiphertext) isLookupUsernameLinkResponse_Response() {} + +func (*LookupUsernameLinkResponse_NotFound) isLookupUsernameLinkResponse_Response() {} + +type SetZkCredentialKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A serialized libsignal ZkCredentialPublicKey + PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetZkCredentialKeyRequest) Reset() { + *x = SetZkCredentialKeyRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetZkCredentialKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetZkCredentialKeyRequest) ProtoMessage() {} + +func (x *SetZkCredentialKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetZkCredentialKeyRequest.ProtoReflect.Descriptor instead. +func (*SetZkCredentialKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{33} +} + +func (x *SetZkCredentialKeyRequest) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +type SetZkCredentialKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A random, non-zero, value that must be included in credential requests using the key. + // + // This value allows the server to ratchet the resulting binding identity, + // as reverting to the previous key will result in a new rotation ID. + RotationId uint64 `protobuf:"varint,1,opt,name=rotation_id,json=rotationId,proto3" json:"rotation_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetZkCredentialKeyResponse) Reset() { + *x = SetZkCredentialKeyResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetZkCredentialKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetZkCredentialKeyResponse) ProtoMessage() {} + +func (x *SetZkCredentialKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetZkCredentialKeyResponse.ProtoReflect.Descriptor instead. +func (*SetZkCredentialKeyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{34} +} + +func (x *SetZkCredentialKeyResponse) GetRotationId() uint64 { + if x != nil { + return x.RotationId + } + return 0 +} + +type ChangeNumberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A means of authenticating the change-number request for the new phone + // number. Exactly one must be provided. + // + // Types that are valid to be assigned to Verification: + // + // *ChangeNumberRequest_SessionId + // *ChangeNumberRequest_RecoveryPassword + Verification isChangeNumberRequest_Verification `protobuf_oneof:"verification"` + // The new phone number for the authenticated account. + Number string `protobuf:"bytes,3,opt,name=number,proto3" json:"number,omitempty"` + // The registration lock secret for the new phone number, if the account + // associated with the new phone number has a registration lock configured. + RegistrationLock []byte `protobuf:"bytes,4,opt,name=registration_lock,json=registrationLock,proto3" json:"registration_lock,omitempty"` + // The new public identity key to use for the phone-number identity (PNI) + // associated with the new phone number. + PniIdentityKey []byte `protobuf:"bytes,5,opt,name=pni_identity_key,json=pniIdentityKey,proto3" json:"pni_identity_key,omitempty"` + // Synchronization messages to send to companion devices to supply the private + // keys associated with the new identity key and their new pre-keys. Exactly + // one message must be supplied for each device other than the sending + // (primary) device. May be omitted if no companion devices are linked to the + // account. + DeviceMessages *messages.IndividualRecipientMessageBundle `protobuf:"bytes,6,opt,name=device_messages,json=deviceMessages,proto3" json:"device_messages,omitempty"` + // A new signed EC pre-key for each device on the account, including the + // sending device, keyed by device ID. Each must be accompanied by a valid + // signature from the identity key in this request. + DevicePniSignedPreKeys map[uint32]*common.EcSignedPreKey `protobuf:"bytes,7,rep,name=device_pni_signed_pre_keys,json=devicePniSignedPreKeys,proto3" json:"device_pni_signed_pre_keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // A new signed post-quantum last-resort pre-key for each device on the + // account, including the sending device, keyed by device ID. Each must be + // accompanied by a valid signature from the identity key in this request. + DevicePniPqLastResortPreKeys map[uint32]*common.KemSignedPreKey `protobuf:"bytes,8,rep,name=device_pni_pq_last_resort_pre_keys,json=devicePniPqLastResortPreKeys,proto3" json:"device_pni_pq_last_resort_pre_keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The new phone-number-identity registration ID for each device on the + // account, including the sending device, keyed by device ID. + PniRegistrationIds map[uint32]uint32 `protobuf:"bytes,9,rep,name=pni_registration_ids,json=pniRegistrationIds,proto3" json:"pni_registration_ids,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeNumberRequest) Reset() { + *x = ChangeNumberRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeNumberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeNumberRequest) ProtoMessage() {} + +func (x *ChangeNumberRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeNumberRequest.ProtoReflect.Descriptor instead. +func (*ChangeNumberRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{35} +} + +func (x *ChangeNumberRequest) GetVerification() isChangeNumberRequest_Verification { + if x != nil { + return x.Verification + } + return nil +} + +func (x *ChangeNumberRequest) GetSessionId() []byte { + if x != nil { + if x, ok := x.Verification.(*ChangeNumberRequest_SessionId); ok { + return x.SessionId + } + } + return nil +} + +func (x *ChangeNumberRequest) GetRecoveryPassword() []byte { + if x != nil { + if x, ok := x.Verification.(*ChangeNumberRequest_RecoveryPassword); ok { + return x.RecoveryPassword + } + } + return nil +} + +func (x *ChangeNumberRequest) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +func (x *ChangeNumberRequest) GetRegistrationLock() []byte { + if x != nil { + return x.RegistrationLock + } + return nil +} + +func (x *ChangeNumberRequest) GetPniIdentityKey() []byte { + if x != nil { + return x.PniIdentityKey + } + return nil +} + +func (x *ChangeNumberRequest) GetDeviceMessages() *messages.IndividualRecipientMessageBundle { + if x != nil { + return x.DeviceMessages + } + return nil +} + +func (x *ChangeNumberRequest) GetDevicePniSignedPreKeys() map[uint32]*common.EcSignedPreKey { + if x != nil { + return x.DevicePniSignedPreKeys + } + return nil +} + +func (x *ChangeNumberRequest) GetDevicePniPqLastResortPreKeys() map[uint32]*common.KemSignedPreKey { + if x != nil { + return x.DevicePniPqLastResortPreKeys + } + return nil +} + +func (x *ChangeNumberRequest) GetPniRegistrationIds() map[uint32]uint32 { + if x != nil { + return x.PniRegistrationIds + } + return nil +} + +type isChangeNumberRequest_Verification interface { + isChangeNumberRequest_Verification() +} + +type ChangeNumberRequest_SessionId struct { + // A verified registration session ID (as returned by the registration + // service) for the new phone number. + SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3,oneof"` +} + +type ChangeNumberRequest_RecoveryPassword struct { + // A registration recovery password for the new phone number. + RecoveryPassword []byte `protobuf:"bytes,2,opt,name=recovery_password,json=recoveryPassword,proto3,oneof"` +} + +func (*ChangeNumberRequest_SessionId) isChangeNumberRequest_Verification() {} + +func (*ChangeNumberRequest_RecoveryPassword) isChangeNumberRequest_Verification() {} + +type ChangeNumberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *ChangeNumberResponse_AccountIdentifiers + // *ChangeNumberResponse_MismatchedDevices + // *ChangeNumberResponse_RegistrationLockFailure + // *ChangeNumberResponse_StaleDevices + // *ChangeNumberResponse_MessageTooLarge + // *ChangeNumberResponse_UnverifiedRegistrationSession + // *ChangeNumberResponse_InvalidRegistrationSession + // *ChangeNumberResponse_RecoveryPasswordVerificationFailed + Response isChangeNumberResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeNumberResponse) Reset() { + *x = ChangeNumberResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeNumberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeNumberResponse) ProtoMessage() {} + +func (x *ChangeNumberResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeNumberResponse.ProtoReflect.Descriptor instead. +func (*ChangeNumberResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{36} +} + +func (x *ChangeNumberResponse) GetResponse() isChangeNumberResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *ChangeNumberResponse) GetAccountIdentifiers() *common.AccountIdentifiers { + if x != nil { + if x, ok := x.Response.(*ChangeNumberResponse_AccountIdentifiers); ok { + return x.AccountIdentifiers + } + } + return nil +} + +func (x *ChangeNumberResponse) GetMismatchedDevices() *messages.MismatchedDevices { + if x != nil { + if x, ok := x.Response.(*ChangeNumberResponse_MismatchedDevices); ok { + return x.MismatchedDevices + } + } + return nil +} + +func (x *ChangeNumberResponse) GetRegistrationLockFailure() *RegistrationLockFailure { + if x != nil { + if x, ok := x.Response.(*ChangeNumberResponse_RegistrationLockFailure); ok { + return x.RegistrationLockFailure + } + } + return nil +} + +func (x *ChangeNumberResponse) GetStaleDevices() *StaleDevices { + if x != nil { + if x, ok := x.Response.(*ChangeNumberResponse_StaleDevices); ok { + return x.StaleDevices + } + } + return nil +} + +func (x *ChangeNumberResponse) GetMessageTooLarge() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ChangeNumberResponse_MessageTooLarge); ok { + return x.MessageTooLarge + } + } + return nil +} + +func (x *ChangeNumberResponse) GetUnverifiedRegistrationSession() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ChangeNumberResponse_UnverifiedRegistrationSession); ok { + return x.UnverifiedRegistrationSession + } + } + return nil +} + +func (x *ChangeNumberResponse) GetInvalidRegistrationSession() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ChangeNumberResponse_InvalidRegistrationSession); ok { + return x.InvalidRegistrationSession + } + } + return nil +} + +func (x *ChangeNumberResponse) GetRecoveryPasswordVerificationFailed() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ChangeNumberResponse_RecoveryPasswordVerificationFailed); ok { + return x.RecoveryPasswordVerificationFailed + } + } + return nil +} + +type isChangeNumberResponse_Response interface { + isChangeNumberResponse_Response() +} + +type ChangeNumberResponse_AccountIdentifiers struct { + // The identifiers of the account after the successful + // number change. + AccountIdentifiers *common.AccountIdentifiers `protobuf:"bytes,1,opt,name=account_identifiers,json=accountIdentifiers,proto3,oneof"` +} + +type ChangeNumberResponse_MismatchedDevices struct { + // Mismatched number of devices or device ids in 'devices to notify' list + MismatchedDevices *messages.MismatchedDevices `protobuf:"bytes,2,opt,name=mismatched_devices,json=mismatchedDevices,proto3,oneof"` +} + +type ChangeNumberResponse_RegistrationLockFailure struct { + // The account associated with the new phone number has a registration lock, + // and the provided registration lock secret was missing or incorrect. + RegistrationLockFailure *RegistrationLockFailure `protobuf:"bytes,3,opt,name=registration_lock_failure,json=registrationLockFailure,proto3,oneof"` +} + +type ChangeNumberResponse_StaleDevices struct { + // Mismatched registration ids in 'devices to notify' list + StaleDevices *StaleDevices `protobuf:"bytes,4,opt,name=stale_devices,json=staleDevices,proto3,oneof"` +} + +type ChangeNumberResponse_MessageTooLarge struct { + // One or more device messages was too large + MessageTooLarge *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=message_too_large,json=messageTooLarge,proto3,oneof"` +} + +type ChangeNumberResponse_UnverifiedRegistrationSession struct { + // The registration session is unverified + UnverifiedRegistrationSession *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=unverified_registration_session,json=unverifiedRegistrationSession,proto3,oneof"` +} + +type ChangeNumberResponse_InvalidRegistrationSession struct { + // The number does not match the registration session, or the registration session is invalid + InvalidRegistrationSession *errors.FailedPrecondition `protobuf:"bytes,7,opt,name=invalid_registration_session,json=invalidRegistrationSession,proto3,oneof"` +} + +type ChangeNumberResponse_RecoveryPasswordVerificationFailed struct { + RecoveryPasswordVerificationFailed *errors.FailedPrecondition `protobuf:"bytes,8,opt,name=recovery_password_verification_failed,json=recoveryPasswordVerificationFailed,proto3,oneof"` +} + +func (*ChangeNumberResponse_AccountIdentifiers) isChangeNumberResponse_Response() {} + +func (*ChangeNumberResponse_MismatchedDevices) isChangeNumberResponse_Response() {} + +func (*ChangeNumberResponse_RegistrationLockFailure) isChangeNumberResponse_Response() {} + +func (*ChangeNumberResponse_StaleDevices) isChangeNumberResponse_Response() {} + +func (*ChangeNumberResponse_MessageTooLarge) isChangeNumberResponse_Response() {} + +func (*ChangeNumberResponse_UnverifiedRegistrationSession) isChangeNumberResponse_Response() {} + +func (*ChangeNumberResponse_InvalidRegistrationSession) isChangeNumberResponse_Response() {} + +func (*ChangeNumberResponse_RecoveryPasswordVerificationFailed) isChangeNumberResponse_Response() {} + +// Information about the current Registration lock and SVR credentials. With a correct PIN, the credentials can +// be used to recover the secret used to derive the registration lock password. +type RegistrationLockFailure struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Time remaining in milliseconds before the existing registration lock expires + TimeRemainingMillis uint64 `protobuf:"varint,1,opt,name=time_remaining_millis,json=timeRemainingMillis,proto3" json:"time_remaining_millis,omitempty"` + // Credentials that can be used with SVR2 + Svr2Credentials *ExternalServiceCredentials `protobuf:"bytes,2,opt,name=svr2_credentials,json=svr2Credentials,proto3" json:"svr2_credentials,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegistrationLockFailure) Reset() { + *x = RegistrationLockFailure{} + mi := &file_org_signal_chat_account_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegistrationLockFailure) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistrationLockFailure) ProtoMessage() {} + +func (x *RegistrationLockFailure) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegistrationLockFailure.ProtoReflect.Descriptor instead. +func (*RegistrationLockFailure) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{37} +} + +func (x *RegistrationLockFailure) GetTimeRemainingMillis() uint64 { + if x != nil { + return x.TimeRemainingMillis + } + return 0 +} + +func (x *RegistrationLockFailure) GetSvr2Credentials() *ExternalServiceCredentials { + if x != nil { + return x.Svr2Credentials + } + return nil +} + +// A username/password pair for authenticating with an external service. +type ExternalServiceCredentials struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A username that can be presented to authenticate with the external service. + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + // A password that can be presented to authenticate with the external service. + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalServiceCredentials) Reset() { + *x = ExternalServiceCredentials{} + mi := &file_org_signal_chat_account_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalServiceCredentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalServiceCredentials) ProtoMessage() {} + +func (x *ExternalServiceCredentials) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalServiceCredentials.ProtoReflect.Descriptor instead. +func (*ExternalServiceCredentials) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{38} +} + +func (x *ExternalServiceCredentials) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *ExternalServiceCredentials) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +// A list of devices that are linked to the account but presented a stale +// registration ID (indicating the device has likely been replaced by another +// device). +type StaleDevices struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The IDs of devices that are no longer active. + StaleDevices []uint32 `protobuf:"varint,1,rep,packed,name=stale_devices,json=staleDevices,proto3" json:"stale_devices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StaleDevices) Reset() { + *x = StaleDevices{} + mi := &file_org_signal_chat_account_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StaleDevices) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaleDevices) ProtoMessage() {} + +func (x *StaleDevices) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaleDevices.ProtoReflect.Descriptor instead. +func (*StaleDevices) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{39} +} + +func (x *StaleDevices) GetStaleDevices() []uint32 { + if x != nil { + return x.StaleDevices + } + return nil +} + +type GetAccountDataReportRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountDataReportRequest) Reset() { + *x = GetAccountDataReportRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountDataReportRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountDataReportRequest) ProtoMessage() {} + +func (x *GetAccountDataReportRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountDataReportRequest.ProtoReflect.Descriptor instead. +func (*GetAccountDataReportRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{40} +} + +type GetAccountDataReportResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The JSON representation of the data report + Json string `protobuf:"bytes,3,opt,name=json,proto3" json:"json,omitempty"` + // A plaintext representation of the data report + Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountDataReportResponse) Reset() { + *x = GetAccountDataReportResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountDataReportResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountDataReportResponse) ProtoMessage() {} + +func (x *GetAccountDataReportResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountDataReportResponse.ProtoReflect.Descriptor instead. +func (*GetAccountDataReportResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{41} +} + +func (x *GetAccountDataReportResponse) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +func (x *GetAccountDataReportResponse) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +type GetCapabilitiesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCapabilitiesRequest) Reset() { + *x = GetCapabilitiesRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCapabilitiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCapabilitiesRequest) ProtoMessage() {} + +func (x *GetCapabilitiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCapabilitiesRequest.ProtoReflect.Descriptor instead. +func (*GetCapabilitiesRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{42} +} + +type Capabilities struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of capabilities enabled on the account. + Capabilities []common.DeviceCapability `protobuf:"varint,1,rep,packed,name=capabilities,proto3,enum=org.signal.chat.common.DeviceCapability" json:"capabilities,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Capabilities) Reset() { + *x = Capabilities{} + mi := &file_org_signal_chat_account_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Capabilities) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Capabilities) ProtoMessage() {} + +func (x *Capabilities) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Capabilities.ProtoReflect.Descriptor instead. +func (*Capabilities) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{43} +} + +func (x *Capabilities) GetCapabilities() []common.DeviceCapability { + if x != nil { + return x.Capabilities + } + return nil +} + +type GetCapabilitiesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of capabilities enabled on the account. + Capabilities *Capabilities `protobuf:"bytes,1,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCapabilitiesResponse) Reset() { + *x = GetCapabilitiesResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCapabilitiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCapabilitiesResponse) ProtoMessage() {} + +func (x *GetCapabilitiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCapabilitiesResponse.ProtoReflect.Descriptor instead. +func (*GetCapabilitiesResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{44} +} + +func (x *GetCapabilitiesResponse) GetCapabilities() *Capabilities { + if x != nil { + return x.Capabilities + } + return nil +} + +type GetCapabilitiesAnonymousRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ACI of the account for which to get capabilities. + AccountIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=account_identifier,json=accountIdentifier,proto3" json:"account_identifier,omitempty"` + // Types that are valid to be assigned to Authentication: + // + // *GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey + // *GetCapabilitiesAnonymousRequest_GroupSendToken + Authentication isGetCapabilitiesAnonymousRequest_Authentication `protobuf_oneof:"authentication"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCapabilitiesAnonymousRequest) Reset() { + *x = GetCapabilitiesAnonymousRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCapabilitiesAnonymousRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCapabilitiesAnonymousRequest) ProtoMessage() {} + +func (x *GetCapabilitiesAnonymousRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCapabilitiesAnonymousRequest.ProtoReflect.Descriptor instead. +func (*GetCapabilitiesAnonymousRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{45} +} + +func (x *GetCapabilitiesAnonymousRequest) GetAccountIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.AccountIdentifier + } + return nil +} + +func (x *GetCapabilitiesAnonymousRequest) GetAuthentication() isGetCapabilitiesAnonymousRequest_Authentication { + if x != nil { + return x.Authentication + } + return nil +} + +func (x *GetCapabilitiesAnonymousRequest) GetUnidentifiedAccessKey() []byte { + if x != nil { + if x, ok := x.Authentication.(*GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey); ok { + return x.UnidentifiedAccessKey + } + } + return nil +} + +func (x *GetCapabilitiesAnonymousRequest) GetGroupSendToken() []byte { + if x != nil { + if x, ok := x.Authentication.(*GetCapabilitiesAnonymousRequest_GroupSendToken); ok { + return x.GroupSendToken + } + } + return nil +} + +type isGetCapabilitiesAnonymousRequest_Authentication interface { + isGetCapabilitiesAnonymousRequest_Authentication() +} + +type GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey struct { + // The unidentified access key for the targeted account. + UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` +} + +type GetCapabilitiesAnonymousRequest_GroupSendToken struct { + // A group send endorsement token for the targeted account. + GroupSendToken []byte `protobuf:"bytes,3,opt,name=group_send_token,json=groupSendToken,proto3,oneof"` +} + +func (*GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey) isGetCapabilitiesAnonymousRequest_Authentication() { +} + +func (*GetCapabilitiesAnonymousRequest_GroupSendToken) isGetCapabilitiesAnonymousRequest_Authentication() { +} + +type GetCapabilitiesAnonymousResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetCapabilitiesAnonymousResponse_Capabilities + // *GetCapabilitiesAnonymousResponse_NotFound + // *GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization + Response isGetCapabilitiesAnonymousResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCapabilitiesAnonymousResponse) Reset() { + *x = GetCapabilitiesAnonymousResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCapabilitiesAnonymousResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCapabilitiesAnonymousResponse) ProtoMessage() {} + +func (x *GetCapabilitiesAnonymousResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCapabilitiesAnonymousResponse.ProtoReflect.Descriptor instead. +func (*GetCapabilitiesAnonymousResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{46} +} + +func (x *GetCapabilitiesAnonymousResponse) GetResponse() isGetCapabilitiesAnonymousResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetCapabilitiesAnonymousResponse) GetCapabilities() *Capabilities { + if x != nil { + if x, ok := x.Response.(*GetCapabilitiesAnonymousResponse_Capabilities); ok { + return x.Capabilities + } + } + return nil +} + +func (x *GetCapabilitiesAnonymousResponse) GetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*GetCapabilitiesAnonymousResponse_NotFound); ok { + return x.NotFound + } + } + return nil +} + +func (x *GetCapabilitiesAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization); ok { + return x.FailedUnidentifiedAuthorization + } + } + return nil +} + +type isGetCapabilitiesAnonymousResponse_Response interface { + isGetCapabilitiesAnonymousResponse_Response() +} + +type GetCapabilitiesAnonymousResponse_Capabilities struct { + // A list of capabilities enabled on the account. + Capabilities *Capabilities `protobuf:"bytes,1,opt,name=capabilities,proto3,oneof"` +} + +type GetCapabilitiesAnonymousResponse_NotFound struct { + NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` +} + +type GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization struct { + FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` +} + +func (*GetCapabilitiesAnonymousResponse_Capabilities) isGetCapabilitiesAnonymousResponse_Response() {} + +func (*GetCapabilitiesAnonymousResponse_NotFound) isGetCapabilitiesAnonymousResponse_Response() {} + +func (*GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization) isGetCapabilitiesAnonymousResponse_Response() { +} + +type TotpParameters struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The HMAC algorithm (e.g. "HmacSHA256") used by the TOTP generator + Algorithm string `protobuf:"bytes,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + // The length of one-time passwords (in decimal digits) produced and expected + // by the TOTP generator + PasswordLength uint32 `protobuf:"varint,2,opt,name=password_length,json=passwordLength,proto3" json:"password_length,omitempty"` + // The time step (in seconds) used by the TOTP generator + TimeStepSeconds uint32 `protobuf:"varint,3,opt,name=time_step_seconds,json=timeStepSeconds,proto3" json:"time_step_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TotpParameters) Reset() { + *x = TotpParameters{} + mi := &file_org_signal_chat_account_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TotpParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TotpParameters) ProtoMessage() {} + +func (x *TotpParameters) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TotpParameters.ProtoReflect.Descriptor instead. +func (*TotpParameters) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{47} +} + +func (x *TotpParameters) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *TotpParameters) GetPasswordLength() uint32 { + if x != nil { + return x.PasswordLength + } + return 0 +} + +func (x *TotpParameters) GetTimeStepSeconds() uint32 { + if x != nil { + return x.TimeStepSeconds + } + return 0 +} + +type GenerateTotpKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenerateTotpKeyRequest) Reset() { + *x = GenerateTotpKeyRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenerateTotpKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateTotpKeyRequest) ProtoMessage() {} + +func (x *GenerateTotpKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateTotpKeyRequest.ProtoReflect.Descriptor instead. +func (*GenerateTotpKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{48} +} + +type GenerateTotpKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GenerateTotpKeyResponse_KeyGenerated_ + // *GenerateTotpKeyResponse_TooManyTotpKeys + Response isGenerateTotpKeyResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenerateTotpKeyResponse) Reset() { + *x = GenerateTotpKeyResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenerateTotpKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateTotpKeyResponse) ProtoMessage() {} + +func (x *GenerateTotpKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateTotpKeyResponse.ProtoReflect.Descriptor instead. +func (*GenerateTotpKeyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{49} +} + +func (x *GenerateTotpKeyResponse) GetResponse() isGenerateTotpKeyResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GenerateTotpKeyResponse) GetKeyGenerated() *GenerateTotpKeyResponse_KeyGenerated { + if x != nil { + if x, ok := x.Response.(*GenerateTotpKeyResponse_KeyGenerated_); ok { + return x.KeyGenerated + } + } + return nil +} + +func (x *GenerateTotpKeyResponse) GetTooManyTotpKeys() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*GenerateTotpKeyResponse_TooManyTotpKeys); ok { + return x.TooManyTotpKeys + } + } + return nil +} + +type isGenerateTotpKeyResponse_Response interface { + isGenerateTotpKeyResponse_Response() +} + +type GenerateTotpKeyResponse_KeyGenerated_ struct { + // A new, pending TOTP key has been generated and added to the authenticated + // account + KeyGenerated *GenerateTotpKeyResponse_KeyGenerated `protobuf:"bytes,1,opt,name=key_generated,json=keyGenerated,proto3,oneof"` +} + +type GenerateTotpKeyResponse_TooManyTotpKeys struct { + // The authenticated account already has too many TOTP keys, and the caller + // must remove one before adding more + TooManyTotpKeys *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=too_many_totp_keys,json=tooManyTotpKeys,proto3,oneof"` +} + +func (*GenerateTotpKeyResponse_KeyGenerated_) isGenerateTotpKeyResponse_Response() {} + +func (*GenerateTotpKeyResponse_TooManyTotpKeys) isGenerateTotpKeyResponse_Response() {} + +type ConfirmTotpKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A one-time password derived from the current pending TOTP key + OneTimePassword uint32 `protobuf:"varint,1,opt,name=one_time_password,json=oneTimePassword,proto3" json:"one_time_password,omitempty"` + // The ciphertext of user-provided metadata (presumably including a + // human-readable name and creation timestamp) to be attached to the + // newly-confirmed key + MetadataCiphertext []byte `protobuf:"bytes,2,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmTotpKeyRequest) Reset() { + *x = ConfirmTotpKeyRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmTotpKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmTotpKeyRequest) ProtoMessage() {} + +func (x *ConfirmTotpKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmTotpKeyRequest.ProtoReflect.Descriptor instead. +func (*ConfirmTotpKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{50} +} + +func (x *ConfirmTotpKeyRequest) GetOneTimePassword() uint32 { + if x != nil { + return x.OneTimePassword + } + return 0 +} + +func (x *ConfirmTotpKeyRequest) GetMetadataCiphertext() []byte { + if x != nil { + return x.MetadataCiphertext + } + return nil +} + +type ConfirmTotpKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *ConfirmTotpKeyResponse_KeyConfirmed_ + // *ConfirmTotpKeyResponse_OneTimePasswordNotVerified + Response isConfirmTotpKeyResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmTotpKeyResponse) Reset() { + *x = ConfirmTotpKeyResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmTotpKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmTotpKeyResponse) ProtoMessage() {} + +func (x *ConfirmTotpKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmTotpKeyResponse.ProtoReflect.Descriptor instead. +func (*ConfirmTotpKeyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{51} +} + +func (x *ConfirmTotpKeyResponse) GetResponse() isConfirmTotpKeyResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *ConfirmTotpKeyResponse) GetKeyConfirmed() *ConfirmTotpKeyResponse_KeyConfirmed { + if x != nil { + if x, ok := x.Response.(*ConfirmTotpKeyResponse_KeyConfirmed_); ok { + return x.KeyConfirmed + } + } + return nil +} + +func (x *ConfirmTotpKeyResponse) GetOneTimePasswordNotVerified() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ConfirmTotpKeyResponse_OneTimePasswordNotVerified); ok { + return x.OneTimePasswordNotVerified + } + } + return nil +} + +type isConfirmTotpKeyResponse_Response interface { + isConfirmTotpKeyResponse_Response() +} + +type ConfirmTotpKeyResponse_KeyConfirmed_ struct { + // The provided one-time password was accepted and the pending TOTP key was + // stored with the provided name ciphertext + KeyConfirmed *ConfirmTotpKeyResponse_KeyConfirmed `protobuf:"bytes,1,opt,name=key_confirmed,json=keyConfirmed,proto3,oneof"` +} + +type ConfirmTotpKeyResponse_OneTimePasswordNotVerified struct { + // The provided one-time password was not valid for any reason (including + // incorrect passwords, misaligned clocks, or missing account records) + OneTimePasswordNotVerified *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=one_time_password_not_verified,json=oneTimePasswordNotVerified,proto3,oneof"` +} + +func (*ConfirmTotpKeyResponse_KeyConfirmed_) isConfirmTotpKeyResponse_Response() {} + +func (*ConfirmTotpKeyResponse_OneTimePasswordNotVerified) isConfirmTotpKeyResponse_Response() {} + +type ListTotpKeysRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListTotpKeysRequest) Reset() { + *x = ListTotpKeysRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListTotpKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTotpKeysRequest) ProtoMessage() {} + +func (x *ListTotpKeysRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTotpKeysRequest.ProtoReflect.Descriptor instead. +func (*ListTotpKeysRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{52} +} + +type ListTotpKeysResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Keys map[int32]*ListTotpKeysResponse_TotpKeyMetadata `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListTotpKeysResponse) Reset() { + *x = ListTotpKeysResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListTotpKeysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTotpKeysResponse) ProtoMessage() {} + +func (x *ListTotpKeysResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTotpKeysResponse.ProtoReflect.Descriptor instead. +func (*ListTotpKeysResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{53} +} + +func (x *ListTotpKeysResponse) GetKeys() map[int32]*ListTotpKeysResponse_TotpKeyMetadata { + if x != nil { + return x.Keys + } + return nil +} + +type SetTotpKeyMetadataRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The account-specific identifier of the TOTP key to modify + KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + // The ciphertext of the new user-provided metadata to be attached to the + // identified key + MetadataCiphertext []byte `protobuf:"bytes,2,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetTotpKeyMetadataRequest) Reset() { + *x = SetTotpKeyMetadataRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetTotpKeyMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetTotpKeyMetadataRequest) ProtoMessage() {} + +func (x *SetTotpKeyMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetTotpKeyMetadataRequest.ProtoReflect.Descriptor instead. +func (*SetTotpKeyMetadataRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{54} +} + +func (x *SetTotpKeyMetadataRequest) GetKeyId() uint32 { + if x != nil { + return x.KeyId + } + return 0 +} + +func (x *SetTotpKeyMetadataRequest) GetMetadataCiphertext() []byte { + if x != nil { + return x.MetadataCiphertext + } + return nil +} + +type SetTotpKeyMetadataResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SetTotpKeyMetadataResponse_MetadataUpdated_ + // *SetTotpKeyMetadataResponse_KeyNotFound + Response isSetTotpKeyMetadataResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetTotpKeyMetadataResponse) Reset() { + *x = SetTotpKeyMetadataResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetTotpKeyMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetTotpKeyMetadataResponse) ProtoMessage() {} + +func (x *SetTotpKeyMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetTotpKeyMetadataResponse.ProtoReflect.Descriptor instead. +func (*SetTotpKeyMetadataResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{55} +} + +func (x *SetTotpKeyMetadataResponse) GetResponse() isSetTotpKeyMetadataResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SetTotpKeyMetadataResponse) GetMetadataUpdated() *SetTotpKeyMetadataResponse_MetadataUpdated { + if x != nil { + if x, ok := x.Response.(*SetTotpKeyMetadataResponse_MetadataUpdated_); ok { + return x.MetadataUpdated + } + } + return nil +} + +func (x *SetTotpKeyMetadataResponse) GetKeyNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*SetTotpKeyMetadataResponse_KeyNotFound); ok { + return x.KeyNotFound + } + } + return nil +} + +type isSetTotpKeyMetadataResponse_Response interface { + isSetTotpKeyMetadataResponse_Response() +} + +type SetTotpKeyMetadataResponse_MetadataUpdated_ struct { + // New metadata was stored for the identified TOTP key + MetadataUpdated *SetTotpKeyMetadataResponse_MetadataUpdated `protobuf:"bytes,1,opt,name=metadata_updated,json=metadataUpdated,proto3,oneof"` +} + +type SetTotpKeyMetadataResponse_KeyNotFound struct { + // No TOTP was found with the given ID + KeyNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=key_not_found,json=keyNotFound,proto3,oneof"` +} + +func (*SetTotpKeyMetadataResponse_MetadataUpdated_) isSetTotpKeyMetadataResponse_Response() {} + +func (*SetTotpKeyMetadataResponse_KeyNotFound) isSetTotpKeyMetadataResponse_Response() {} + +type RemoveTotpKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The account-specific identifier of the TOTP key to remove + KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveTotpKeyRequest) Reset() { + *x = RemoveTotpKeyRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveTotpKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveTotpKeyRequest) ProtoMessage() {} + +func (x *RemoveTotpKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveTotpKeyRequest.ProtoReflect.Descriptor instead. +func (*RemoveTotpKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{56} +} + +func (x *RemoveTotpKeyRequest) GetKeyId() uint32 { + if x != nil { + return x.KeyId + } + return 0 +} + +type RemoveTotpKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveTotpKeyResponse) Reset() { + *x = RemoveTotpKeyResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveTotpKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveTotpKeyResponse) ProtoMessage() {} + +func (x *RemoveTotpKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[57] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveTotpKeyResponse.ProtoReflect.Descriptor instead. +func (*RemoveTotpKeyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{57} +} + +type GetEntitlementsResponse_BadgeEntitlement struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The id of the badge the account is entitled. Metadata to display for + // badges may be obtained by cross-referencing badge ids with + // RemoteConfiguration.GetBadges. + BadgeId string `protobuf:"bytes,1,opt,name=badge_id,json=badgeId,proto3" json:"badge_id,omitempty"` + // When the badge expires, in number of seconds since epoch + ExpirationEpochSeconds uint64 `protobuf:"varint,2,opt,name=expiration_epoch_seconds,json=expirationEpochSeconds,proto3" json:"expiration_epoch_seconds,omitempty"` + // Whether the badge is currently configured to be visible + Visible bool `protobuf:"varint,3,opt,name=visible,proto3" json:"visible,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetEntitlementsResponse_BadgeEntitlement) Reset() { + *x = GetEntitlementsResponse_BadgeEntitlement{} + mi := &file_org_signal_chat_account_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetEntitlementsResponse_BadgeEntitlement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEntitlementsResponse_BadgeEntitlement) ProtoMessage() {} + +func (x *GetEntitlementsResponse_BadgeEntitlement) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[58] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEntitlementsResponse_BadgeEntitlement.ProtoReflect.Descriptor instead. +func (*GetEntitlementsResponse_BadgeEntitlement) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *GetEntitlementsResponse_BadgeEntitlement) GetBadgeId() string { + if x != nil { + return x.BadgeId + } + return "" +} + +func (x *GetEntitlementsResponse_BadgeEntitlement) GetExpirationEpochSeconds() uint64 { + if x != nil { + return x.ExpirationEpochSeconds + } + return 0 +} + +func (x *GetEntitlementsResponse_BadgeEntitlement) GetVisible() bool { + if x != nil { + return x.Visible + } + return false +} + +type GetEntitlementsResponse_BackupEntitlement struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The backup level of the account + Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + // When the backup entitlement expires, in number of seconds since epoch + ExpirationEpochSeconds uint64 `protobuf:"varint,2,opt,name=expiration_epoch_seconds,json=expirationEpochSeconds,proto3" json:"expiration_epoch_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetEntitlementsResponse_BackupEntitlement) Reset() { + *x = GetEntitlementsResponse_BackupEntitlement{} + mi := &file_org_signal_chat_account_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetEntitlementsResponse_BackupEntitlement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEntitlementsResponse_BackupEntitlement) ProtoMessage() {} + +func (x *GetEntitlementsResponse_BackupEntitlement) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[59] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEntitlementsResponse_BackupEntitlement.ProtoReflect.Descriptor instead. +func (*GetEntitlementsResponse_BackupEntitlement) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *GetEntitlementsResponse_BackupEntitlement) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *GetEntitlementsResponse_BackupEntitlement) GetExpirationEpochSeconds() uint64 { + if x != nil { + return x.ExpirationEpochSeconds + } + return 0 +} + +type ConfirmUsernameHashResponse_ConfirmedUsernameHash struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The server-generated username link handle for the newly-confirmed username. + UsernameLinkHandle []byte `protobuf:"bytes,2,opt,name=username_link_handle,json=usernameLinkHandle,proto3" json:"username_link_handle,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) Reset() { + *x = ConfirmUsernameHashResponse_ConfirmedUsernameHash{} + mi := &file_org_signal_chat_account_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmUsernameHashResponse_ConfirmedUsernameHash) ProtoMessage() {} + +func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[60] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmUsernameHashResponse_ConfirmedUsernameHash.ProtoReflect.Descriptor instead. +func (*ConfirmUsernameHashResponse_ConfirmedUsernameHash) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{14, 0} +} + +func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) GetUsernameLinkHandle() []byte { + if x != nil { + return x.UsernameLinkHandle + } + return nil +} + +type GenerateTotpKeyResponse_KeyGenerated struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The raw TOTP key + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // The TOTP parameters associated with the generated key + TotpParameters *TotpParameters `protobuf:"bytes,2,opt,name=totp_parameters,json=totpParameters,proto3" json:"totp_parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenerateTotpKeyResponse_KeyGenerated) Reset() { + *x = GenerateTotpKeyResponse_KeyGenerated{} + mi := &file_org_signal_chat_account_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenerateTotpKeyResponse_KeyGenerated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateTotpKeyResponse_KeyGenerated) ProtoMessage() {} + +func (x *GenerateTotpKeyResponse_KeyGenerated) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateTotpKeyResponse_KeyGenerated.ProtoReflect.Descriptor instead. +func (*GenerateTotpKeyResponse_KeyGenerated) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{49, 0} +} + +func (x *GenerateTotpKeyResponse_KeyGenerated) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *GenerateTotpKeyResponse_KeyGenerated) GetTotpParameters() *TotpParameters { + if x != nil { + return x.TotpParameters + } + return nil +} + +type ConfirmTotpKeyResponse_KeyConfirmed struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The account-specific identifier for the newly-confirmed TOTP key + KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmTotpKeyResponse_KeyConfirmed) Reset() { + *x = ConfirmTotpKeyResponse_KeyConfirmed{} + mi := &file_org_signal_chat_account_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmTotpKeyResponse_KeyConfirmed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmTotpKeyResponse_KeyConfirmed) ProtoMessage() {} + +func (x *ConfirmTotpKeyResponse_KeyConfirmed) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmTotpKeyResponse_KeyConfirmed.ProtoReflect.Descriptor instead. +func (*ConfirmTotpKeyResponse_KeyConfirmed) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{51, 0} +} + +func (x *ConfirmTotpKeyResponse_KeyConfirmed) GetKeyId() uint32 { + if x != nil { + return x.KeyId + } + return 0 +} + +type ListTotpKeysResponse_TotpKeyMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The user-provided ciphertext for metadata associated with this TOTP key + MetadataCiphertext []byte `protobuf:"bytes,1,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` + // The TOTP parameters associated with this key + TotpParameters *TotpParameters `protobuf:"bytes,2,opt,name=totp_parameters,json=totpParameters,proto3" json:"totp_parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListTotpKeysResponse_TotpKeyMetadata) Reset() { + *x = ListTotpKeysResponse_TotpKeyMetadata{} + mi := &file_org_signal_chat_account_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListTotpKeysResponse_TotpKeyMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTotpKeysResponse_TotpKeyMetadata) ProtoMessage() {} + +func (x *ListTotpKeysResponse_TotpKeyMetadata) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTotpKeysResponse_TotpKeyMetadata.ProtoReflect.Descriptor instead. +func (*ListTotpKeysResponse_TotpKeyMetadata) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{53, 0} +} + +func (x *ListTotpKeysResponse_TotpKeyMetadata) GetMetadataCiphertext() []byte { + if x != nil { + return x.MetadataCiphertext + } + return nil +} + +func (x *ListTotpKeysResponse_TotpKeyMetadata) GetTotpParameters() *TotpParameters { + if x != nil { + return x.TotpParameters + } + return nil +} + +type SetTotpKeyMetadataResponse_MetadataUpdated struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetTotpKeyMetadataResponse_MetadataUpdated) Reset() { + *x = SetTotpKeyMetadataResponse_MetadataUpdated{} + mi := &file_org_signal_chat_account_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetTotpKeyMetadataResponse_MetadataUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetTotpKeyMetadataResponse_MetadataUpdated) ProtoMessage() {} + +func (x *SetTotpKeyMetadataResponse_MetadataUpdated) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[68] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetTotpKeyMetadataResponse_MetadataUpdated.ProtoReflect.Descriptor instead. +func (*SetTotpKeyMetadataResponse_MetadataUpdated) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{55, 0} +} + +var File_org_signal_chat_account_proto protoreflect.FileDescriptor + +const file_org_signal_chat_account_proto_rawDesc = "" + + "\n" + + "\x1dorg/signal/chat/account.proto\x12\x17org.signal.chat.account\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1eorg/signal/chat/messages.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\x1b\n" + + "\x19GetAccountIdentityRequest\"y\n" + + "\x1aGetAccountIdentityResponse\x12[\n" + + "\x13account_identifiers\x18\x01 \x01(\v2*.org.signal.chat.common.AccountIdentifiersR\x12accountIdentifiers\"\x18\n" + + "\x16GetEntitlementsRequest\"\xb9\x03\n" + + "\x17GetEntitlementsResponse\x12Y\n" + + "\x06badges\x18\x01 \x03(\v2A.org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlementR\x06badges\x12Z\n" + + "\x06backup\x18\x02 \x01(\v2B.org.signal.chat.account.GetEntitlementsResponse.BackupEntitlementR\x06backup\x1a\x81\x01\n" + + "\x10BadgeEntitlement\x12\x19\n" + + "\bbadge_id\x18\x01 \x01(\tR\abadgeId\x128\n" + + "\x18expiration_epoch_seconds\x18\x02 \x01(\x04R\x16expirationEpochSeconds\x12\x18\n" + + "\avisible\x18\x03 \x01(\bR\avisible\x1ac\n" + + "\x11BackupEntitlement\x12\x14\n" + + "\x05level\x18\x01 \x01(\x04R\x05level\x128\n" + + "\x18expiration_epoch_seconds\x18\x02 \x01(\x04R\x16expirationEpochSeconds\"\x16\n" + + "\x14DeleteAccountRequest\"\x17\n" + + "\x15DeleteAccountResponse\"P\n" + + "\x1aSetRegistrationLockRequest\x122\n" + + "\x11registration_lock\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\x10registrationLock\"\x1d\n" + + "\x1bSetRegistrationLockResponse\"\x1e\n" + + "\x1cClearRegistrationLockRequest\"\x1f\n" + + "\x1dClearRegistrationLockResponse\"V\n" + + "\x1aReserveUsernameHashRequest\x128\n" + + "\x0fusername_hashes\x18\x01 \x03(\fB\x0f\x9a\x97\"\x04\b\x01\x10\x14җ\"\x03\x1a\x01 R\x0eusernameHashes\"\x16\n" + + "\x14UsernameNotAvailable\"\xd4\x01\n" + + "\x1bReserveUsernameHashResponse\x12%\n" + + "\rusername_hash\x18\x01 \x01(\fH\x00R\fusernameHash\x12\x81\x01\n" + + "\x16username_not_available\x18\x02 \x01(\v2-.org.signal.chat.account.UsernameNotAvailableB\x1a\xc2\xd5\"\x16username_not_availableH\x00R\x14usernameNotAvailableB\n" + + "\n" + + "\bresponse\"\xa5\x01\n" + + "\x1aConfirmUsernameHashRequest\x12*\n" + + "\rusername_hash\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fusernameHash\x12\x1f\n" + + "\bzk_proof\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\azkProof\x12:\n" + + "\x13username_ciphertext\x18\x03 \x01(\fB\t\x9a\x97\"\x05\b\x01\x10\x80\x01R\x12usernameCiphertext\"\x82\x04\n" + + "\x1bConfirmUsernameHashResponse\x12\x84\x01\n" + + "\x17confirmed_username_hash\x18\x01 \x01(\v2J.org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHashH\x00R\x15confirmedUsernameHash\x12{\n" + + "\x15reservation_not_found\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x19\xc2\xd5\"\x15reservation_not_foundH\x00R\x13reservationNotFound\x12\x81\x01\n" + + "\x16username_not_available\x18\x03 \x01(\v2-.org.signal.chat.account.UsernameNotAvailableB\x1a\xc2\xd5\"\x16username_not_availableH\x00R\x14usernameNotAvailable\x1aO\n" + + "\x15ConfirmedUsernameHash\x120\n" + + "\x14username_link_handle\x18\x02 \x01(\fR\x12usernameLinkHandleJ\x04\b\x01\x10\x02B\n" + + "\n" + + "\bresponse\"\x1b\n" + + "\x19DeleteUsernameHashRequest\"\x1c\n" + + "\x1aDeleteUsernameHashResponse\"~\n" + + "\x16SetUsernameLinkRequest\x12:\n" + + "\x13username_ciphertext\x18\x01 \x01(\fB\t\x9a\x97\"\x05\b\x01\x10\x80\x01R\x12usernameCiphertext\x12(\n" + + "\x10keep_link_handle\x18\x02 \x01(\bR\x0ekeepLinkHandle\"\xc4\x01\n" + + "\x17SetUsernameLinkResponse\x122\n" + + "\x14username_link_handle\x18\x01 \x01(\fH\x00R\x12usernameLinkHandle\x12i\n" + + "\x0fno_username_set\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0fno_username_setH\x00R\rnoUsernameSetB\n" + + "\n" + + "\bresponse\"\x1b\n" + + "\x19DeleteUsernameLinkRequest\"\x1c\n" + + "\x1aDeleteUsernameLinkResponse\"\xe5\x01\n" + + "\"ConfigureUnidentifiedAccessRequest\x12?\n" + + "\x17unidentified_access_key\x18\x01 \x01(\fB\x05\xa2\x97\"\x01\x10H\x00R\x15unidentifiedAccessKey\x12m\n" + + "&allow_unrestricted_unidentified_access\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R#allowUnrestrictedUnidentifiedAccessB\x0f\n" + + "\rconfiguration\"%\n" + + "#ConfigureUnidentifiedAccessResponse\"f\n" + + "#SetDiscoverableByPhoneNumberRequest\x12?\n" + + "\x1cdiscoverable_by_phone_number\x18\x01 \x01(\bR\x19discoverableByPhoneNumber\"&\n" + + "$SetDiscoverableByPhoneNumberResponse\"u\n" + + "&SetRegistrationRecoveryPasswordRequest\x12K\n" + + "\x1eregistration_recovery_password\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\x1cregistrationRecoveryPassword\")\n" + + "'SetRegistrationRecoveryPasswordResponse\"x\n" + + "\x1cCheckAccountExistenceRequest\x12X\n" + + "\x12service_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x11serviceIdentifier\"F\n" + + "\x1dCheckAccountExistenceResponse\x12%\n" + + "\x0eaccount_exists\x18\x01 \x01(\bR\raccountExists\"G\n" + + "\x19LookupUsernameHashRequest\x12*\n" + + "\rusername_hash\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fusernameHash\"\xd4\x01\n" + + "\x1aLookupUsernameHashResponse\x12Z\n" + + "\x12service_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierH\x00R\x11serviceIdentifier\x12N\n" + + "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFoundB\n" + + "\n" + + "\bresponse\"T\n" + + "\x19LookupUsernameLinkRequest\x127\n" + + "\x14username_link_handle\x18\x01 \x01(\fB\x05\xa2\x97\"\x01\x10R\x12usernameLinkHandle\"\xab\x01\n" + + "\x1aLookupUsernameLinkResponse\x121\n" + + "\x13username_ciphertext\x18\x01 \x01(\fH\x00R\x12usernameCiphertext\x12N\n" + + "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFoundB\n" + + "\n" + + "\bresponse\"A\n" + + "\x19SetZkCredentialKeyRequest\x12$\n" + + "\n" + + "public_key\x18\x01 \x01(\fB\x05\xa2\x97\"\x01!R\tpublicKey\"=\n" + + "\x1aSetZkCredentialKeyResponse\x12\x1f\n" + + "\vrotation_id\x18\x01 \x01(\x04R\n" + + "rotationId\"\xb8\b\n" + + "\x13ChangeNumberRequest\x12%\n" + + "\n" + + "session_id\x18\x01 \x01(\fB\x04\x88\x97\"\x01H\x00R\tsessionId\x124\n" + + "\x11recovery_password\x18\x02 \x01(\fB\x05\xa2\x97\"\x01 H\x00R\x10recoveryPassword\x12\x1c\n" + + "\x06number\x18\x03 \x01(\tB\x04\xa8\x97\"\x01R\x06number\x123\n" + + "\x11registration_lock\x18\x04 \x01(\fB\x06\xa2\x97\"\x02\x00 R\x10registrationLock\x12.\n" + + "\x10pni_identity_key\x18\x05 \x01(\fB\x04\x88\x97\"\x01R\x0epniIdentityKey\x12c\n" + + "\x0fdevice_messages\x18\x06 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\x0edeviceMessages\x12\x84\x01\n" + + "\x1adevice_pni_signed_pre_keys\x18\a \x03(\v2H.org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntryR\x16devicePniSignedPreKeys\x12\x98\x01\n" + + "\"device_pni_pq_last_resort_pre_keys\x18\b \x03(\v2N.org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntryR\x1cdevicePniPqLastResortPreKeys\x12v\n" + + "\x14pni_registration_ids\x18\t \x03(\v2D.org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntryR\x12pniRegistrationIds\x1aq\n" + + "\x1bDevicePniSignedPreKeysEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12<\n" + + "\x05value\x18\x02 \x01(\v2&.org.signal.chat.common.EcSignedPreKeyR\x05value:\x028\x01\x1ax\n" + + "!DevicePniPqLastResortPreKeysEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12=\n" + + "\x05value\x18\x02 \x01(\v2'.org.signal.chat.common.KemSignedPreKeyR\x05value:\x028\x01\x1aE\n" + + "\x17PniRegistrationIdsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\rR\x05value:\x028\x01B\x0e\n" + + "\fverification\"\xb5\b\n" + + "\x14ChangeNumberResponse\x12]\n" + + "\x13account_identifiers\x18\x01 \x01(\v2*.org.signal.chat.common.AccountIdentifiersH\x00R\x12accountIdentifiers\x12t\n" + + "\x12mismatched_devices\x18\x02 \x01(\v2+.org.signal.chat.messages.MismatchedDevicesB\x16\xc2\xd5\"\x12mismatched_devicesH\x00R\x11mismatchedDevices\x12\x8d\x01\n" + + "\x19registration_lock_failure\x18\x03 \x01(\v20.org.signal.chat.account.RegistrationLockFailureB\x1d\xc2\xd5\"\x19registration_lock_failureH\x00R\x17registrationLockFailure\x12_\n" + + "\rstale_devices\x18\x04 \x01(\v2%.org.signal.chat.account.StaleDevicesB\x11\xc2\xd5\"\rstale_devicesH\x00R\fstaleDevices\x12o\n" + + "\x11message_too_large\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11message_too_largeH\x00R\x0fmessageTooLarge\x12\x99\x01\n" + + "\x1funverified_registration_session\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1funverified_registration_sessionH\x00R\x1dunverifiedRegistrationSession\x12\x90\x01\n" + + "\x1cinvalid_registration_session\x18\a \x01(\v2*.org.signal.chat.errors.FailedPreconditionB \xc2\xd5\"\x1cinvalid_registration_sessionH\x00R\x1ainvalidRegistrationSession\x12\xaa\x01\n" + + "%recovery_password_verification_failed\x18\b \x01(\v2*.org.signal.chat.errors.FailedPreconditionB)\xc2\xd5\"%recovery_password_verification_failedH\x00R\"recoveryPasswordVerificationFailedB\n" + + "\n" + + "\bresponse\"\xad\x01\n" + + "\x17RegistrationLockFailure\x122\n" + + "\x15time_remaining_millis\x18\x01 \x01(\x04R\x13timeRemainingMillis\x12^\n" + + "\x10svr2_credentials\x18\x02 \x01(\v23.org.signal.chat.account.ExternalServiceCredentialsR\x0fsvr2Credentials\"T\n" + + "\x1aExternalServiceCredentials\x12\x1a\n" + + "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\"=\n" + + "\fStaleDevices\x12-\n" + + "\rstale_devices\x18\x01 \x03(\rB\bҗ\"\x042\x02\x10\x7fR\fstaleDevices\"\x1d\n" + + "\x1bGetAccountDataReportRequest\"F\n" + + "\x1cGetAccountDataReportResponse\x12\x12\n" + + "\x04json\x18\x03 \x01(\tR\x04json\x12\x12\n" + + "\x04text\x18\x04 \x01(\tR\x04text\"\x18\n" + + "\x16GetCapabilitiesRequest\"\\\n" + + "\fCapabilities\x12L\n" + + "\fcapabilities\x18\x01 \x03(\x0e2(.org.signal.chat.common.DeviceCapabilityR\fcapabilities\"d\n" + + "\x17GetCapabilitiesResponse\x12I\n" + + "\fcapabilities\x18\x01 \x01(\v2%.org.signal.chat.account.CapabilitiesR\fcapabilities\"\x8a\x02\n" + + "\x1fGetCapabilitiesAnonymousRequest\x12b\n" + + "\x12account_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierB\b\xb8\x97\"\x01ȗ\"\x01R\x11accountIdentifier\x12?\n" + + "\x17unidentified_access_key\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x10H\x00R\x15unidentifiedAccessKey\x120\n" + + "\x10group_send_token\x18\x03 \x01(\fB\x04\x88\x97\"\x01H\x00R\x0egroupSendTokenB\x10\n" + + "\x0eauthentication\"\xfa\x02\n" + + " GetCapabilitiesAnonymousResponse\x12K\n" + + "\fcapabilities\x18\x01 \x01(\v2%.org.signal.chat.account.CapabilitiesH\x00R\fcapabilities\x12N\n" + + "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFound\x12\xac\x01\n" + + "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + + "\n" + + "\bresponse\"\x83\x01\n" + + "\x0eTotpParameters\x12\x1c\n" + + "\talgorithm\x18\x01 \x01(\tR\talgorithm\x12'\n" + + "\x0fpassword_length\x18\x02 \x01(\rR\x0epasswordLength\x12*\n" + + "\x11time_step_seconds\x18\x03 \x01(\rR\x0ftimeStepSeconds\"\x18\n" + + "\x16GenerateTotpKeyRequest\"\xf2\x02\n" + + "\x17GenerateTotpKeyResponse\x12d\n" + + "\rkey_generated\x18\x01 \x01(\v2=.org.signal.chat.account.GenerateTotpKeyResponse.KeyGeneratedH\x00R\fkeyGenerated\x12q\n" + + "\x12too_many_totp_keys\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x16\xc2\xd5\"\x12too_many_totp_keysH\x00R\x0ftooManyTotpKeys\x1ar\n" + + "\fKeyGenerated\x12\x10\n" + + "\x03key\x18\x01 \x01(\fR\x03key\x12P\n" + + "\x0ftotp_parameters\x18\x02 \x01(\v2'.org.signal.chat.account.TotpParametersR\x0etotpParametersB\n" + + "\n" + + "\bresponse\"|\n" + + "\x15ConfirmTotpKeyRequest\x12*\n" + + "\x11one_time_password\x18\x01 \x01(\rR\x0foneTimePassword\x127\n" + + "\x13metadata_ciphertext\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\xc7\x02\n" + + "\x16ConfirmTotpKeyResponse\x12c\n" + + "\rkey_confirmed\x18\x01 \x01(\v2<.org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmedH\x00R\fkeyConfirmed\x12\x94\x01\n" + + "\x1eone_time_password_not_verified\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\"\xc2\xd5\"\x1eone_time_password_not_verifiedH\x00R\x1aoneTimePasswordNotVerified\x1a%\n" + + "\fKeyConfirmed\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\rR\x05keyIdB\n" + + "\n" + + "\bresponse\"\x15\n" + + "\x13ListTotpKeysRequest\"\xf2\x02\n" + + "\x14ListTotpKeysResponse\x12K\n" + + "\x04keys\x18\x01 \x03(\v27.org.signal.chat.account.ListTotpKeysResponse.KeysEntryR\x04keys\x1a\x94\x01\n" + + "\x0fTotpKeyMetadata\x12/\n" + + "\x13metadata_ciphertext\x18\x01 \x01(\fR\x12metadataCiphertext\x12P\n" + + "\x0ftotp_parameters\x18\x02 \x01(\v2'.org.signal.chat.account.TotpParametersR\x0etotpParameters\x1av\n" + + "\tKeysEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12S\n" + + "\x05value\x18\x02 \x01(\v2=.org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadataR\x05value:\x028\x01\"k\n" + + "\x19SetTotpKeyMetadataRequest\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\rR\x05keyId\x127\n" + + "\x13metadata_ciphertext\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\x88\x02\n" + + "\x1aSetTotpKeyMetadataResponse\x12p\n" + + "\x10metadata_updated\x18\x01 \x01(\v2C.org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdatedH\x00R\x0fmetadataUpdated\x12Y\n" + + "\rkey_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x11\xc2\xd5\"\rkey_not_foundH\x00R\vkeyNotFound\x1a\x11\n" + + "\x0fMetadataUpdatedB\n" + + "\n" + + "\bresponse\"-\n" + + "\x14RemoveTotpKeyRequest\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\rR\x05keyId\"\x17\n" + + "\x15RemoveTotpKeyResponse2\xb4\x16\n" + + "\bAccounts\x12\x7f\n" + + "\x12GetAccountIdentity\x122.org.signal.chat.account.GetAccountIdentityRequest\x1a3.org.signal.chat.account.GetAccountIdentityResponse\"\x00\x12v\n" + + "\x0fGetEntitlements\x12/.org.signal.chat.account.GetEntitlementsRequest\x1a0.org.signal.chat.account.GetEntitlementsResponse\"\x00\x12p\n" + + "\rDeleteAccount\x12-.org.signal.chat.account.DeleteAccountRequest\x1a..org.signal.chat.account.DeleteAccountResponse\"\x00\x12\x82\x01\n" + + "\x13SetRegistrationLock\x123.org.signal.chat.account.SetRegistrationLockRequest\x1a4.org.signal.chat.account.SetRegistrationLockResponse\"\x00\x12\x88\x01\n" + + "\x15ClearRegistrationLock\x125.org.signal.chat.account.ClearRegistrationLockRequest\x1a6.org.signal.chat.account.ClearRegistrationLockResponse\"\x00\x12\x82\x01\n" + + "\x13ReserveUsernameHash\x123.org.signal.chat.account.ReserveUsernameHashRequest\x1a4.org.signal.chat.account.ReserveUsernameHashResponse\"\x00\x12\x82\x01\n" + + "\x13ConfirmUsernameHash\x123.org.signal.chat.account.ConfirmUsernameHashRequest\x1a4.org.signal.chat.account.ConfirmUsernameHashResponse\"\x00\x12\x7f\n" + + "\x12DeleteUsernameHash\x122.org.signal.chat.account.DeleteUsernameHashRequest\x1a3.org.signal.chat.account.DeleteUsernameHashResponse\"\x00\x12v\n" + + "\x0fSetUsernameLink\x12/.org.signal.chat.account.SetUsernameLinkRequest\x1a0.org.signal.chat.account.SetUsernameLinkResponse\"\x00\x12\x7f\n" + + "\x12DeleteUsernameLink\x122.org.signal.chat.account.DeleteUsernameLinkRequest\x1a3.org.signal.chat.account.DeleteUsernameLinkResponse\"\x00\x12\x9a\x01\n" + + "\x1bConfigureUnidentifiedAccess\x12;.org.signal.chat.account.ConfigureUnidentifiedAccessRequest\x1a<.org.signal.chat.account.ConfigureUnidentifiedAccessResponse\"\x00\x12\x9d\x01\n" + + "\x1cSetDiscoverableByPhoneNumber\x12<.org.signal.chat.account.SetDiscoverableByPhoneNumberRequest\x1a=.org.signal.chat.account.SetDiscoverableByPhoneNumberResponse\"\x00\x12\xa6\x01\n" + + "\x1fSetRegistrationRecoveryPassword\x12?.org.signal.chat.account.SetRegistrationRecoveryPasswordRequest\x1a@.org.signal.chat.account.SetRegistrationRecoveryPasswordResponse\"\x00\x12\x7f\n" + + "\x12SetZkCredentialKey\x122.org.signal.chat.account.SetZkCredentialKeyRequest\x1a3.org.signal.chat.account.SetZkCredentialKeyResponse\"\x00\x12m\n" + + "\fChangeNumber\x12,.org.signal.chat.account.ChangeNumberRequest\x1a-.org.signal.chat.account.ChangeNumberResponse\"\x00\x12\x85\x01\n" + + "\x14GetAccountDataReport\x124.org.signal.chat.account.GetAccountDataReportRequest\x1a5.org.signal.chat.account.GetAccountDataReportResponse\"\x00\x12v\n" + + "\x0fGetCapabilities\x12/.org.signal.chat.account.GetCapabilitiesRequest\x1a0.org.signal.chat.account.GetCapabilitiesResponse\"\x00\x12v\n" + + "\x0fGenerateTotpKey\x12/.org.signal.chat.account.GenerateTotpKeyRequest\x1a0.org.signal.chat.account.GenerateTotpKeyResponse\"\x00\x12s\n" + + "\x0eConfirmTotpKey\x12..org.signal.chat.account.ConfirmTotpKeyRequest\x1a/.org.signal.chat.account.ConfirmTotpKeyResponse\"\x00\x12m\n" + + "\fListTotpKeys\x12,.org.signal.chat.account.ListTotpKeysRequest\x1a-.org.signal.chat.account.ListTotpKeysResponse\"\x00\x12\x7f\n" + + "\x12SetTotpKeyMetadata\x122.org.signal.chat.account.SetTotpKeyMetadataRequest\x1a3.org.signal.chat.account.SetTotpKeyMetadataResponse\"\x00\x12p\n" + + "\rRemoveTotpKey\x12-.org.signal.chat.account.RemoveTotpKeyRequest\x1a..org.signal.chat.account.RemoveTotpKeyResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xb1\x04\n" + + "\x11AccountsAnonymous\x12\x88\x01\n" + + "\x15CheckAccountExistence\x125.org.signal.chat.account.CheckAccountExistenceRequest\x1a6.org.signal.chat.account.CheckAccountExistenceResponse\"\x00\x12\x7f\n" + + "\x12LookupUsernameHash\x122.org.signal.chat.account.LookupUsernameHashRequest\x1a3.org.signal.chat.account.LookupUsernameHashResponse\"\x00\x12\x7f\n" + + "\x12LookupUsernameLink\x122.org.signal.chat.account.LookupUsernameLinkRequest\x1a3.org.signal.chat.account.LookupUsernameLinkResponse\"\x00\x12\x88\x01\n" + + "\x0fGetCapabilities\x128.org.signal.chat.account.GetCapabilitiesAnonymousRequest\x1a9.org.signal.chat.account.GetCapabilitiesAnonymousResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_account_proto_rawDescOnce sync.Once + file_org_signal_chat_account_proto_rawDescData []byte +) + +func file_org_signal_chat_account_proto_rawDescGZIP() []byte { + file_org_signal_chat_account_proto_rawDescOnce.Do(func() { + file_org_signal_chat_account_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_account_proto_rawDesc), len(file_org_signal_chat_account_proto_rawDesc))) + }) + return file_org_signal_chat_account_proto_rawDescData +} + +var file_org_signal_chat_account_proto_msgTypes = make([]protoimpl.MessageInfo, 69) +var file_org_signal_chat_account_proto_goTypes = []any{ + (*GetAccountIdentityRequest)(nil), // 0: org.signal.chat.account.GetAccountIdentityRequest + (*GetAccountIdentityResponse)(nil), // 1: org.signal.chat.account.GetAccountIdentityResponse + (*GetEntitlementsRequest)(nil), // 2: org.signal.chat.account.GetEntitlementsRequest + (*GetEntitlementsResponse)(nil), // 3: org.signal.chat.account.GetEntitlementsResponse + (*DeleteAccountRequest)(nil), // 4: org.signal.chat.account.DeleteAccountRequest + (*DeleteAccountResponse)(nil), // 5: org.signal.chat.account.DeleteAccountResponse + (*SetRegistrationLockRequest)(nil), // 6: org.signal.chat.account.SetRegistrationLockRequest + (*SetRegistrationLockResponse)(nil), // 7: org.signal.chat.account.SetRegistrationLockResponse + (*ClearRegistrationLockRequest)(nil), // 8: org.signal.chat.account.ClearRegistrationLockRequest + (*ClearRegistrationLockResponse)(nil), // 9: org.signal.chat.account.ClearRegistrationLockResponse + (*ReserveUsernameHashRequest)(nil), // 10: org.signal.chat.account.ReserveUsernameHashRequest + (*UsernameNotAvailable)(nil), // 11: org.signal.chat.account.UsernameNotAvailable + (*ReserveUsernameHashResponse)(nil), // 12: org.signal.chat.account.ReserveUsernameHashResponse + (*ConfirmUsernameHashRequest)(nil), // 13: org.signal.chat.account.ConfirmUsernameHashRequest + (*ConfirmUsernameHashResponse)(nil), // 14: org.signal.chat.account.ConfirmUsernameHashResponse + (*DeleteUsernameHashRequest)(nil), // 15: org.signal.chat.account.DeleteUsernameHashRequest + (*DeleteUsernameHashResponse)(nil), // 16: org.signal.chat.account.DeleteUsernameHashResponse + (*SetUsernameLinkRequest)(nil), // 17: org.signal.chat.account.SetUsernameLinkRequest + (*SetUsernameLinkResponse)(nil), // 18: org.signal.chat.account.SetUsernameLinkResponse + (*DeleteUsernameLinkRequest)(nil), // 19: org.signal.chat.account.DeleteUsernameLinkRequest + (*DeleteUsernameLinkResponse)(nil), // 20: org.signal.chat.account.DeleteUsernameLinkResponse + (*ConfigureUnidentifiedAccessRequest)(nil), // 21: org.signal.chat.account.ConfigureUnidentifiedAccessRequest + (*ConfigureUnidentifiedAccessResponse)(nil), // 22: org.signal.chat.account.ConfigureUnidentifiedAccessResponse + (*SetDiscoverableByPhoneNumberRequest)(nil), // 23: org.signal.chat.account.SetDiscoverableByPhoneNumberRequest + (*SetDiscoverableByPhoneNumberResponse)(nil), // 24: org.signal.chat.account.SetDiscoverableByPhoneNumberResponse + (*SetRegistrationRecoveryPasswordRequest)(nil), // 25: org.signal.chat.account.SetRegistrationRecoveryPasswordRequest + (*SetRegistrationRecoveryPasswordResponse)(nil), // 26: org.signal.chat.account.SetRegistrationRecoveryPasswordResponse + (*CheckAccountExistenceRequest)(nil), // 27: org.signal.chat.account.CheckAccountExistenceRequest + (*CheckAccountExistenceResponse)(nil), // 28: org.signal.chat.account.CheckAccountExistenceResponse + (*LookupUsernameHashRequest)(nil), // 29: org.signal.chat.account.LookupUsernameHashRequest + (*LookupUsernameHashResponse)(nil), // 30: org.signal.chat.account.LookupUsernameHashResponse + (*LookupUsernameLinkRequest)(nil), // 31: org.signal.chat.account.LookupUsernameLinkRequest + (*LookupUsernameLinkResponse)(nil), // 32: org.signal.chat.account.LookupUsernameLinkResponse + (*SetZkCredentialKeyRequest)(nil), // 33: org.signal.chat.account.SetZkCredentialKeyRequest + (*SetZkCredentialKeyResponse)(nil), // 34: org.signal.chat.account.SetZkCredentialKeyResponse + (*ChangeNumberRequest)(nil), // 35: org.signal.chat.account.ChangeNumberRequest + (*ChangeNumberResponse)(nil), // 36: org.signal.chat.account.ChangeNumberResponse + (*RegistrationLockFailure)(nil), // 37: org.signal.chat.account.RegistrationLockFailure + (*ExternalServiceCredentials)(nil), // 38: org.signal.chat.account.ExternalServiceCredentials + (*StaleDevices)(nil), // 39: org.signal.chat.account.StaleDevices + (*GetAccountDataReportRequest)(nil), // 40: org.signal.chat.account.GetAccountDataReportRequest + (*GetAccountDataReportResponse)(nil), // 41: org.signal.chat.account.GetAccountDataReportResponse + (*GetCapabilitiesRequest)(nil), // 42: org.signal.chat.account.GetCapabilitiesRequest + (*Capabilities)(nil), // 43: org.signal.chat.account.Capabilities + (*GetCapabilitiesResponse)(nil), // 44: org.signal.chat.account.GetCapabilitiesResponse + (*GetCapabilitiesAnonymousRequest)(nil), // 45: org.signal.chat.account.GetCapabilitiesAnonymousRequest + (*GetCapabilitiesAnonymousResponse)(nil), // 46: org.signal.chat.account.GetCapabilitiesAnonymousResponse + (*TotpParameters)(nil), // 47: org.signal.chat.account.TotpParameters + (*GenerateTotpKeyRequest)(nil), // 48: org.signal.chat.account.GenerateTotpKeyRequest + (*GenerateTotpKeyResponse)(nil), // 49: org.signal.chat.account.GenerateTotpKeyResponse + (*ConfirmTotpKeyRequest)(nil), // 50: org.signal.chat.account.ConfirmTotpKeyRequest + (*ConfirmTotpKeyResponse)(nil), // 51: org.signal.chat.account.ConfirmTotpKeyResponse + (*ListTotpKeysRequest)(nil), // 52: org.signal.chat.account.ListTotpKeysRequest + (*ListTotpKeysResponse)(nil), // 53: org.signal.chat.account.ListTotpKeysResponse + (*SetTotpKeyMetadataRequest)(nil), // 54: org.signal.chat.account.SetTotpKeyMetadataRequest + (*SetTotpKeyMetadataResponse)(nil), // 55: org.signal.chat.account.SetTotpKeyMetadataResponse + (*RemoveTotpKeyRequest)(nil), // 56: org.signal.chat.account.RemoveTotpKeyRequest + (*RemoveTotpKeyResponse)(nil), // 57: org.signal.chat.account.RemoveTotpKeyResponse + (*GetEntitlementsResponse_BadgeEntitlement)(nil), // 58: org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlement + (*GetEntitlementsResponse_BackupEntitlement)(nil), // 59: org.signal.chat.account.GetEntitlementsResponse.BackupEntitlement + (*ConfirmUsernameHashResponse_ConfirmedUsernameHash)(nil), // 60: org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash + nil, // 61: org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry + nil, // 62: org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry + nil, // 63: org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntry + (*GenerateTotpKeyResponse_KeyGenerated)(nil), // 64: org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated + (*ConfirmTotpKeyResponse_KeyConfirmed)(nil), // 65: org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmed + (*ListTotpKeysResponse_TotpKeyMetadata)(nil), // 66: org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata + nil, // 67: org.signal.chat.account.ListTotpKeysResponse.KeysEntry + (*SetTotpKeyMetadataResponse_MetadataUpdated)(nil), // 68: org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdated + (*common.AccountIdentifiers)(nil), // 69: org.signal.chat.common.AccountIdentifiers + (*errors.FailedPrecondition)(nil), // 70: org.signal.chat.errors.FailedPrecondition + (*emptypb.Empty)(nil), // 71: google.protobuf.Empty + (*common.ServiceIdentifier)(nil), // 72: org.signal.chat.common.ServiceIdentifier + (*errors.NotFound)(nil), // 73: org.signal.chat.errors.NotFound + (*messages.IndividualRecipientMessageBundle)(nil), // 74: org.signal.chat.messages.IndividualRecipientMessageBundle + (*messages.MismatchedDevices)(nil), // 75: org.signal.chat.messages.MismatchedDevices + (common.DeviceCapability)(0), // 76: org.signal.chat.common.DeviceCapability + (*errors.FailedUnidentifiedAuthorization)(nil), // 77: org.signal.chat.errors.FailedUnidentifiedAuthorization + (*common.EcSignedPreKey)(nil), // 78: org.signal.chat.common.EcSignedPreKey + (*common.KemSignedPreKey)(nil), // 79: org.signal.chat.common.KemSignedPreKey +} +var file_org_signal_chat_account_proto_depIdxs = []int32{ + 69, // 0: org.signal.chat.account.GetAccountIdentityResponse.account_identifiers:type_name -> org.signal.chat.common.AccountIdentifiers + 58, // 1: org.signal.chat.account.GetEntitlementsResponse.badges:type_name -> org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlement + 59, // 2: org.signal.chat.account.GetEntitlementsResponse.backup:type_name -> org.signal.chat.account.GetEntitlementsResponse.BackupEntitlement + 11, // 3: org.signal.chat.account.ReserveUsernameHashResponse.username_not_available:type_name -> org.signal.chat.account.UsernameNotAvailable + 60, // 4: org.signal.chat.account.ConfirmUsernameHashResponse.confirmed_username_hash:type_name -> org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash + 70, // 5: org.signal.chat.account.ConfirmUsernameHashResponse.reservation_not_found:type_name -> org.signal.chat.errors.FailedPrecondition + 11, // 6: org.signal.chat.account.ConfirmUsernameHashResponse.username_not_available:type_name -> org.signal.chat.account.UsernameNotAvailable + 70, // 7: org.signal.chat.account.SetUsernameLinkResponse.no_username_set:type_name -> org.signal.chat.errors.FailedPrecondition + 71, // 8: org.signal.chat.account.ConfigureUnidentifiedAccessRequest.allow_unrestricted_unidentified_access:type_name -> google.protobuf.Empty + 72, // 9: org.signal.chat.account.CheckAccountExistenceRequest.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 72, // 10: org.signal.chat.account.LookupUsernameHashResponse.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 73, // 11: org.signal.chat.account.LookupUsernameHashResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 73, // 12: org.signal.chat.account.LookupUsernameLinkResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 74, // 13: org.signal.chat.account.ChangeNumberRequest.device_messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle + 61, // 14: org.signal.chat.account.ChangeNumberRequest.device_pni_signed_pre_keys:type_name -> org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry + 62, // 15: org.signal.chat.account.ChangeNumberRequest.device_pni_pq_last_resort_pre_keys:type_name -> org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry + 63, // 16: org.signal.chat.account.ChangeNumberRequest.pni_registration_ids:type_name -> org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntry + 69, // 17: org.signal.chat.account.ChangeNumberResponse.account_identifiers:type_name -> org.signal.chat.common.AccountIdentifiers + 75, // 18: org.signal.chat.account.ChangeNumberResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices + 37, // 19: org.signal.chat.account.ChangeNumberResponse.registration_lock_failure:type_name -> org.signal.chat.account.RegistrationLockFailure + 39, // 20: org.signal.chat.account.ChangeNumberResponse.stale_devices:type_name -> org.signal.chat.account.StaleDevices + 70, // 21: org.signal.chat.account.ChangeNumberResponse.message_too_large:type_name -> org.signal.chat.errors.FailedPrecondition + 70, // 22: org.signal.chat.account.ChangeNumberResponse.unverified_registration_session:type_name -> org.signal.chat.errors.FailedPrecondition + 70, // 23: org.signal.chat.account.ChangeNumberResponse.invalid_registration_session:type_name -> org.signal.chat.errors.FailedPrecondition + 70, // 24: org.signal.chat.account.ChangeNumberResponse.recovery_password_verification_failed:type_name -> org.signal.chat.errors.FailedPrecondition + 38, // 25: org.signal.chat.account.RegistrationLockFailure.svr2_credentials:type_name -> org.signal.chat.account.ExternalServiceCredentials + 76, // 26: org.signal.chat.account.Capabilities.capabilities:type_name -> org.signal.chat.common.DeviceCapability + 43, // 27: org.signal.chat.account.GetCapabilitiesResponse.capabilities:type_name -> org.signal.chat.account.Capabilities + 72, // 28: org.signal.chat.account.GetCapabilitiesAnonymousRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 43, // 29: org.signal.chat.account.GetCapabilitiesAnonymousResponse.capabilities:type_name -> org.signal.chat.account.Capabilities + 73, // 30: org.signal.chat.account.GetCapabilitiesAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 77, // 31: org.signal.chat.account.GetCapabilitiesAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 64, // 32: org.signal.chat.account.GenerateTotpKeyResponse.key_generated:type_name -> org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated + 70, // 33: org.signal.chat.account.GenerateTotpKeyResponse.too_many_totp_keys:type_name -> org.signal.chat.errors.FailedPrecondition + 65, // 34: org.signal.chat.account.ConfirmTotpKeyResponse.key_confirmed:type_name -> org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmed + 70, // 35: org.signal.chat.account.ConfirmTotpKeyResponse.one_time_password_not_verified:type_name -> org.signal.chat.errors.FailedPrecondition + 67, // 36: org.signal.chat.account.ListTotpKeysResponse.keys:type_name -> org.signal.chat.account.ListTotpKeysResponse.KeysEntry + 68, // 37: org.signal.chat.account.SetTotpKeyMetadataResponse.metadata_updated:type_name -> org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdated + 73, // 38: org.signal.chat.account.SetTotpKeyMetadataResponse.key_not_found:type_name -> org.signal.chat.errors.NotFound + 78, // 39: org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry.value:type_name -> org.signal.chat.common.EcSignedPreKey + 79, // 40: org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry.value:type_name -> org.signal.chat.common.KemSignedPreKey + 47, // 41: org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated.totp_parameters:type_name -> org.signal.chat.account.TotpParameters + 47, // 42: org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata.totp_parameters:type_name -> org.signal.chat.account.TotpParameters + 66, // 43: org.signal.chat.account.ListTotpKeysResponse.KeysEntry.value:type_name -> org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata + 0, // 44: org.signal.chat.account.Accounts.GetAccountIdentity:input_type -> org.signal.chat.account.GetAccountIdentityRequest + 2, // 45: org.signal.chat.account.Accounts.GetEntitlements:input_type -> org.signal.chat.account.GetEntitlementsRequest + 4, // 46: org.signal.chat.account.Accounts.DeleteAccount:input_type -> org.signal.chat.account.DeleteAccountRequest + 6, // 47: org.signal.chat.account.Accounts.SetRegistrationLock:input_type -> org.signal.chat.account.SetRegistrationLockRequest + 8, // 48: org.signal.chat.account.Accounts.ClearRegistrationLock:input_type -> org.signal.chat.account.ClearRegistrationLockRequest + 10, // 49: org.signal.chat.account.Accounts.ReserveUsernameHash:input_type -> org.signal.chat.account.ReserveUsernameHashRequest + 13, // 50: org.signal.chat.account.Accounts.ConfirmUsernameHash:input_type -> org.signal.chat.account.ConfirmUsernameHashRequest + 15, // 51: org.signal.chat.account.Accounts.DeleteUsernameHash:input_type -> org.signal.chat.account.DeleteUsernameHashRequest + 17, // 52: org.signal.chat.account.Accounts.SetUsernameLink:input_type -> org.signal.chat.account.SetUsernameLinkRequest + 19, // 53: org.signal.chat.account.Accounts.DeleteUsernameLink:input_type -> org.signal.chat.account.DeleteUsernameLinkRequest + 21, // 54: org.signal.chat.account.Accounts.ConfigureUnidentifiedAccess:input_type -> org.signal.chat.account.ConfigureUnidentifiedAccessRequest + 23, // 55: org.signal.chat.account.Accounts.SetDiscoverableByPhoneNumber:input_type -> org.signal.chat.account.SetDiscoverableByPhoneNumberRequest + 25, // 56: org.signal.chat.account.Accounts.SetRegistrationRecoveryPassword:input_type -> org.signal.chat.account.SetRegistrationRecoveryPasswordRequest + 33, // 57: org.signal.chat.account.Accounts.SetZkCredentialKey:input_type -> org.signal.chat.account.SetZkCredentialKeyRequest + 35, // 58: org.signal.chat.account.Accounts.ChangeNumber:input_type -> org.signal.chat.account.ChangeNumberRequest + 40, // 59: org.signal.chat.account.Accounts.GetAccountDataReport:input_type -> org.signal.chat.account.GetAccountDataReportRequest + 42, // 60: org.signal.chat.account.Accounts.GetCapabilities:input_type -> org.signal.chat.account.GetCapabilitiesRequest + 48, // 61: org.signal.chat.account.Accounts.GenerateTotpKey:input_type -> org.signal.chat.account.GenerateTotpKeyRequest + 50, // 62: org.signal.chat.account.Accounts.ConfirmTotpKey:input_type -> org.signal.chat.account.ConfirmTotpKeyRequest + 52, // 63: org.signal.chat.account.Accounts.ListTotpKeys:input_type -> org.signal.chat.account.ListTotpKeysRequest + 54, // 64: org.signal.chat.account.Accounts.SetTotpKeyMetadata:input_type -> org.signal.chat.account.SetTotpKeyMetadataRequest + 56, // 65: org.signal.chat.account.Accounts.RemoveTotpKey:input_type -> org.signal.chat.account.RemoveTotpKeyRequest + 27, // 66: org.signal.chat.account.AccountsAnonymous.CheckAccountExistence:input_type -> org.signal.chat.account.CheckAccountExistenceRequest + 29, // 67: org.signal.chat.account.AccountsAnonymous.LookupUsernameHash:input_type -> org.signal.chat.account.LookupUsernameHashRequest + 31, // 68: org.signal.chat.account.AccountsAnonymous.LookupUsernameLink:input_type -> org.signal.chat.account.LookupUsernameLinkRequest + 45, // 69: org.signal.chat.account.AccountsAnonymous.GetCapabilities:input_type -> org.signal.chat.account.GetCapabilitiesAnonymousRequest + 1, // 70: org.signal.chat.account.Accounts.GetAccountIdentity:output_type -> org.signal.chat.account.GetAccountIdentityResponse + 3, // 71: org.signal.chat.account.Accounts.GetEntitlements:output_type -> org.signal.chat.account.GetEntitlementsResponse + 5, // 72: org.signal.chat.account.Accounts.DeleteAccount:output_type -> org.signal.chat.account.DeleteAccountResponse + 7, // 73: org.signal.chat.account.Accounts.SetRegistrationLock:output_type -> org.signal.chat.account.SetRegistrationLockResponse + 9, // 74: org.signal.chat.account.Accounts.ClearRegistrationLock:output_type -> org.signal.chat.account.ClearRegistrationLockResponse + 12, // 75: org.signal.chat.account.Accounts.ReserveUsernameHash:output_type -> org.signal.chat.account.ReserveUsernameHashResponse + 14, // 76: org.signal.chat.account.Accounts.ConfirmUsernameHash:output_type -> org.signal.chat.account.ConfirmUsernameHashResponse + 16, // 77: org.signal.chat.account.Accounts.DeleteUsernameHash:output_type -> org.signal.chat.account.DeleteUsernameHashResponse + 18, // 78: org.signal.chat.account.Accounts.SetUsernameLink:output_type -> org.signal.chat.account.SetUsernameLinkResponse + 20, // 79: org.signal.chat.account.Accounts.DeleteUsernameLink:output_type -> org.signal.chat.account.DeleteUsernameLinkResponse + 22, // 80: org.signal.chat.account.Accounts.ConfigureUnidentifiedAccess:output_type -> org.signal.chat.account.ConfigureUnidentifiedAccessResponse + 24, // 81: org.signal.chat.account.Accounts.SetDiscoverableByPhoneNumber:output_type -> org.signal.chat.account.SetDiscoverableByPhoneNumberResponse + 26, // 82: org.signal.chat.account.Accounts.SetRegistrationRecoveryPassword:output_type -> org.signal.chat.account.SetRegistrationRecoveryPasswordResponse + 34, // 83: org.signal.chat.account.Accounts.SetZkCredentialKey:output_type -> org.signal.chat.account.SetZkCredentialKeyResponse + 36, // 84: org.signal.chat.account.Accounts.ChangeNumber:output_type -> org.signal.chat.account.ChangeNumberResponse + 41, // 85: org.signal.chat.account.Accounts.GetAccountDataReport:output_type -> org.signal.chat.account.GetAccountDataReportResponse + 44, // 86: org.signal.chat.account.Accounts.GetCapabilities:output_type -> org.signal.chat.account.GetCapabilitiesResponse + 49, // 87: org.signal.chat.account.Accounts.GenerateTotpKey:output_type -> org.signal.chat.account.GenerateTotpKeyResponse + 51, // 88: org.signal.chat.account.Accounts.ConfirmTotpKey:output_type -> org.signal.chat.account.ConfirmTotpKeyResponse + 53, // 89: org.signal.chat.account.Accounts.ListTotpKeys:output_type -> org.signal.chat.account.ListTotpKeysResponse + 55, // 90: org.signal.chat.account.Accounts.SetTotpKeyMetadata:output_type -> org.signal.chat.account.SetTotpKeyMetadataResponse + 57, // 91: org.signal.chat.account.Accounts.RemoveTotpKey:output_type -> org.signal.chat.account.RemoveTotpKeyResponse + 28, // 92: org.signal.chat.account.AccountsAnonymous.CheckAccountExistence:output_type -> org.signal.chat.account.CheckAccountExistenceResponse + 30, // 93: org.signal.chat.account.AccountsAnonymous.LookupUsernameHash:output_type -> org.signal.chat.account.LookupUsernameHashResponse + 32, // 94: org.signal.chat.account.AccountsAnonymous.LookupUsernameLink:output_type -> org.signal.chat.account.LookupUsernameLinkResponse + 46, // 95: org.signal.chat.account.AccountsAnonymous.GetCapabilities:output_type -> org.signal.chat.account.GetCapabilitiesAnonymousResponse + 70, // [70:96] is the sub-list for method output_type + 44, // [44:70] is the sub-list for method input_type + 44, // [44:44] is the sub-list for extension type_name + 44, // [44:44] is the sub-list for extension extendee + 0, // [0:44] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_account_proto_init() } +func file_org_signal_chat_account_proto_init() { + if File_org_signal_chat_account_proto != nil { + return + } + file_org_signal_chat_account_proto_msgTypes[12].OneofWrappers = []any{ + (*ReserveUsernameHashResponse_UsernameHash)(nil), + (*ReserveUsernameHashResponse_UsernameNotAvailable)(nil), + } + file_org_signal_chat_account_proto_msgTypes[14].OneofWrappers = []any{ + (*ConfirmUsernameHashResponse_ConfirmedUsernameHash_)(nil), + (*ConfirmUsernameHashResponse_ReservationNotFound)(nil), + (*ConfirmUsernameHashResponse_UsernameNotAvailable)(nil), + } + file_org_signal_chat_account_proto_msgTypes[18].OneofWrappers = []any{ + (*SetUsernameLinkResponse_UsernameLinkHandle)(nil), + (*SetUsernameLinkResponse_NoUsernameSet)(nil), + } + file_org_signal_chat_account_proto_msgTypes[21].OneofWrappers = []any{ + (*ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey)(nil), + (*ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess)(nil), + } + file_org_signal_chat_account_proto_msgTypes[30].OneofWrappers = []any{ + (*LookupUsernameHashResponse_ServiceIdentifier)(nil), + (*LookupUsernameHashResponse_NotFound)(nil), + } + file_org_signal_chat_account_proto_msgTypes[32].OneofWrappers = []any{ + (*LookupUsernameLinkResponse_UsernameCiphertext)(nil), + (*LookupUsernameLinkResponse_NotFound)(nil), + } + file_org_signal_chat_account_proto_msgTypes[35].OneofWrappers = []any{ + (*ChangeNumberRequest_SessionId)(nil), + (*ChangeNumberRequest_RecoveryPassword)(nil), + } + file_org_signal_chat_account_proto_msgTypes[36].OneofWrappers = []any{ + (*ChangeNumberResponse_AccountIdentifiers)(nil), + (*ChangeNumberResponse_MismatchedDevices)(nil), + (*ChangeNumberResponse_RegistrationLockFailure)(nil), + (*ChangeNumberResponse_StaleDevices)(nil), + (*ChangeNumberResponse_MessageTooLarge)(nil), + (*ChangeNumberResponse_UnverifiedRegistrationSession)(nil), + (*ChangeNumberResponse_InvalidRegistrationSession)(nil), + (*ChangeNumberResponse_RecoveryPasswordVerificationFailed)(nil), + } + file_org_signal_chat_account_proto_msgTypes[45].OneofWrappers = []any{ + (*GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey)(nil), + (*GetCapabilitiesAnonymousRequest_GroupSendToken)(nil), + } + file_org_signal_chat_account_proto_msgTypes[46].OneofWrappers = []any{ + (*GetCapabilitiesAnonymousResponse_Capabilities)(nil), + (*GetCapabilitiesAnonymousResponse_NotFound)(nil), + (*GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization)(nil), + } + file_org_signal_chat_account_proto_msgTypes[49].OneofWrappers = []any{ + (*GenerateTotpKeyResponse_KeyGenerated_)(nil), + (*GenerateTotpKeyResponse_TooManyTotpKeys)(nil), + } + file_org_signal_chat_account_proto_msgTypes[51].OneofWrappers = []any{ + (*ConfirmTotpKeyResponse_KeyConfirmed_)(nil), + (*ConfirmTotpKeyResponse_OneTimePasswordNotVerified)(nil), + } + file_org_signal_chat_account_proto_msgTypes[55].OneofWrappers = []any{ + (*SetTotpKeyMetadataResponse_MetadataUpdated_)(nil), + (*SetTotpKeyMetadataResponse_KeyNotFound)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_account_proto_rawDesc), len(file_org_signal_chat_account_proto_rawDesc)), + NumEnums: 0, + NumMessages: 69, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_org_signal_chat_account_proto_goTypes, + DependencyIndexes: file_org_signal_chat_account_proto_depIdxs, + MessageInfos: file_org_signal_chat_account_proto_msgTypes, + }.Build() + File_org_signal_chat_account_proto = out.File + file_org_signal_chat_account_proto_goTypes = nil + file_org_signal_chat_account_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go new file mode 100644 index 0000000..609e7d6 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go @@ -0,0 +1,1231 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/account.proto + +package account + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Accounts_GetAccountIdentity_FullMethodName = "/org.signal.chat.account.Accounts/GetAccountIdentity" + Accounts_GetEntitlements_FullMethodName = "/org.signal.chat.account.Accounts/GetEntitlements" + Accounts_DeleteAccount_FullMethodName = "/org.signal.chat.account.Accounts/DeleteAccount" + Accounts_SetRegistrationLock_FullMethodName = "/org.signal.chat.account.Accounts/SetRegistrationLock" + Accounts_ClearRegistrationLock_FullMethodName = "/org.signal.chat.account.Accounts/ClearRegistrationLock" + Accounts_ReserveUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/ReserveUsernameHash" + Accounts_ConfirmUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/ConfirmUsernameHash" + Accounts_DeleteUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/DeleteUsernameHash" + Accounts_SetUsernameLink_FullMethodName = "/org.signal.chat.account.Accounts/SetUsernameLink" + Accounts_DeleteUsernameLink_FullMethodName = "/org.signal.chat.account.Accounts/DeleteUsernameLink" + Accounts_ConfigureUnidentifiedAccess_FullMethodName = "/org.signal.chat.account.Accounts/ConfigureUnidentifiedAccess" + Accounts_SetDiscoverableByPhoneNumber_FullMethodName = "/org.signal.chat.account.Accounts/SetDiscoverableByPhoneNumber" + Accounts_SetRegistrationRecoveryPassword_FullMethodName = "/org.signal.chat.account.Accounts/SetRegistrationRecoveryPassword" + Accounts_SetZkCredentialKey_FullMethodName = "/org.signal.chat.account.Accounts/SetZkCredentialKey" + Accounts_ChangeNumber_FullMethodName = "/org.signal.chat.account.Accounts/ChangeNumber" + Accounts_GetAccountDataReport_FullMethodName = "/org.signal.chat.account.Accounts/GetAccountDataReport" + Accounts_GetCapabilities_FullMethodName = "/org.signal.chat.account.Accounts/GetCapabilities" + Accounts_GenerateTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/GenerateTotpKey" + Accounts_ConfirmTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/ConfirmTotpKey" + Accounts_ListTotpKeys_FullMethodName = "/org.signal.chat.account.Accounts/ListTotpKeys" + Accounts_SetTotpKeyMetadata_FullMethodName = "/org.signal.chat.account.Accounts/SetTotpKeyMetadata" + Accounts_RemoveTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/RemoveTotpKey" +) + +// AccountsClient is the client API for Accounts service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for working with Signal accounts. +type AccountsClient interface { + // Returns basic identifiers for the authenticated account. + GetAccountIdentity(ctx context.Context, in *GetAccountIdentityRequest, opts ...grpc.CallOption) (*GetAccountIdentityResponse, error) + // Returns entitlements for the authenticated account. + GetEntitlements(ctx context.Context, in *GetEntitlementsRequest, opts ...grpc.CallOption) (*GetEntitlementsResponse, error) + // Deletes the authenticated account, purging all associated data in the + // process. + DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) + // Sets the registration lock secret for the authenticated account. To remove + // a registration lock, please use `ClearRegistrationLock`. + SetRegistrationLock(ctx context.Context, in *SetRegistrationLockRequest, opts ...grpc.CallOption) (*SetRegistrationLockResponse, error) + // Removes any registration lock credentials from the authenticated account. + ClearRegistrationLock(ctx context.Context, in *ClearRegistrationLockRequest, opts ...grpc.CallOption) (*ClearRegistrationLockResponse, error) + // Attempts to reserve one of multiple given username hashes. Reserved + // usernames may be claimed later via `ConfirmUsernameHash`. + ReserveUsernameHash(ctx context.Context, in *ReserveUsernameHashRequest, opts ...grpc.CallOption) (*ReserveUsernameHashResponse, error) + // Sets the username hash/encrypted username to a previously-reserved value + // (see `ReserveUsernameHash`). + ConfirmUsernameHash(ctx context.Context, in *ConfirmUsernameHashRequest, opts ...grpc.CallOption) (*ConfirmUsernameHashResponse, error) + // Clears the current username hash, ciphertext, and link for the + // authenticated user. + DeleteUsernameHash(ctx context.Context, in *DeleteUsernameHashRequest, opts ...grpc.CallOption) (*DeleteUsernameHashResponse, error) + // Associates the given username ciphertext with the account, replacing any + // previously stored ciphertext. A new link handle will optionally be created, + // and the link handle to use will be returned in any event. + SetUsernameLink(ctx context.Context, in *SetUsernameLinkRequest, opts ...grpc.CallOption) (*SetUsernameLinkResponse, error) + // Clears any username link associated with the authenticated account. + DeleteUsernameLink(ctx context.Context, in *DeleteUsernameLinkRequest, opts ...grpc.CallOption) (*DeleteUsernameLinkResponse, error) + // Configures "unidentified access" keys and preferences for the authenticated + // account. Other users permitted to interact with this account anonymously + // may take actions like fetching pre-keys and profiles for this account or + // sending sealed-sender messages without providing identifying credentials. + ConfigureUnidentifiedAccess(ctx context.Context, in *ConfigureUnidentifiedAccessRequest, opts ...grpc.CallOption) (*ConfigureUnidentifiedAccessResponse, error) + // Sets whether the authenticated account may be discovered by phone number + // via the Contact Discovery Service (CDS). + SetDiscoverableByPhoneNumber(ctx context.Context, in *SetDiscoverableByPhoneNumberRequest, opts ...grpc.CallOption) (*SetDiscoverableByPhoneNumberResponse, error) + // Sets the registration recovery password for the authenticated account. + SetRegistrationRecoveryPassword(ctx context.Context, in *SetRegistrationRecoveryPasswordRequest, opts ...grpc.CallOption) (*SetRegistrationRecoveryPasswordResponse, error) + // Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account. + SetZkCredentialKey(ctx context.Context, in *SetZkCredentialKeyRequest, opts ...grpc.CallOption) (*SetZkCredentialKeyResponse, error) + // Changes the phone number associated with the authenticated account. + ChangeNumber(ctx context.Context, in *ChangeNumberRequest, opts ...grpc.CallOption) (*ChangeNumberResponse, error) + // Produces a report of non-ephemeral account data stored by the service + GetAccountDataReport(ctx context.Context, in *GetAccountDataReportRequest, opts ...grpc.CallOption) (*GetAccountDataReportResponse, error) + // Gets the capabilities for the authenticated account. + GetCapabilities(ctx context.Context, in *GetCapabilitiesRequest, opts ...grpc.CallOption) (*GetCapabilitiesResponse, error) + // Generates and stores a pending TOTP key for the authenticated account. + // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. + GenerateTotpKey(ctx context.Context, in *GenerateTotpKeyRequest, opts ...grpc.CallOption) (*GenerateTotpKeyResponse, error) + // Confirms that the caller has stored and can derive one-time passwords from + // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the + // key for the caller's account + ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyRequest, opts ...grpc.CallOption) (*ConfirmTotpKeyResponse, error) + // Returns a list of confirmed TOTP keys for the authenticated account + ListTotpKeys(ctx context.Context, in *ListTotpKeysRequest, opts ...grpc.CallOption) (*ListTotpKeysResponse, error) + // Updates encrypted, user-supplied metadata (e.g. a human-readable name and + // creation timestamp) for an existing, confirmed TOTP key + SetTotpKeyMetadata(ctx context.Context, in *SetTotpKeyMetadataRequest, opts ...grpc.CallOption) (*SetTotpKeyMetadataResponse, error) + // Removes a TOTP from the authenticated account + RemoveTotpKey(ctx context.Context, in *RemoveTotpKeyRequest, opts ...grpc.CallOption) (*RemoveTotpKeyResponse, error) +} + +type accountsClient struct { + cc grpc.ClientConnInterface +} + +func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient { + return &accountsClient{cc} +} + +func (c *accountsClient) GetAccountIdentity(ctx context.Context, in *GetAccountIdentityRequest, opts ...grpc.CallOption) (*GetAccountIdentityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountIdentityResponse) + err := c.cc.Invoke(ctx, Accounts_GetAccountIdentity_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GetEntitlements(ctx context.Context, in *GetEntitlementsRequest, opts ...grpc.CallOption) (*GetEntitlementsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetEntitlementsResponse) + err := c.cc.Invoke(ctx, Accounts_GetEntitlements_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteAccountResponse) + err := c.cc.Invoke(ctx, Accounts_DeleteAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) SetRegistrationLock(ctx context.Context, in *SetRegistrationLockRequest, opts ...grpc.CallOption) (*SetRegistrationLockResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetRegistrationLockResponse) + err := c.cc.Invoke(ctx, Accounts_SetRegistrationLock_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) ClearRegistrationLock(ctx context.Context, in *ClearRegistrationLockRequest, opts ...grpc.CallOption) (*ClearRegistrationLockResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ClearRegistrationLockResponse) + err := c.cc.Invoke(ctx, Accounts_ClearRegistrationLock_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) ReserveUsernameHash(ctx context.Context, in *ReserveUsernameHashRequest, opts ...grpc.CallOption) (*ReserveUsernameHashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReserveUsernameHashResponse) + err := c.cc.Invoke(ctx, Accounts_ReserveUsernameHash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) ConfirmUsernameHash(ctx context.Context, in *ConfirmUsernameHashRequest, opts ...grpc.CallOption) (*ConfirmUsernameHashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ConfirmUsernameHashResponse) + err := c.cc.Invoke(ctx, Accounts_ConfirmUsernameHash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) DeleteUsernameHash(ctx context.Context, in *DeleteUsernameHashRequest, opts ...grpc.CallOption) (*DeleteUsernameHashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteUsernameHashResponse) + err := c.cc.Invoke(ctx, Accounts_DeleteUsernameHash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) SetUsernameLink(ctx context.Context, in *SetUsernameLinkRequest, opts ...grpc.CallOption) (*SetUsernameLinkResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetUsernameLinkResponse) + err := c.cc.Invoke(ctx, Accounts_SetUsernameLink_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) DeleteUsernameLink(ctx context.Context, in *DeleteUsernameLinkRequest, opts ...grpc.CallOption) (*DeleteUsernameLinkResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteUsernameLinkResponse) + err := c.cc.Invoke(ctx, Accounts_DeleteUsernameLink_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) ConfigureUnidentifiedAccess(ctx context.Context, in *ConfigureUnidentifiedAccessRequest, opts ...grpc.CallOption) (*ConfigureUnidentifiedAccessResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ConfigureUnidentifiedAccessResponse) + err := c.cc.Invoke(ctx, Accounts_ConfigureUnidentifiedAccess_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) SetDiscoverableByPhoneNumber(ctx context.Context, in *SetDiscoverableByPhoneNumberRequest, opts ...grpc.CallOption) (*SetDiscoverableByPhoneNumberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetDiscoverableByPhoneNumberResponse) + err := c.cc.Invoke(ctx, Accounts_SetDiscoverableByPhoneNumber_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) SetRegistrationRecoveryPassword(ctx context.Context, in *SetRegistrationRecoveryPasswordRequest, opts ...grpc.CallOption) (*SetRegistrationRecoveryPasswordResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetRegistrationRecoveryPasswordResponse) + err := c.cc.Invoke(ctx, Accounts_SetRegistrationRecoveryPassword_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) SetZkCredentialKey(ctx context.Context, in *SetZkCredentialKeyRequest, opts ...grpc.CallOption) (*SetZkCredentialKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetZkCredentialKeyResponse) + err := c.cc.Invoke(ctx, Accounts_SetZkCredentialKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) ChangeNumber(ctx context.Context, in *ChangeNumberRequest, opts ...grpc.CallOption) (*ChangeNumberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ChangeNumberResponse) + err := c.cc.Invoke(ctx, Accounts_ChangeNumber_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GetAccountDataReport(ctx context.Context, in *GetAccountDataReportRequest, opts ...grpc.CallOption) (*GetAccountDataReportResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountDataReportResponse) + err := c.cc.Invoke(ctx, Accounts_GetAccountDataReport_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GetCapabilities(ctx context.Context, in *GetCapabilitiesRequest, opts ...grpc.CallOption) (*GetCapabilitiesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetCapabilitiesResponse) + err := c.cc.Invoke(ctx, Accounts_GetCapabilities_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GenerateTotpKey(ctx context.Context, in *GenerateTotpKeyRequest, opts ...grpc.CallOption) (*GenerateTotpKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GenerateTotpKeyResponse) + err := c.cc.Invoke(ctx, Accounts_GenerateTotpKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyRequest, opts ...grpc.CallOption) (*ConfirmTotpKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ConfirmTotpKeyResponse) + err := c.cc.Invoke(ctx, Accounts_ConfirmTotpKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) ListTotpKeys(ctx context.Context, in *ListTotpKeysRequest, opts ...grpc.CallOption) (*ListTotpKeysResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListTotpKeysResponse) + err := c.cc.Invoke(ctx, Accounts_ListTotpKeys_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) SetTotpKeyMetadata(ctx context.Context, in *SetTotpKeyMetadataRequest, opts ...grpc.CallOption) (*SetTotpKeyMetadataResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetTotpKeyMetadataResponse) + err := c.cc.Invoke(ctx, Accounts_SetTotpKeyMetadata_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) RemoveTotpKey(ctx context.Context, in *RemoveTotpKeyRequest, opts ...grpc.CallOption) (*RemoveTotpKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RemoveTotpKeyResponse) + err := c.cc.Invoke(ctx, Accounts_RemoveTotpKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccountsServer is the server API for Accounts service. +// All implementations must embed UnimplementedAccountsServer +// for forward compatibility. +// +// Provides methods for working with Signal accounts. +type AccountsServer interface { + // Returns basic identifiers for the authenticated account. + GetAccountIdentity(context.Context, *GetAccountIdentityRequest) (*GetAccountIdentityResponse, error) + // Returns entitlements for the authenticated account. + GetEntitlements(context.Context, *GetEntitlementsRequest) (*GetEntitlementsResponse, error) + // Deletes the authenticated account, purging all associated data in the + // process. + DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) + // Sets the registration lock secret for the authenticated account. To remove + // a registration lock, please use `ClearRegistrationLock`. + SetRegistrationLock(context.Context, *SetRegistrationLockRequest) (*SetRegistrationLockResponse, error) + // Removes any registration lock credentials from the authenticated account. + ClearRegistrationLock(context.Context, *ClearRegistrationLockRequest) (*ClearRegistrationLockResponse, error) + // Attempts to reserve one of multiple given username hashes. Reserved + // usernames may be claimed later via `ConfirmUsernameHash`. + ReserveUsernameHash(context.Context, *ReserveUsernameHashRequest) (*ReserveUsernameHashResponse, error) + // Sets the username hash/encrypted username to a previously-reserved value + // (see `ReserveUsernameHash`). + ConfirmUsernameHash(context.Context, *ConfirmUsernameHashRequest) (*ConfirmUsernameHashResponse, error) + // Clears the current username hash, ciphertext, and link for the + // authenticated user. + DeleteUsernameHash(context.Context, *DeleteUsernameHashRequest) (*DeleteUsernameHashResponse, error) + // Associates the given username ciphertext with the account, replacing any + // previously stored ciphertext. A new link handle will optionally be created, + // and the link handle to use will be returned in any event. + SetUsernameLink(context.Context, *SetUsernameLinkRequest) (*SetUsernameLinkResponse, error) + // Clears any username link associated with the authenticated account. + DeleteUsernameLink(context.Context, *DeleteUsernameLinkRequest) (*DeleteUsernameLinkResponse, error) + // Configures "unidentified access" keys and preferences for the authenticated + // account. Other users permitted to interact with this account anonymously + // may take actions like fetching pre-keys and profiles for this account or + // sending sealed-sender messages without providing identifying credentials. + ConfigureUnidentifiedAccess(context.Context, *ConfigureUnidentifiedAccessRequest) (*ConfigureUnidentifiedAccessResponse, error) + // Sets whether the authenticated account may be discovered by phone number + // via the Contact Discovery Service (CDS). + SetDiscoverableByPhoneNumber(context.Context, *SetDiscoverableByPhoneNumberRequest) (*SetDiscoverableByPhoneNumberResponse, error) + // Sets the registration recovery password for the authenticated account. + SetRegistrationRecoveryPassword(context.Context, *SetRegistrationRecoveryPasswordRequest) (*SetRegistrationRecoveryPasswordResponse, error) + // Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account. + SetZkCredentialKey(context.Context, *SetZkCredentialKeyRequest) (*SetZkCredentialKeyResponse, error) + // Changes the phone number associated with the authenticated account. + ChangeNumber(context.Context, *ChangeNumberRequest) (*ChangeNumberResponse, error) + // Produces a report of non-ephemeral account data stored by the service + GetAccountDataReport(context.Context, *GetAccountDataReportRequest) (*GetAccountDataReportResponse, error) + // Gets the capabilities for the authenticated account. + GetCapabilities(context.Context, *GetCapabilitiesRequest) (*GetCapabilitiesResponse, error) + // Generates and stores a pending TOTP key for the authenticated account. + // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. + GenerateTotpKey(context.Context, *GenerateTotpKeyRequest) (*GenerateTotpKeyResponse, error) + // Confirms that the caller has stored and can derive one-time passwords from + // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the + // key for the caller's account + ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error) + // Returns a list of confirmed TOTP keys for the authenticated account + ListTotpKeys(context.Context, *ListTotpKeysRequest) (*ListTotpKeysResponse, error) + // Updates encrypted, user-supplied metadata (e.g. a human-readable name and + // creation timestamp) for an existing, confirmed TOTP key + SetTotpKeyMetadata(context.Context, *SetTotpKeyMetadataRequest) (*SetTotpKeyMetadataResponse, error) + // Removes a TOTP from the authenticated account + RemoveTotpKey(context.Context, *RemoveTotpKeyRequest) (*RemoveTotpKeyResponse, error) + mustEmbedUnimplementedAccountsServer() +} + +// UnimplementedAccountsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAccountsServer struct{} + +func (UnimplementedAccountsServer) GetAccountIdentity(context.Context, *GetAccountIdentityRequest) (*GetAccountIdentityResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAccountIdentity not implemented") +} +func (UnimplementedAccountsServer) GetEntitlements(context.Context, *GetEntitlementsRequest) (*GetEntitlementsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetEntitlements not implemented") +} +func (UnimplementedAccountsServer) DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteAccount not implemented") +} +func (UnimplementedAccountsServer) SetRegistrationLock(context.Context, *SetRegistrationLockRequest) (*SetRegistrationLockResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetRegistrationLock not implemented") +} +func (UnimplementedAccountsServer) ClearRegistrationLock(context.Context, *ClearRegistrationLockRequest) (*ClearRegistrationLockResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ClearRegistrationLock not implemented") +} +func (UnimplementedAccountsServer) ReserveUsernameHash(context.Context, *ReserveUsernameHashRequest) (*ReserveUsernameHashResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ReserveUsernameHash not implemented") +} +func (UnimplementedAccountsServer) ConfirmUsernameHash(context.Context, *ConfirmUsernameHashRequest) (*ConfirmUsernameHashResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ConfirmUsernameHash not implemented") +} +func (UnimplementedAccountsServer) DeleteUsernameHash(context.Context, *DeleteUsernameHashRequest) (*DeleteUsernameHashResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteUsernameHash not implemented") +} +func (UnimplementedAccountsServer) SetUsernameLink(context.Context, *SetUsernameLinkRequest) (*SetUsernameLinkResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetUsernameLink not implemented") +} +func (UnimplementedAccountsServer) DeleteUsernameLink(context.Context, *DeleteUsernameLinkRequest) (*DeleteUsernameLinkResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteUsernameLink not implemented") +} +func (UnimplementedAccountsServer) ConfigureUnidentifiedAccess(context.Context, *ConfigureUnidentifiedAccessRequest) (*ConfigureUnidentifiedAccessResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ConfigureUnidentifiedAccess not implemented") +} +func (UnimplementedAccountsServer) SetDiscoverableByPhoneNumber(context.Context, *SetDiscoverableByPhoneNumberRequest) (*SetDiscoverableByPhoneNumberResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetDiscoverableByPhoneNumber not implemented") +} +func (UnimplementedAccountsServer) SetRegistrationRecoveryPassword(context.Context, *SetRegistrationRecoveryPasswordRequest) (*SetRegistrationRecoveryPasswordResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetRegistrationRecoveryPassword not implemented") +} +func (UnimplementedAccountsServer) SetZkCredentialKey(context.Context, *SetZkCredentialKeyRequest) (*SetZkCredentialKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetZkCredentialKey not implemented") +} +func (UnimplementedAccountsServer) ChangeNumber(context.Context, *ChangeNumberRequest) (*ChangeNumberResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ChangeNumber not implemented") +} +func (UnimplementedAccountsServer) GetAccountDataReport(context.Context, *GetAccountDataReportRequest) (*GetAccountDataReportResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAccountDataReport not implemented") +} +func (UnimplementedAccountsServer) GetCapabilities(context.Context, *GetCapabilitiesRequest) (*GetCapabilitiesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetCapabilities not implemented") +} +func (UnimplementedAccountsServer) GenerateTotpKey(context.Context, *GenerateTotpKeyRequest) (*GenerateTotpKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GenerateTotpKey not implemented") +} +func (UnimplementedAccountsServer) ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ConfirmTotpKey not implemented") +} +func (UnimplementedAccountsServer) ListTotpKeys(context.Context, *ListTotpKeysRequest) (*ListTotpKeysResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListTotpKeys not implemented") +} +func (UnimplementedAccountsServer) SetTotpKeyMetadata(context.Context, *SetTotpKeyMetadataRequest) (*SetTotpKeyMetadataResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetTotpKeyMetadata not implemented") +} +func (UnimplementedAccountsServer) RemoveTotpKey(context.Context, *RemoveTotpKeyRequest) (*RemoveTotpKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RemoveTotpKey not implemented") +} +func (UnimplementedAccountsServer) mustEmbedUnimplementedAccountsServer() {} +func (UnimplementedAccountsServer) testEmbeddedByValue() {} + +// UnsafeAccountsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AccountsServer will +// result in compilation errors. +type UnsafeAccountsServer interface { + mustEmbedUnimplementedAccountsServer() +} + +func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer) { + // If the following call panics, it indicates UnimplementedAccountsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Accounts_ServiceDesc, srv) +} + +func _Accounts_GetAccountIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountIdentityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetAccountIdentity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_GetAccountIdentity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetAccountIdentity(ctx, req.(*GetAccountIdentityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GetEntitlements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEntitlementsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetEntitlements(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_GetEntitlements_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetEntitlements(ctx, req.(*GetEntitlementsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).DeleteAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_DeleteAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).DeleteAccount(ctx, req.(*DeleteAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_SetRegistrationLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetRegistrationLockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).SetRegistrationLock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_SetRegistrationLock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).SetRegistrationLock(ctx, req.(*SetRegistrationLockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_ClearRegistrationLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClearRegistrationLockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).ClearRegistrationLock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_ClearRegistrationLock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).ClearRegistrationLock(ctx, req.(*ClearRegistrationLockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_ReserveUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReserveUsernameHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).ReserveUsernameHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_ReserveUsernameHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).ReserveUsernameHash(ctx, req.(*ReserveUsernameHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_ConfirmUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConfirmUsernameHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).ConfirmUsernameHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_ConfirmUsernameHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).ConfirmUsernameHash(ctx, req.(*ConfirmUsernameHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_DeleteUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteUsernameHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).DeleteUsernameHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_DeleteUsernameHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).DeleteUsernameHash(ctx, req.(*DeleteUsernameHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_SetUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetUsernameLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).SetUsernameLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_SetUsernameLink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).SetUsernameLink(ctx, req.(*SetUsernameLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_DeleteUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteUsernameLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).DeleteUsernameLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_DeleteUsernameLink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).DeleteUsernameLink(ctx, req.(*DeleteUsernameLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_ConfigureUnidentifiedAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConfigureUnidentifiedAccessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).ConfigureUnidentifiedAccess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_ConfigureUnidentifiedAccess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).ConfigureUnidentifiedAccess(ctx, req.(*ConfigureUnidentifiedAccessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_SetDiscoverableByPhoneNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetDiscoverableByPhoneNumberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).SetDiscoverableByPhoneNumber(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_SetDiscoverableByPhoneNumber_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).SetDiscoverableByPhoneNumber(ctx, req.(*SetDiscoverableByPhoneNumberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_SetRegistrationRecoveryPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetRegistrationRecoveryPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).SetRegistrationRecoveryPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_SetRegistrationRecoveryPassword_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).SetRegistrationRecoveryPassword(ctx, req.(*SetRegistrationRecoveryPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_SetZkCredentialKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetZkCredentialKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).SetZkCredentialKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_SetZkCredentialKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).SetZkCredentialKey(ctx, req.(*SetZkCredentialKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_ChangeNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeNumberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).ChangeNumber(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_ChangeNumber_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).ChangeNumber(ctx, req.(*ChangeNumberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GetAccountDataReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountDataReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetAccountDataReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_GetAccountDataReport_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetAccountDataReport(ctx, req.(*GetAccountDataReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCapabilitiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_GetCapabilities_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetCapabilities(ctx, req.(*GetCapabilitiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GenerateTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateTotpKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GenerateTotpKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_GenerateTotpKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GenerateTotpKey(ctx, req.(*GenerateTotpKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_ConfirmTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConfirmTotpKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).ConfirmTotpKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_ConfirmTotpKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).ConfirmTotpKey(ctx, req.(*ConfirmTotpKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_ListTotpKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTotpKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).ListTotpKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_ListTotpKeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).ListTotpKeys(ctx, req.(*ListTotpKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_SetTotpKeyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetTotpKeyMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).SetTotpKeyMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_SetTotpKeyMetadata_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).SetTotpKeyMetadata(ctx, req.(*SetTotpKeyMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_RemoveTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveTotpKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).RemoveTotpKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_RemoveTotpKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).RemoveTotpKey(ctx, req.(*RemoveTotpKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Accounts_ServiceDesc is the grpc.ServiceDesc for Accounts service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Accounts_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.account.Accounts", + HandlerType: (*AccountsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAccountIdentity", + Handler: _Accounts_GetAccountIdentity_Handler, + }, + { + MethodName: "GetEntitlements", + Handler: _Accounts_GetEntitlements_Handler, + }, + { + MethodName: "DeleteAccount", + Handler: _Accounts_DeleteAccount_Handler, + }, + { + MethodName: "SetRegistrationLock", + Handler: _Accounts_SetRegistrationLock_Handler, + }, + { + MethodName: "ClearRegistrationLock", + Handler: _Accounts_ClearRegistrationLock_Handler, + }, + { + MethodName: "ReserveUsernameHash", + Handler: _Accounts_ReserveUsernameHash_Handler, + }, + { + MethodName: "ConfirmUsernameHash", + Handler: _Accounts_ConfirmUsernameHash_Handler, + }, + { + MethodName: "DeleteUsernameHash", + Handler: _Accounts_DeleteUsernameHash_Handler, + }, + { + MethodName: "SetUsernameLink", + Handler: _Accounts_SetUsernameLink_Handler, + }, + { + MethodName: "DeleteUsernameLink", + Handler: _Accounts_DeleteUsernameLink_Handler, + }, + { + MethodName: "ConfigureUnidentifiedAccess", + Handler: _Accounts_ConfigureUnidentifiedAccess_Handler, + }, + { + MethodName: "SetDiscoverableByPhoneNumber", + Handler: _Accounts_SetDiscoverableByPhoneNumber_Handler, + }, + { + MethodName: "SetRegistrationRecoveryPassword", + Handler: _Accounts_SetRegistrationRecoveryPassword_Handler, + }, + { + MethodName: "SetZkCredentialKey", + Handler: _Accounts_SetZkCredentialKey_Handler, + }, + { + MethodName: "ChangeNumber", + Handler: _Accounts_ChangeNumber_Handler, + }, + { + MethodName: "GetAccountDataReport", + Handler: _Accounts_GetAccountDataReport_Handler, + }, + { + MethodName: "GetCapabilities", + Handler: _Accounts_GetCapabilities_Handler, + }, + { + MethodName: "GenerateTotpKey", + Handler: _Accounts_GenerateTotpKey_Handler, + }, + { + MethodName: "ConfirmTotpKey", + Handler: _Accounts_ConfirmTotpKey_Handler, + }, + { + MethodName: "ListTotpKeys", + Handler: _Accounts_ListTotpKeys_Handler, + }, + { + MethodName: "SetTotpKeyMetadata", + Handler: _Accounts_SetTotpKeyMetadata_Handler, + }, + { + MethodName: "RemoveTotpKey", + Handler: _Accounts_RemoveTotpKey_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/account.proto", +} + +const ( + AccountsAnonymous_CheckAccountExistence_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/CheckAccountExistence" + AccountsAnonymous_LookupUsernameHash_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/LookupUsernameHash" + AccountsAnonymous_LookupUsernameLink_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/LookupUsernameLink" + AccountsAnonymous_GetCapabilities_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/GetCapabilities" +) + +// AccountsAnonymousClient is the client API for AccountsAnonymous service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for looking up Signal accounts. Callers must not provide +// identifying credentials when calling methods in this service. +type AccountsAnonymousClient interface { + // Checks whether an account with the given service identifier exists. + CheckAccountExistence(ctx context.Context, in *CheckAccountExistenceRequest, opts ...grpc.CallOption) (*CheckAccountExistenceResponse, error) + // Finds the service identifier of the account associated with the given + // username hash. + LookupUsernameHash(ctx context.Context, in *LookupUsernameHashRequest, opts ...grpc.CallOption) (*LookupUsernameHashResponse, error) + // Finds the encrypted username identified by a given username link handle. + LookupUsernameLink(ctx context.Context, in *LookupUsernameLinkRequest, opts ...grpc.CallOption) (*LookupUsernameLinkResponse, error) + // Gets the publicly-visible capabilities enabled on the account identified by + // the provided ACI. + GetCapabilities(ctx context.Context, in *GetCapabilitiesAnonymousRequest, opts ...grpc.CallOption) (*GetCapabilitiesAnonymousResponse, error) +} + +type accountsAnonymousClient struct { + cc grpc.ClientConnInterface +} + +func NewAccountsAnonymousClient(cc grpc.ClientConnInterface) AccountsAnonymousClient { + return &accountsAnonymousClient{cc} +} + +func (c *accountsAnonymousClient) CheckAccountExistence(ctx context.Context, in *CheckAccountExistenceRequest, opts ...grpc.CallOption) (*CheckAccountExistenceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckAccountExistenceResponse) + err := c.cc.Invoke(ctx, AccountsAnonymous_CheckAccountExistence_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsAnonymousClient) LookupUsernameHash(ctx context.Context, in *LookupUsernameHashRequest, opts ...grpc.CallOption) (*LookupUsernameHashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LookupUsernameHashResponse) + err := c.cc.Invoke(ctx, AccountsAnonymous_LookupUsernameHash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsAnonymousClient) LookupUsernameLink(ctx context.Context, in *LookupUsernameLinkRequest, opts ...grpc.CallOption) (*LookupUsernameLinkResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LookupUsernameLinkResponse) + err := c.cc.Invoke(ctx, AccountsAnonymous_LookupUsernameLink_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsAnonymousClient) GetCapabilities(ctx context.Context, in *GetCapabilitiesAnonymousRequest, opts ...grpc.CallOption) (*GetCapabilitiesAnonymousResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetCapabilitiesAnonymousResponse) + err := c.cc.Invoke(ctx, AccountsAnonymous_GetCapabilities_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccountsAnonymousServer is the server API for AccountsAnonymous service. +// All implementations must embed UnimplementedAccountsAnonymousServer +// for forward compatibility. +// +// Provides methods for looking up Signal accounts. Callers must not provide +// identifying credentials when calling methods in this service. +type AccountsAnonymousServer interface { + // Checks whether an account with the given service identifier exists. + CheckAccountExistence(context.Context, *CheckAccountExistenceRequest) (*CheckAccountExistenceResponse, error) + // Finds the service identifier of the account associated with the given + // username hash. + LookupUsernameHash(context.Context, *LookupUsernameHashRequest) (*LookupUsernameHashResponse, error) + // Finds the encrypted username identified by a given username link handle. + LookupUsernameLink(context.Context, *LookupUsernameLinkRequest) (*LookupUsernameLinkResponse, error) + // Gets the publicly-visible capabilities enabled on the account identified by + // the provided ACI. + GetCapabilities(context.Context, *GetCapabilitiesAnonymousRequest) (*GetCapabilitiesAnonymousResponse, error) + mustEmbedUnimplementedAccountsAnonymousServer() +} + +// UnimplementedAccountsAnonymousServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAccountsAnonymousServer struct{} + +func (UnimplementedAccountsAnonymousServer) CheckAccountExistence(context.Context, *CheckAccountExistenceRequest) (*CheckAccountExistenceResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CheckAccountExistence not implemented") +} +func (UnimplementedAccountsAnonymousServer) LookupUsernameHash(context.Context, *LookupUsernameHashRequest) (*LookupUsernameHashResponse, error) { + return nil, status.Error(codes.Unimplemented, "method LookupUsernameHash not implemented") +} +func (UnimplementedAccountsAnonymousServer) LookupUsernameLink(context.Context, *LookupUsernameLinkRequest) (*LookupUsernameLinkResponse, error) { + return nil, status.Error(codes.Unimplemented, "method LookupUsernameLink not implemented") +} +func (UnimplementedAccountsAnonymousServer) GetCapabilities(context.Context, *GetCapabilitiesAnonymousRequest) (*GetCapabilitiesAnonymousResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetCapabilities not implemented") +} +func (UnimplementedAccountsAnonymousServer) mustEmbedUnimplementedAccountsAnonymousServer() {} +func (UnimplementedAccountsAnonymousServer) testEmbeddedByValue() {} + +// UnsafeAccountsAnonymousServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AccountsAnonymousServer will +// result in compilation errors. +type UnsafeAccountsAnonymousServer interface { + mustEmbedUnimplementedAccountsAnonymousServer() +} + +func RegisterAccountsAnonymousServer(s grpc.ServiceRegistrar, srv AccountsAnonymousServer) { + // If the following call panics, it indicates UnimplementedAccountsAnonymousServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&AccountsAnonymous_ServiceDesc, srv) +} + +func _AccountsAnonymous_CheckAccountExistence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckAccountExistenceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsAnonymousServer).CheckAccountExistence(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountsAnonymous_CheckAccountExistence_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsAnonymousServer).CheckAccountExistence(ctx, req.(*CheckAccountExistenceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountsAnonymous_LookupUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupUsernameHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsAnonymousServer).LookupUsernameHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountsAnonymous_LookupUsernameHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsAnonymousServer).LookupUsernameHash(ctx, req.(*LookupUsernameHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountsAnonymous_LookupUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupUsernameLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsAnonymousServer).LookupUsernameLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountsAnonymous_LookupUsernameLink_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsAnonymousServer).LookupUsernameLink(ctx, req.(*LookupUsernameLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountsAnonymous_GetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCapabilitiesAnonymousRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsAnonymousServer).GetCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountsAnonymous_GetCapabilities_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsAnonymousServer).GetCapabilities(ctx, req.(*GetCapabilitiesAnonymousRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AccountsAnonymous_ServiceDesc is the grpc.ServiceDesc for AccountsAnonymous service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AccountsAnonymous_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.account.AccountsAnonymous", + HandlerType: (*AccountsAnonymousServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CheckAccountExistence", + Handler: _AccountsAnonymous_CheckAccountExistence_Handler, + }, + { + MethodName: "LookupUsernameHash", + Handler: _AccountsAnonymous_LookupUsernameHash_Handler, + }, + { + MethodName: "LookupUsernameLink", + Handler: _AccountsAnonymous_LookupUsernameLink_Handler, + }, + { + MethodName: "GetCapabilities", + Handler: _AccountsAnonymous_GetCapabilities_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/account.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/attachments/attachments.pb.go b/pkg/signalmeow/protobuf/rpc/attachments/attachments.pb.go new file mode 100644 index 0000000..da9464d --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/attachments/attachments.pb.go @@ -0,0 +1,357 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/attachments.proto + +package attachments + +import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetUploadFormRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The length of the attachment for the requested upload form. Uploads + // performed with this form will be limited to the provided length. + UploadLength uint64 `protobuf:"varint,1,opt,name=uploadLength,proto3" json:"uploadLength,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUploadFormRequest) Reset() { + *x = GetUploadFormRequest{} + mi := &file_org_signal_chat_attachments_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUploadFormRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUploadFormRequest) ProtoMessage() {} + +func (x *GetUploadFormRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_attachments_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUploadFormRequest.ProtoReflect.Descriptor instead. +func (*GetUploadFormRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{0} +} + +func (x *GetUploadFormRequest) GetUploadLength() uint64 { + if x != nil { + return x.UploadLength + } + return 0 +} + +type GetUploadFormResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Outcome: + // + // *GetUploadFormResponse_UploadForm + // *GetUploadFormResponse_ExceedsMaxUploadLength + Outcome isGetUploadFormResponse_Outcome `protobuf_oneof:"outcome"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUploadFormResponse) Reset() { + *x = GetUploadFormResponse{} + mi := &file_org_signal_chat_attachments_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUploadFormResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUploadFormResponse) ProtoMessage() {} + +func (x *GetUploadFormResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_attachments_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUploadFormResponse.ProtoReflect.Descriptor instead. +func (*GetUploadFormResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{1} +} + +func (x *GetUploadFormResponse) GetOutcome() isGetUploadFormResponse_Outcome { + if x != nil { + return x.Outcome + } + return nil +} + +func (x *GetUploadFormResponse) GetUploadForm() *common.UploadForm { + if x != nil { + if x, ok := x.Outcome.(*GetUploadFormResponse_UploadForm); ok { + return x.UploadForm + } + } + return nil +} + +func (x *GetUploadFormResponse) GetExceedsMaxUploadLength() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Outcome.(*GetUploadFormResponse_ExceedsMaxUploadLength); ok { + return x.ExceedsMaxUploadLength + } + } + return nil +} + +type isGetUploadFormResponse_Outcome interface { + isGetUploadFormResponse_Outcome() +} + +type GetUploadFormResponse_UploadForm struct { + UploadForm *common.UploadForm `protobuf:"bytes,1,opt,name=upload_form,json=uploadForm,proto3,oneof"` +} + +type GetUploadFormResponse_ExceedsMaxUploadLength struct { + // The request size was larger than the maximum supported upload size. The + // maximum upload size is subject to change and is governed by + // `global.attachments.maxBytes` + ExceedsMaxUploadLength *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=exceeds_max_upload_length,json=exceedsMaxUploadLength,proto3,oneof"` +} + +func (*GetUploadFormResponse_UploadForm) isGetUploadFormResponse_Outcome() {} + +func (*GetUploadFormResponse_ExceedsMaxUploadLength) isGetUploadFormResponse_Outcome() {} + +type GetStickerUploadFormRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The number of stickers in the sticker pack to upload + StickerCount uint32 `protobuf:"varint,1,opt,name=sticker_count,json=stickerCount,proto3" json:"sticker_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetStickerUploadFormRequest) Reset() { + *x = GetStickerUploadFormRequest{} + mi := &file_org_signal_chat_attachments_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetStickerUploadFormRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStickerUploadFormRequest) ProtoMessage() {} + +func (x *GetStickerUploadFormRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_attachments_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStickerUploadFormRequest.ProtoReflect.Descriptor instead. +func (*GetStickerUploadFormRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{2} +} + +func (x *GetStickerUploadFormRequest) GetStickerCount() uint32 { + if x != nil { + return x.StickerCount + } + return 0 +} + +type GetStickerUploadFormResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A randomly-generated ID for the new sticker pack + PackId string `protobuf:"bytes,1,opt,name=pack_id,json=packId,proto3" json:"pack_id,omitempty"` + // An upload form clients must use to upload a manifest for the sticker pack + ManifestUploadForm *common.S3UploadForm `protobuf:"bytes,2,opt,name=manifest_upload_form,json=manifestUploadForm,proto3" json:"manifest_upload_form,omitempty"` + // Upload forms for individual stickers within the sticker pack + StickerUploadForms []*common.S3UploadForm `protobuf:"bytes,3,rep,name=sticker_upload_forms,json=stickerUploadForms,proto3" json:"sticker_upload_forms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetStickerUploadFormResponse) Reset() { + *x = GetStickerUploadFormResponse{} + mi := &file_org_signal_chat_attachments_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetStickerUploadFormResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStickerUploadFormResponse) ProtoMessage() {} + +func (x *GetStickerUploadFormResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_attachments_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStickerUploadFormResponse.ProtoReflect.Descriptor instead. +func (*GetStickerUploadFormResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{3} +} + +func (x *GetStickerUploadFormResponse) GetPackId() string { + if x != nil { + return x.PackId + } + return "" +} + +func (x *GetStickerUploadFormResponse) GetManifestUploadForm() *common.S3UploadForm { + if x != nil { + return x.ManifestUploadForm + } + return nil +} + +func (x *GetStickerUploadFormResponse) GetStickerUploadForms() []*common.S3UploadForm { + if x != nil { + return x.StickerUploadForms + } + return nil +} + +var File_org_signal_chat_attachments_proto protoreflect.FileDescriptor + +const file_org_signal_chat_attachments_proto_rawDesc = "" + + "\n" + + "!org/signal/chat/attachments.proto\x12\x1borg.signal.chat.attachments\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"B\n" + + "\x14GetUploadFormRequest\x12*\n" + + "\fuploadLength\x18\x01 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\fuploadLength\"\xe7\x01\n" + + "\x15GetUploadFormResponse\x12E\n" + + "\vupload_form\x18\x01 \x01(\v2\".org.signal.chat.common.UploadFormH\x00R\n" + + "uploadForm\x12|\n" + + "\x19exceeds_max_upload_length\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0foversize_uploadH\x00R\x16exceedsMaxUploadLengthB\t\n" + + "\aoutcome\"M\n" + + "\x1bGetStickerUploadFormRequest\x12.\n" + + "\rsticker_count\x18\x01 \x01(\rB\t\xb2\x97\"\x05\b\x01\x10\xc9\x01R\fstickerCount\"\xe7\x01\n" + + "\x1cGetStickerUploadFormResponse\x12\x17\n" + + "\apack_id\x18\x01 \x01(\tR\x06packId\x12V\n" + + "\x14manifest_upload_form\x18\x02 \x01(\v2$.org.signal.chat.common.S3UploadFormR\x12manifestUploadForm\x12V\n" + + "\x14sticker_upload_forms\x18\x03 \x03(\v2$.org.signal.chat.common.S3UploadFormR\x12stickerUploadForms2\x9d\x02\n" + + "\vAttachments\x12x\n" + + "\rGetUploadForm\x121.org.signal.chat.attachments.GetUploadFormRequest\x1a2.org.signal.chat.attachments.GetUploadFormResponse\"\x00\x12\x8d\x01\n" + + "\x14GetStickerUploadForm\x128.org.signal.chat.attachments.GetStickerUploadFormRequest\x1a9.org.signal.chat.attachments.GetStickerUploadFormResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_attachments_proto_rawDescOnce sync.Once + file_org_signal_chat_attachments_proto_rawDescData []byte +) + +func file_org_signal_chat_attachments_proto_rawDescGZIP() []byte { + file_org_signal_chat_attachments_proto_rawDescOnce.Do(func() { + file_org_signal_chat_attachments_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_attachments_proto_rawDesc), len(file_org_signal_chat_attachments_proto_rawDesc))) + }) + return file_org_signal_chat_attachments_proto_rawDescData +} + +var file_org_signal_chat_attachments_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_org_signal_chat_attachments_proto_goTypes = []any{ + (*GetUploadFormRequest)(nil), // 0: org.signal.chat.attachments.GetUploadFormRequest + (*GetUploadFormResponse)(nil), // 1: org.signal.chat.attachments.GetUploadFormResponse + (*GetStickerUploadFormRequest)(nil), // 2: org.signal.chat.attachments.GetStickerUploadFormRequest + (*GetStickerUploadFormResponse)(nil), // 3: org.signal.chat.attachments.GetStickerUploadFormResponse + (*common.UploadForm)(nil), // 4: org.signal.chat.common.UploadForm + (*errors.FailedPrecondition)(nil), // 5: org.signal.chat.errors.FailedPrecondition + (*common.S3UploadForm)(nil), // 6: org.signal.chat.common.S3UploadForm +} +var file_org_signal_chat_attachments_proto_depIdxs = []int32{ + 4, // 0: org.signal.chat.attachments.GetUploadFormResponse.upload_form:type_name -> org.signal.chat.common.UploadForm + 5, // 1: org.signal.chat.attachments.GetUploadFormResponse.exceeds_max_upload_length:type_name -> org.signal.chat.errors.FailedPrecondition + 6, // 2: org.signal.chat.attachments.GetStickerUploadFormResponse.manifest_upload_form:type_name -> org.signal.chat.common.S3UploadForm + 6, // 3: org.signal.chat.attachments.GetStickerUploadFormResponse.sticker_upload_forms:type_name -> org.signal.chat.common.S3UploadForm + 0, // 4: org.signal.chat.attachments.Attachments.GetUploadForm:input_type -> org.signal.chat.attachments.GetUploadFormRequest + 2, // 5: org.signal.chat.attachments.Attachments.GetStickerUploadForm:input_type -> org.signal.chat.attachments.GetStickerUploadFormRequest + 1, // 6: org.signal.chat.attachments.Attachments.GetUploadForm:output_type -> org.signal.chat.attachments.GetUploadFormResponse + 3, // 7: org.signal.chat.attachments.Attachments.GetStickerUploadForm:output_type -> org.signal.chat.attachments.GetStickerUploadFormResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_attachments_proto_init() } +func file_org_signal_chat_attachments_proto_init() { + if File_org_signal_chat_attachments_proto != nil { + return + } + file_org_signal_chat_attachments_proto_msgTypes[1].OneofWrappers = []any{ + (*GetUploadFormResponse_UploadForm)(nil), + (*GetUploadFormResponse_ExceedsMaxUploadLength)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_attachments_proto_rawDesc), len(file_org_signal_chat_attachments_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_attachments_proto_goTypes, + DependencyIndexes: file_org_signal_chat_attachments_proto_depIdxs, + MessageInfos: file_org_signal_chat_attachments_proto_msgTypes, + }.Build() + File_org_signal_chat_attachments_proto = out.File + file_org_signal_chat_attachments_proto_goTypes = nil + file_org_signal_chat_attachments_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/attachments/attachments_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/attachments/attachments_grpc.pb.go new file mode 100644 index 0000000..2452d12 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/attachments/attachments_grpc.pb.go @@ -0,0 +1,167 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/attachments.proto + +package attachments + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Attachments_GetUploadForm_FullMethodName = "/org.signal.chat.attachments.Attachments/GetUploadForm" + Attachments_GetStickerUploadForm_FullMethodName = "/org.signal.chat.attachments.Attachments/GetStickerUploadForm" +) + +// AttachmentsClient is the client API for Attachments service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AttachmentsClient interface { + // Retrieve an upload form that can be used to perform a resumable upload + GetUploadForm(ctx context.Context, in *GetUploadFormRequest, opts ...grpc.CallOption) (*GetUploadFormResponse, error) + // Retrieve an upload form that can be used to upload a sticker pack + GetStickerUploadForm(ctx context.Context, in *GetStickerUploadFormRequest, opts ...grpc.CallOption) (*GetStickerUploadFormResponse, error) +} + +type attachmentsClient struct { + cc grpc.ClientConnInterface +} + +func NewAttachmentsClient(cc grpc.ClientConnInterface) AttachmentsClient { + return &attachmentsClient{cc} +} + +func (c *attachmentsClient) GetUploadForm(ctx context.Context, in *GetUploadFormRequest, opts ...grpc.CallOption) (*GetUploadFormResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetUploadFormResponse) + err := c.cc.Invoke(ctx, Attachments_GetUploadForm_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *attachmentsClient) GetStickerUploadForm(ctx context.Context, in *GetStickerUploadFormRequest, opts ...grpc.CallOption) (*GetStickerUploadFormResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetStickerUploadFormResponse) + err := c.cc.Invoke(ctx, Attachments_GetStickerUploadForm_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AttachmentsServer is the server API for Attachments service. +// All implementations must embed UnimplementedAttachmentsServer +// for forward compatibility. +type AttachmentsServer interface { + // Retrieve an upload form that can be used to perform a resumable upload + GetUploadForm(context.Context, *GetUploadFormRequest) (*GetUploadFormResponse, error) + // Retrieve an upload form that can be used to upload a sticker pack + GetStickerUploadForm(context.Context, *GetStickerUploadFormRequest) (*GetStickerUploadFormResponse, error) + mustEmbedUnimplementedAttachmentsServer() +} + +// UnimplementedAttachmentsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAttachmentsServer struct{} + +func (UnimplementedAttachmentsServer) GetUploadForm(context.Context, *GetUploadFormRequest) (*GetUploadFormResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetUploadForm not implemented") +} +func (UnimplementedAttachmentsServer) GetStickerUploadForm(context.Context, *GetStickerUploadFormRequest) (*GetStickerUploadFormResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetStickerUploadForm not implemented") +} +func (UnimplementedAttachmentsServer) mustEmbedUnimplementedAttachmentsServer() {} +func (UnimplementedAttachmentsServer) testEmbeddedByValue() {} + +// UnsafeAttachmentsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AttachmentsServer will +// result in compilation errors. +type UnsafeAttachmentsServer interface { + mustEmbedUnimplementedAttachmentsServer() +} + +func RegisterAttachmentsServer(s grpc.ServiceRegistrar, srv AttachmentsServer) { + // If the following call panics, it indicates UnimplementedAttachmentsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Attachments_ServiceDesc, srv) +} + +func _Attachments_GetUploadForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUploadFormRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttachmentsServer).GetUploadForm(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Attachments_GetUploadForm_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttachmentsServer).GetUploadForm(ctx, req.(*GetUploadFormRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Attachments_GetStickerUploadForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStickerUploadFormRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttachmentsServer).GetStickerUploadForm(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Attachments_GetStickerUploadForm_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttachmentsServer).GetStickerUploadForm(ctx, req.(*GetStickerUploadFormRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Attachments_ServiceDesc is the grpc.ServiceDesc for Attachments service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Attachments_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.attachments.Attachments", + HandlerType: (*AttachmentsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetUploadForm", + Handler: _Attachments_GetUploadForm_Handler, + }, + { + MethodName: "GetStickerUploadForm", + Handler: _Attachments_GetStickerUploadForm_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/attachments.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go b/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go new file mode 100644 index 0000000..91a3fc7 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go @@ -0,0 +1,3268 @@ +// +// Copyright 2024 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/backups.proto + +package backups + +import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SetBackupIdRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A BackupAuthCredentialRequest containing a blinded encrypted backup-id, + // encoded in standard padded base64. This backup-id should be used for + // message backups only, and must have the message backup type set on the + // credential. If absent, the message credential request will not be updated. + MessagesBackupAuthCredentialRequest []byte `protobuf:"bytes,1,opt,name=messages_backup_auth_credential_request,json=messagesBackupAuthCredentialRequest,proto3" json:"messages_backup_auth_credential_request,omitempty"` + // A BackupAuthCredentialRequest containing a blinded encrypted backup-id, + // encoded in standard padded base64. This backup-id should be used for + // media only, and must have the media type set on the credential. If absent, + // the media credential request will not be updated. + MediaBackupAuthCredentialRequest []byte `protobuf:"bytes,2,opt,name=media_backup_auth_credential_request,json=mediaBackupAuthCredentialRequest,proto3" json:"media_backup_auth_credential_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetBackupIdRequest) Reset() { + *x = SetBackupIdRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetBackupIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetBackupIdRequest) ProtoMessage() {} + +func (x *SetBackupIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetBackupIdRequest.ProtoReflect.Descriptor instead. +func (*SetBackupIdRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{0} +} + +func (x *SetBackupIdRequest) GetMessagesBackupAuthCredentialRequest() []byte { + if x != nil { + return x.MessagesBackupAuthCredentialRequest + } + return nil +} + +func (x *SetBackupIdRequest) GetMediaBackupAuthCredentialRequest() []byte { + if x != nil { + return x.MediaBackupAuthCredentialRequest + } + return nil +} + +type SetBackupIdResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetBackupIdResponse) Reset() { + *x = SetBackupIdResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetBackupIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetBackupIdResponse) ProtoMessage() {} + +func (x *SetBackupIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetBackupIdResponse.ProtoReflect.Descriptor instead. +func (*SetBackupIdResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{1} +} + +type RedeemReceiptRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Presentation for a previously acquired receipt, serialized with libsignal + Presentation []byte `protobuf:"bytes,1,opt,name=presentation,proto3" json:"presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RedeemReceiptRequest) Reset() { + *x = RedeemReceiptRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RedeemReceiptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedeemReceiptRequest) ProtoMessage() {} + +func (x *RedeemReceiptRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedeemReceiptRequest.ProtoReflect.Descriptor instead. +func (*RedeemReceiptRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{2} +} + +func (x *RedeemReceiptRequest) GetPresentation() []byte { + if x != nil { + return x.Presentation + } + return nil +} + +type RedeemReceiptResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *RedeemReceiptResponse_Success + // *RedeemReceiptResponse_AccountMissingCommitment + // *RedeemReceiptResponse_InvalidReceipt + Response isRedeemReceiptResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RedeemReceiptResponse) Reset() { + *x = RedeemReceiptResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RedeemReceiptResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedeemReceiptResponse) ProtoMessage() {} + +func (x *RedeemReceiptResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedeemReceiptResponse.ProtoReflect.Descriptor instead. +func (*RedeemReceiptResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{3} +} + +func (x *RedeemReceiptResponse) GetResponse() isRedeemReceiptResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *RedeemReceiptResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*RedeemReceiptResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *RedeemReceiptResponse) GetAccountMissingCommitment() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*RedeemReceiptResponse_AccountMissingCommitment); ok { + return x.AccountMissingCommitment + } + } + return nil +} + +func (x *RedeemReceiptResponse) GetInvalidReceipt() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*RedeemReceiptResponse_InvalidReceipt); ok { + return x.InvalidReceipt + } + } + return nil +} + +type isRedeemReceiptResponse_Response interface { + isRedeemReceiptResponse_Response() +} + +type RedeemReceiptResponse_Success struct { + // The receipt was successfully redeemed + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type RedeemReceiptResponse_AccountMissingCommitment struct { + // The target account does not have a backup-id commitment + AccountMissingCommitment *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=account_missing_commitment,json=accountMissingCommitment,proto3,oneof"` +} + +type RedeemReceiptResponse_InvalidReceipt struct { + // The provided receipt presentation was malformed or expired + InvalidReceipt *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=invalid_receipt,json=invalidReceipt,proto3,oneof"` +} + +func (*RedeemReceiptResponse_Success) isRedeemReceiptResponse_Response() {} + +func (*RedeemReceiptResponse_AccountMissingCommitment) isRedeemReceiptResponse_Response() {} + +func (*RedeemReceiptResponse_InvalidReceipt) isRedeemReceiptResponse_Response() {} + +type GetBackupAuthCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The redemption time for the first credential. This must be a day-aligned + // seconds since epoch in UTC. + RedemptionStart int64 `protobuf:"varint,1,opt,name=redemption_start,json=redemptionStart,proto3" json:"redemption_start,omitempty"` + // The redemption time for the last credential. This must be a day-aligned + // seconds since epoch in UTC. The span between redemptionStart and + // redemptionEnd must not exceed 7 days. + RedemptionStop int64 `protobuf:"varint,2,opt,name=redemption_stop,json=redemptionStop,proto3" json:"redemption_stop,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBackupAuthCredentialsRequest) Reset() { + *x = GetBackupAuthCredentialsRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBackupAuthCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBackupAuthCredentialsRequest) ProtoMessage() {} + +func (x *GetBackupAuthCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBackupAuthCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetBackupAuthCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{4} +} + +func (x *GetBackupAuthCredentialsRequest) GetRedemptionStart() int64 { + if x != nil { + return x.RedemptionStart + } + return 0 +} + +func (x *GetBackupAuthCredentialsRequest) GetRedemptionStop() int64 { + if x != nil { + return x.RedemptionStop + } + return 0 +} + +type GetBackupAuthCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The requested credentials. If absent, there was no existing blinded + // backup id associated with the provided account. + Credentials *GetBackupAuthCredentialsResponse_Credentials `protobuf:"bytes,1,opt,name=credentials,proto3" json:"credentials,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBackupAuthCredentialsResponse) Reset() { + *x = GetBackupAuthCredentialsResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBackupAuthCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBackupAuthCredentialsResponse) ProtoMessage() {} + +func (x *GetBackupAuthCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBackupAuthCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetBackupAuthCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{5} +} + +func (x *GetBackupAuthCredentialsResponse) GetCredentials() *GetBackupAuthCredentialsResponse_Credentials { + if x != nil { + return x.Credentials + } + return nil +} + +type SignedPresentation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Presentation of a BackupAuthCredential previously retrieved from + // GetBackupAuthCredentials on the authenticated channel + Presentation []byte `protobuf:"bytes,1,opt,name=presentation,proto3" json:"presentation,omitempty"` + // The presentation signed with the private key corresponding to the public + // key set with SetPublicKey + PresentationSignature []byte `protobuf:"bytes,2,opt,name=presentation_signature,json=presentationSignature,proto3" json:"presentation_signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignedPresentation) Reset() { + *x = SignedPresentation{} + mi := &file_org_signal_chat_backups_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignedPresentation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedPresentation) ProtoMessage() {} + +func (x *SignedPresentation) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignedPresentation.ProtoReflect.Descriptor instead. +func (*SignedPresentation) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{6} +} + +func (x *SignedPresentation) GetPresentation() []byte { + if x != nil { + return x.Presentation + } + return nil +} + +func (x *SignedPresentation) GetPresentationSignature() []byte { + if x != nil { + return x.PresentationSignature + } + return nil +} + +type SetPublicKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + // The public key, serialized in libsignal's elliptic-curve public key format. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPublicKeyRequest) Reset() { + *x = SetPublicKeyRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPublicKeyRequest) ProtoMessage() {} + +func (x *SetPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*SetPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{7} +} + +func (x *SetPublicKeyRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +func (x *SetPublicKeyRequest) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +type SetPublicKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SetPublicKeyResponse_Success + // *SetPublicKeyResponse_FailedAuthentication + Response isSetPublicKeyResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPublicKeyResponse) Reset() { + *x = SetPublicKeyResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPublicKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPublicKeyResponse) ProtoMessage() {} + +func (x *SetPublicKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPublicKeyResponse.ProtoReflect.Descriptor instead. +func (*SetPublicKeyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{8} +} + +func (x *SetPublicKeyResponse) GetResponse() isSetPublicKeyResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SetPublicKeyResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*SetPublicKeyResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *SetPublicKeyResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*SetPublicKeyResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isSetPublicKeyResponse_Response interface { + isSetPublicKeyResponse_Response() +} + +type SetPublicKeyResponse_Success struct { + // The public key was successfully set + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type SetPublicKeyResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + // + // This may also be returned if there was an existing public key and the + // provided public key did not match. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*SetPublicKeyResponse_Success) isSetPublicKeyResponse_Response() {} + +func (*SetPublicKeyResponse_FailedAuthentication) isSetPublicKeyResponse_Response() {} + +type GetCdnCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + Cdn uint32 `protobuf:"varint,2,opt,name=cdn,proto3" json:"cdn,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCdnCredentialsRequest) Reset() { + *x = GetCdnCredentialsRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCdnCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCdnCredentialsRequest) ProtoMessage() {} + +func (x *GetCdnCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCdnCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetCdnCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{9} +} + +func (x *GetCdnCredentialsRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +func (x *GetCdnCredentialsRequest) GetCdn() uint32 { + if x != nil { + return x.Cdn + } + return 0 +} + +type GetCdnCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetCdnCredentialsResponse_CdnCredentials_ + // *GetCdnCredentialsResponse_FailedAuthentication + Response isGetCdnCredentialsResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCdnCredentialsResponse) Reset() { + *x = GetCdnCredentialsResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCdnCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCdnCredentialsResponse) ProtoMessage() {} + +func (x *GetCdnCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCdnCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetCdnCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{10} +} + +func (x *GetCdnCredentialsResponse) GetResponse() isGetCdnCredentialsResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetCdnCredentialsResponse) GetCdnCredentials() *GetCdnCredentialsResponse_CdnCredentials { + if x != nil { + if x, ok := x.Response.(*GetCdnCredentialsResponse_CdnCredentials_); ok { + return x.CdnCredentials + } + } + return nil +} + +func (x *GetCdnCredentialsResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*GetCdnCredentialsResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isGetCdnCredentialsResponse_Response interface { + isGetCdnCredentialsResponse_Response() +} + +type GetCdnCredentialsResponse_CdnCredentials_ struct { + // Headers to include with requests to the read from the backup CDN. Includes + // time limited read-only credentials. + CdnCredentials *GetCdnCredentialsResponse_CdnCredentials `protobuf:"bytes,1,opt,name=cdn_credentials,json=cdnCredentials,proto3,oneof"` +} + +type GetCdnCredentialsResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*GetCdnCredentialsResponse_CdnCredentials_) isGetCdnCredentialsResponse_Response() {} + +func (*GetCdnCredentialsResponse_FailedAuthentication) isGetCdnCredentialsResponse_Response() {} + +type GetSvrBCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSvrBCredentialsRequest) Reset() { + *x = GetSvrBCredentialsRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSvrBCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSvrBCredentialsRequest) ProtoMessage() {} + +func (x *GetSvrBCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSvrBCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetSvrBCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{11} +} + +func (x *GetSvrBCredentialsRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +type GetSvrBCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetSvrBCredentialsResponse_SvrbCredentials + // *GetSvrBCredentialsResponse_FailedAuthentication + Response isGetSvrBCredentialsResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSvrBCredentialsResponse) Reset() { + *x = GetSvrBCredentialsResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSvrBCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSvrBCredentialsResponse) ProtoMessage() {} + +func (x *GetSvrBCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSvrBCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetSvrBCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{12} +} + +func (x *GetSvrBCredentialsResponse) GetResponse() isGetSvrBCredentialsResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetSvrBCredentialsResponse) GetSvrbCredentials() *GetSvrBCredentialsResponse_SvrBCredentials { + if x != nil { + if x, ok := x.Response.(*GetSvrBCredentialsResponse_SvrbCredentials); ok { + return x.SvrbCredentials + } + } + return nil +} + +func (x *GetSvrBCredentialsResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*GetSvrBCredentialsResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isGetSvrBCredentialsResponse_Response interface { + isGetSvrBCredentialsResponse_Response() +} + +type GetSvrBCredentialsResponse_SvrbCredentials struct { + SvrbCredentials *GetSvrBCredentialsResponse_SvrBCredentials `protobuf:"bytes,1,opt,name=svrb_credentials,json=svrbCredentials,proto3,oneof"` +} + +type GetSvrBCredentialsResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*GetSvrBCredentialsResponse_SvrbCredentials) isGetSvrBCredentialsResponse_Response() {} + +func (*GetSvrBCredentialsResponse_FailedAuthentication) isGetSvrBCredentialsResponse_Response() {} + +type GetBackupInfoRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBackupInfoRequest) Reset() { + *x = GetBackupInfoRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBackupInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBackupInfoRequest) ProtoMessage() {} + +func (x *GetBackupInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBackupInfoRequest.ProtoReflect.Descriptor instead. +func (*GetBackupInfoRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{13} +} + +func (x *GetBackupInfoRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +type GetMessageBackupInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetMessageBackupInfoResponse_BackupInfo + // *GetMessageBackupInfoResponse_FailedAuthentication + Response isGetMessageBackupInfoResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessageBackupInfoResponse) Reset() { + *x = GetMessageBackupInfoResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessageBackupInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessageBackupInfoResponse) ProtoMessage() {} + +func (x *GetMessageBackupInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMessageBackupInfoResponse.ProtoReflect.Descriptor instead. +func (*GetMessageBackupInfoResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{14} +} + +func (x *GetMessageBackupInfoResponse) GetResponse() isGetMessageBackupInfoResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetMessageBackupInfoResponse) GetBackupInfo() *GetMessageBackupInfoResponse_MessageBackupInfo { + if x != nil { + if x, ok := x.Response.(*GetMessageBackupInfoResponse_BackupInfo); ok { + return x.BackupInfo + } + } + return nil +} + +func (x *GetMessageBackupInfoResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*GetMessageBackupInfoResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isGetMessageBackupInfoResponse_Response interface { + isGetMessageBackupInfoResponse_Response() +} + +type GetMessageBackupInfoResponse_BackupInfo struct { + BackupInfo *GetMessageBackupInfoResponse_MessageBackupInfo `protobuf:"bytes,1,opt,name=backup_info,json=backupInfo,proto3,oneof"` +} + +type GetMessageBackupInfoResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*GetMessageBackupInfoResponse_BackupInfo) isGetMessageBackupInfoResponse_Response() {} + +func (*GetMessageBackupInfoResponse_FailedAuthentication) isGetMessageBackupInfoResponse_Response() {} + +type GetMediaBackupInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetMediaBackupInfoResponse_BackupInfo + // *GetMediaBackupInfoResponse_FailedAuthentication + Response isGetMediaBackupInfoResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMediaBackupInfoResponse) Reset() { + *x = GetMediaBackupInfoResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMediaBackupInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMediaBackupInfoResponse) ProtoMessage() {} + +func (x *GetMediaBackupInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMediaBackupInfoResponse.ProtoReflect.Descriptor instead. +func (*GetMediaBackupInfoResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{15} +} + +func (x *GetMediaBackupInfoResponse) GetResponse() isGetMediaBackupInfoResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetMediaBackupInfoResponse) GetBackupInfo() *GetMediaBackupInfoResponse_MediaBackupInfo { + if x != nil { + if x, ok := x.Response.(*GetMediaBackupInfoResponse_BackupInfo); ok { + return x.BackupInfo + } + } + return nil +} + +func (x *GetMediaBackupInfoResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*GetMediaBackupInfoResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isGetMediaBackupInfoResponse_Response interface { + isGetMediaBackupInfoResponse_Response() +} + +type GetMediaBackupInfoResponse_BackupInfo struct { + BackupInfo *GetMediaBackupInfoResponse_MediaBackupInfo `protobuf:"bytes,1,opt,name=backup_info,json=backupInfo,proto3,oneof"` +} + +type GetMediaBackupInfoResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*GetMediaBackupInfoResponse_BackupInfo) isGetMediaBackupInfoResponse_Response() {} + +func (*GetMediaBackupInfoResponse_FailedAuthentication) isGetMediaBackupInfoResponse_Response() {} + +type RefreshRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefreshRequest) Reset() { + *x = RefreshRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefreshRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshRequest) ProtoMessage() {} + +func (x *RefreshRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead. +func (*RefreshRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{16} +} + +func (x *RefreshRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +type RefreshResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *RefreshResponse_Success + // *RefreshResponse_FailedAuthentication + Response isRefreshResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefreshResponse) Reset() { + *x = RefreshResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefreshResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshResponse) ProtoMessage() {} + +func (x *RefreshResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshResponse.ProtoReflect.Descriptor instead. +func (*RefreshResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{17} +} + +func (x *RefreshResponse) GetResponse() isRefreshResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *RefreshResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*RefreshResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *RefreshResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*RefreshResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isRefreshResponse_Response interface { + isRefreshResponse_Response() +} + +type RefreshResponse_Success struct { + // The backup was successfully refreshed + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type RefreshResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*RefreshResponse_Success) isRefreshResponse_Response() {} + +func (*RefreshResponse_FailedAuthentication) isRefreshResponse_Response() {} + +type GetUploadFormRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + // Types that are valid to be assigned to UploadType: + // + // *GetUploadFormRequest_Messages + // *GetUploadFormRequest_Media + UploadType isGetUploadFormRequest_UploadType `protobuf_oneof:"upload_type"` + // The length of the attachment for the requested upload form. Uploads + // performed with this form will be limited to the provided length. + UploadLength uint64 `protobuf:"varint,4,opt,name=uploadLength,proto3" json:"uploadLength,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUploadFormRequest) Reset() { + *x = GetUploadFormRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUploadFormRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUploadFormRequest) ProtoMessage() {} + +func (x *GetUploadFormRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUploadFormRequest.ProtoReflect.Descriptor instead. +func (*GetUploadFormRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18} +} + +func (x *GetUploadFormRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +func (x *GetUploadFormRequest) GetUploadType() isGetUploadFormRequest_UploadType { + if x != nil { + return x.UploadType + } + return nil +} + +func (x *GetUploadFormRequest) GetMessages() *GetUploadFormRequest_MessagesUploadType { + if x != nil { + if x, ok := x.UploadType.(*GetUploadFormRequest_Messages); ok { + return x.Messages + } + } + return nil +} + +func (x *GetUploadFormRequest) GetMedia() *GetUploadFormRequest_MediaUploadType { + if x != nil { + if x, ok := x.UploadType.(*GetUploadFormRequest_Media); ok { + return x.Media + } + } + return nil +} + +func (x *GetUploadFormRequest) GetUploadLength() uint64 { + if x != nil { + return x.UploadLength + } + return 0 +} + +type isGetUploadFormRequest_UploadType interface { + isGetUploadFormRequest_UploadType() +} + +type GetUploadFormRequest_Messages struct { + // Retrieve an upload form that can be used to perform a resumable upload of + // a message backup. The finished upload will be available on the backup cdn. + Messages *GetUploadFormRequest_MessagesUploadType `protobuf:"bytes,2,opt,name=messages,proto3,oneof"` +} + +type GetUploadFormRequest_Media struct { + // Retrieve an upload form for a temporary location that can be used to + // perform a resumable upload of an attachment. After uploading, the + // attachment can be copied into the backup via CopyMedia. + // + // Behaves identically to the account authenticated version at /attachments. + Media *GetUploadFormRequest_MediaUploadType `protobuf:"bytes,3,opt,name=media,proto3,oneof"` +} + +func (*GetUploadFormRequest_Messages) isGetUploadFormRequest_UploadType() {} + +func (*GetUploadFormRequest_Media) isGetUploadFormRequest_UploadType() {} + +type GetUploadFormResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetUploadFormResponse_UploadForm + // *GetUploadFormResponse_FailedAuthentication + // *GetUploadFormResponse_ExceedsMaxUploadLength + Response isGetUploadFormResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUploadFormResponse) Reset() { + *x = GetUploadFormResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUploadFormResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUploadFormResponse) ProtoMessage() {} + +func (x *GetUploadFormResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUploadFormResponse.ProtoReflect.Descriptor instead. +func (*GetUploadFormResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{19} +} + +func (x *GetUploadFormResponse) GetResponse() isGetUploadFormResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetUploadFormResponse) GetUploadForm() *common.UploadForm { + if x != nil { + if x, ok := x.Response.(*GetUploadFormResponse_UploadForm); ok { + return x.UploadForm + } + } + return nil +} + +func (x *GetUploadFormResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*GetUploadFormResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +func (x *GetUploadFormResponse) GetExceedsMaxUploadLength() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*GetUploadFormResponse_ExceedsMaxUploadLength); ok { + return x.ExceedsMaxUploadLength + } + } + return nil +} + +type isGetUploadFormResponse_Response interface { + isGetUploadFormResponse_Response() +} + +type GetUploadFormResponse_UploadForm struct { + UploadForm *common.UploadForm `protobuf:"bytes,1,opt,name=upload_form,json=uploadForm,proto3,oneof"` +} + +type GetUploadFormResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +type GetUploadFormResponse_ExceedsMaxUploadLength struct { + // The request size was larger than the maximum supported upload size. The + // maximum upload size is subject to change and is governed by + // `global.attachments.maxBytes` + ExceedsMaxUploadLength *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=exceeds_max_upload_length,json=exceedsMaxUploadLength,proto3,oneof"` +} + +func (*GetUploadFormResponse_UploadForm) isGetUploadFormResponse_Response() {} + +func (*GetUploadFormResponse_FailedAuthentication) isGetUploadFormResponse_Response() {} + +func (*GetUploadFormResponse_ExceedsMaxUploadLength) isGetUploadFormResponse_Response() {} + +type CopyMediaItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The attachment cdn of the object to copy into the backup + SourceAttachmentCdn uint32 `protobuf:"varint,1,opt,name=source_attachment_cdn,json=sourceAttachmentCdn,proto3" json:"source_attachment_cdn,omitempty"` + // The attachment key of the object to copy into the backup + SourceKey string `protobuf:"bytes,2,opt,name=source_key,json=sourceKey,proto3" json:"source_key,omitempty"` + // The length of the source attachment before the encryption applied by the + // copy operation + ObjectLength uint64 `protobuf:"varint,3,opt,name=object_length,json=objectLength,proto3" json:"object_length,omitempty"` + // media_id to copy on to the backup CDN + MediaId []byte `protobuf:"bytes,4,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"` + // A 32-byte key for the MAC + HmacKey []byte `protobuf:"bytes,5,opt,name=hmac_key,json=hmacKey,proto3" json:"hmac_key,omitempty"` + // A 32-byte encryption key for AES + EncryptionKey []byte `protobuf:"bytes,6,opt,name=encryption_key,json=encryptionKey,proto3" json:"encryption_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CopyMediaItem) Reset() { + *x = CopyMediaItem{} + mi := &file_org_signal_chat_backups_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CopyMediaItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyMediaItem) ProtoMessage() {} + +func (x *CopyMediaItem) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyMediaItem.ProtoReflect.Descriptor instead. +func (*CopyMediaItem) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{20} +} + +func (x *CopyMediaItem) GetSourceAttachmentCdn() uint32 { + if x != nil { + return x.SourceAttachmentCdn + } + return 0 +} + +func (x *CopyMediaItem) GetSourceKey() string { + if x != nil { + return x.SourceKey + } + return "" +} + +func (x *CopyMediaItem) GetObjectLength() uint64 { + if x != nil { + return x.ObjectLength + } + return 0 +} + +func (x *CopyMediaItem) GetMediaId() []byte { + if x != nil { + return x.MediaId + } + return nil +} + +func (x *CopyMediaItem) GetHmacKey() []byte { + if x != nil { + return x.HmacKey + } + return nil +} + +func (x *CopyMediaItem) GetEncryptionKey() []byte { + if x != nil { + return x.EncryptionKey + } + return nil +} + +type CopyMediaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + // Items to copy + Items []*CopyMediaItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CopyMediaRequest) Reset() { + *x = CopyMediaRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CopyMediaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyMediaRequest) ProtoMessage() {} + +func (x *CopyMediaRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyMediaRequest.ProtoReflect.Descriptor instead. +func (*CopyMediaRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{21} +} + +func (x *CopyMediaRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +func (x *CopyMediaRequest) GetItems() []*CopyMediaItem { + if x != nil { + return x.Items + } + return nil +} + +type CopyMediaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The 15-byte media_id from the corresponding CopyMediaItem in the request + MediaId []byte `protobuf:"bytes,1,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"` + // Types that are valid to be assigned to Response: + // + // *CopyMediaResponse_Success + // *CopyMediaResponse_SourceNotFound_ + // *CopyMediaResponse_WrongSourceLength_ + // *CopyMediaResponse_OutOfSpace_ + Response isCopyMediaResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CopyMediaResponse) Reset() { + *x = CopyMediaResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CopyMediaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyMediaResponse) ProtoMessage() {} + +func (x *CopyMediaResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyMediaResponse.ProtoReflect.Descriptor instead. +func (*CopyMediaResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22} +} + +func (x *CopyMediaResponse) GetMediaId() []byte { + if x != nil { + return x.MediaId + } + return nil +} + +func (x *CopyMediaResponse) GetResponse() isCopyMediaResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *CopyMediaResponse) GetSuccess() *CopyMediaResponse_CopySuccess { + if x != nil { + if x, ok := x.Response.(*CopyMediaResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *CopyMediaResponse) GetSourceNotFound() *CopyMediaResponse_SourceNotFound { + if x != nil { + if x, ok := x.Response.(*CopyMediaResponse_SourceNotFound_); ok { + return x.SourceNotFound + } + } + return nil +} + +func (x *CopyMediaResponse) GetWrongSourceLength() *CopyMediaResponse_WrongSourceLength { + if x != nil { + if x, ok := x.Response.(*CopyMediaResponse_WrongSourceLength_); ok { + return x.WrongSourceLength + } + } + return nil +} + +func (x *CopyMediaResponse) GetOutOfSpace() *CopyMediaResponse_OutOfSpace { + if x != nil { + if x, ok := x.Response.(*CopyMediaResponse_OutOfSpace_); ok { + return x.OutOfSpace + } + } + return nil +} + +type isCopyMediaResponse_Response interface { + isCopyMediaResponse_Response() +} + +type CopyMediaResponse_Success struct { + // The media item was successfully copied into the backup + Success *CopyMediaResponse_CopySuccess `protobuf:"bytes,2,opt,name=success,proto3,oneof"` +} + +type CopyMediaResponse_SourceNotFound_ struct { + // The source object was not found + SourceNotFound *CopyMediaResponse_SourceNotFound `protobuf:"bytes,3,opt,name=source_not_found,json=sourceNotFound,proto3,oneof"` +} + +type CopyMediaResponse_WrongSourceLength_ struct { + // The provided object length was incorrect + WrongSourceLength *CopyMediaResponse_WrongSourceLength `protobuf:"bytes,4,opt,name=wrong_source_length,json=wrongSourceLength,proto3,oneof"` +} + +type CopyMediaResponse_OutOfSpace_ struct { + // All media capacity has been consumed. Free some space to continue. + OutOfSpace *CopyMediaResponse_OutOfSpace `protobuf:"bytes,5,opt,name=out_of_space,json=outOfSpace,proto3,oneof"` +} + +func (*CopyMediaResponse_Success) isCopyMediaResponse_Response() {} + +func (*CopyMediaResponse_SourceNotFound_) isCopyMediaResponse_Response() {} + +func (*CopyMediaResponse_WrongSourceLength_) isCopyMediaResponse_Response() {} + +func (*CopyMediaResponse_OutOfSpace_) isCopyMediaResponse_Response() {} + +// The reason why a media stream RPC is being prematurely closed by the server. +type BackupStreamClosed struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Reason: + // + // *BackupStreamClosed_FailedAuthentication + Reason isBackupStreamClosed_Reason `protobuf_oneof:"reason"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BackupStreamClosed) Reset() { + *x = BackupStreamClosed{} + mi := &file_org_signal_chat_backups_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BackupStreamClosed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackupStreamClosed) ProtoMessage() {} + +func (x *BackupStreamClosed) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackupStreamClosed.ProtoReflect.Descriptor instead. +func (*BackupStreamClosed) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{23} +} + +func (x *BackupStreamClosed) GetReason() isBackupStreamClosed_Reason { + if x != nil { + return x.Reason + } + return nil +} + +func (x *BackupStreamClosed) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Reason.(*BackupStreamClosed_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isBackupStreamClosed_Reason interface { + isBackupStreamClosed_Reason() +} + +type BackupStreamClosed_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,1,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*BackupStreamClosed_FailedAuthentication) isBackupStreamClosed_Reason() {} + +type ListMediaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + // A cursor returned by a previous call to ListMedia, absent on the first call + Cursor *string `protobuf:"bytes,2,opt,name=cursor,proto3,oneof" json:"cursor,omitempty"` + // If provided, the maximum number of entries to return in a page. If absent, + // a server-chosen default is used. + Limit *uint32 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMediaRequest) Reset() { + *x = ListMediaRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMediaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMediaRequest) ProtoMessage() {} + +func (x *ListMediaRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMediaRequest.ProtoReflect.Descriptor instead. +func (*ListMediaRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{24} +} + +func (x *ListMediaRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +func (x *ListMediaRequest) GetCursor() string { + if x != nil && x.Cursor != nil { + return *x.Cursor + } + return "" +} + +func (x *ListMediaRequest) GetLimit() uint32 { + if x != nil && x.Limit != nil { + return *x.Limit + } + return 0 +} + +type ListMediaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *ListMediaResponse_ListResult_ + // *ListMediaResponse_FailedAuthentication + Response isListMediaResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMediaResponse) Reset() { + *x = ListMediaResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMediaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMediaResponse) ProtoMessage() {} + +func (x *ListMediaResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMediaResponse.ProtoReflect.Descriptor instead. +func (*ListMediaResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25} +} + +func (x *ListMediaResponse) GetResponse() isListMediaResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *ListMediaResponse) GetListResult() *ListMediaResponse_ListResult { + if x != nil { + if x, ok := x.Response.(*ListMediaResponse_ListResult_); ok { + return x.ListResult + } + } + return nil +} + +func (x *ListMediaResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*ListMediaResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isListMediaResponse_Response interface { + isListMediaResponse_Response() +} + +type ListMediaResponse_ListResult_ struct { + ListResult *ListMediaResponse_ListResult `protobuf:"bytes,1,opt,name=list_result,json=listResult,proto3,oneof"` +} + +type ListMediaResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*ListMediaResponse_ListResult_) isListMediaResponse_Response() {} + +func (*ListMediaResponse_FailedAuthentication) isListMediaResponse_Response() {} + +type DeleteAllRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAllRequest) Reset() { + *x = DeleteAllRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAllRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAllRequest) ProtoMessage() {} + +func (x *DeleteAllRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAllRequest.ProtoReflect.Descriptor instead. +func (*DeleteAllRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{26} +} + +func (x *DeleteAllRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +type DeleteAllResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *DeleteAllResponse_Success + // *DeleteAllResponse_FailedAuthentication + Response isDeleteAllResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAllResponse) Reset() { + *x = DeleteAllResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAllResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAllResponse) ProtoMessage() {} + +func (x *DeleteAllResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAllResponse.ProtoReflect.Descriptor instead. +func (*DeleteAllResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{27} +} + +func (x *DeleteAllResponse) GetResponse() isDeleteAllResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *DeleteAllResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*DeleteAllResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *DeleteAllResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*DeleteAllResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +type isDeleteAllResponse_Response interface { + isDeleteAllResponse_Response() +} + +type DeleteAllResponse_Success struct { + // The backup was successfully scheduled for deletion + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type DeleteAllResponse_FailedAuthentication struct { + // The provided backup auth credential presentation could not be + // authenticated. Either, the presentation could not be verified, or + // the public key signature was invalid, or there is no backup associated + // with the backup-id in the presentation. + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +func (*DeleteAllResponse_Success) isDeleteAllResponse_Response() {} + +func (*DeleteAllResponse_FailedAuthentication) isDeleteAllResponse_Response() {} + +type DeleteMediaItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The backup cdn where this media object is stored + Cdn uint32 `protobuf:"varint,1,opt,name=cdn,proto3" json:"cdn,omitempty"` + // The media_id of the object to delete + MediaId []byte `protobuf:"bytes,2,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMediaItem) Reset() { + *x = DeleteMediaItem{} + mi := &file_org_signal_chat_backups_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMediaItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMediaItem) ProtoMessage() {} + +func (x *DeleteMediaItem) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMediaItem.ProtoReflect.Descriptor instead. +func (*DeleteMediaItem) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{28} +} + +func (x *DeleteMediaItem) GetCdn() uint32 { + if x != nil { + return x.Cdn + } + return 0 +} + +func (x *DeleteMediaItem) GetMediaId() []byte { + if x != nil { + return x.MediaId + } + return nil +} + +type DeleteMediaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` + Items []*DeleteMediaItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMediaRequest) Reset() { + *x = DeleteMediaRequest{} + mi := &file_org_signal_chat_backups_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMediaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMediaRequest) ProtoMessage() {} + +func (x *DeleteMediaRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMediaRequest.ProtoReflect.Descriptor instead. +func (*DeleteMediaRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{29} +} + +func (x *DeleteMediaRequest) GetSignedPresentation() *SignedPresentation { + if x != nil { + return x.SignedPresentation + } + return nil +} + +func (x *DeleteMediaRequest) GetItems() []*DeleteMediaItem { + if x != nil { + return x.Items + } + return nil +} + +type DeleteMediaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeletedItem *DeleteMediaItem `protobuf:"bytes,1,opt,name=deleted_item,json=deletedItem,proto3" json:"deleted_item,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMediaResponse) Reset() { + *x = DeleteMediaResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMediaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMediaResponse) ProtoMessage() {} + +func (x *DeleteMediaResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMediaResponse.ProtoReflect.Descriptor instead. +func (*DeleteMediaResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{30} +} + +func (x *DeleteMediaResponse) GetDeletedItem() *DeleteMediaItem { + if x != nil { + return x.DeletedItem + } + return nil +} + +type GetBackupAuthCredentialsResponse_Credentials struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The requested message backup ZkCredentials indexed by the start of their + // validity period. The smallest key should be for the requested + // redemption_start, the largest for the requested redemption_end. + MessageCredentials map[int64]*common.ZkCredential `protobuf:"bytes,1,rep,name=message_credentials,json=messageCredentials,proto3" json:"message_credentials,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The requested media backup ZkCredentials indexed by the start of their + // validity period. The smallest key should be for the requested + // redemption_start, the largest for the requested redemption_end. + MediaCredentials map[int64]*common.ZkCredential `protobuf:"bytes,2,rep,name=media_credentials,json=mediaCredentials,proto3" json:"media_credentials,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBackupAuthCredentialsResponse_Credentials) Reset() { + *x = GetBackupAuthCredentialsResponse_Credentials{} + mi := &file_org_signal_chat_backups_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBackupAuthCredentialsResponse_Credentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBackupAuthCredentialsResponse_Credentials) ProtoMessage() {} + +func (x *GetBackupAuthCredentialsResponse_Credentials) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBackupAuthCredentialsResponse_Credentials.ProtoReflect.Descriptor instead. +func (*GetBackupAuthCredentialsResponse_Credentials) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *GetBackupAuthCredentialsResponse_Credentials) GetMessageCredentials() map[int64]*common.ZkCredential { + if x != nil { + return x.MessageCredentials + } + return nil +} + +func (x *GetBackupAuthCredentialsResponse_Credentials) GetMediaCredentials() map[int64]*common.ZkCredential { + if x != nil { + return x.MediaCredentials + } + return nil +} + +type GetCdnCredentialsResponse_CdnCredentials struct { + state protoimpl.MessageState `protogen:"open.v1"` + Headers map[string]string `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCdnCredentialsResponse_CdnCredentials) Reset() { + *x = GetCdnCredentialsResponse_CdnCredentials{} + mi := &file_org_signal_chat_backups_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCdnCredentialsResponse_CdnCredentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCdnCredentialsResponse_CdnCredentials) ProtoMessage() {} + +func (x *GetCdnCredentialsResponse_CdnCredentials) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCdnCredentialsResponse_CdnCredentials.ProtoReflect.Descriptor instead. +func (*GetCdnCredentialsResponse_CdnCredentials) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{10, 0} +} + +func (x *GetCdnCredentialsResponse_CdnCredentials) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + +type GetSvrBCredentialsResponse_SvrBCredentials struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A username that can be presented to authenticate with SVRB + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + // A password that can be presented to authenticate with SVRB + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSvrBCredentialsResponse_SvrBCredentials) Reset() { + *x = GetSvrBCredentialsResponse_SvrBCredentials{} + mi := &file_org_signal_chat_backups_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSvrBCredentialsResponse_SvrBCredentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSvrBCredentialsResponse_SvrBCredentials) ProtoMessage() {} + +func (x *GetSvrBCredentialsResponse_SvrBCredentials) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSvrBCredentialsResponse_SvrBCredentials.ProtoReflect.Descriptor instead. +func (*GetSvrBCredentialsResponse_SvrBCredentials) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{12, 0} +} + +func (x *GetSvrBCredentialsResponse_SvrBCredentials) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *GetSvrBCredentialsResponse_SvrBCredentials) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type GetMessageBackupInfoResponse_MessageBackupInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The base directory of your backup data on the cdn. Always non-empty, even + // if a backup has not actually been stored to the cdn. If a backup was + // previously uploaded and has not expired, it can be found in the returned + // cdn at /backup_dir/backup_name. + BackupDir string `protobuf:"bytes,1,opt,name=backup_dir,json=backupDir,proto3" json:"backup_dir,omitempty"` + // The CDN type where the message backup is stored. Media may be stored + // elsewhere. + Cdn uint32 `protobuf:"varint,2,opt,name=cdn,proto3" json:"cdn,omitempty"` + // The location of the message backup on the cdn. Always non-empty, even + // if a backup has not actually been stored to the cdn. If a backup was + // previously uploaded and has not expired, it can be found in the returned + // cdn at /backup_dir/backup_name. + BackupName string `protobuf:"bytes,3,opt,name=backup_name,json=backupName,proto3" json:"backup_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessageBackupInfoResponse_MessageBackupInfo) Reset() { + *x = GetMessageBackupInfoResponse_MessageBackupInfo{} + mi := &file_org_signal_chat_backups_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessageBackupInfoResponse_MessageBackupInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessageBackupInfoResponse_MessageBackupInfo) ProtoMessage() {} + +func (x *GetMessageBackupInfoResponse_MessageBackupInfo) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMessageBackupInfoResponse_MessageBackupInfo.ProtoReflect.Descriptor instead. +func (*GetMessageBackupInfoResponse_MessageBackupInfo) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{14, 0} +} + +func (x *GetMessageBackupInfoResponse_MessageBackupInfo) GetBackupDir() string { + if x != nil { + return x.BackupDir + } + return "" +} + +func (x *GetMessageBackupInfoResponse_MessageBackupInfo) GetCdn() uint32 { + if x != nil { + return x.Cdn + } + return 0 +} + +func (x *GetMessageBackupInfoResponse_MessageBackupInfo) GetBackupName() string { + if x != nil { + return x.BackupName + } + return "" +} + +type GetMediaBackupInfoResponse_MediaBackupInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The base directory of your backup data on the cdn. Always non-empty, even + // if no media has been stored to the cdn or the credential is for a tier + // that does not support media. + BackupDir string `protobuf:"bytes,1,opt,name=backup_dir,json=backupDir,proto3" json:"backup_dir,omitempty"` + // The prefix path component for media objects on a cdn. Stored media for a + // media_id can be found at /backup_dir/media_dir/media_id, where the + // media_id is encoded in unpadded url-safe base64. Always non-empty, even + // if no media has been stored to the cdn or the credential is for a tier + // that does not support media. + MediaDir string `protobuf:"bytes,2,opt,name=media_dir,json=mediaDir,proto3" json:"media_dir,omitempty"` + // The amount of space used to store media + UsedSpace uint64 `protobuf:"varint,3,opt,name=used_space,json=usedSpace,proto3" json:"used_space,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMediaBackupInfoResponse_MediaBackupInfo) Reset() { + *x = GetMediaBackupInfoResponse_MediaBackupInfo{} + mi := &file_org_signal_chat_backups_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMediaBackupInfoResponse_MediaBackupInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMediaBackupInfoResponse_MediaBackupInfo) ProtoMessage() {} + +func (x *GetMediaBackupInfoResponse_MediaBackupInfo) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMediaBackupInfoResponse_MediaBackupInfo.ProtoReflect.Descriptor instead. +func (*GetMediaBackupInfoResponse_MediaBackupInfo) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{15, 0} +} + +func (x *GetMediaBackupInfoResponse_MediaBackupInfo) GetBackupDir() string { + if x != nil { + return x.BackupDir + } + return "" +} + +func (x *GetMediaBackupInfoResponse_MediaBackupInfo) GetMediaDir() string { + if x != nil { + return x.MediaDir + } + return "" +} + +func (x *GetMediaBackupInfoResponse_MediaBackupInfo) GetUsedSpace() uint64 { + if x != nil { + return x.UsedSpace + } + return 0 +} + +type GetUploadFormRequest_MessagesUploadType struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUploadFormRequest_MessagesUploadType) Reset() { + *x = GetUploadFormRequest_MessagesUploadType{} + mi := &file_org_signal_chat_backups_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUploadFormRequest_MessagesUploadType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUploadFormRequest_MessagesUploadType) ProtoMessage() {} + +func (x *GetUploadFormRequest_MessagesUploadType) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUploadFormRequest_MessagesUploadType.ProtoReflect.Descriptor instead. +func (*GetUploadFormRequest_MessagesUploadType) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18, 0} +} + +type GetUploadFormRequest_MediaUploadType struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUploadFormRequest_MediaUploadType) Reset() { + *x = GetUploadFormRequest_MediaUploadType{} + mi := &file_org_signal_chat_backups_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUploadFormRequest_MediaUploadType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUploadFormRequest_MediaUploadType) ProtoMessage() {} + +func (x *GetUploadFormRequest_MediaUploadType) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUploadFormRequest_MediaUploadType.ProtoReflect.Descriptor instead. +func (*GetUploadFormRequest_MediaUploadType) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18, 1} +} + +type CopyMediaResponse_SourceNotFound struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CopyMediaResponse_SourceNotFound) Reset() { + *x = CopyMediaResponse_SourceNotFound{} + mi := &file_org_signal_chat_backups_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CopyMediaResponse_SourceNotFound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyMediaResponse_SourceNotFound) ProtoMessage() {} + +func (x *CopyMediaResponse_SourceNotFound) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyMediaResponse_SourceNotFound.ProtoReflect.Descriptor instead. +func (*CopyMediaResponse_SourceNotFound) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 0} +} + +type CopyMediaResponse_WrongSourceLength struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CopyMediaResponse_WrongSourceLength) Reset() { + *x = CopyMediaResponse_WrongSourceLength{} + mi := &file_org_signal_chat_backups_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CopyMediaResponse_WrongSourceLength) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyMediaResponse_WrongSourceLength) ProtoMessage() {} + +func (x *CopyMediaResponse_WrongSourceLength) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyMediaResponse_WrongSourceLength.ProtoReflect.Descriptor instead. +func (*CopyMediaResponse_WrongSourceLength) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 1} +} + +type CopyMediaResponse_OutOfSpace struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CopyMediaResponse_OutOfSpace) Reset() { + *x = CopyMediaResponse_OutOfSpace{} + mi := &file_org_signal_chat_backups_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CopyMediaResponse_OutOfSpace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyMediaResponse_OutOfSpace) ProtoMessage() {} + +func (x *CopyMediaResponse_OutOfSpace) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyMediaResponse_OutOfSpace.ProtoReflect.Descriptor instead. +func (*CopyMediaResponse_OutOfSpace) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 2} +} + +type CopyMediaResponse_CopySuccess struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The backup cdn where this media object is stored + Cdn uint32 `protobuf:"varint,1,opt,name=cdn,proto3" json:"cdn,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CopyMediaResponse_CopySuccess) Reset() { + *x = CopyMediaResponse_CopySuccess{} + mi := &file_org_signal_chat_backups_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CopyMediaResponse_CopySuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CopyMediaResponse_CopySuccess) ProtoMessage() {} + +func (x *CopyMediaResponse_CopySuccess) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CopyMediaResponse_CopySuccess.ProtoReflect.Descriptor instead. +func (*CopyMediaResponse_CopySuccess) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 3} +} + +func (x *CopyMediaResponse_CopySuccess) GetCdn() uint32 { + if x != nil { + return x.Cdn + } + return 0 +} + +type ListMediaResponse_ListEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The backup cdn where this media object is stored + Cdn uint32 `protobuf:"varint,1,opt,name=cdn,proto3" json:"cdn,omitempty"` + // The media_id of the object + MediaId []byte `protobuf:"bytes,2,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"` + // The length of the object in bytes + Length uint64 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMediaResponse_ListEntry) Reset() { + *x = ListMediaResponse_ListEntry{} + mi := &file_org_signal_chat_backups_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMediaResponse_ListEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMediaResponse_ListEntry) ProtoMessage() {} + +func (x *ListMediaResponse_ListEntry) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMediaResponse_ListEntry.ProtoReflect.Descriptor instead. +func (*ListMediaResponse_ListEntry) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25, 0} +} + +func (x *ListMediaResponse_ListEntry) GetCdn() uint32 { + if x != nil { + return x.Cdn + } + return 0 +} + +func (x *ListMediaResponse_ListEntry) GetMediaId() []byte { + if x != nil { + return x.MediaId + } + return nil +} + +func (x *ListMediaResponse_ListEntry) GetLength() uint64 { + if x != nil { + return x.Length + } + return 0 +} + +type ListMediaResponse_ListResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A page of media objects stored for this backup ID + Page []*ListMediaResponse_ListEntry `protobuf:"bytes,1,rep,name=page,proto3" json:"page,omitempty"` + // The base directory of the backup data on the cdn. The stored media can be + // found at /backup_dir/media_dir/media_id, where the media_id is encoded with + // unpadded url-safe base64. + BackupDir string `protobuf:"bytes,2,opt,name=backup_dir,json=backupDir,proto3" json:"backup_dir,omitempty"` + // The prefix path component for the media objects. The stored media for + // media_id can be found at /backup_dir/media_dir/media_id, where the media_id + // is encoded with unpadded url-safe base64. + MediaDir string `protobuf:"bytes,3,opt,name=media_dir,json=mediaDir,proto3" json:"media_dir,omitempty"` + // If set, the cursor value to pass to the next list request to continue + // listing. If absent, all objects have been listed + Cursor *string `protobuf:"bytes,4,opt,name=cursor,proto3,oneof" json:"cursor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMediaResponse_ListResult) Reset() { + *x = ListMediaResponse_ListResult{} + mi := &file_org_signal_chat_backups_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMediaResponse_ListResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMediaResponse_ListResult) ProtoMessage() {} + +func (x *ListMediaResponse_ListResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMediaResponse_ListResult.ProtoReflect.Descriptor instead. +func (*ListMediaResponse_ListResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25, 1} +} + +func (x *ListMediaResponse_ListResult) GetPage() []*ListMediaResponse_ListEntry { + if x != nil { + return x.Page + } + return nil +} + +func (x *ListMediaResponse_ListResult) GetBackupDir() string { + if x != nil { + return x.BackupDir + } + return "" +} + +func (x *ListMediaResponse_ListResult) GetMediaDir() string { + if x != nil { + return x.MediaDir + } + return "" +} + +func (x *ListMediaResponse_ListResult) GetCursor() string { + if x != nil && x.Cursor != nil { + return *x.Cursor + } + return "" +} + +var File_org_signal_chat_backups_proto protoreflect.FileDescriptor + +const file_org_signal_chat_backups_proto_rawDesc = "" + + "\n" + + "\x1dorg/signal/chat/backups.proto\x12\x16org.signal.chat.backup\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\xba\x01\n" + + "\x12SetBackupIdRequest\x12T\n" + + "'messages_backup_auth_credential_request\x18\x01 \x01(\fR#messagesBackupAuthCredentialRequest\x12N\n" + + "$media_backup_auth_credential_request\x18\x02 \x01(\fR mediaBackupAuthCredentialRequest\"\x15\n" + + "\x13SetBackupIdResponse\":\n" + + "\x14RedeemReceiptRequest\x12\"\n" + + "\fpresentation\x18\x01 \x01(\fR\fpresentation\"\xd0\x02\n" + + "\x15RedeemReceiptResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x8a\x01\n" + + "\x1aaccount_missing_commitment\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1e\xc2\xd5\"\x1aaccount_missing_commitmentH\x00R\x18accountMissingCommitment\x12j\n" + + "\x0finvalid_receipt\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0finvalid_receiptH\x00R\x0einvalidReceiptB\n" + + "\n" + + "\bresponse\"\x85\x01\n" + + "\x1fGetBackupAuthCredentialsRequest\x121\n" + + "\x10redemption_start\x18\x01 \x01(\x03B\x06\xb2\x97\"\x02\b\x01R\x0fredemptionStart\x12/\n" + + "\x0fredemption_stop\x18\x02 \x01(\x03B\x06\xb2\x97\"\x02\b\x01R\x0eredemptionStop\"\x8c\x05\n" + + " GetBackupAuthCredentialsResponse\x12f\n" + + "\vcredentials\x18\x01 \x01(\v2D.org.signal.chat.backup.GetBackupAuthCredentialsResponse.CredentialsR\vcredentials\x1a\xff\x03\n" + + "\vCredentials\x12\x8d\x01\n" + + "\x13message_credentials\x18\x01 \x03(\v2\\.org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntryR\x12messageCredentials\x12\x87\x01\n" + + "\x11media_credentials\x18\x02 \x03(\v2Z.org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntryR\x10mediaCredentials\x1ak\n" + + "\x17MessageCredentialsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12:\n" + + "\x05value\x18\x02 \x01(\v2$.org.signal.chat.common.ZkCredentialR\x05value:\x028\x01\x1ai\n" + + "\x15MediaCredentialsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12:\n" + + "\x05value\x18\x02 \x01(\v2$.org.signal.chat.common.ZkCredentialR\x05value:\x028\x01\"{\n" + + "\x12SignedPresentation\x12(\n" + + "\fpresentation\x18\x01 \x01(\fB\x04\x88\x97\"\x01R\fpresentation\x12;\n" + + "\x16presentation_signature\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\x15presentationSignature\"\x97\x01\n" + + "\x13SetPublicKeyRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12#\n" + + "\n" + + "public_key\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\tpublicKey\"\xd9\x01\n" + + "\x14SetPublicKeyResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthenticationB\n" + + "\n" + + "\bresponse\"\x89\x01\n" + + "\x18GetCdnCredentialsRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12\x10\n" + + "\x03cdn\x18\x02 \x01(\rR\x03cdn\"\xcf\x03\n" + + "\x19GetCdnCredentialsResponse\x12k\n" + + "\x0fcdn_credentials\x18\x01 \x01(\v2@.org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentialsH\x00R\x0ecdnCredentials\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1a\xb5\x01\n" + + "\x0eCdnCredentials\x12g\n" + + "\aheaders\x18\x01 \x03(\v2M.org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntryR\aheaders\x1a:\n" + + "\fHeadersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\n" + + "\n" + + "\bresponse\"x\n" + + "\x19GetSvrBCredentialsRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\"\xe7\x02\n" + + "\x1aGetSvrBCredentialsResponse\x12o\n" + + "\x10svrb_credentials\x18\x01 \x01(\v2B.org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentialsH\x00R\x0fsvrbCredentials\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1aI\n" + + "\x0fSvrBCredentials\x12\x1a\n" + + "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpasswordB\n" + + "\n" + + "\bresponse\"s\n" + + "\x14GetBackupInfoRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\"\xff\x02\n" + + "\x1cGetMessageBackupInfoResponse\x12i\n" + + "\vbackup_info\x18\x01 \x01(\v2F.org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfoH\x00R\n" + + "backupInfo\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1ae\n" + + "\x11MessageBackupInfo\x12\x1d\n" + + "\n" + + "backup_dir\x18\x01 \x01(\tR\tbackupDir\x12\x10\n" + + "\x03cdn\x18\x02 \x01(\rR\x03cdn\x12\x1f\n" + + "\vbackup_name\x18\x03 \x01(\tR\n" + + "backupNameB\n" + + "\n" + + "\bresponse\"\x80\x03\n" + + "\x1aGetMediaBackupInfoResponse\x12e\n" + + "\vbackup_info\x18\x01 \x01(\v2B.org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfoH\x00R\n" + + "backupInfo\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1al\n" + + "\x0fMediaBackupInfo\x12\x1d\n" + + "\n" + + "backup_dir\x18\x01 \x01(\tR\tbackupDir\x12\x1b\n" + + "\tmedia_dir\x18\x02 \x01(\tR\bmediaDir\x12\x1d\n" + + "\n" + + "used_space\x18\x03 \x01(\x04R\tusedSpaceB\n" + + "\n" + + "\bresponse\"m\n" + + "\x0eRefreshRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\"\xd4\x01\n" + + "\x0fRefreshResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthenticationB\n" + + "\n" + + "\bresponse\"\x8c\x03\n" + + "\x14GetUploadFormRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12]\n" + + "\bmessages\x18\x02 \x01(\v2?.org.signal.chat.backup.GetUploadFormRequest.MessagesUploadTypeH\x00R\bmessages\x12T\n" + + "\x05media\x18\x03 \x01(\v2<.org.signal.chat.backup.GetUploadFormRequest.MediaUploadTypeH\x00R\x05media\x12*\n" + + "\fuploadLength\x18\x04 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\fuploadLength\x1a\x14\n" + + "\x12MessagesUploadType\x1a\x11\n" + + "\x0fMediaUploadTypeB\r\n" + + "\vupload_type\"\xeb\x02\n" + + "\x15GetUploadFormResponse\x12E\n" + + "\vupload_form\x18\x01 \x01(\v2\".org.signal.chat.common.UploadFormH\x00R\n" + + "uploadForm\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x12|\n" + + "\x19exceeds_max_upload_length\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0foversize_uploadH\x00R\x16exceedsMaxUploadLengthB\n" + + "\n" + + "\bresponse\"\x8d\x02\n" + + "\rCopyMediaItem\x12<\n" + + "\x15source_attachment_cdn\x18\x01 \x01(\rB\b\xb2\x97\"\x04\b\x01\x10\x03R\x13sourceAttachmentCdn\x12'\n" + + "\n" + + "source_key\x18\x02 \x01(\tB\b\x88\x97\"\x01\xc0\x97\"\x01R\tsourceKey\x12#\n" + + "\robject_length\x18\x03 \x01(\x04R\fobjectLength\x12 \n" + + "\bmedia_id\x18\x04 \x01(\fB\x05\xa2\x97\"\x01\x0fR\amediaId\x12 \n" + + "\bhmac_key\x18\x05 \x01(\fB\x05\xa2\x97\"\x01 R\ahmacKey\x12,\n" + + "\x0eencryption_key\x18\x06 \x01(\fB\x05\xa2\x97\"\x01 R\rencryptionKey\"\xb7\x01\n" + + "\x10CopyMediaRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12F\n" + + "\x05items\x18\x02 \x03(\v2%.org.signal.chat.backup.CopyMediaItemB\t\x9a\x97\"\x05\b\x01\x10\xe8\aR\x05items\"\xd4\x04\n" + + "\x11CopyMediaResponse\x12\x19\n" + + "\bmedia_id\x18\x01 \x01(\fR\amediaId\x12Q\n" + + "\asuccess\x18\x02 \x01(\v25.org.signal.chat.backup.CopyMediaResponse.CopySuccessH\x00R\asuccess\x12z\n" + + "\x10source_not_found\x18\x03 \x01(\v28.org.signal.chat.backup.CopyMediaResponse.SourceNotFoundB\x14\xc2\xd5\"\x10source_not_foundH\x00R\x0esourceNotFound\x12\x86\x01\n" + + "\x13wrong_source_length\x18\x04 \x01(\v2;.org.signal.chat.backup.CopyMediaResponse.WrongSourceLengthB\x17\xc2\xd5\"\x13wrong_source_lengthH\x00R\x11wrongSourceLength\x12j\n" + + "\fout_of_space\x18\x05 \x01(\v24.org.signal.chat.backup.CopyMediaResponse.OutOfSpaceB\x10\xc2\xd5\"\fout_of_spaceH\x00R\n" + + "outOfSpace\x1a\x10\n" + + "\x0eSourceNotFound\x1a\x13\n" + + "\x11WrongSourceLength\x1a\f\n" + + "\n" + + "OutOfSpace\x1a\x1f\n" + + "\vCopySuccess\x12\x10\n" + + "\x03cdn\x18\x01 \x01(\rR\x03cdnB\n" + + "\n" + + "\bresponse\"\xa1\x01\n" + + "\x12BackupStreamClosed\x12\x80\x01\n" + + "\x15failed_authentication\x18\x01 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthenticationB\b\n" + + "\x06reason\"\xc7\x01\n" + + "\x10ListMediaRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12\x1b\n" + + "\x06cursor\x18\x02 \x01(\tH\x00R\x06cursor\x88\x01\x01\x12$\n" + + "\x05limit\x18\x03 \x01(\rB\t\xb2\x97\"\x05\b\x01\x10\x90NH\x01R\x05limit\x88\x01\x01B\t\n" + + "\a_cursorB\b\n" + + "\x06_limit\"\x89\x04\n" + + "\x11ListMediaResponse\x12W\n" + + "\vlist_result\x18\x01 \x01(\v24.org.signal.chat.backup.ListMediaResponse.ListResultH\x00R\n" + + "listResult\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1aP\n" + + "\tListEntry\x12\x10\n" + + "\x03cdn\x18\x01 \x01(\rR\x03cdn\x12\x19\n" + + "\bmedia_id\x18\x02 \x01(\fR\amediaId\x12\x16\n" + + "\x06length\x18\x03 \x01(\x04R\x06length\x1a\xb9\x01\n" + + "\n" + + "ListResult\x12G\n" + + "\x04page\x18\x01 \x03(\v23.org.signal.chat.backup.ListMediaResponse.ListEntryR\x04page\x12\x1d\n" + + "\n" + + "backup_dir\x18\x02 \x01(\tR\tbackupDir\x12\x1b\n" + + "\tmedia_dir\x18\x03 \x01(\tR\bmediaDir\x12\x1b\n" + + "\x06cursor\x18\x04 \x01(\tH\x00R\x06cursor\x88\x01\x01B\t\n" + + "\a_cursorB\n" + + "\n" + + "\bresponse\"o\n" + + "\x10DeleteAllRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\"\xd6\x01\n" + + "\x11DeleteAllResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthenticationB\n" + + "\n" + + "\bresponse\"E\n" + + "\x0fDeleteMediaItem\x12\x10\n" + + "\x03cdn\x18\x01 \x01(\rR\x03cdn\x12 \n" + + "\bmedia_id\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x0fR\amediaId\"\xbb\x01\n" + + "\x12DeleteMediaRequest\x12[\n" + + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12H\n" + + "\x05items\x18\x02 \x03(\v2'.org.signal.chat.backup.DeleteMediaItemB\t\x9a\x97\"\x05\b\x01\x10\xe8\aR\x05items\"a\n" + + "\x13DeleteMediaResponse\x12J\n" + + "\fdeleted_item\x18\x01 \x01(\v2'.org.signal.chat.backup.DeleteMediaItemR\vdeletedItem2\xfb\x02\n" + + "\aBackups\x12h\n" + + "\vSetBackupId\x12*.org.signal.chat.backup.SetBackupIdRequest\x1a+.org.signal.chat.backup.SetBackupIdResponse\"\x00\x12n\n" + + "\rRedeemReceipt\x12,.org.signal.chat.backup.RedeemReceiptRequest\x1a-.org.signal.chat.backup.RedeemReceiptResponse\"\x00\x12\x8f\x01\n" + + "\x18GetBackupAuthCredentials\x127.org.signal.chat.backup.GetBackupAuthCredentialsRequest\x1a8.org.signal.chat.backup.GetBackupAuthCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xe0\t\n" + + "\x10BackupsAnonymous\x12z\n" + + "\x11GetCdnCredentials\x120.org.signal.chat.backup.GetCdnCredentialsRequest\x1a1.org.signal.chat.backup.GetCdnCredentialsResponse\"\x00\x12}\n" + + "\x12GetSvrBCredentials\x121.org.signal.chat.backup.GetSvrBCredentialsRequest\x1a2.org.signal.chat.backup.GetSvrBCredentialsResponse\"\x00\x12|\n" + + "\x14GetMessageBackupInfo\x12,.org.signal.chat.backup.GetBackupInfoRequest\x1a4.org.signal.chat.backup.GetMessageBackupInfoResponse\"\x00\x12x\n" + + "\x12GetMediaBackupInfo\x12,.org.signal.chat.backup.GetBackupInfoRequest\x1a2.org.signal.chat.backup.GetMediaBackupInfoResponse\"\x00\x12k\n" + + "\fSetPublicKey\x12+.org.signal.chat.backup.SetPublicKeyRequest\x1a,.org.signal.chat.backup.SetPublicKeyResponse\"\x00\x12\\\n" + + "\aRefresh\x12&.org.signal.chat.backup.RefreshRequest\x1a'.org.signal.chat.backup.RefreshResponse\"\x00\x12n\n" + + "\rGetUploadForm\x12,.org.signal.chat.backup.GetUploadFormRequest\x1a-.org.signal.chat.backup.GetUploadFormResponse\"\x00\x12d\n" + + "\tCopyMedia\x12(.org.signal.chat.backup.CopyMediaRequest\x1a).org.signal.chat.backup.CopyMediaResponse\"\x000\x01\x12b\n" + + "\tListMedia\x12(.org.signal.chat.backup.ListMediaRequest\x1a).org.signal.chat.backup.ListMediaResponse\"\x00\x12j\n" + + "\vDeleteMedia\x12*.org.signal.chat.backup.DeleteMediaRequest\x1a+.org.signal.chat.backup.DeleteMediaResponse\"\x000\x01\x12b\n" + + "\tDeleteAll\x12(.org.signal.chat.backup.DeleteAllRequest\x1a).org.signal.chat.backup.DeleteAllResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_backups_proto_rawDescOnce sync.Once + file_org_signal_chat_backups_proto_rawDescData []byte +) + +func file_org_signal_chat_backups_proto_rawDescGZIP() []byte { + file_org_signal_chat_backups_proto_rawDescOnce.Do(func() { + file_org_signal_chat_backups_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_backups_proto_rawDesc), len(file_org_signal_chat_backups_proto_rawDesc))) + }) + return file_org_signal_chat_backups_proto_rawDescData +} + +var file_org_signal_chat_backups_proto_msgTypes = make([]protoimpl.MessageInfo, 47) +var file_org_signal_chat_backups_proto_goTypes = []any{ + (*SetBackupIdRequest)(nil), // 0: org.signal.chat.backup.SetBackupIdRequest + (*SetBackupIdResponse)(nil), // 1: org.signal.chat.backup.SetBackupIdResponse + (*RedeemReceiptRequest)(nil), // 2: org.signal.chat.backup.RedeemReceiptRequest + (*RedeemReceiptResponse)(nil), // 3: org.signal.chat.backup.RedeemReceiptResponse + (*GetBackupAuthCredentialsRequest)(nil), // 4: org.signal.chat.backup.GetBackupAuthCredentialsRequest + (*GetBackupAuthCredentialsResponse)(nil), // 5: org.signal.chat.backup.GetBackupAuthCredentialsResponse + (*SignedPresentation)(nil), // 6: org.signal.chat.backup.SignedPresentation + (*SetPublicKeyRequest)(nil), // 7: org.signal.chat.backup.SetPublicKeyRequest + (*SetPublicKeyResponse)(nil), // 8: org.signal.chat.backup.SetPublicKeyResponse + (*GetCdnCredentialsRequest)(nil), // 9: org.signal.chat.backup.GetCdnCredentialsRequest + (*GetCdnCredentialsResponse)(nil), // 10: org.signal.chat.backup.GetCdnCredentialsResponse + (*GetSvrBCredentialsRequest)(nil), // 11: org.signal.chat.backup.GetSvrBCredentialsRequest + (*GetSvrBCredentialsResponse)(nil), // 12: org.signal.chat.backup.GetSvrBCredentialsResponse + (*GetBackupInfoRequest)(nil), // 13: org.signal.chat.backup.GetBackupInfoRequest + (*GetMessageBackupInfoResponse)(nil), // 14: org.signal.chat.backup.GetMessageBackupInfoResponse + (*GetMediaBackupInfoResponse)(nil), // 15: org.signal.chat.backup.GetMediaBackupInfoResponse + (*RefreshRequest)(nil), // 16: org.signal.chat.backup.RefreshRequest + (*RefreshResponse)(nil), // 17: org.signal.chat.backup.RefreshResponse + (*GetUploadFormRequest)(nil), // 18: org.signal.chat.backup.GetUploadFormRequest + (*GetUploadFormResponse)(nil), // 19: org.signal.chat.backup.GetUploadFormResponse + (*CopyMediaItem)(nil), // 20: org.signal.chat.backup.CopyMediaItem + (*CopyMediaRequest)(nil), // 21: org.signal.chat.backup.CopyMediaRequest + (*CopyMediaResponse)(nil), // 22: org.signal.chat.backup.CopyMediaResponse + (*BackupStreamClosed)(nil), // 23: org.signal.chat.backup.BackupStreamClosed + (*ListMediaRequest)(nil), // 24: org.signal.chat.backup.ListMediaRequest + (*ListMediaResponse)(nil), // 25: org.signal.chat.backup.ListMediaResponse + (*DeleteAllRequest)(nil), // 26: org.signal.chat.backup.DeleteAllRequest + (*DeleteAllResponse)(nil), // 27: org.signal.chat.backup.DeleteAllResponse + (*DeleteMediaItem)(nil), // 28: org.signal.chat.backup.DeleteMediaItem + (*DeleteMediaRequest)(nil), // 29: org.signal.chat.backup.DeleteMediaRequest + (*DeleteMediaResponse)(nil), // 30: org.signal.chat.backup.DeleteMediaResponse + (*GetBackupAuthCredentialsResponse_Credentials)(nil), // 31: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials + nil, // 32: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry + nil, // 33: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry + (*GetCdnCredentialsResponse_CdnCredentials)(nil), // 34: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials + nil, // 35: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntry + (*GetSvrBCredentialsResponse_SvrBCredentials)(nil), // 36: org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials + (*GetMessageBackupInfoResponse_MessageBackupInfo)(nil), // 37: org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo + (*GetMediaBackupInfoResponse_MediaBackupInfo)(nil), // 38: org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo + (*GetUploadFormRequest_MessagesUploadType)(nil), // 39: org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType + (*GetUploadFormRequest_MediaUploadType)(nil), // 40: org.signal.chat.backup.GetUploadFormRequest.MediaUploadType + (*CopyMediaResponse_SourceNotFound)(nil), // 41: org.signal.chat.backup.CopyMediaResponse.SourceNotFound + (*CopyMediaResponse_WrongSourceLength)(nil), // 42: org.signal.chat.backup.CopyMediaResponse.WrongSourceLength + (*CopyMediaResponse_OutOfSpace)(nil), // 43: org.signal.chat.backup.CopyMediaResponse.OutOfSpace + (*CopyMediaResponse_CopySuccess)(nil), // 44: org.signal.chat.backup.CopyMediaResponse.CopySuccess + (*ListMediaResponse_ListEntry)(nil), // 45: org.signal.chat.backup.ListMediaResponse.ListEntry + (*ListMediaResponse_ListResult)(nil), // 46: org.signal.chat.backup.ListMediaResponse.ListResult + (*emptypb.Empty)(nil), // 47: google.protobuf.Empty + (*errors.FailedPrecondition)(nil), // 48: org.signal.chat.errors.FailedPrecondition + (*errors.FailedZkAuthentication)(nil), // 49: org.signal.chat.errors.FailedZkAuthentication + (*common.UploadForm)(nil), // 50: org.signal.chat.common.UploadForm + (*common.ZkCredential)(nil), // 51: org.signal.chat.common.ZkCredential +} +var file_org_signal_chat_backups_proto_depIdxs = []int32{ + 47, // 0: org.signal.chat.backup.RedeemReceiptResponse.success:type_name -> google.protobuf.Empty + 48, // 1: org.signal.chat.backup.RedeemReceiptResponse.account_missing_commitment:type_name -> org.signal.chat.errors.FailedPrecondition + 48, // 2: org.signal.chat.backup.RedeemReceiptResponse.invalid_receipt:type_name -> org.signal.chat.errors.FailedPrecondition + 31, // 3: org.signal.chat.backup.GetBackupAuthCredentialsResponse.credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials + 6, // 4: org.signal.chat.backup.SetPublicKeyRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 47, // 5: org.signal.chat.backup.SetPublicKeyResponse.success:type_name -> google.protobuf.Empty + 49, // 6: org.signal.chat.backup.SetPublicKeyResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 7: org.signal.chat.backup.GetCdnCredentialsRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 34, // 8: org.signal.chat.backup.GetCdnCredentialsResponse.cdn_credentials:type_name -> org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials + 49, // 9: org.signal.chat.backup.GetCdnCredentialsResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 10: org.signal.chat.backup.GetSvrBCredentialsRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 36, // 11: org.signal.chat.backup.GetSvrBCredentialsResponse.svrb_credentials:type_name -> org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials + 49, // 12: org.signal.chat.backup.GetSvrBCredentialsResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 13: org.signal.chat.backup.GetBackupInfoRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 37, // 14: org.signal.chat.backup.GetMessageBackupInfoResponse.backup_info:type_name -> org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo + 49, // 15: org.signal.chat.backup.GetMessageBackupInfoResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 38, // 16: org.signal.chat.backup.GetMediaBackupInfoResponse.backup_info:type_name -> org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo + 49, // 17: org.signal.chat.backup.GetMediaBackupInfoResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 18: org.signal.chat.backup.RefreshRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 47, // 19: org.signal.chat.backup.RefreshResponse.success:type_name -> google.protobuf.Empty + 49, // 20: org.signal.chat.backup.RefreshResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 21: org.signal.chat.backup.GetUploadFormRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 39, // 22: org.signal.chat.backup.GetUploadFormRequest.messages:type_name -> org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType + 40, // 23: org.signal.chat.backup.GetUploadFormRequest.media:type_name -> org.signal.chat.backup.GetUploadFormRequest.MediaUploadType + 50, // 24: org.signal.chat.backup.GetUploadFormResponse.upload_form:type_name -> org.signal.chat.common.UploadForm + 49, // 25: org.signal.chat.backup.GetUploadFormResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 48, // 26: org.signal.chat.backup.GetUploadFormResponse.exceeds_max_upload_length:type_name -> org.signal.chat.errors.FailedPrecondition + 6, // 27: org.signal.chat.backup.CopyMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 20, // 28: org.signal.chat.backup.CopyMediaRequest.items:type_name -> org.signal.chat.backup.CopyMediaItem + 44, // 29: org.signal.chat.backup.CopyMediaResponse.success:type_name -> org.signal.chat.backup.CopyMediaResponse.CopySuccess + 41, // 30: org.signal.chat.backup.CopyMediaResponse.source_not_found:type_name -> org.signal.chat.backup.CopyMediaResponse.SourceNotFound + 42, // 31: org.signal.chat.backup.CopyMediaResponse.wrong_source_length:type_name -> org.signal.chat.backup.CopyMediaResponse.WrongSourceLength + 43, // 32: org.signal.chat.backup.CopyMediaResponse.out_of_space:type_name -> org.signal.chat.backup.CopyMediaResponse.OutOfSpace + 49, // 33: org.signal.chat.backup.BackupStreamClosed.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 34: org.signal.chat.backup.ListMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 46, // 35: org.signal.chat.backup.ListMediaResponse.list_result:type_name -> org.signal.chat.backup.ListMediaResponse.ListResult + 49, // 36: org.signal.chat.backup.ListMediaResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 37: org.signal.chat.backup.DeleteAllRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 47, // 38: org.signal.chat.backup.DeleteAllResponse.success:type_name -> google.protobuf.Empty + 49, // 39: org.signal.chat.backup.DeleteAllResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 40: org.signal.chat.backup.DeleteMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 28, // 41: org.signal.chat.backup.DeleteMediaRequest.items:type_name -> org.signal.chat.backup.DeleteMediaItem + 28, // 42: org.signal.chat.backup.DeleteMediaResponse.deleted_item:type_name -> org.signal.chat.backup.DeleteMediaItem + 32, // 43: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.message_credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry + 33, // 44: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.media_credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry + 51, // 45: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry.value:type_name -> org.signal.chat.common.ZkCredential + 51, // 46: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry.value:type_name -> org.signal.chat.common.ZkCredential + 35, // 47: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.headers:type_name -> org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntry + 45, // 48: org.signal.chat.backup.ListMediaResponse.ListResult.page:type_name -> org.signal.chat.backup.ListMediaResponse.ListEntry + 0, // 49: org.signal.chat.backup.Backups.SetBackupId:input_type -> org.signal.chat.backup.SetBackupIdRequest + 2, // 50: org.signal.chat.backup.Backups.RedeemReceipt:input_type -> org.signal.chat.backup.RedeemReceiptRequest + 4, // 51: org.signal.chat.backup.Backups.GetBackupAuthCredentials:input_type -> org.signal.chat.backup.GetBackupAuthCredentialsRequest + 9, // 52: org.signal.chat.backup.BackupsAnonymous.GetCdnCredentials:input_type -> org.signal.chat.backup.GetCdnCredentialsRequest + 11, // 53: org.signal.chat.backup.BackupsAnonymous.GetSvrBCredentials:input_type -> org.signal.chat.backup.GetSvrBCredentialsRequest + 13, // 54: org.signal.chat.backup.BackupsAnonymous.GetMessageBackupInfo:input_type -> org.signal.chat.backup.GetBackupInfoRequest + 13, // 55: org.signal.chat.backup.BackupsAnonymous.GetMediaBackupInfo:input_type -> org.signal.chat.backup.GetBackupInfoRequest + 7, // 56: org.signal.chat.backup.BackupsAnonymous.SetPublicKey:input_type -> org.signal.chat.backup.SetPublicKeyRequest + 16, // 57: org.signal.chat.backup.BackupsAnonymous.Refresh:input_type -> org.signal.chat.backup.RefreshRequest + 18, // 58: org.signal.chat.backup.BackupsAnonymous.GetUploadForm:input_type -> org.signal.chat.backup.GetUploadFormRequest + 21, // 59: org.signal.chat.backup.BackupsAnonymous.CopyMedia:input_type -> org.signal.chat.backup.CopyMediaRequest + 24, // 60: org.signal.chat.backup.BackupsAnonymous.ListMedia:input_type -> org.signal.chat.backup.ListMediaRequest + 29, // 61: org.signal.chat.backup.BackupsAnonymous.DeleteMedia:input_type -> org.signal.chat.backup.DeleteMediaRequest + 26, // 62: org.signal.chat.backup.BackupsAnonymous.DeleteAll:input_type -> org.signal.chat.backup.DeleteAllRequest + 1, // 63: org.signal.chat.backup.Backups.SetBackupId:output_type -> org.signal.chat.backup.SetBackupIdResponse + 3, // 64: org.signal.chat.backup.Backups.RedeemReceipt:output_type -> org.signal.chat.backup.RedeemReceiptResponse + 5, // 65: org.signal.chat.backup.Backups.GetBackupAuthCredentials:output_type -> org.signal.chat.backup.GetBackupAuthCredentialsResponse + 10, // 66: org.signal.chat.backup.BackupsAnonymous.GetCdnCredentials:output_type -> org.signal.chat.backup.GetCdnCredentialsResponse + 12, // 67: org.signal.chat.backup.BackupsAnonymous.GetSvrBCredentials:output_type -> org.signal.chat.backup.GetSvrBCredentialsResponse + 14, // 68: org.signal.chat.backup.BackupsAnonymous.GetMessageBackupInfo:output_type -> org.signal.chat.backup.GetMessageBackupInfoResponse + 15, // 69: org.signal.chat.backup.BackupsAnonymous.GetMediaBackupInfo:output_type -> org.signal.chat.backup.GetMediaBackupInfoResponse + 8, // 70: org.signal.chat.backup.BackupsAnonymous.SetPublicKey:output_type -> org.signal.chat.backup.SetPublicKeyResponse + 17, // 71: org.signal.chat.backup.BackupsAnonymous.Refresh:output_type -> org.signal.chat.backup.RefreshResponse + 19, // 72: org.signal.chat.backup.BackupsAnonymous.GetUploadForm:output_type -> org.signal.chat.backup.GetUploadFormResponse + 22, // 73: org.signal.chat.backup.BackupsAnonymous.CopyMedia:output_type -> org.signal.chat.backup.CopyMediaResponse + 25, // 74: org.signal.chat.backup.BackupsAnonymous.ListMedia:output_type -> org.signal.chat.backup.ListMediaResponse + 30, // 75: org.signal.chat.backup.BackupsAnonymous.DeleteMedia:output_type -> org.signal.chat.backup.DeleteMediaResponse + 27, // 76: org.signal.chat.backup.BackupsAnonymous.DeleteAll:output_type -> org.signal.chat.backup.DeleteAllResponse + 63, // [63:77] is the sub-list for method output_type + 49, // [49:63] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_backups_proto_init() } +func file_org_signal_chat_backups_proto_init() { + if File_org_signal_chat_backups_proto != nil { + return + } + file_org_signal_chat_backups_proto_msgTypes[3].OneofWrappers = []any{ + (*RedeemReceiptResponse_Success)(nil), + (*RedeemReceiptResponse_AccountMissingCommitment)(nil), + (*RedeemReceiptResponse_InvalidReceipt)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[8].OneofWrappers = []any{ + (*SetPublicKeyResponse_Success)(nil), + (*SetPublicKeyResponse_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[10].OneofWrappers = []any{ + (*GetCdnCredentialsResponse_CdnCredentials_)(nil), + (*GetCdnCredentialsResponse_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[12].OneofWrappers = []any{ + (*GetSvrBCredentialsResponse_SvrbCredentials)(nil), + (*GetSvrBCredentialsResponse_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[14].OneofWrappers = []any{ + (*GetMessageBackupInfoResponse_BackupInfo)(nil), + (*GetMessageBackupInfoResponse_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[15].OneofWrappers = []any{ + (*GetMediaBackupInfoResponse_BackupInfo)(nil), + (*GetMediaBackupInfoResponse_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[17].OneofWrappers = []any{ + (*RefreshResponse_Success)(nil), + (*RefreshResponse_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[18].OneofWrappers = []any{ + (*GetUploadFormRequest_Messages)(nil), + (*GetUploadFormRequest_Media)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[19].OneofWrappers = []any{ + (*GetUploadFormResponse_UploadForm)(nil), + (*GetUploadFormResponse_FailedAuthentication)(nil), + (*GetUploadFormResponse_ExceedsMaxUploadLength)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[22].OneofWrappers = []any{ + (*CopyMediaResponse_Success)(nil), + (*CopyMediaResponse_SourceNotFound_)(nil), + (*CopyMediaResponse_WrongSourceLength_)(nil), + (*CopyMediaResponse_OutOfSpace_)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[23].OneofWrappers = []any{ + (*BackupStreamClosed_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[24].OneofWrappers = []any{} + file_org_signal_chat_backups_proto_msgTypes[25].OneofWrappers = []any{ + (*ListMediaResponse_ListResult_)(nil), + (*ListMediaResponse_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[27].OneofWrappers = []any{ + (*DeleteAllResponse_Success)(nil), + (*DeleteAllResponse_FailedAuthentication)(nil), + } + file_org_signal_chat_backups_proto_msgTypes[46].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_backups_proto_rawDesc), len(file_org_signal_chat_backups_proto_rawDesc)), + NumEnums: 0, + NumMessages: 47, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_org_signal_chat_backups_proto_goTypes, + DependencyIndexes: file_org_signal_chat_backups_proto_depIdxs, + MessageInfos: file_org_signal_chat_backups_proto_msgTypes, + }.Build() + File_org_signal_chat_backups_proto = out.File + file_org_signal_chat_backups_proto_goTypes = nil + file_org_signal_chat_backups_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go new file mode 100644 index 0000000..b7079e3 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go @@ -0,0 +1,878 @@ +// +// Copyright 2024 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/backups.proto + +package backups + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Backups_SetBackupId_FullMethodName = "/org.signal.chat.backup.Backups/SetBackupId" + Backups_RedeemReceipt_FullMethodName = "/org.signal.chat.backup.Backups/RedeemReceipt" + Backups_GetBackupAuthCredentials_FullMethodName = "/org.signal.chat.backup.Backups/GetBackupAuthCredentials" +) + +// BackupsClient is the client API for Backups service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Service for backup operations that require account authentication. +// +// Most actual backup operations operate on the backup-id and cannot be linked +// to the caller's account, but setting up anonymous credentials and changing +// backup tier requires account authentication. +type BackupsClient interface { + // Set (blinded) backup-id(s) for the account. + // + // Each account may have a single active backup-id for each credential type + // that can be used to store and retrieve backups. Once the backup-id is set, + // BackupAuthCredentials can be generated using GetBackupAuthCredentials. + // + // The blinded backup-id and the key-pair used to blind it must be derived + // from a recoverable secret. + // + // At least one of the credential types must be set on the request. + // Only the primary device can set a blinded backup-id. + SetBackupId(ctx context.Context, in *SetBackupIdRequest, opts ...grpc.CallOption) (*SetBackupIdResponse, error) + // Redeem a receipt acquired from /v1/subscription/{subscriberId}/receipt_credentials + // to mark the account as eligible for the paid backup tier. + // + // After successful redemption, subsequent requests to + // GetBackupAuthCredentials will return credentials with the level on the + // provided receipt until the expiration time on the receipt. + RedeemReceipt(ctx context.Context, in *RedeemReceiptRequest, opts ...grpc.CallOption) (*RedeemReceiptResponse, error) + // After setting a blinded backup-id with PUT /v1/archives/, this fetches + // credentials that can be used to perform operations against that backup-id. + // Clients may (and should) request up to 7 days of credentials at a time. + // + // The redemption_start and redemption_end seconds must be UTC day aligned, and + // must not span more than 7 days. + // + // Each credential contains a receipt level which indicates the backup level + // the credential is good for. If the account has paid backup access that + // expires at some point in the provided redemption window, credentials with + // redemption times after the expiration may be on a lower backup level. + // + // Clients must validate the receipt level on the credential matches a known + // receipt level before using it. + GetBackupAuthCredentials(ctx context.Context, in *GetBackupAuthCredentialsRequest, opts ...grpc.CallOption) (*GetBackupAuthCredentialsResponse, error) +} + +type backupsClient struct { + cc grpc.ClientConnInterface +} + +func NewBackupsClient(cc grpc.ClientConnInterface) BackupsClient { + return &backupsClient{cc} +} + +func (c *backupsClient) SetBackupId(ctx context.Context, in *SetBackupIdRequest, opts ...grpc.CallOption) (*SetBackupIdResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetBackupIdResponse) + err := c.cc.Invoke(ctx, Backups_SetBackupId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsClient) RedeemReceipt(ctx context.Context, in *RedeemReceiptRequest, opts ...grpc.CallOption) (*RedeemReceiptResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RedeemReceiptResponse) + err := c.cc.Invoke(ctx, Backups_RedeemReceipt_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsClient) GetBackupAuthCredentials(ctx context.Context, in *GetBackupAuthCredentialsRequest, opts ...grpc.CallOption) (*GetBackupAuthCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBackupAuthCredentialsResponse) + err := c.cc.Invoke(ctx, Backups_GetBackupAuthCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BackupsServer is the server API for Backups service. +// All implementations must embed UnimplementedBackupsServer +// for forward compatibility. +// +// Service for backup operations that require account authentication. +// +// Most actual backup operations operate on the backup-id and cannot be linked +// to the caller's account, but setting up anonymous credentials and changing +// backup tier requires account authentication. +type BackupsServer interface { + // Set (blinded) backup-id(s) for the account. + // + // Each account may have a single active backup-id for each credential type + // that can be used to store and retrieve backups. Once the backup-id is set, + // BackupAuthCredentials can be generated using GetBackupAuthCredentials. + // + // The blinded backup-id and the key-pair used to blind it must be derived + // from a recoverable secret. + // + // At least one of the credential types must be set on the request. + // Only the primary device can set a blinded backup-id. + SetBackupId(context.Context, *SetBackupIdRequest) (*SetBackupIdResponse, error) + // Redeem a receipt acquired from /v1/subscription/{subscriberId}/receipt_credentials + // to mark the account as eligible for the paid backup tier. + // + // After successful redemption, subsequent requests to + // GetBackupAuthCredentials will return credentials with the level on the + // provided receipt until the expiration time on the receipt. + RedeemReceipt(context.Context, *RedeemReceiptRequest) (*RedeemReceiptResponse, error) + // After setting a blinded backup-id with PUT /v1/archives/, this fetches + // credentials that can be used to perform operations against that backup-id. + // Clients may (and should) request up to 7 days of credentials at a time. + // + // The redemption_start and redemption_end seconds must be UTC day aligned, and + // must not span more than 7 days. + // + // Each credential contains a receipt level which indicates the backup level + // the credential is good for. If the account has paid backup access that + // expires at some point in the provided redemption window, credentials with + // redemption times after the expiration may be on a lower backup level. + // + // Clients must validate the receipt level on the credential matches a known + // receipt level before using it. + GetBackupAuthCredentials(context.Context, *GetBackupAuthCredentialsRequest) (*GetBackupAuthCredentialsResponse, error) + mustEmbedUnimplementedBackupsServer() +} + +// UnimplementedBackupsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedBackupsServer struct{} + +func (UnimplementedBackupsServer) SetBackupId(context.Context, *SetBackupIdRequest) (*SetBackupIdResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetBackupId not implemented") +} +func (UnimplementedBackupsServer) RedeemReceipt(context.Context, *RedeemReceiptRequest) (*RedeemReceiptResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RedeemReceipt not implemented") +} +func (UnimplementedBackupsServer) GetBackupAuthCredentials(context.Context, *GetBackupAuthCredentialsRequest) (*GetBackupAuthCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetBackupAuthCredentials not implemented") +} +func (UnimplementedBackupsServer) mustEmbedUnimplementedBackupsServer() {} +func (UnimplementedBackupsServer) testEmbeddedByValue() {} + +// UnsafeBackupsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BackupsServer will +// result in compilation errors. +type UnsafeBackupsServer interface { + mustEmbedUnimplementedBackupsServer() +} + +func RegisterBackupsServer(s grpc.ServiceRegistrar, srv BackupsServer) { + // If the following call panics, it indicates UnimplementedBackupsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Backups_ServiceDesc, srv) +} + +func _Backups_SetBackupId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetBackupIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsServer).SetBackupId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Backups_SetBackupId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsServer).SetBackupId(ctx, req.(*SetBackupIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Backups_RedeemReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RedeemReceiptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsServer).RedeemReceipt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Backups_RedeemReceipt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsServer).RedeemReceipt(ctx, req.(*RedeemReceiptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Backups_GetBackupAuthCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBackupAuthCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsServer).GetBackupAuthCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Backups_GetBackupAuthCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsServer).GetBackupAuthCredentials(ctx, req.(*GetBackupAuthCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Backups_ServiceDesc is the grpc.ServiceDesc for Backups service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Backups_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.backup.Backups", + HandlerType: (*BackupsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SetBackupId", + Handler: _Backups_SetBackupId_Handler, + }, + { + MethodName: "RedeemReceipt", + Handler: _Backups_RedeemReceipt_Handler, + }, + { + MethodName: "GetBackupAuthCredentials", + Handler: _Backups_GetBackupAuthCredentials_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/backups.proto", +} + +const ( + BackupsAnonymous_GetCdnCredentials_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetCdnCredentials" + BackupsAnonymous_GetSvrBCredentials_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetSvrBCredentials" + BackupsAnonymous_GetMessageBackupInfo_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetMessageBackupInfo" + BackupsAnonymous_GetMediaBackupInfo_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetMediaBackupInfo" + BackupsAnonymous_SetPublicKey_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/SetPublicKey" + BackupsAnonymous_Refresh_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/Refresh" + BackupsAnonymous_GetUploadForm_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetUploadForm" + BackupsAnonymous_CopyMedia_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/CopyMedia" + BackupsAnonymous_ListMedia_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/ListMedia" + BackupsAnonymous_DeleteMedia_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/DeleteMedia" + BackupsAnonymous_DeleteAll_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/DeleteAll" +) + +// BackupsAnonymousClient is the client API for BackupsAnonymous service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// # Service for backup operations with anonymous credentials +// +// This service never requires account authentication. It instead requires a +// backup-id authenticated with an anonymous credential that cannot be linked +// to the account. +// +// To register an anonymous credential: +// +// 1. Set a backup-id on the authenticated channel via Backups::SetBackupId +// 2. Retrieve BackupAuthCredentials via Backups::GetBackupAuthCredentials +// 3. Generate a key pair and set the public key via +// BackupsAnonymous::SetPublicKey +// +// Unless otherwise noted, requests for this service require a +// SignedPresentation, which includes: +// +// - a presentation generated from a BackupAuthCredential issued by +// GetBackupAuthCredentials +// - a signature of that presentation using the private key of a key pair +// previously set with SetPublicKey. +type BackupsAnonymousClient interface { + // Retrieve credentials used to read objects stored on the backup cdn + GetCdnCredentials(ctx context.Context, in *GetCdnCredentialsRequest, opts ...grpc.CallOption) (*GetCdnCredentialsResponse, error) + // Retrieve credentials used to interact with the SecureValueRecoveryB service + GetSvrBCredentials(ctx context.Context, in *GetSvrBCredentialsRequest, opts ...grpc.CallOption) (*GetSvrBCredentialsResponse, error) + // Retrieve information about the currently stored message backup + GetMessageBackupInfo(ctx context.Context, in *GetBackupInfoRequest, opts ...grpc.CallOption) (*GetMessageBackupInfoResponse, error) + // Retrieve information about the currently stored media backup + GetMediaBackupInfo(ctx context.Context, in *GetBackupInfoRequest, opts ...grpc.CallOption) (*GetMediaBackupInfoResponse, error) + // Permanently set the public key of an ED25519 key-pair for the backup-id. + // All requests (including this one!) must sign their BackupAuthCredential + // presentations with the private key corresponding to the provided public key. + SetPublicKey(ctx context.Context, in *SetPublicKeyRequest, opts ...grpc.CallOption) (*SetPublicKeyResponse, error) + // Refresh the backup, indicating that the backup is still active. Clients + // must periodically upload new backups or perform a refresh. If a backup has + // not been active for 30 days, it may be deleted. + Refresh(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*RefreshResponse, error) + // Retrieve an upload form that can be used to perform a resumable upload + GetUploadForm(ctx context.Context, in *GetUploadFormRequest, opts ...grpc.CallOption) (*GetUploadFormResponse, error) + // Copy and re-encrypt media from the attachments cdn into the backup cdn. + // The original, already encrypted, attachments will be encrypted with the + // provided key material before being copied. + // + // The copy operation is not atomic and responses will be returned as copy + // operations complete with detailed information about the outcome. If an + // error is encountered, not all requests may be reflected in the responses. + // + // On retries, a particular destination media id must not be reused with a + // different source media id or different encryption parameters. + // + // The response stream may be closed with STREAM_CLOSED error reason. In this + // case, a BackupStreamClosed message will be present in the error details. + CopyMedia(ctx context.Context, in *CopyMediaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CopyMediaResponse], error) + // Retrieve a page of media objects stored for this backup-id. A client may + // have previously stored media objects that are no longer referenced in their + // current backup. To reclaim storage space used by these orphaned objects, + // perform a list operation and remove any unreferenced media objects + // via DeleteMedia. + ListMedia(ctx context.Context, in *ListMediaRequest, opts ...grpc.CallOption) (*ListMediaResponse, error) + // Delete media objects stored with this backup-id. Streams the locations of + // media items back when the item has successfully been removed. + // + // The response stream may be closed with STREAM_CLOSED error reason. In this + // case, a BackupStreamClosed message will be present in the error details. + DeleteMedia(ctx context.Context, in *DeleteMediaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DeleteMediaResponse], error) + // Delete all backup metadata, objects, and stored public key. To use + // backups again, a public key must be resupplied. + DeleteAll(ctx context.Context, in *DeleteAllRequest, opts ...grpc.CallOption) (*DeleteAllResponse, error) +} + +type backupsAnonymousClient struct { + cc grpc.ClientConnInterface +} + +func NewBackupsAnonymousClient(cc grpc.ClientConnInterface) BackupsAnonymousClient { + return &backupsAnonymousClient{cc} +} + +func (c *backupsAnonymousClient) GetCdnCredentials(ctx context.Context, in *GetCdnCredentialsRequest, opts ...grpc.CallOption) (*GetCdnCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetCdnCredentialsResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_GetCdnCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsAnonymousClient) GetSvrBCredentials(ctx context.Context, in *GetSvrBCredentialsRequest, opts ...grpc.CallOption) (*GetSvrBCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetSvrBCredentialsResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_GetSvrBCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsAnonymousClient) GetMessageBackupInfo(ctx context.Context, in *GetBackupInfoRequest, opts ...grpc.CallOption) (*GetMessageBackupInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMessageBackupInfoResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_GetMessageBackupInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsAnonymousClient) GetMediaBackupInfo(ctx context.Context, in *GetBackupInfoRequest, opts ...grpc.CallOption) (*GetMediaBackupInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMediaBackupInfoResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_GetMediaBackupInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsAnonymousClient) SetPublicKey(ctx context.Context, in *SetPublicKeyRequest, opts ...grpc.CallOption) (*SetPublicKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPublicKeyResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_SetPublicKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsAnonymousClient) Refresh(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*RefreshResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RefreshResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_Refresh_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsAnonymousClient) GetUploadForm(ctx context.Context, in *GetUploadFormRequest, opts ...grpc.CallOption) (*GetUploadFormResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetUploadFormResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_GetUploadForm_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsAnonymousClient) CopyMedia(ctx context.Context, in *CopyMediaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CopyMediaResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BackupsAnonymous_ServiceDesc.Streams[0], BackupsAnonymous_CopyMedia_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[CopyMediaRequest, CopyMediaResponse]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BackupsAnonymous_CopyMediaClient = grpc.ServerStreamingClient[CopyMediaResponse] + +func (c *backupsAnonymousClient) ListMedia(ctx context.Context, in *ListMediaRequest, opts ...grpc.CallOption) (*ListMediaResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListMediaResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_ListMedia_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *backupsAnonymousClient) DeleteMedia(ctx context.Context, in *DeleteMediaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DeleteMediaResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BackupsAnonymous_ServiceDesc.Streams[1], BackupsAnonymous_DeleteMedia_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[DeleteMediaRequest, DeleteMediaResponse]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BackupsAnonymous_DeleteMediaClient = grpc.ServerStreamingClient[DeleteMediaResponse] + +func (c *backupsAnonymousClient) DeleteAll(ctx context.Context, in *DeleteAllRequest, opts ...grpc.CallOption) (*DeleteAllResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteAllResponse) + err := c.cc.Invoke(ctx, BackupsAnonymous_DeleteAll_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BackupsAnonymousServer is the server API for BackupsAnonymous service. +// All implementations must embed UnimplementedBackupsAnonymousServer +// for forward compatibility. +// +// # Service for backup operations with anonymous credentials +// +// This service never requires account authentication. It instead requires a +// backup-id authenticated with an anonymous credential that cannot be linked +// to the account. +// +// To register an anonymous credential: +// +// 1. Set a backup-id on the authenticated channel via Backups::SetBackupId +// 2. Retrieve BackupAuthCredentials via Backups::GetBackupAuthCredentials +// 3. Generate a key pair and set the public key via +// BackupsAnonymous::SetPublicKey +// +// Unless otherwise noted, requests for this service require a +// SignedPresentation, which includes: +// +// - a presentation generated from a BackupAuthCredential issued by +// GetBackupAuthCredentials +// - a signature of that presentation using the private key of a key pair +// previously set with SetPublicKey. +type BackupsAnonymousServer interface { + // Retrieve credentials used to read objects stored on the backup cdn + GetCdnCredentials(context.Context, *GetCdnCredentialsRequest) (*GetCdnCredentialsResponse, error) + // Retrieve credentials used to interact with the SecureValueRecoveryB service + GetSvrBCredentials(context.Context, *GetSvrBCredentialsRequest) (*GetSvrBCredentialsResponse, error) + // Retrieve information about the currently stored message backup + GetMessageBackupInfo(context.Context, *GetBackupInfoRequest) (*GetMessageBackupInfoResponse, error) + // Retrieve information about the currently stored media backup + GetMediaBackupInfo(context.Context, *GetBackupInfoRequest) (*GetMediaBackupInfoResponse, error) + // Permanently set the public key of an ED25519 key-pair for the backup-id. + // All requests (including this one!) must sign their BackupAuthCredential + // presentations with the private key corresponding to the provided public key. + SetPublicKey(context.Context, *SetPublicKeyRequest) (*SetPublicKeyResponse, error) + // Refresh the backup, indicating that the backup is still active. Clients + // must periodically upload new backups or perform a refresh. If a backup has + // not been active for 30 days, it may be deleted. + Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error) + // Retrieve an upload form that can be used to perform a resumable upload + GetUploadForm(context.Context, *GetUploadFormRequest) (*GetUploadFormResponse, error) + // Copy and re-encrypt media from the attachments cdn into the backup cdn. + // The original, already encrypted, attachments will be encrypted with the + // provided key material before being copied. + // + // The copy operation is not atomic and responses will be returned as copy + // operations complete with detailed information about the outcome. If an + // error is encountered, not all requests may be reflected in the responses. + // + // On retries, a particular destination media id must not be reused with a + // different source media id or different encryption parameters. + // + // The response stream may be closed with STREAM_CLOSED error reason. In this + // case, a BackupStreamClosed message will be present in the error details. + CopyMedia(*CopyMediaRequest, grpc.ServerStreamingServer[CopyMediaResponse]) error + // Retrieve a page of media objects stored for this backup-id. A client may + // have previously stored media objects that are no longer referenced in their + // current backup. To reclaim storage space used by these orphaned objects, + // perform a list operation and remove any unreferenced media objects + // via DeleteMedia. + ListMedia(context.Context, *ListMediaRequest) (*ListMediaResponse, error) + // Delete media objects stored with this backup-id. Streams the locations of + // media items back when the item has successfully been removed. + // + // The response stream may be closed with STREAM_CLOSED error reason. In this + // case, a BackupStreamClosed message will be present in the error details. + DeleteMedia(*DeleteMediaRequest, grpc.ServerStreamingServer[DeleteMediaResponse]) error + // Delete all backup metadata, objects, and stored public key. To use + // backups again, a public key must be resupplied. + DeleteAll(context.Context, *DeleteAllRequest) (*DeleteAllResponse, error) + mustEmbedUnimplementedBackupsAnonymousServer() +} + +// UnimplementedBackupsAnonymousServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedBackupsAnonymousServer struct{} + +func (UnimplementedBackupsAnonymousServer) GetCdnCredentials(context.Context, *GetCdnCredentialsRequest) (*GetCdnCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetCdnCredentials not implemented") +} +func (UnimplementedBackupsAnonymousServer) GetSvrBCredentials(context.Context, *GetSvrBCredentialsRequest) (*GetSvrBCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetSvrBCredentials not implemented") +} +func (UnimplementedBackupsAnonymousServer) GetMessageBackupInfo(context.Context, *GetBackupInfoRequest) (*GetMessageBackupInfoResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMessageBackupInfo not implemented") +} +func (UnimplementedBackupsAnonymousServer) GetMediaBackupInfo(context.Context, *GetBackupInfoRequest) (*GetMediaBackupInfoResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMediaBackupInfo not implemented") +} +func (UnimplementedBackupsAnonymousServer) SetPublicKey(context.Context, *SetPublicKeyRequest) (*SetPublicKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetPublicKey not implemented") +} +func (UnimplementedBackupsAnonymousServer) Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error) { + return nil, status.Error(codes.Unimplemented, "method Refresh not implemented") +} +func (UnimplementedBackupsAnonymousServer) GetUploadForm(context.Context, *GetUploadFormRequest) (*GetUploadFormResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetUploadForm not implemented") +} +func (UnimplementedBackupsAnonymousServer) CopyMedia(*CopyMediaRequest, grpc.ServerStreamingServer[CopyMediaResponse]) error { + return status.Error(codes.Unimplemented, "method CopyMedia not implemented") +} +func (UnimplementedBackupsAnonymousServer) ListMedia(context.Context, *ListMediaRequest) (*ListMediaResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListMedia not implemented") +} +func (UnimplementedBackupsAnonymousServer) DeleteMedia(*DeleteMediaRequest, grpc.ServerStreamingServer[DeleteMediaResponse]) error { + return status.Error(codes.Unimplemented, "method DeleteMedia not implemented") +} +func (UnimplementedBackupsAnonymousServer) DeleteAll(context.Context, *DeleteAllRequest) (*DeleteAllResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteAll not implemented") +} +func (UnimplementedBackupsAnonymousServer) mustEmbedUnimplementedBackupsAnonymousServer() {} +func (UnimplementedBackupsAnonymousServer) testEmbeddedByValue() {} + +// UnsafeBackupsAnonymousServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BackupsAnonymousServer will +// result in compilation errors. +type UnsafeBackupsAnonymousServer interface { + mustEmbedUnimplementedBackupsAnonymousServer() +} + +func RegisterBackupsAnonymousServer(s grpc.ServiceRegistrar, srv BackupsAnonymousServer) { + // If the following call panics, it indicates UnimplementedBackupsAnonymousServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&BackupsAnonymous_ServiceDesc, srv) +} + +func _BackupsAnonymous_GetCdnCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCdnCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).GetCdnCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_GetCdnCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).GetCdnCredentials(ctx, req.(*GetCdnCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BackupsAnonymous_GetSvrBCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSvrBCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).GetSvrBCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_GetSvrBCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).GetSvrBCredentials(ctx, req.(*GetSvrBCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BackupsAnonymous_GetMessageBackupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBackupInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).GetMessageBackupInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_GetMessageBackupInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).GetMessageBackupInfo(ctx, req.(*GetBackupInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BackupsAnonymous_GetMediaBackupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBackupInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).GetMediaBackupInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_GetMediaBackupInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).GetMediaBackupInfo(ctx, req.(*GetBackupInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BackupsAnonymous_SetPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).SetPublicKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_SetPublicKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).SetPublicKey(ctx, req.(*SetPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BackupsAnonymous_Refresh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefreshRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).Refresh(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_Refresh_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).Refresh(ctx, req.(*RefreshRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BackupsAnonymous_GetUploadForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUploadFormRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).GetUploadForm(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_GetUploadForm_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).GetUploadForm(ctx, req.(*GetUploadFormRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BackupsAnonymous_CopyMedia_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(CopyMediaRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BackupsAnonymousServer).CopyMedia(m, &grpc.GenericServerStream[CopyMediaRequest, CopyMediaResponse]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BackupsAnonymous_CopyMediaServer = grpc.ServerStreamingServer[CopyMediaResponse] + +func _BackupsAnonymous_ListMedia_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMediaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).ListMedia(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_ListMedia_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).ListMedia(ctx, req.(*ListMediaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BackupsAnonymous_DeleteMedia_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(DeleteMediaRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BackupsAnonymousServer).DeleteMedia(m, &grpc.GenericServerStream[DeleteMediaRequest, DeleteMediaResponse]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BackupsAnonymous_DeleteMediaServer = grpc.ServerStreamingServer[DeleteMediaResponse] + +func _BackupsAnonymous_DeleteAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAllRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsAnonymousServer).DeleteAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BackupsAnonymous_DeleteAll_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsAnonymousServer).DeleteAll(ctx, req.(*DeleteAllRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BackupsAnonymous_ServiceDesc is the grpc.ServiceDesc for BackupsAnonymous service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BackupsAnonymous_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.backup.BackupsAnonymous", + HandlerType: (*BackupsAnonymousServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetCdnCredentials", + Handler: _BackupsAnonymous_GetCdnCredentials_Handler, + }, + { + MethodName: "GetSvrBCredentials", + Handler: _BackupsAnonymous_GetSvrBCredentials_Handler, + }, + { + MethodName: "GetMessageBackupInfo", + Handler: _BackupsAnonymous_GetMessageBackupInfo_Handler, + }, + { + MethodName: "GetMediaBackupInfo", + Handler: _BackupsAnonymous_GetMediaBackupInfo_Handler, + }, + { + MethodName: "SetPublicKey", + Handler: _BackupsAnonymous_SetPublicKey_Handler, + }, + { + MethodName: "Refresh", + Handler: _BackupsAnonymous_Refresh_Handler, + }, + { + MethodName: "GetUploadForm", + Handler: _BackupsAnonymous_GetUploadForm_Handler, + }, + { + MethodName: "ListMedia", + Handler: _BackupsAnonymous_ListMedia_Handler, + }, + { + MethodName: "DeleteAll", + Handler: _BackupsAnonymous_DeleteAll_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "CopyMedia", + Handler: _BackupsAnonymous_CopyMedia_Handler, + ServerStreams: true, + }, + { + StreamName: "DeleteMedia", + Handler: _BackupsAnonymous_DeleteMedia_Handler, + ServerStreams: true, + }, + }, + Metadata: "org/signal/chat/backups.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/call_quality/call_quality.pb.go b/pkg/signalmeow/protobuf/rpc/call_quality/call_quality.pb.go new file mode 100644 index 0000000..9e023d8 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/call_quality/call_quality.pb.go @@ -0,0 +1,426 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/call_quality.proto + +package call_quality + +import ( + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SubmitCallQualitySurveyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Indicates whether the caller was generally satisfied with the quality of + // the call + UserSatisfied bool `protobuf:"varint,1,opt,name=user_satisfied,json=userSatisfied,proto3" json:"user_satisfied,omitempty"` + // A list of call quality issues selected by the caller + CallQualityIssues []string `protobuf:"bytes,2,rep,name=call_quality_issues,json=callQualityIssues,proto3" json:"call_quality_issues,omitempty"` + // A free-form description of any additional issues as written by the caller + AdditionalIssuesDescription *string `protobuf:"bytes,3,opt,name=additional_issues_description,json=additionalIssuesDescription,proto3,oneof" json:"additional_issues_description,omitempty"` + // A URL for a set of debug logs associated with the call if the caller chose + // to submit debug logs + DebugLogUrl *string `protobuf:"bytes,4,opt,name=debug_log_url,json=debugLogUrl,proto3,oneof" json:"debug_log_url,omitempty"` + // The time at which the call started in milliseconds since the epoch + StartTimestamp int64 `protobuf:"varint,5,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"` + // The time at which the call ended in milliseconds since the epoch + EndTimestamp int64 `protobuf:"varint,6,opt,name=end_timestamp,json=endTimestamp,proto3" json:"end_timestamp,omitempty"` + // The type of call; note that direct voice calls can become video calls and + // vice versa, and this field indicates which mode was selected at call + // initiation time. At the time of writing, expected call types are + // "direct_voice", "direct_video", "group", and "call_link". + CallType string `protobuf:"bytes,7,opt,name=call_type,json=callType,proto3" json:"call_type,omitempty"` + // Indicates whether the call completed without error or if it terminated + // abnormally + Success bool `protobuf:"varint,8,opt,name=success,proto3" json:"success,omitempty"` + // A client-defined, but human-readable reason for call termination + CallEndReason string `protobuf:"bytes,9,opt,name=call_end_reason,json=callEndReason,proto3" json:"call_end_reason,omitempty"` + // The median round-trip time, measured in milliseconds, for STUN/ICE packets + // (i.e. connection maintenance and establishment) + ConnectionRttMedian *float32 `protobuf:"fixed32,10,opt,name=connection_rtt_median,json=connectionRttMedian,proto3,oneof" json:"connection_rtt_median,omitempty"` + // The median round-trip time, measured in milliseconds, for RTP/RTCP packets + // for audio streams + AudioRttMedian *float32 `protobuf:"fixed32,11,opt,name=audio_rtt_median,json=audioRttMedian,proto3,oneof" json:"audio_rtt_median,omitempty"` + // The median round-trip time, measured in milliseconds, for RTP/RTCP packets + // for video streams + VideoRttMedian *float32 `protobuf:"fixed32,12,opt,name=video_rtt_median,json=videoRttMedian,proto3,oneof" json:"video_rtt_median,omitempty"` + // The median jitter for audio streams, measured in milliseconds, for the + // duration of the call as measured by the client submitting the survey + AudioRecvJitterMedian *float32 `protobuf:"fixed32,13,opt,name=audio_recv_jitter_median,json=audioRecvJitterMedian,proto3,oneof" json:"audio_recv_jitter_median,omitempty"` + // The median jitter for video streams, measured in milliseconds, for the + // duration of the call as measured by the client submitting the survey + VideoRecvJitterMedian *float32 `protobuf:"fixed32,14,opt,name=video_recv_jitter_median,json=videoRecvJitterMedian,proto3,oneof" json:"video_recv_jitter_median,omitempty"` + // The median jitter for audio streams, measured in milliseconds, for the + // duration of the call as measured by the remote endpoint in the call (either + // the peer of the client submitting the survey in a direct call or the SFU in + // a group call) + AudioSendJitterMedian *float32 `protobuf:"fixed32,15,opt,name=audio_send_jitter_median,json=audioSendJitterMedian,proto3,oneof" json:"audio_send_jitter_median,omitempty"` + // The median jitter for video streams, measured in milliseconds, for the + // duration of the call as measured by the remote endpoint in the call (either + // the peer of the client submitting the survey in a direct call or the SFU in + // a group call) + VideoSendJitterMedian *float32 `protobuf:"fixed32,16,opt,name=video_send_jitter_median,json=videoSendJitterMedian,proto3,oneof" json:"video_send_jitter_median,omitempty"` + // The fraction of audio packets lost over the duration of the call as + // measured by the client submitting the survey + AudioRecvPacketLossFraction *float32 `protobuf:"fixed32,17,opt,name=audio_recv_packet_loss_fraction,json=audioRecvPacketLossFraction,proto3,oneof" json:"audio_recv_packet_loss_fraction,omitempty"` + // The fraction of video packets lost over the duration of the call as + // measured by the client submitting the survey + VideoRecvPacketLossFraction *float32 `protobuf:"fixed32,18,opt,name=video_recv_packet_loss_fraction,json=videoRecvPacketLossFraction,proto3,oneof" json:"video_recv_packet_loss_fraction,omitempty"` + // The fraction of audio packets lost over the duration of the call as + // measured by the remote endpoint in the call (either the peer of the client + // submitting the survey in a direct call or the SFU in a group call) + AudioSendPacketLossFraction *float32 `protobuf:"fixed32,19,opt,name=audio_send_packet_loss_fraction,json=audioSendPacketLossFraction,proto3,oneof" json:"audio_send_packet_loss_fraction,omitempty"` + // The fraction of video packets lost over the duration of the call as + // measured by the remote endpoint in the call (either the peer of the client + // submitting the survey in a direct call or the SFU in a group call) + VideoSendPacketLossFraction *float32 `protobuf:"fixed32,20,opt,name=video_send_packet_loss_fraction,json=videoSendPacketLossFraction,proto3,oneof" json:"video_send_packet_loss_fraction,omitempty"` + // Machine-generated telemetry from the call; this is a serialized protobuf + // entity generated (and, critically, explained to the user!) by the calling + // library + CallTelemetry []byte `protobuf:"bytes,21,opt,name=call_telemetry,json=callTelemetry,proto3,oneof" json:"call_telemetry,omitempty"` + // A hash of a call ID (shared between clients and never sent to the calling + // server) that can be used to correlate survey responses from multiple + // participants in a call + CallIdHash []byte `protobuf:"bytes,22,opt,name=call_id_hash,json=callIdHash,proto3,oneof" json:"call_id_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubmitCallQualitySurveyRequest) Reset() { + *x = SubmitCallQualitySurveyRequest{} + mi := &file_org_signal_chat_call_quality_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubmitCallQualitySurveyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitCallQualitySurveyRequest) ProtoMessage() {} + +func (x *SubmitCallQualitySurveyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_call_quality_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitCallQualitySurveyRequest.ProtoReflect.Descriptor instead. +func (*SubmitCallQualitySurveyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_call_quality_proto_rawDescGZIP(), []int{0} +} + +func (x *SubmitCallQualitySurveyRequest) GetUserSatisfied() bool { + if x != nil { + return x.UserSatisfied + } + return false +} + +func (x *SubmitCallQualitySurveyRequest) GetCallQualityIssues() []string { + if x != nil { + return x.CallQualityIssues + } + return nil +} + +func (x *SubmitCallQualitySurveyRequest) GetAdditionalIssuesDescription() string { + if x != nil && x.AdditionalIssuesDescription != nil { + return *x.AdditionalIssuesDescription + } + return "" +} + +func (x *SubmitCallQualitySurveyRequest) GetDebugLogUrl() string { + if x != nil && x.DebugLogUrl != nil { + return *x.DebugLogUrl + } + return "" +} + +func (x *SubmitCallQualitySurveyRequest) GetStartTimestamp() int64 { + if x != nil { + return x.StartTimestamp + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetEndTimestamp() int64 { + if x != nil { + return x.EndTimestamp + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetCallType() string { + if x != nil { + return x.CallType + } + return "" +} + +func (x *SubmitCallQualitySurveyRequest) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *SubmitCallQualitySurveyRequest) GetCallEndReason() string { + if x != nil { + return x.CallEndReason + } + return "" +} + +func (x *SubmitCallQualitySurveyRequest) GetConnectionRttMedian() float32 { + if x != nil && x.ConnectionRttMedian != nil { + return *x.ConnectionRttMedian + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetAudioRttMedian() float32 { + if x != nil && x.AudioRttMedian != nil { + return *x.AudioRttMedian + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetVideoRttMedian() float32 { + if x != nil && x.VideoRttMedian != nil { + return *x.VideoRttMedian + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetAudioRecvJitterMedian() float32 { + if x != nil && x.AudioRecvJitterMedian != nil { + return *x.AudioRecvJitterMedian + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetVideoRecvJitterMedian() float32 { + if x != nil && x.VideoRecvJitterMedian != nil { + return *x.VideoRecvJitterMedian + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetAudioSendJitterMedian() float32 { + if x != nil && x.AudioSendJitterMedian != nil { + return *x.AudioSendJitterMedian + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetVideoSendJitterMedian() float32 { + if x != nil && x.VideoSendJitterMedian != nil { + return *x.VideoSendJitterMedian + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetAudioRecvPacketLossFraction() float32 { + if x != nil && x.AudioRecvPacketLossFraction != nil { + return *x.AudioRecvPacketLossFraction + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetVideoRecvPacketLossFraction() float32 { + if x != nil && x.VideoRecvPacketLossFraction != nil { + return *x.VideoRecvPacketLossFraction + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetAudioSendPacketLossFraction() float32 { + if x != nil && x.AudioSendPacketLossFraction != nil { + return *x.AudioSendPacketLossFraction + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetVideoSendPacketLossFraction() float32 { + if x != nil && x.VideoSendPacketLossFraction != nil { + return *x.VideoSendPacketLossFraction + } + return 0 +} + +func (x *SubmitCallQualitySurveyRequest) GetCallTelemetry() []byte { + if x != nil { + return x.CallTelemetry + } + return nil +} + +func (x *SubmitCallQualitySurveyRequest) GetCallIdHash() []byte { + if x != nil { + return x.CallIdHash + } + return nil +} + +type SubmitCallQualitySurveyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubmitCallQualitySurveyResponse) Reset() { + *x = SubmitCallQualitySurveyResponse{} + mi := &file_org_signal_chat_call_quality_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubmitCallQualitySurveyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitCallQualitySurveyResponse) ProtoMessage() {} + +func (x *SubmitCallQualitySurveyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_call_quality_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitCallQualitySurveyResponse.ProtoReflect.Descriptor instead. +func (*SubmitCallQualitySurveyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_call_quality_proto_rawDescGZIP(), []int{1} +} + +var File_org_signal_chat_call_quality_proto protoreflect.FileDescriptor + +const file_org_signal_chat_call_quality_proto_rawDesc = "" + + "\n" + + "\"org/signal/chat/call_quality.proto\x12\x1forg.signal.chat.calling.quality\x1a\x1dorg/signal/chat/require.proto\"\xc4\f\n" + + "\x1eSubmitCallQualitySurveyRequest\x12%\n" + + "\x0euser_satisfied\x18\x01 \x01(\bR\ruserSatisfied\x12.\n" + + "\x13call_quality_issues\x18\x02 \x03(\tR\x11callQualityIssues\x12G\n" + + "\x1dadditional_issues_description\x18\x03 \x01(\tH\x00R\x1badditionalIssuesDescription\x88\x01\x01\x12'\n" + + "\rdebug_log_url\x18\x04 \x01(\tH\x01R\vdebugLogUrl\x88\x01\x01\x12'\n" + + "\x0fstart_timestamp\x18\x05 \x01(\x03R\x0estartTimestamp\x12#\n" + + "\rend_timestamp\x18\x06 \x01(\x03R\fendTimestamp\x12\x1b\n" + + "\tcall_type\x18\a \x01(\tR\bcallType\x12\x18\n" + + "\asuccess\x18\b \x01(\bR\asuccess\x12&\n" + + "\x0fcall_end_reason\x18\t \x01(\tR\rcallEndReason\x127\n" + + "\x15connection_rtt_median\x18\n" + + " \x01(\x02H\x02R\x13connectionRttMedian\x88\x01\x01\x12-\n" + + "\x10audio_rtt_median\x18\v \x01(\x02H\x03R\x0eaudioRttMedian\x88\x01\x01\x12-\n" + + "\x10video_rtt_median\x18\f \x01(\x02H\x04R\x0evideoRttMedian\x88\x01\x01\x12<\n" + + "\x18audio_recv_jitter_median\x18\r \x01(\x02H\x05R\x15audioRecvJitterMedian\x88\x01\x01\x12<\n" + + "\x18video_recv_jitter_median\x18\x0e \x01(\x02H\x06R\x15videoRecvJitterMedian\x88\x01\x01\x12<\n" + + "\x18audio_send_jitter_median\x18\x0f \x01(\x02H\aR\x15audioSendJitterMedian\x88\x01\x01\x12<\n" + + "\x18video_send_jitter_median\x18\x10 \x01(\x02H\bR\x15videoSendJitterMedian\x88\x01\x01\x12I\n" + + "\x1faudio_recv_packet_loss_fraction\x18\x11 \x01(\x02H\tR\x1baudioRecvPacketLossFraction\x88\x01\x01\x12I\n" + + "\x1fvideo_recv_packet_loss_fraction\x18\x12 \x01(\x02H\n" + + "R\x1bvideoRecvPacketLossFraction\x88\x01\x01\x12I\n" + + "\x1faudio_send_packet_loss_fraction\x18\x13 \x01(\x02H\vR\x1baudioSendPacketLossFraction\x88\x01\x01\x12I\n" + + "\x1fvideo_send_packet_loss_fraction\x18\x14 \x01(\x02H\fR\x1bvideoSendPacketLossFraction\x88\x01\x01\x12*\n" + + "\x0ecall_telemetry\x18\x15 \x01(\fH\rR\rcallTelemetry\x88\x01\x01\x12%\n" + + "\fcall_id_hash\x18\x16 \x01(\fH\x0eR\n" + + "callIdHash\x88\x01\x01B \n" + + "\x1e_additional_issues_descriptionB\x10\n" + + "\x0e_debug_log_urlB\x18\n" + + "\x16_connection_rtt_medianB\x13\n" + + "\x11_audio_rtt_medianB\x13\n" + + "\x11_video_rtt_medianB\x1b\n" + + "\x19_audio_recv_jitter_medianB\x1b\n" + + "\x19_video_recv_jitter_medianB\x1b\n" + + "\x19_audio_send_jitter_medianB\x1b\n" + + "\x19_video_send_jitter_medianB\"\n" + + " _audio_recv_packet_loss_fractionB\"\n" + + " _video_recv_packet_loss_fractionB\"\n" + + " _audio_send_packet_loss_fractionB\"\n" + + " _video_send_packet_loss_fractionB\x11\n" + + "\x0f_call_telemetryB\x0f\n" + + "\r_call_id_hash\"!\n" + + "\x1fSubmitCallQualitySurveyResponse2\xb4\x01\n" + + "\vCallQuality\x12\x9e\x01\n" + + "\x17SubmitCallQualitySurvey\x12?.org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest\x1a@.org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_call_quality_proto_rawDescOnce sync.Once + file_org_signal_chat_call_quality_proto_rawDescData []byte +) + +func file_org_signal_chat_call_quality_proto_rawDescGZIP() []byte { + file_org_signal_chat_call_quality_proto_rawDescOnce.Do(func() { + file_org_signal_chat_call_quality_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_call_quality_proto_rawDesc), len(file_org_signal_chat_call_quality_proto_rawDesc))) + }) + return file_org_signal_chat_call_quality_proto_rawDescData +} + +var file_org_signal_chat_call_quality_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_org_signal_chat_call_quality_proto_goTypes = []any{ + (*SubmitCallQualitySurveyRequest)(nil), // 0: org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest + (*SubmitCallQualitySurveyResponse)(nil), // 1: org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse +} +var file_org_signal_chat_call_quality_proto_depIdxs = []int32{ + 0, // 0: org.signal.chat.calling.quality.CallQuality.SubmitCallQualitySurvey:input_type -> org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest + 1, // 1: org.signal.chat.calling.quality.CallQuality.SubmitCallQualitySurvey:output_type -> org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_call_quality_proto_init() } +func file_org_signal_chat_call_quality_proto_init() { + if File_org_signal_chat_call_quality_proto != nil { + return + } + file_org_signal_chat_call_quality_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_call_quality_proto_rawDesc), len(file_org_signal_chat_call_quality_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_call_quality_proto_goTypes, + DependencyIndexes: file_org_signal_chat_call_quality_proto_depIdxs, + MessageInfos: file_org_signal_chat_call_quality_proto_msgTypes, + }.Build() + File_org_signal_chat_call_quality_proto = out.File + file_org_signal_chat_call_quality_proto_goTypes = nil + file_org_signal_chat_call_quality_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/call_quality/call_quality_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/call_quality/call_quality_grpc.pb.go new file mode 100644 index 0000000..da99137 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/call_quality/call_quality_grpc.pb.go @@ -0,0 +1,131 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/call_quality.proto + +package call_quality + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + CallQuality_SubmitCallQualitySurvey_FullMethodName = "/org.signal.chat.calling.quality.CallQuality/SubmitCallQualitySurvey" +) + +// CallQualityClient is the client API for CallQuality service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for submitting call quality surveys +type CallQualityClient interface { + // Submits a call quality survey response. + SubmitCallQualitySurvey(ctx context.Context, in *SubmitCallQualitySurveyRequest, opts ...grpc.CallOption) (*SubmitCallQualitySurveyResponse, error) +} + +type callQualityClient struct { + cc grpc.ClientConnInterface +} + +func NewCallQualityClient(cc grpc.ClientConnInterface) CallQualityClient { + return &callQualityClient{cc} +} + +func (c *callQualityClient) SubmitCallQualitySurvey(ctx context.Context, in *SubmitCallQualitySurveyRequest, opts ...grpc.CallOption) (*SubmitCallQualitySurveyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SubmitCallQualitySurveyResponse) + err := c.cc.Invoke(ctx, CallQuality_SubmitCallQualitySurvey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CallQualityServer is the server API for CallQuality service. +// All implementations must embed UnimplementedCallQualityServer +// for forward compatibility. +// +// Provides methods for submitting call quality surveys +type CallQualityServer interface { + // Submits a call quality survey response. + SubmitCallQualitySurvey(context.Context, *SubmitCallQualitySurveyRequest) (*SubmitCallQualitySurveyResponse, error) + mustEmbedUnimplementedCallQualityServer() +} + +// UnimplementedCallQualityServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCallQualityServer struct{} + +func (UnimplementedCallQualityServer) SubmitCallQualitySurvey(context.Context, *SubmitCallQualitySurveyRequest) (*SubmitCallQualitySurveyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SubmitCallQualitySurvey not implemented") +} +func (UnimplementedCallQualityServer) mustEmbedUnimplementedCallQualityServer() {} +func (UnimplementedCallQualityServer) testEmbeddedByValue() {} + +// UnsafeCallQualityServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CallQualityServer will +// result in compilation errors. +type UnsafeCallQualityServer interface { + mustEmbedUnimplementedCallQualityServer() +} + +func RegisterCallQualityServer(s grpc.ServiceRegistrar, srv CallQualityServer) { + // If the following call panics, it indicates UnimplementedCallQualityServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&CallQuality_ServiceDesc, srv) +} + +func _CallQuality_SubmitCallQualitySurvey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubmitCallQualitySurveyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CallQualityServer).SubmitCallQualitySurvey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CallQuality_SubmitCallQualitySurvey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CallQualityServer).SubmitCallQualitySurvey(ctx, req.(*SubmitCallQualitySurveyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CallQuality_ServiceDesc is the grpc.ServiceDesc for CallQuality service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CallQuality_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.calling.quality.CallQuality", + HandlerType: (*CallQualityServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SubmitCallQualitySurvey", + Handler: _CallQuality_SubmitCallQualitySurvey_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/call_quality.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/calling/calling.pb.go b/pkg/signalmeow/protobuf/rpc/calling/calling.pb.go new file mode 100644 index 0000000..7b68f1a --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/calling/calling.pb.go @@ -0,0 +1,379 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/calling.proto + +package calling + +import ( + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetCallingRelaysRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCallingRelaysRequest) Reset() { + *x = GetCallingRelaysRequest{} + mi := &file_org_signal_chat_calling_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCallingRelaysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCallingRelaysRequest) ProtoMessage() {} + +func (x *GetCallingRelaysRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_calling_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCallingRelaysRequest.ProtoReflect.Descriptor instead. +func (*GetCallingRelaysRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{0} +} + +type GetCallingRelaysResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A collection of calling relays a client may use for one-on-one calls. + Relays []*GetCallingRelaysResponse_Relay `protobuf:"bytes,1,rep,name=relays,proto3" json:"relays,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCallingRelaysResponse) Reset() { + *x = GetCallingRelaysResponse{} + mi := &file_org_signal_chat_calling_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCallingRelaysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCallingRelaysResponse) ProtoMessage() {} + +func (x *GetCallingRelaysResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_calling_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCallingRelaysResponse.ProtoReflect.Descriptor instead. +func (*GetCallingRelaysResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{1} +} + +func (x *GetCallingRelaysResponse) GetRelays() []*GetCallingRelaysResponse_Relay { + if x != nil { + return x.Relays + } + return nil +} + +type GetCallingRelaysResponse_HostnameUrlList struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A collection of hostname-based TURN, TURNS, or STUN URLs a client can use + // to connect to a relay. + Urls []string `protobuf:"bytes,1,rep,name=urls,proto3" json:"urls,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCallingRelaysResponse_HostnameUrlList) Reset() { + *x = GetCallingRelaysResponse_HostnameUrlList{} + mi := &file_org_signal_chat_calling_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCallingRelaysResponse_HostnameUrlList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCallingRelaysResponse_HostnameUrlList) ProtoMessage() {} + +func (x *GetCallingRelaysResponse_HostnameUrlList) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_calling_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCallingRelaysResponse_HostnameUrlList.ProtoReflect.Descriptor instead. +func (*GetCallingRelaysResponse_HostnameUrlList) Descriptor() ([]byte, []int) { + return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *GetCallingRelaysResponse_HostnameUrlList) GetUrls() []string { + if x != nil { + return x.Urls + } + return nil +} + +type GetCallingRelaysResponse_IpUrlList struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A collection of IP-based TURN, TURNS, or STUN URLs a client can use to + // connect to a relay. + Urls []string `protobuf:"bytes,1,rep,name=urls,proto3" json:"urls,omitempty"` + // A hostname clients must use to validate the relay's TLS certificate when + // connecting via an IP-based TURNS URL. May not be specified if `urls` + // contains no TURNS URLs. + Hostname *string `protobuf:"bytes,2,opt,name=hostname,proto3,oneof" json:"hostname,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCallingRelaysResponse_IpUrlList) Reset() { + *x = GetCallingRelaysResponse_IpUrlList{} + mi := &file_org_signal_chat_calling_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCallingRelaysResponse_IpUrlList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCallingRelaysResponse_IpUrlList) ProtoMessage() {} + +func (x *GetCallingRelaysResponse_IpUrlList) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_calling_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCallingRelaysResponse_IpUrlList.ProtoReflect.Descriptor instead. +func (*GetCallingRelaysResponse_IpUrlList) Descriptor() ([]byte, []int) { + return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *GetCallingRelaysResponse_IpUrlList) GetUrls() []string { + if x != nil { + return x.Urls + } + return nil +} + +func (x *GetCallingRelaysResponse_IpUrlList) GetHostname() string { + if x != nil && x.Hostname != nil { + return *x.Hostname + } + return "" +} + +type GetCallingRelaysResponse_Relay struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A username that can be presented to authenticate with a TURN server. + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + // A password that can be presented to authenticate with a TURN server. + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + // The duration, in seconds, after which the included username and password + // will no longer be valid. + CredentialTtlSeconds uint64 `protobuf:"varint,3,opt,name=credential_ttl_seconds,json=credentialTtlSeconds,proto3" json:"credential_ttl_seconds,omitempty"` + // A collection of hostname-based URLs clients may use to connect to this + // relay. + HostnameUrls *GetCallingRelaysResponse_HostnameUrlList `protobuf:"bytes,4,opt,name=hostname_urls,json=hostnameUrls,proto3,oneof" json:"hostname_urls,omitempty"` + // A collection of IP-based URLs clients may use to connect to this relay. + IpUrls *GetCallingRelaysResponse_IpUrlList `protobuf:"bytes,5,opt,name=ip_urls,json=ipUrls,proto3,oneof" json:"ip_urls,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCallingRelaysResponse_Relay) Reset() { + *x = GetCallingRelaysResponse_Relay{} + mi := &file_org_signal_chat_calling_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCallingRelaysResponse_Relay) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCallingRelaysResponse_Relay) ProtoMessage() {} + +func (x *GetCallingRelaysResponse_Relay) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_calling_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCallingRelaysResponse_Relay.ProtoReflect.Descriptor instead. +func (*GetCallingRelaysResponse_Relay) Descriptor() ([]byte, []int) { + return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *GetCallingRelaysResponse_Relay) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *GetCallingRelaysResponse_Relay) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *GetCallingRelaysResponse_Relay) GetCredentialTtlSeconds() uint64 { + if x != nil { + return x.CredentialTtlSeconds + } + return 0 +} + +func (x *GetCallingRelaysResponse_Relay) GetHostnameUrls() *GetCallingRelaysResponse_HostnameUrlList { + if x != nil { + return x.HostnameUrls + } + return nil +} + +func (x *GetCallingRelaysResponse_Relay) GetIpUrls() *GetCallingRelaysResponse_IpUrlList { + if x != nil { + return x.IpUrls + } + return nil +} + +var File_org_signal_chat_calling_proto protoreflect.FileDescriptor + +const file_org_signal_chat_calling_proto_rawDesc = "" + + "\n" + + "\x1dorg/signal/chat/calling.proto\x12\x17org.signal.chat.calling\x1a\x1dorg/signal/chat/require.proto\"\x19\n" + + "\x17GetCallingRelaysRequest\"\xbf\x04\n" + + "\x18GetCallingRelaysResponse\x12O\n" + + "\x06relays\x18\x01 \x03(\v27.org.signal.chat.calling.GetCallingRelaysResponse.RelayR\x06relays\x1a%\n" + + "\x0fHostnameUrlList\x12\x12\n" + + "\x04urls\x18\x01 \x03(\tR\x04urls\x1aM\n" + + "\tIpUrlList\x12\x12\n" + + "\x04urls\x18\x01 \x03(\tR\x04urls\x12\x1f\n" + + "\bhostname\x18\x02 \x01(\tH\x00R\bhostname\x88\x01\x01B\v\n" + + "\t_hostname\x1a\xdb\x02\n" + + "\x05Relay\x12\x1a\n" + + "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\x124\n" + + "\x16credential_ttl_seconds\x18\x03 \x01(\x04R\x14credentialTtlSeconds\x12k\n" + + "\rhostname_urls\x18\x04 \x01(\v2A.org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlListH\x00R\fhostnameUrls\x88\x01\x01\x12Y\n" + + "\aip_urls\x18\x05 \x01(\v2;.org.signal.chat.calling.GetCallingRelaysResponse.IpUrlListH\x01R\x06ipUrls\x88\x01\x01B\x10\n" + + "\x0e_hostname_urlsB\n" + + "\n" + + "\b_ip_urls2\x8a\x01\n" + + "\aCalling\x12y\n" + + "\x10GetCallingRelays\x120.org.signal.chat.calling.GetCallingRelaysRequest\x1a1.org.signal.chat.calling.GetCallingRelaysResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_calling_proto_rawDescOnce sync.Once + file_org_signal_chat_calling_proto_rawDescData []byte +) + +func file_org_signal_chat_calling_proto_rawDescGZIP() []byte { + file_org_signal_chat_calling_proto_rawDescOnce.Do(func() { + file_org_signal_chat_calling_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_calling_proto_rawDesc), len(file_org_signal_chat_calling_proto_rawDesc))) + }) + return file_org_signal_chat_calling_proto_rawDescData +} + +var file_org_signal_chat_calling_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_org_signal_chat_calling_proto_goTypes = []any{ + (*GetCallingRelaysRequest)(nil), // 0: org.signal.chat.calling.GetCallingRelaysRequest + (*GetCallingRelaysResponse)(nil), // 1: org.signal.chat.calling.GetCallingRelaysResponse + (*GetCallingRelaysResponse_HostnameUrlList)(nil), // 2: org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList + (*GetCallingRelaysResponse_IpUrlList)(nil), // 3: org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList + (*GetCallingRelaysResponse_Relay)(nil), // 4: org.signal.chat.calling.GetCallingRelaysResponse.Relay +} +var file_org_signal_chat_calling_proto_depIdxs = []int32{ + 4, // 0: org.signal.chat.calling.GetCallingRelaysResponse.relays:type_name -> org.signal.chat.calling.GetCallingRelaysResponse.Relay + 2, // 1: org.signal.chat.calling.GetCallingRelaysResponse.Relay.hostname_urls:type_name -> org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList + 3, // 2: org.signal.chat.calling.GetCallingRelaysResponse.Relay.ip_urls:type_name -> org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList + 0, // 3: org.signal.chat.calling.Calling.GetCallingRelays:input_type -> org.signal.chat.calling.GetCallingRelaysRequest + 1, // 4: org.signal.chat.calling.Calling.GetCallingRelays:output_type -> org.signal.chat.calling.GetCallingRelaysResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_calling_proto_init() } +func file_org_signal_chat_calling_proto_init() { + if File_org_signal_chat_calling_proto != nil { + return + } + file_org_signal_chat_calling_proto_msgTypes[3].OneofWrappers = []any{} + file_org_signal_chat_calling_proto_msgTypes[4].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_calling_proto_rawDesc), len(file_org_signal_chat_calling_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_calling_proto_goTypes, + DependencyIndexes: file_org_signal_chat_calling_proto_depIdxs, + MessageInfos: file_org_signal_chat_calling_proto_msgTypes, + }.Build() + File_org_signal_chat_calling_proto = out.File + file_org_signal_chat_calling_proto_goTypes = nil + file_org_signal_chat_calling_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/calling/calling_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/calling/calling_grpc.pb.go new file mode 100644 index 0000000..87ec6d7 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/calling/calling_grpc.pb.go @@ -0,0 +1,133 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/calling.proto + +package calling + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Calling_GetCallingRelays_FullMethodName = "/org.signal.chat.calling.Calling/GetCallingRelays" +) + +// CallingClient is the client API for Calling service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for getting credentials and relay options for one-on-one +// calls. +type CallingClient interface { + // Retrieves TURN credentials and relay options for one-on-one calls. + GetCallingRelays(ctx context.Context, in *GetCallingRelaysRequest, opts ...grpc.CallOption) (*GetCallingRelaysResponse, error) +} + +type callingClient struct { + cc grpc.ClientConnInterface +} + +func NewCallingClient(cc grpc.ClientConnInterface) CallingClient { + return &callingClient{cc} +} + +func (c *callingClient) GetCallingRelays(ctx context.Context, in *GetCallingRelaysRequest, opts ...grpc.CallOption) (*GetCallingRelaysResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetCallingRelaysResponse) + err := c.cc.Invoke(ctx, Calling_GetCallingRelays_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CallingServer is the server API for Calling service. +// All implementations must embed UnimplementedCallingServer +// for forward compatibility. +// +// Provides methods for getting credentials and relay options for one-on-one +// calls. +type CallingServer interface { + // Retrieves TURN credentials and relay options for one-on-one calls. + GetCallingRelays(context.Context, *GetCallingRelaysRequest) (*GetCallingRelaysResponse, error) + mustEmbedUnimplementedCallingServer() +} + +// UnimplementedCallingServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCallingServer struct{} + +func (UnimplementedCallingServer) GetCallingRelays(context.Context, *GetCallingRelaysRequest) (*GetCallingRelaysResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetCallingRelays not implemented") +} +func (UnimplementedCallingServer) mustEmbedUnimplementedCallingServer() {} +func (UnimplementedCallingServer) testEmbeddedByValue() {} + +// UnsafeCallingServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CallingServer will +// result in compilation errors. +type UnsafeCallingServer interface { + mustEmbedUnimplementedCallingServer() +} + +func RegisterCallingServer(s grpc.ServiceRegistrar, srv CallingServer) { + // If the following call panics, it indicates UnimplementedCallingServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Calling_ServiceDesc, srv) +} + +func _Calling_GetCallingRelays_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCallingRelaysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CallingServer).GetCallingRelays(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Calling_GetCallingRelays_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CallingServer).GetCallingRelays(ctx, req.(*GetCallingRelaysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Calling_ServiceDesc is the grpc.ServiceDesc for Calling service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Calling_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.calling.Calling", + HandlerType: (*CallingServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetCallingRelays", + Handler: _Calling_GetCallingRelays_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/calling.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go b/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go new file mode 100644 index 0000000..3643365 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go @@ -0,0 +1,333 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/challenge.proto + +package challenge + +import ( + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AnswerChallengeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The opaque token id from the ChallengeRequired response returned by the + // server endpoint that requested the challenge + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + // Types that are valid to be assigned to Request: + // + // *AnswerChallengeRequest_Push + // *AnswerChallengeRequest_Captcha + Request isAnswerChallengeRequest_Request `protobuf_oneof:"request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnswerChallengeRequest) Reset() { + *x = AnswerChallengeRequest{} + mi := &file_org_signal_chat_challenge_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnswerChallengeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerChallengeRequest) ProtoMessage() {} + +func (x *AnswerChallengeRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_challenge_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerChallengeRequest.ProtoReflect.Descriptor instead. +func (*AnswerChallengeRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{0} +} + +func (x *AnswerChallengeRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *AnswerChallengeRequest) GetRequest() isAnswerChallengeRequest_Request { + if x != nil { + return x.Request + } + return nil +} + +func (x *AnswerChallengeRequest) GetPush() *AnswerChallengeRequest_AnswerPushChallengeRequest { + if x != nil { + if x, ok := x.Request.(*AnswerChallengeRequest_Push); ok { + return x.Push + } + } + return nil +} + +func (x *AnswerChallengeRequest) GetCaptcha() *AnswerChallengeRequest_AnswerCaptchaChallengeRequest { + if x != nil { + if x, ok := x.Request.(*AnswerChallengeRequest_Captcha); ok { + return x.Captcha + } + } + return nil +} + +type isAnswerChallengeRequest_Request interface { + isAnswerChallengeRequest_Request() +} + +type AnswerChallengeRequest_Push struct { + Push *AnswerChallengeRequest_AnswerPushChallengeRequest `protobuf:"bytes,2,opt,name=push,proto3,oneof"` +} + +type AnswerChallengeRequest_Captcha struct { + Captcha *AnswerChallengeRequest_AnswerCaptchaChallengeRequest `protobuf:"bytes,3,opt,name=captcha,proto3,oneof"` +} + +func (*AnswerChallengeRequest_Push) isAnswerChallengeRequest_Request() {} + +func (*AnswerChallengeRequest_Captcha) isAnswerChallengeRequest_Request() {} + +type AnswerChallengeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Whether the challenge proof was accepted + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnswerChallengeResponse) Reset() { + *x = AnswerChallengeResponse{} + mi := &file_org_signal_chat_challenge_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnswerChallengeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerChallengeResponse) ProtoMessage() {} + +func (x *AnswerChallengeResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_challenge_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerChallengeResponse.ProtoReflect.Descriptor instead. +func (*AnswerChallengeResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{1} +} + +func (x *AnswerChallengeResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type AnswerChallengeRequest_AnswerPushChallengeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The challenge string provided to the client via a push payload + Challenge string `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) Reset() { + *x = AnswerChallengeRequest_AnswerPushChallengeRequest{} + mi := &file_org_signal_chat_challenge_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerChallengeRequest_AnswerPushChallengeRequest) ProtoMessage() {} + +func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_challenge_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerChallengeRequest_AnswerPushChallengeRequest.ProtoReflect.Descriptor instead. +func (*AnswerChallengeRequest_AnswerPushChallengeRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) GetChallenge() string { + if x != nil { + return x.Challenge + } + return "" +} + +type AnswerChallengeRequest_AnswerCaptchaChallengeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A string representing a solved captcha + // Example: signal-hcaptcha.30b01b46-d8c9-4c30-bbd7-9719acfe0c10.challenge.abcdefg1345 + Captcha string `protobuf:"bytes,1,opt,name=captcha,proto3" json:"captcha,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) Reset() { + *x = AnswerChallengeRequest_AnswerCaptchaChallengeRequest{} + mi := &file_org_signal_chat_challenge_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest) ProtoMessage() {} + +func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_challenge_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerChallengeRequest_AnswerCaptchaChallengeRequest.ProtoReflect.Descriptor instead. +func (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) GetCaptcha() string { + if x != nil { + return x.Captcha + } + return "" +} + +var File_org_signal_chat_challenge_proto protoreflect.FileDescriptor + +const file_org_signal_chat_challenge_proto_rawDesc = "" + + "\n" + + "\x1forg/signal/chat/challenge.proto\x12\x19org.signal.chat.challenge\x1a\x1dorg/signal/chat/require.proto\"\x93\x03\n" + + "\x16AnswerChallengeRequest\x12\x1a\n" + + "\x05token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x05token\x12b\n" + + "\x04push\x18\x02 \x01(\v2L.org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequestH\x00R\x04push\x12k\n" + + "\acaptcha\x18\x03 \x01(\v2O.org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequestH\x00R\acaptcha\x1a@\n" + + "\x1aAnswerPushChallengeRequest\x12\"\n" + + "\tchallenge\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\tchallenge\x1a?\n" + + "\x1dAnswerCaptchaChallengeRequest\x12\x1e\n" + + "\acaptcha\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\acaptchaB\t\n" + + "\arequest\"3\n" + + "\x17AnswerChallengeResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess2\x96\x01\n" + + "\tChallenge\x12\x82\x01\n" + + "\x17HandleChallengeResponse\x121.org.signal.chat.challenge.AnswerChallengeRequest\x1a2.org.signal.chat.challenge.AnswerChallengeResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_challenge_proto_rawDescOnce sync.Once + file_org_signal_chat_challenge_proto_rawDescData []byte +) + +func file_org_signal_chat_challenge_proto_rawDescGZIP() []byte { + file_org_signal_chat_challenge_proto_rawDescOnce.Do(func() { + file_org_signal_chat_challenge_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_challenge_proto_rawDesc), len(file_org_signal_chat_challenge_proto_rawDesc))) + }) + return file_org_signal_chat_challenge_proto_rawDescData +} + +var file_org_signal_chat_challenge_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_org_signal_chat_challenge_proto_goTypes = []any{ + (*AnswerChallengeRequest)(nil), // 0: org.signal.chat.challenge.AnswerChallengeRequest + (*AnswerChallengeResponse)(nil), // 1: org.signal.chat.challenge.AnswerChallengeResponse + (*AnswerChallengeRequest_AnswerPushChallengeRequest)(nil), // 2: org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest + (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest)(nil), // 3: org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest +} +var file_org_signal_chat_challenge_proto_depIdxs = []int32{ + 2, // 0: org.signal.chat.challenge.AnswerChallengeRequest.push:type_name -> org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest + 3, // 1: org.signal.chat.challenge.AnswerChallengeRequest.captcha:type_name -> org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest + 0, // 2: org.signal.chat.challenge.Challenge.HandleChallengeResponse:input_type -> org.signal.chat.challenge.AnswerChallengeRequest + 1, // 3: org.signal.chat.challenge.Challenge.HandleChallengeResponse:output_type -> org.signal.chat.challenge.AnswerChallengeResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_challenge_proto_init() } +func file_org_signal_chat_challenge_proto_init() { + if File_org_signal_chat_challenge_proto != nil { + return + } + file_org_signal_chat_challenge_proto_msgTypes[0].OneofWrappers = []any{ + (*AnswerChallengeRequest_Push)(nil), + (*AnswerChallengeRequest_Captcha)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_challenge_proto_rawDesc), len(file_org_signal_chat_challenge_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_challenge_proto_goTypes, + DependencyIndexes: file_org_signal_chat_challenge_proto_depIdxs, + MessageInfos: file_org_signal_chat_challenge_proto_msgTypes, + }.Build() + File_org_signal_chat_challenge_proto = out.File + file_org_signal_chat_challenge_proto_goTypes = nil + file_org_signal_chat_challenge_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go new file mode 100644 index 0000000..e242637 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go @@ -0,0 +1,133 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/challenge.proto + +package challenge + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Challenge_HandleChallengeResponse_FullMethodName = "/org.signal.chat.challenge.Challenge/HandleChallengeResponse" +) + +// ChallengeClient is the client API for Challenge service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ChallengeClient interface { + // Some server endpoints (the "send message" endpoint, for example) may return + // a response indicating the client must complete a challenge before continuing. + // Clients may use this endpoint to provide proof of a completed challenge. + // If successful, the client may then continue their original operation. + HandleChallengeResponse(ctx context.Context, in *AnswerChallengeRequest, opts ...grpc.CallOption) (*AnswerChallengeResponse, error) +} + +type challengeClient struct { + cc grpc.ClientConnInterface +} + +func NewChallengeClient(cc grpc.ClientConnInterface) ChallengeClient { + return &challengeClient{cc} +} + +func (c *challengeClient) HandleChallengeResponse(ctx context.Context, in *AnswerChallengeRequest, opts ...grpc.CallOption) (*AnswerChallengeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AnswerChallengeResponse) + err := c.cc.Invoke(ctx, Challenge_HandleChallengeResponse_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ChallengeServer is the server API for Challenge service. +// All implementations must embed UnimplementedChallengeServer +// for forward compatibility. +type ChallengeServer interface { + // Some server endpoints (the "send message" endpoint, for example) may return + // a response indicating the client must complete a challenge before continuing. + // Clients may use this endpoint to provide proof of a completed challenge. + // If successful, the client may then continue their original operation. + HandleChallengeResponse(context.Context, *AnswerChallengeRequest) (*AnswerChallengeResponse, error) + mustEmbedUnimplementedChallengeServer() +} + +// UnimplementedChallengeServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedChallengeServer struct{} + +func (UnimplementedChallengeServer) HandleChallengeResponse(context.Context, *AnswerChallengeRequest) (*AnswerChallengeResponse, error) { + return nil, status.Error(codes.Unimplemented, "method HandleChallengeResponse not implemented") +} +func (UnimplementedChallengeServer) mustEmbedUnimplementedChallengeServer() {} +func (UnimplementedChallengeServer) testEmbeddedByValue() {} + +// UnsafeChallengeServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ChallengeServer will +// result in compilation errors. +type UnsafeChallengeServer interface { + mustEmbedUnimplementedChallengeServer() +} + +func RegisterChallengeServer(s grpc.ServiceRegistrar, srv ChallengeServer) { + // If the following call panics, it indicates UnimplementedChallengeServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Challenge_ServiceDesc, srv) +} + +func _Challenge_HandleChallengeResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AnswerChallengeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChallengeServer).HandleChallengeResponse(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Challenge_HandleChallengeResponse_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChallengeServer).HandleChallengeResponse(ctx, req.(*AnswerChallengeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Challenge_ServiceDesc is the grpc.ServiceDesc for Challenge service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Challenge_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.challenge.Challenge", + HandlerType: (*ChallengeServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleChallengeResponse", + Handler: _Challenge_HandleChallengeResponse_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/challenge.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/common/common.pb.go b/pkg/signalmeow/protobuf/rpc/common/common.pb.go new file mode 100644 index 0000000..551d115 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/common/common.pb.go @@ -0,0 +1,986 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/common.proto + +package common + +import ( + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type IdentityType int32 + +const ( + IdentityType_IDENTITY_TYPE_UNSPECIFIED IdentityType = 0 + IdentityType_IDENTITY_TYPE_ACI IdentityType = 1 + IdentityType_IDENTITY_TYPE_PNI IdentityType = 2 +) + +// Enum value maps for IdentityType. +var ( + IdentityType_name = map[int32]string{ + 0: "IDENTITY_TYPE_UNSPECIFIED", + 1: "IDENTITY_TYPE_ACI", + 2: "IDENTITY_TYPE_PNI", + } + IdentityType_value = map[string]int32{ + "IDENTITY_TYPE_UNSPECIFIED": 0, + "IDENTITY_TYPE_ACI": 1, + "IDENTITY_TYPE_PNI": 2, + } +) + +func (x IdentityType) Enum() *IdentityType { + p := new(IdentityType) + *p = x + return p +} + +func (x IdentityType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IdentityType) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_common_proto_enumTypes[0].Descriptor() +} + +func (IdentityType) Type() protoreflect.EnumType { + return &file_org_signal_chat_common_proto_enumTypes[0] +} + +func (x IdentityType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IdentityType.Descriptor instead. +func (IdentityType) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{0} +} + +type DeviceCapability int32 + +const ( + DeviceCapability_DEVICE_CAPABILITY_UNSPECIFIED DeviceCapability = 0 + DeviceCapability_DEVICE_CAPABILITY_STORAGE DeviceCapability = 1 + DeviceCapability_DEVICE_CAPABILITY_TRANSFER DeviceCapability = 2 + DeviceCapability_DEVICE_CAPABILITY_ATTACHMENT_BACKFILL DeviceCapability = 6 + DeviceCapability_DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET DeviceCapability = 7 + DeviceCapability_DEVICE_CAPABILITY_PROFILES_V2 DeviceCapability = 8 + DeviceCapability_DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE DeviceCapability = 9 + DeviceCapability_DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER DeviceCapability = 10 +) + +// Enum value maps for DeviceCapability. +var ( + DeviceCapability_name = map[int32]string{ + 0: "DEVICE_CAPABILITY_UNSPECIFIED", + 1: "DEVICE_CAPABILITY_STORAGE", + 2: "DEVICE_CAPABILITY_TRANSFER", + 6: "DEVICE_CAPABILITY_ATTACHMENT_BACKFILL", + 7: "DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET", + 8: "DEVICE_CAPABILITY_PROFILES_V2", + 9: "DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE", + 10: "DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER", + } + DeviceCapability_value = map[string]int32{ + "DEVICE_CAPABILITY_UNSPECIFIED": 0, + "DEVICE_CAPABILITY_STORAGE": 1, + "DEVICE_CAPABILITY_TRANSFER": 2, + "DEVICE_CAPABILITY_ATTACHMENT_BACKFILL": 6, + "DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET": 7, + "DEVICE_CAPABILITY_PROFILES_V2": 8, + "DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE": 9, + "DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER": 10, + } +) + +func (x DeviceCapability) Enum() *DeviceCapability { + p := new(DeviceCapability) + *p = x + return p +} + +func (x DeviceCapability) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeviceCapability) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_common_proto_enumTypes[1].Descriptor() +} + +func (DeviceCapability) Type() protoreflect.EnumType { + return &file_org_signal_chat_common_proto_enumTypes[1] +} + +func (x DeviceCapability) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeviceCapability.Descriptor instead. +func (DeviceCapability) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{1} +} + +type ServiceIdentifier struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The type of identity represented by this service identifier. + IdentityType IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` + // The UUID of the identity represented by this service identifier. + Uuid []byte `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ServiceIdentifier) Reset() { + *x = ServiceIdentifier{} + mi := &file_org_signal_chat_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServiceIdentifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceIdentifier) ProtoMessage() {} + +func (x *ServiceIdentifier) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceIdentifier.ProtoReflect.Descriptor instead. +func (*ServiceIdentifier) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{0} +} + +func (x *ServiceIdentifier) GetIdentityType() IdentityType { + if x != nil { + return x.IdentityType + } + return IdentityType_IDENTITY_TYPE_UNSPECIFIED +} + +func (x *ServiceIdentifier) GetUuid() []byte { + if x != nil { + return x.Uuid + } + return nil +} + +// All identifiers associated with an account. +type AccountIdentifiers struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of service identifiers for the identified account. Always includes + // exactly one ACI service identifier and at most one PNI service identifier. + ServiceIdentifiers []*ServiceIdentifier `protobuf:"bytes,1,rep,name=service_identifiers,json=serviceIdentifiers,proto3" json:"service_identifiers,omitempty"` + // The phone number associated with the identified account. May be empty if + // the given account does not have a phone number. + E164 string `protobuf:"bytes,2,opt,name=e164,proto3" json:"e164,omitempty"` + // The username hash (if any) associated with the identified account. May be + // empty if no username is associated with the identified account. + UsernameHash []byte `protobuf:"bytes,3,opt,name=username_hash,json=usernameHash,proto3" json:"username_hash,omitempty"` + // The username link handle UUID associated with the identified account. + // May be empty if no username is associated with the identified account. + UsernameLinkHandle []byte `protobuf:"bytes,4,opt,name=username_link_handle,json=usernameLinkHandle,proto3" json:"username_link_handle,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountIdentifiers) Reset() { + *x = AccountIdentifiers{} + mi := &file_org_signal_chat_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountIdentifiers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountIdentifiers) ProtoMessage() {} + +func (x *AccountIdentifiers) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountIdentifiers.ProtoReflect.Descriptor instead. +func (*AccountIdentifiers) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountIdentifiers) GetServiceIdentifiers() []*ServiceIdentifier { + if x != nil { + return x.ServiceIdentifiers + } + return nil +} + +func (x *AccountIdentifiers) GetE164() string { + if x != nil { + return x.E164 + } + return "" +} + +func (x *AccountIdentifiers) GetUsernameHash() []byte { + if x != nil { + return x.UsernameHash + } + return nil +} + +func (x *AccountIdentifiers) GetUsernameLinkHandle() []byte { + if x != nil { + return x.UsernameLinkHandle + } + return nil +} + +type EcPreKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A locally-unique identifier for this key, which will be provided by + // peers using this key to encrypt messages so the private key can be looked + // up. + KeyId int32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + // The public key, serialized in libsignal's elliptic-curve public key format. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EcPreKey) Reset() { + *x = EcPreKey{} + mi := &file_org_signal_chat_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EcPreKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EcPreKey) ProtoMessage() {} + +func (x *EcPreKey) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EcPreKey.ProtoReflect.Descriptor instead. +func (*EcPreKey) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{2} +} + +func (x *EcPreKey) GetKeyId() int32 { + if x != nil { + return x.KeyId + } + return 0 +} + +func (x *EcPreKey) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +type EcSignedPreKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A locally-unique identifier for this key, which will be provided by + // peers using this key to encrypt messages so the private key can be looked + // up. + KeyId int32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + // The public key, serialized in libsignal's elliptic-curve public key format. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // A signature of the public key, verifiable with the identity key for the + // account/identity associated with this pre-key. + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EcSignedPreKey) Reset() { + *x = EcSignedPreKey{} + mi := &file_org_signal_chat_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EcSignedPreKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EcSignedPreKey) ProtoMessage() {} + +func (x *EcSignedPreKey) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EcSignedPreKey.ProtoReflect.Descriptor instead. +func (*EcSignedPreKey) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{3} +} + +func (x *EcSignedPreKey) GetKeyId() int32 { + if x != nil { + return x.KeyId + } + return 0 +} + +func (x *EcSignedPreKey) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *EcSignedPreKey) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type KemSignedPreKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An locally-unique identifier for this key, which will be provided by peers + // using this key to encrypt messages so the private key can be looked up. + KeyId int32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + // The public key, serialized in libsignal's Kyber1024 public key format. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // A signature of the public key, verifiable with the identity key for the + // account/identity associated with this pre-key. + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *KemSignedPreKey) Reset() { + *x = KemSignedPreKey{} + mi := &file_org_signal_chat_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *KemSignedPreKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KemSignedPreKey) ProtoMessage() {} + +func (x *KemSignedPreKey) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KemSignedPreKey.ProtoReflect.Descriptor instead. +func (*KemSignedPreKey) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{4} +} + +func (x *KemSignedPreKey) GetKeyId() int32 { + if x != nil { + return x.KeyId + } + return 0 +} + +func (x *KemSignedPreKey) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *KemSignedPreKey) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type ZkCredential struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Day on which this credential can be redeemed, in UTC seconds since epoch + RedemptionTime int64 `protobuf:"varint,1,opt,name=redemption_time,json=redemptionTime,proto3" json:"redemption_time,omitempty"` + // The ZK credential, using libsignal's serialization + Credential []byte `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ZkCredential) Reset() { + *x = ZkCredential{} + mi := &file_org_signal_chat_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ZkCredential) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ZkCredential) ProtoMessage() {} + +func (x *ZkCredential) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ZkCredential.ProtoReflect.Descriptor instead. +func (*ZkCredential) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{5} +} + +func (x *ZkCredential) GetRedemptionTime() int64 { + if x != nil { + return x.RedemptionTime + } + return 0 +} + +func (x *ZkCredential) GetCredential() []byte { + if x != nil { + return x.Credential + } + return nil +} + +// An upload location and credentials which may be used to upload an object +// to an external CDN +type UploadForm struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Indicates the CDN type. 3 indicates resumable uploads using TUS + Cdn uint32 `protobuf:"varint,1,opt,name=cdn,proto3" json:"cdn,omitempty"` + // The location within the specified cdn where the finished upload can be found + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // A map of headers to include with all upload requests. Potentially contains + // time-limited upload credentials + Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The URL to upload to with the appropriate protocol + SignedUploadLocation string `protobuf:"bytes,4,opt,name=signed_upload_location,json=signedUploadLocation,proto3" json:"signed_upload_location,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UploadForm) Reset() { + *x = UploadForm{} + mi := &file_org_signal_chat_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UploadForm) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UploadForm) ProtoMessage() {} + +func (x *UploadForm) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UploadForm.ProtoReflect.Descriptor instead. +func (*UploadForm) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{6} +} + +func (x *UploadForm) GetCdn() uint32 { + if x != nil { + return x.Cdn + } + return 0 +} + +func (x *UploadForm) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *UploadForm) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + +func (x *UploadForm) GetSignedUploadLocation() string { + if x != nil { + return x.SignedUploadLocation + } + return "" +} + +// An upload location, credentials, and metadata which may be used to upload an +// object to AWS S3 +type S3UploadForm struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The S3 key (i.e. path and filename) for the uploaded file. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // A scoped credential. Includes the AWS access key, date, region targeted, + // and AWS service. + Credential string `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` + // The type of access control for the uploaded file. + Acl string `protobuf:"bytes,3,opt,name=acl,proto3" json:"acl,omitempty"` + // The algorithm used to calculate a signature on the S3 policy. + Algorithm string `protobuf:"bytes,4,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + // The timestamp (formatted as "yyyyMMdd'T'HHmmssX") at which the S3 policy + // and signature were generated. + Date string `protobuf:"bytes,5,opt,name=date,proto3" json:"date,omitempty"` + // The S3 policy (as a base64-encoded JSON string) used to upload the file. + Policy string `protobuf:"bytes,6,opt,name=policy,proto3" json:"policy,omitempty"` + // A digital signature (formatted as a hex string) on the S3 policy. + Signature string `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *S3UploadForm) Reset() { + *x = S3UploadForm{} + mi := &file_org_signal_chat_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *S3UploadForm) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S3UploadForm) ProtoMessage() {} + +func (x *S3UploadForm) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use S3UploadForm.ProtoReflect.Descriptor instead. +func (*S3UploadForm) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{7} +} + +func (x *S3UploadForm) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *S3UploadForm) GetCredential() string { + if x != nil { + return x.Credential + } + return "" +} + +func (x *S3UploadForm) GetAcl() string { + if x != nil { + return x.Acl + } + return "" +} + +func (x *S3UploadForm) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *S3UploadForm) GetDate() string { + if x != nil { + return x.Date + } + return "" +} + +func (x *S3UploadForm) GetPolicy() string { + if x != nil { + return x.Policy + } + return "" +} + +func (x *S3UploadForm) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +type BadgeSvg struct { + state protoimpl.MessageState `protogen:"open.v1"` + // File name of the scalable vector graphic for light mode. + Light string `protobuf:"bytes,1,opt,name=light,proto3" json:"light,omitempty"` + // File name of the scalable vector graphic for dark mode. + Dark string `protobuf:"bytes,2,opt,name=dark,proto3" json:"dark,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BadgeSvg) Reset() { + *x = BadgeSvg{} + mi := &file_org_signal_chat_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BadgeSvg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BadgeSvg) ProtoMessage() {} + +func (x *BadgeSvg) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BadgeSvg.ProtoReflect.Descriptor instead. +func (*BadgeSvg) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{8} +} + +func (x *BadgeSvg) GetLight() string { + if x != nil { + return x.Light + } + return "" +} + +func (x *BadgeSvg) GetDark() string { + if x != nil { + return x.Dark + } + return "" +} + +type Badge struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An ID that uniquely identifies the badge. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The category the badge falls in ("donor" or "other"). + Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` + // The badge name. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // The badge description. + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // Different size badge SVG files. + Sprites6 []string `protobuf:"bytes,5,rep,name=sprites6,proto3" json:"sprites6,omitempty"` + // File name of the scalable vector graphic representing this badge. + Svg string `protobuf:"bytes,6,opt,name=svg,proto3" json:"svg,omitempty"` + // Pairs of light/dark SVG files designed for display at different sizes. + Svgs []*BadgeSvg `protobuf:"bytes,7,rep,name=svgs,proto3" json:"svgs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Badge) Reset() { + *x = Badge{} + mi := &file_org_signal_chat_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Badge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Badge) ProtoMessage() {} + +func (x *Badge) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_common_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Badge.ProtoReflect.Descriptor instead. +func (*Badge) Descriptor() ([]byte, []int) { + return file_org_signal_chat_common_proto_rawDescGZIP(), []int{9} +} + +func (x *Badge) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Badge) GetCategory() string { + if x != nil { + return x.Category + } + return "" +} + +func (x *Badge) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Badge) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Badge) GetSprites6() []string { + if x != nil { + return x.Sprites6 + } + return nil +} + +func (x *Badge) GetSvg() string { + if x != nil { + return x.Svg + } + return "" +} + +func (x *Badge) GetSvgs() []*BadgeSvg { + if x != nil { + return x.Svgs + } + return nil +} + +var File_org_signal_chat_common_proto protoreflect.FileDescriptor + +const file_org_signal_chat_common_proto_rawDesc = "" + + "\n" + + "\x1corg/signal/chat/common.proto\x12\x16org.signal.chat.common\x1a\x1dorg/signal/chat/require.proto\"\x7f\n" + + "\x11ServiceIdentifier\x12O\n" + + "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeB\x04\x90\x97\"\x01R\fidentityType\x12\x19\n" + + "\x04uuid\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x10R\x04uuid\"\xf1\x01\n" + + "\x12AccountIdentifiers\x12Z\n" + + "\x13service_identifiers\x18\x01 \x03(\v2).org.signal.chat.common.ServiceIdentifierR\x12serviceIdentifiers\x12\x18\n" + + "\x04e164\x18\x02 \x01(\tB\x04\xa8\x97\"\x01R\x04e164\x12+\n" + + "\rusername_hash\x18\x03 \x01(\fB\x06\xa2\x97\"\x02\x00 R\fusernameHash\x128\n" + + "\x14username_link_handle\x18\x04 \x01(\fB\x06\xa2\x97\"\x02\x00\x10R\x12usernameLinkHandle\"N\n" + + "\bEcPreKey\x12\x1d\n" + + "\x06key_id\x18\x01 \x01(\x05B\x06\xb2\x97\"\x02\b\x00R\x05keyId\x12#\n" + + "\n" + + "public_key\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\tpublicKey\"x\n" + + "\x0eEcSignedPreKey\x12\x1d\n" + + "\x06key_id\x18\x01 \x01(\x05B\x06\xb2\x97\"\x02\b\x00R\x05keyId\x12#\n" + + "\n" + + "public_key\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\tpublicKey\x12\"\n" + + "\tsignature\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\tsignature\"y\n" + + "\x0fKemSignedPreKey\x12\x1d\n" + + "\x06key_id\x18\x01 \x01(\x05B\x06\xb2\x97\"\x02\b\x00R\x05keyId\x12#\n" + + "\n" + + "public_key\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\tpublicKey\x12\"\n" + + "\tsignature\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\tsignature\"]\n" + + "\fZkCredential\x12'\n" + + "\x0fredemption_time\x18\x01 \x01(\x03R\x0eredemptionTime\x12$\n" + + "\n" + + "credential\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\n" + + "credential\"\xed\x01\n" + + "\n" + + "UploadForm\x12\x10\n" + + "\x03cdn\x18\x01 \x01(\rR\x03cdn\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x12I\n" + + "\aheaders\x18\x03 \x03(\v2/.org.signal.chat.common.UploadForm.HeadersEntryR\aheaders\x124\n" + + "\x16signed_upload_location\x18\x04 \x01(\tR\x14signedUploadLocation\x1a:\n" + + "\fHeadersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xba\x01\n" + + "\fS3UploadForm\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x1e\n" + + "\n" + + "credential\x18\x02 \x01(\tR\n" + + "credential\x12\x10\n" + + "\x03acl\x18\x03 \x01(\tR\x03acl\x12\x1c\n" + + "\talgorithm\x18\x04 \x01(\tR\talgorithm\x12\x12\n" + + "\x04date\x18\x05 \x01(\tR\x04date\x12\x16\n" + + "\x06policy\x18\x06 \x01(\tR\x06policy\x12\x1c\n" + + "\tsignature\x18\a \x01(\tR\tsignature\"4\n" + + "\bBadgeSvg\x12\x14\n" + + "\x05light\x18\x01 \x01(\tR\x05light\x12\x12\n" + + "\x04dark\x18\x02 \x01(\tR\x04dark\"\xcd\x01\n" + + "\x05Badge\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + + "\bcategory\x18\x02 \x01(\tR\bcategory\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12\x1a\n" + + "\bsprites6\x18\x05 \x03(\tR\bsprites6\x12\x10\n" + + "\x03svg\x18\x06 \x01(\tR\x03svg\x124\n" + + "\x04svgs\x18\a \x03(\v2 .org.signal.chat.common.BadgeSvgR\x04svgs*[\n" + + "\fIdentityType\x12\x1d\n" + + "\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x15\n" + + "\x11IDENTITY_TYPE_ACI\x10\x01\x12\x15\n" + + "\x11IDENTITY_TYPE_PNI\x10\x02*\xe8\x02\n" + + "\x10DeviceCapability\x12!\n" + + "\x1dDEVICE_CAPABILITY_UNSPECIFIED\x10\x00\x12\x1d\n" + + "\x19DEVICE_CAPABILITY_STORAGE\x10\x01\x12\x1e\n" + + "\x1aDEVICE_CAPABILITY_TRANSFER\x10\x02\x12)\n" + + "%DEVICE_CAPABILITY_ATTACHMENT_BACKFILL\x10\x06\x121\n" + + "-DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET\x10\a\x12!\n" + + "\x1dDEVICE_CAPABILITY_PROFILES_V2\x10\b\x122\n" + + ".DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE\x10\t\x12+\n" + + "'DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER\x10\n" + + "\"\x04\b\x03\x10\x03\"\x04\b\x04\x10\x04\"\x04\b\x05\x10\x05B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_common_proto_rawDescOnce sync.Once + file_org_signal_chat_common_proto_rawDescData []byte +) + +func file_org_signal_chat_common_proto_rawDescGZIP() []byte { + file_org_signal_chat_common_proto_rawDescOnce.Do(func() { + file_org_signal_chat_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_common_proto_rawDesc), len(file_org_signal_chat_common_proto_rawDesc))) + }) + return file_org_signal_chat_common_proto_rawDescData +} + +var file_org_signal_chat_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_org_signal_chat_common_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_org_signal_chat_common_proto_goTypes = []any{ + (IdentityType)(0), // 0: org.signal.chat.common.IdentityType + (DeviceCapability)(0), // 1: org.signal.chat.common.DeviceCapability + (*ServiceIdentifier)(nil), // 2: org.signal.chat.common.ServiceIdentifier + (*AccountIdentifiers)(nil), // 3: org.signal.chat.common.AccountIdentifiers + (*EcPreKey)(nil), // 4: org.signal.chat.common.EcPreKey + (*EcSignedPreKey)(nil), // 5: org.signal.chat.common.EcSignedPreKey + (*KemSignedPreKey)(nil), // 6: org.signal.chat.common.KemSignedPreKey + (*ZkCredential)(nil), // 7: org.signal.chat.common.ZkCredential + (*UploadForm)(nil), // 8: org.signal.chat.common.UploadForm + (*S3UploadForm)(nil), // 9: org.signal.chat.common.S3UploadForm + (*BadgeSvg)(nil), // 10: org.signal.chat.common.BadgeSvg + (*Badge)(nil), // 11: org.signal.chat.common.Badge + nil, // 12: org.signal.chat.common.UploadForm.HeadersEntry +} +var file_org_signal_chat_common_proto_depIdxs = []int32{ + 0, // 0: org.signal.chat.common.ServiceIdentifier.identity_type:type_name -> org.signal.chat.common.IdentityType + 2, // 1: org.signal.chat.common.AccountIdentifiers.service_identifiers:type_name -> org.signal.chat.common.ServiceIdentifier + 12, // 2: org.signal.chat.common.UploadForm.headers:type_name -> org.signal.chat.common.UploadForm.HeadersEntry + 10, // 3: org.signal.chat.common.Badge.svgs:type_name -> org.signal.chat.common.BadgeSvg + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_common_proto_init() } +func file_org_signal_chat_common_proto_init() { + if File_org_signal_chat_common_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_common_proto_rawDesc), len(file_org_signal_chat_common_proto_rawDesc)), + NumEnums: 2, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_org_signal_chat_common_proto_goTypes, + DependencyIndexes: file_org_signal_chat_common_proto_depIdxs, + EnumInfos: file_org_signal_chat_common_proto_enumTypes, + MessageInfos: file_org_signal_chat_common_proto_msgTypes, + }.Build() + File_org_signal_chat_common_proto = out.File + file_org_signal_chat_common_proto_goTypes = nil + file_org_signal_chat_common_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go b/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go new file mode 100644 index 0000000..569347f --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go @@ -0,0 +1,855 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/credentials.proto + +package credentials + +import ( + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ExternalServiceType int32 + +const ( + ExternalServiceType_EXTERNAL_SERVICE_TYPE_UNSPECIFIED ExternalServiceType = 0 + ExternalServiceType_EXTERNAL_SERVICE_TYPE_DIRECTORY ExternalServiceType = 1 + ExternalServiceType_EXTERNAL_SERVICE_TYPE_PAYMENTS ExternalServiceType = 2 + ExternalServiceType_EXTERNAL_SERVICE_TYPE_STORAGE ExternalServiceType = 3 + ExternalServiceType_EXTERNAL_SERVICE_TYPE_SVR ExternalServiceType = 4 +) + +// Enum value maps for ExternalServiceType. +var ( + ExternalServiceType_name = map[int32]string{ + 0: "EXTERNAL_SERVICE_TYPE_UNSPECIFIED", + 1: "EXTERNAL_SERVICE_TYPE_DIRECTORY", + 2: "EXTERNAL_SERVICE_TYPE_PAYMENTS", + 3: "EXTERNAL_SERVICE_TYPE_STORAGE", + 4: "EXTERNAL_SERVICE_TYPE_SVR", + } + ExternalServiceType_value = map[string]int32{ + "EXTERNAL_SERVICE_TYPE_UNSPECIFIED": 0, + "EXTERNAL_SERVICE_TYPE_DIRECTORY": 1, + "EXTERNAL_SERVICE_TYPE_PAYMENTS": 2, + "EXTERNAL_SERVICE_TYPE_STORAGE": 3, + "EXTERNAL_SERVICE_TYPE_SVR": 4, + } +) + +func (x ExternalServiceType) Enum() *ExternalServiceType { + p := new(ExternalServiceType) + *p = x + return p +} + +func (x ExternalServiceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExternalServiceType) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_credentials_proto_enumTypes[0].Descriptor() +} + +func (ExternalServiceType) Type() protoreflect.EnumType { + return &file_org_signal_chat_credentials_proto_enumTypes[0] +} + +func (x ExternalServiceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ExternalServiceType.Descriptor instead. +func (ExternalServiceType) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{0} +} + +type AuthCheckResult int32 + +const ( + AuthCheckResult_AUTH_CHECK_RESULT_UNSPECIFIED AuthCheckResult = 0 + // The credentials could be used to make a call to SVR service by the user + // associated with the `CheckSvrCredentialsRequest.number` phone number. + AuthCheckResult_AUTH_CHECK_RESULT_MATCH AuthCheckResult = 1 + // The credentials were generated by a different user. + AuthCheckResult_AUTH_CHECK_RESULT_NO_MATCH AuthCheckResult = 2 + // This status indicates that the corresponding credentials token should no longer be used. + // This may be because it has expired or invalid, but it can also mean that there is a more + // recent token in the request which should be used instead. + AuthCheckResult_AUTH_CHECK_RESULT_INVALID AuthCheckResult = 3 +) + +// Enum value maps for AuthCheckResult. +var ( + AuthCheckResult_name = map[int32]string{ + 0: "AUTH_CHECK_RESULT_UNSPECIFIED", + 1: "AUTH_CHECK_RESULT_MATCH", + 2: "AUTH_CHECK_RESULT_NO_MATCH", + 3: "AUTH_CHECK_RESULT_INVALID", + } + AuthCheckResult_value = map[string]int32{ + "AUTH_CHECK_RESULT_UNSPECIFIED": 0, + "AUTH_CHECK_RESULT_MATCH": 1, + "AUTH_CHECK_RESULT_NO_MATCH": 2, + "AUTH_CHECK_RESULT_INVALID": 3, + } +) + +func (x AuthCheckResult) Enum() *AuthCheckResult { + p := new(AuthCheckResult) + *p = x + return p +} + +func (x AuthCheckResult) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AuthCheckResult) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_credentials_proto_enumTypes[1].Descriptor() +} + +func (AuthCheckResult) Type() protoreflect.EnumType { + return &file_org_signal_chat_credentials_proto_enumTypes[1] +} + +func (x AuthCheckResult) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AuthCheckResult.Descriptor instead. +func (AuthCheckResult) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{1} +} + +type GetExternalServiceCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A service to request credentials for. + ExternalService ExternalServiceType `protobuf:"varint,1,opt,name=externalService,proto3,enum=org.signal.chat.credentials.ExternalServiceType" json:"externalService,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetExternalServiceCredentialsRequest) Reset() { + *x = GetExternalServiceCredentialsRequest{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetExternalServiceCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExternalServiceCredentialsRequest) ProtoMessage() {} + +func (x *GetExternalServiceCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetExternalServiceCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetExternalServiceCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{0} +} + +func (x *GetExternalServiceCredentialsRequest) GetExternalService() ExternalServiceType { + if x != nil { + return x.ExternalService + } + return ExternalServiceType_EXTERNAL_SERVICE_TYPE_UNSPECIFIED +} + +type GetExternalServiceCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A username that can be presented to authenticate with the external service. + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + // A password that can be presented to authenticate with the external service. + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetExternalServiceCredentialsResponse) Reset() { + *x = GetExternalServiceCredentialsResponse{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetExternalServiceCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExternalServiceCredentialsResponse) ProtoMessage() {} + +func (x *GetExternalServiceCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetExternalServiceCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetExternalServiceCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{1} +} + +func (x *GetExternalServiceCredentialsResponse) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *GetExternalServiceCredentialsResponse) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type CheckSvrCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A phone number in the E164 format to check the passwords against. + // Only passwords generated for the user associated with the given number will be marked as `AUTH_CHECK_RESULT_MATCH`. + Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` + // A list of credentials from previously made calls to `ExternalServiceCredentials.GetExternalServiceCredentials()` + // for `EXTERNAL_SERVICE_TYPE_SVR`. This list may contain credentials generated by different users. Up to 10 credentials + // can be checked. + Passwords []string `protobuf:"bytes,2,rep,name=passwords,proto3" json:"passwords,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckSvrCredentialsRequest) Reset() { + *x = CheckSvrCredentialsRequest{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckSvrCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckSvrCredentialsRequest) ProtoMessage() {} + +func (x *CheckSvrCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckSvrCredentialsRequest.ProtoReflect.Descriptor instead. +func (*CheckSvrCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{2} +} + +func (x *CheckSvrCredentialsRequest) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +func (x *CheckSvrCredentialsRequest) GetPasswords() []string { + if x != nil { + return x.Passwords + } + return nil +} + +// For each of the credentials tokens in the `CheckSvrCredentialsRequest` contains the result of the check. +type CheckSvrCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Matches map[string]AuthCheckResult `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=org.signal.chat.credentials.AuthCheckResult"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckSvrCredentialsResponse) Reset() { + *x = CheckSvrCredentialsResponse{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckSvrCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckSvrCredentialsResponse) ProtoMessage() {} + +func (x *CheckSvrCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckSvrCredentialsResponse.ProtoReflect.Descriptor instead. +func (*CheckSvrCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{3} +} + +func (x *CheckSvrCredentialsResponse) GetMatches() map[string]AuthCheckResult { + if x != nil { + return x.Matches + } + return nil +} + +type GetDeliveryCertificateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDeliveryCertificateRequest) Reset() { + *x = GetDeliveryCertificateRequest{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDeliveryCertificateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDeliveryCertificateRequest) ProtoMessage() {} + +func (x *GetDeliveryCertificateRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDeliveryCertificateRequest.ProtoReflect.Descriptor instead. +func (*GetDeliveryCertificateRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{4} +} + +// A pair of message delivery certificates. The response unconditionally +// includes certificates with and without the caller's phone number so the +// server never learns anything about the caller's intent to share their phone +// number with their contacts. +type GetDeliveryCertificateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A delivery receipt that includes the caller's phone number; may be empty if + // the authenticated account does not have a phone number + CertificateWithE164 []byte `protobuf:"bytes,1,opt,name=certificate_with_e164,json=certificateWithE164,proto3" json:"certificate_with_e164,omitempty"` + // A delivery receipt that does not include the caller's phone number + CertificateWithoutE164 []byte `protobuf:"bytes,2,opt,name=certificate_without_e164,json=certificateWithoutE164,proto3" json:"certificate_without_e164,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDeliveryCertificateResponse) Reset() { + *x = GetDeliveryCertificateResponse{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDeliveryCertificateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDeliveryCertificateResponse) ProtoMessage() {} + +func (x *GetDeliveryCertificateResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDeliveryCertificateResponse.ProtoReflect.Descriptor instead. +func (*GetDeliveryCertificateResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{5} +} + +func (x *GetDeliveryCertificateResponse) GetCertificateWithE164() []byte { + if x != nil { + return x.CertificateWithE164 + } + return nil +} + +func (x *GetDeliveryCertificateResponse) GetCertificateWithoutE164() []byte { + if x != nil { + return x.CertificateWithoutE164 + } + return nil +} + +type GetGroupCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The earliest time for which to issue group credentials; must be aligned to + // a UTC day boundary and may be no more than one day in the past at the time + // of the call. + RedemptionStartSeconds uint64 `protobuf:"varint,1,opt,name=redemption_start_seconds,json=redemptionStartSeconds,proto3" json:"redemption_start_seconds,omitempty"` + // The latest time for which to issue group credentials; must be aligned to a + // UTC day boundary and no more than seven days in the future at the time of + // the call. + RedemptionEndSeconds uint64 `protobuf:"varint,2,opt,name=redemption_end_seconds,json=redemptionEndSeconds,proto3" json:"redemption_end_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetGroupCredentialsRequest) Reset() { + *x = GetGroupCredentialsRequest{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetGroupCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupCredentialsRequest) ProtoMessage() {} + +func (x *GetGroupCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetGroupCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{6} +} + +func (x *GetGroupCredentialsRequest) GetRedemptionStartSeconds() uint64 { + if x != nil { + return x.RedemptionStartSeconds + } + return 0 +} + +func (x *GetGroupCredentialsRequest) GetRedemptionEndSeconds() uint64 { + if x != nil { + return x.RedemptionEndSeconds + } + return 0 +} + +type GetGroupCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A collection of credentials allowing the holder to anonymously + // authenticate themselves for group-related actions + GroupCredentials []*GetGroupCredentialsResponse_CredentialAndRedemptionTime `protobuf:"bytes,1,rep,name=group_credentials,json=groupCredentials,proto3" json:"group_credentials,omitempty"` + // A collection of credentials allowing the holder to read, update, and delete + // group call links + CallLinkAuthCredentials []*GetGroupCredentialsResponse_CredentialAndRedemptionTime `protobuf:"bytes,2,rep,name=call_link_auth_credentials,json=callLinkAuthCredentials,proto3" json:"call_link_auth_credentials,omitempty"` + // The phone number identifier for which the included credentials were + // generated. Empty if the account does not have a phone number. + Pni []byte `protobuf:"bytes,3,opt,name=pni,proto3" json:"pni,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetGroupCredentialsResponse) Reset() { + *x = GetGroupCredentialsResponse{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetGroupCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupCredentialsResponse) ProtoMessage() {} + +func (x *GetGroupCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetGroupCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{7} +} + +func (x *GetGroupCredentialsResponse) GetGroupCredentials() []*GetGroupCredentialsResponse_CredentialAndRedemptionTime { + if x != nil { + return x.GroupCredentials + } + return nil +} + +func (x *GetGroupCredentialsResponse) GetCallLinkAuthCredentials() []*GetGroupCredentialsResponse_CredentialAndRedemptionTime { + if x != nil { + return x.CallLinkAuthCredentials + } + return nil +} + +func (x *GetGroupCredentialsResponse) GetPni() []byte { + if x != nil { + return x.Pni + } + return nil +} + +type GetCreateCallLinkCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A zero-knowledge credential request + CredentialRequest []byte `protobuf:"bytes,1,opt,name=credential_request,json=credentialRequest,proto3" json:"credential_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCreateCallLinkCredentialsRequest) Reset() { + *x = GetCreateCallLinkCredentialsRequest{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCreateCallLinkCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCreateCallLinkCredentialsRequest) ProtoMessage() {} + +func (x *GetCreateCallLinkCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCreateCallLinkCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetCreateCallLinkCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{8} +} + +func (x *GetCreateCallLinkCredentialsRequest) GetCredentialRequest() []byte { + if x != nil { + return x.CredentialRequest + } + return nil +} + +type GetCreateCallLinkCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A zero-knowledge credential that may be redeemed at or up to one day after + // the given redemption time + Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` + // The earliest time, in seconds since the epoch, at which the associated + // credential may be redeemed + RedemptionTimeSeconds uint64 `protobuf:"varint,2,opt,name=redemption_time_seconds,json=redemptionTimeSeconds,proto3" json:"redemption_time_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCreateCallLinkCredentialsResponse) Reset() { + *x = GetCreateCallLinkCredentialsResponse{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCreateCallLinkCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCreateCallLinkCredentialsResponse) ProtoMessage() {} + +func (x *GetCreateCallLinkCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCreateCallLinkCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetCreateCallLinkCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{9} +} + +func (x *GetCreateCallLinkCredentialsResponse) GetCredential() []byte { + if x != nil { + return x.Credential + } + return nil +} + +func (x *GetCreateCallLinkCredentialsResponse) GetRedemptionTimeSeconds() uint64 { + if x != nil { + return x.RedemptionTimeSeconds + } + return 0 +} + +// A zero-knowledge credential that may be redeemed at or up to one day after +// the given redemption time +type GetGroupCredentialsResponse_CredentialAndRedemptionTime struct { + state protoimpl.MessageState `protogen:"open.v1"` + Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` + RedemptionTimeSeconds uint64 `protobuf:"varint,2,opt,name=redemption_time_seconds,json=redemptionTimeSeconds,proto3" json:"redemption_time_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) Reset() { + *x = GetGroupCredentialsResponse_CredentialAndRedemptionTime{} + mi := &file_org_signal_chat_credentials_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupCredentialsResponse_CredentialAndRedemptionTime) ProtoMessage() {} + +func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_credentials_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupCredentialsResponse_CredentialAndRedemptionTime.ProtoReflect.Descriptor instead. +func (*GetGroupCredentialsResponse_CredentialAndRedemptionTime) Descriptor() ([]byte, []int) { + return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) GetCredential() []byte { + if x != nil { + return x.Credential + } + return nil +} + +func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) GetRedemptionTimeSeconds() uint64 { + if x != nil { + return x.RedemptionTimeSeconds + } + return 0 +} + +var File_org_signal_chat_credentials_proto protoreflect.FileDescriptor + +const file_org_signal_chat_credentials_proto_rawDesc = "" + + "\n" + + "!org/signal/chat/credentials.proto\x12\x1borg.signal.chat.credentials\x1a\x1dorg/signal/chat/require.proto\"\x82\x01\n" + + "$GetExternalServiceCredentialsRequest\x12Z\n" + + "\x0fexternalService\x18\x01 \x01(\x0e20.org.signal.chat.credentials.ExternalServiceTypeR\x0fexternalService\"_\n" + + "%GetExternalServiceCredentialsResponse\x12\x1a\n" + + "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\"^\n" + + "\x1aCheckSvrCredentialsRequest\x12\x16\n" + + "\x06number\x18\x01 \x01(\tR\x06number\x12(\n" + + "\tpasswords\x18\x02 \x03(\tB\n" + + "\x88\x97\"\x01\x9a\x97\"\x02\x10\n" + + "R\tpasswords\"\xe8\x01\n" + + "\x1bCheckSvrCredentialsResponse\x12_\n" + + "\amatches\x18\x01 \x03(\v2E.org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntryR\amatches\x1ah\n" + + "\fMatchesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12B\n" + + "\x05value\x18\x02 \x01(\x0e2,.org.signal.chat.credentials.AuthCheckResultR\x05value:\x028\x01\"\x1f\n" + + "\x1dGetDeliveryCertificateRequest\"\x8e\x01\n" + + "\x1eGetDeliveryCertificateResponse\x122\n" + + "\x15certificate_with_e164\x18\x01 \x01(\fR\x13certificateWithE164\x128\n" + + "\x18certificate_without_e164\x18\x02 \x01(\fR\x16certificateWithoutE164\"\x8c\x01\n" + + "\x1aGetGroupCredentialsRequest\x128\n" + + "\x18redemption_start_seconds\x18\x01 \x01(\x04R\x16redemptionStartSeconds\x124\n" + + "\x16redemption_end_seconds\x18\x02 \x01(\x04R\x14redemptionEndSeconds\"\xbe\x03\n" + + "\x1bGetGroupCredentialsResponse\x12\x81\x01\n" + + "\x11group_credentials\x18\x01 \x03(\v2T.org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTimeR\x10groupCredentials\x12\x91\x01\n" + + "\x1acall_link_auth_credentials\x18\x02 \x03(\v2T.org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTimeR\x17callLinkAuthCredentials\x12\x10\n" + + "\x03pni\x18\x03 \x01(\fR\x03pni\x1au\n" + + "\x1bCredentialAndRedemptionTime\x12\x1e\n" + + "\n" + + "credential\x18\x01 \x01(\fR\n" + + "credential\x126\n" + + "\x17redemption_time_seconds\x18\x02 \x01(\x04R\x15redemptionTimeSeconds\"T\n" + + "#GetCreateCallLinkCredentialsRequest\x12-\n" + + "\x12credential_request\x18\x01 \x01(\fR\x11credentialRequest\"~\n" + + "$GetCreateCallLinkCredentialsResponse\x12\x1e\n" + + "\n" + + "credential\x18\x01 \x01(\fR\n" + + "credential\x126\n" + + "\x17redemption_time_seconds\x18\x02 \x01(\x04R\x15redemptionTimeSeconds*\xc7\x01\n" + + "\x13ExternalServiceType\x12%\n" + + "!EXTERNAL_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12#\n" + + "\x1fEXTERNAL_SERVICE_TYPE_DIRECTORY\x10\x01\x12\"\n" + + "\x1eEXTERNAL_SERVICE_TYPE_PAYMENTS\x10\x02\x12!\n" + + "\x1dEXTERNAL_SERVICE_TYPE_STORAGE\x10\x03\x12\x1d\n" + + "\x19EXTERNAL_SERVICE_TYPE_SVR\x10\x04*\x90\x01\n" + + "\x0fAuthCheckResult\x12!\n" + + "\x1dAUTH_CHECK_RESULT_UNSPECIFIED\x10\x00\x12\x1b\n" + + "\x17AUTH_CHECK_RESULT_MATCH\x10\x01\x12\x1e\n" + + "\x1aAUTH_CHECK_RESULT_NO_MATCH\x10\x02\x12\x1d\n" + + "\x19AUTH_CHECK_RESULT_INVALID\x10\x032\x89\x05\n" + + "\vCredentials\x12\xa8\x01\n" + + "\x1dGetExternalServiceCredentials\x12A.org.signal.chat.credentials.GetExternalServiceCredentialsRequest\x1aB.org.signal.chat.credentials.GetExternalServiceCredentialsResponse\"\x00\x12\x93\x01\n" + + "\x16GetDeliveryCertificate\x12:.org.signal.chat.credentials.GetDeliveryCertificateRequest\x1a;.org.signal.chat.credentials.GetDeliveryCertificateResponse\"\x00\x12\x8a\x01\n" + + "\x13GetGroupCredentials\x127.org.signal.chat.credentials.GetGroupCredentialsRequest\x1a8.org.signal.chat.credentials.GetGroupCredentialsResponse\"\x00\x12\xa5\x01\n" + + "\x1cGetCreateCallLinkCredentials\x12@.org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest\x1aA.org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xa9\x01\n" + + "\x14CredentialsAnonymous\x12\x8a\x01\n" + + "\x13CheckSvrCredentials\x127.org.signal.chat.credentials.CheckSvrCredentialsRequest\x1a8.org.signal.chat.credentials.CheckSvrCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_credentials_proto_rawDescOnce sync.Once + file_org_signal_chat_credentials_proto_rawDescData []byte +) + +func file_org_signal_chat_credentials_proto_rawDescGZIP() []byte { + file_org_signal_chat_credentials_proto_rawDescOnce.Do(func() { + file_org_signal_chat_credentials_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_credentials_proto_rawDesc), len(file_org_signal_chat_credentials_proto_rawDesc))) + }) + return file_org_signal_chat_credentials_proto_rawDescData +} + +var file_org_signal_chat_credentials_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_org_signal_chat_credentials_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_org_signal_chat_credentials_proto_goTypes = []any{ + (ExternalServiceType)(0), // 0: org.signal.chat.credentials.ExternalServiceType + (AuthCheckResult)(0), // 1: org.signal.chat.credentials.AuthCheckResult + (*GetExternalServiceCredentialsRequest)(nil), // 2: org.signal.chat.credentials.GetExternalServiceCredentialsRequest + (*GetExternalServiceCredentialsResponse)(nil), // 3: org.signal.chat.credentials.GetExternalServiceCredentialsResponse + (*CheckSvrCredentialsRequest)(nil), // 4: org.signal.chat.credentials.CheckSvrCredentialsRequest + (*CheckSvrCredentialsResponse)(nil), // 5: org.signal.chat.credentials.CheckSvrCredentialsResponse + (*GetDeliveryCertificateRequest)(nil), // 6: org.signal.chat.credentials.GetDeliveryCertificateRequest + (*GetDeliveryCertificateResponse)(nil), // 7: org.signal.chat.credentials.GetDeliveryCertificateResponse + (*GetGroupCredentialsRequest)(nil), // 8: org.signal.chat.credentials.GetGroupCredentialsRequest + (*GetGroupCredentialsResponse)(nil), // 9: org.signal.chat.credentials.GetGroupCredentialsResponse + (*GetCreateCallLinkCredentialsRequest)(nil), // 10: org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest + (*GetCreateCallLinkCredentialsResponse)(nil), // 11: org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse + nil, // 12: org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry + (*GetGroupCredentialsResponse_CredentialAndRedemptionTime)(nil), // 13: org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime +} +var file_org_signal_chat_credentials_proto_depIdxs = []int32{ + 0, // 0: org.signal.chat.credentials.GetExternalServiceCredentialsRequest.externalService:type_name -> org.signal.chat.credentials.ExternalServiceType + 12, // 1: org.signal.chat.credentials.CheckSvrCredentialsResponse.matches:type_name -> org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry + 13, // 2: org.signal.chat.credentials.GetGroupCredentialsResponse.group_credentials:type_name -> org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime + 13, // 3: org.signal.chat.credentials.GetGroupCredentialsResponse.call_link_auth_credentials:type_name -> org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime + 1, // 4: org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry.value:type_name -> org.signal.chat.credentials.AuthCheckResult + 2, // 5: org.signal.chat.credentials.Credentials.GetExternalServiceCredentials:input_type -> org.signal.chat.credentials.GetExternalServiceCredentialsRequest + 6, // 6: org.signal.chat.credentials.Credentials.GetDeliveryCertificate:input_type -> org.signal.chat.credentials.GetDeliveryCertificateRequest + 8, // 7: org.signal.chat.credentials.Credentials.GetGroupCredentials:input_type -> org.signal.chat.credentials.GetGroupCredentialsRequest + 10, // 8: org.signal.chat.credentials.Credentials.GetCreateCallLinkCredentials:input_type -> org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest + 4, // 9: org.signal.chat.credentials.CredentialsAnonymous.CheckSvrCredentials:input_type -> org.signal.chat.credentials.CheckSvrCredentialsRequest + 3, // 10: org.signal.chat.credentials.Credentials.GetExternalServiceCredentials:output_type -> org.signal.chat.credentials.GetExternalServiceCredentialsResponse + 7, // 11: org.signal.chat.credentials.Credentials.GetDeliveryCertificate:output_type -> org.signal.chat.credentials.GetDeliveryCertificateResponse + 9, // 12: org.signal.chat.credentials.Credentials.GetGroupCredentials:output_type -> org.signal.chat.credentials.GetGroupCredentialsResponse + 11, // 13: org.signal.chat.credentials.Credentials.GetCreateCallLinkCredentials:output_type -> org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse + 5, // 14: org.signal.chat.credentials.CredentialsAnonymous.CheckSvrCredentials:output_type -> org.signal.chat.credentials.CheckSvrCredentialsResponse + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_credentials_proto_init() } +func file_org_signal_chat_credentials_proto_init() { + if File_org_signal_chat_credentials_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_credentials_proto_rawDesc), len(file_org_signal_chat_credentials_proto_rawDesc)), + NumEnums: 2, + NumMessages: 12, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_org_signal_chat_credentials_proto_goTypes, + DependencyIndexes: file_org_signal_chat_credentials_proto_depIdxs, + EnumInfos: file_org_signal_chat_credentials_proto_enumTypes, + MessageInfos: file_org_signal_chat_credentials_proto_msgTypes, + }.Build() + File_org_signal_chat_credentials_proto = out.File + file_org_signal_chat_credentials_proto_goTypes = nil + file_org_signal_chat_credentials_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go new file mode 100644 index 0000000..c7934c0 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go @@ -0,0 +1,377 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/credentials.proto + +package credentials + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Credentials_GetExternalServiceCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetExternalServiceCredentials" + Credentials_GetDeliveryCertificate_FullMethodName = "/org.signal.chat.credentials.Credentials/GetDeliveryCertificate" + Credentials_GetGroupCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetGroupCredentials" + Credentials_GetCreateCallLinkCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetCreateCallLinkCredentials" +) + +// CredentialsClient is the client API for Credentials service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for obtaining and verifying credentials that allow an +// authenticated user to authenticate in another service or context without +// revealing their identity. +type CredentialsClient interface { + // Generates and returns an external service credentials for the caller. + GetExternalServiceCredentials(ctx context.Context, in *GetExternalServiceCredentialsRequest, opts ...grpc.CallOption) (*GetExternalServiceCredentialsResponse, error) + // Generates a pair of delivery certificates that the holder can include to + // identify themselves to a message recipient (but not the server) in a + // sealed-sender message. + GetDeliveryCertificate(ctx context.Context, in *GetDeliveryCertificateRequest, opts ...grpc.CallOption) (*GetDeliveryCertificateResponse, error) + // Generates a set of zero-knowledge credentials for various group-related + // actions. + GetGroupCredentials(ctx context.Context, in *GetGroupCredentialsRequest, opts ...grpc.CallOption) (*GetGroupCredentialsResponse, error) + // Generates zero-knowledge credentials for creating call links. + GetCreateCallLinkCredentials(ctx context.Context, in *GetCreateCallLinkCredentialsRequest, opts ...grpc.CallOption) (*GetCreateCallLinkCredentialsResponse, error) +} + +type credentialsClient struct { + cc grpc.ClientConnInterface +} + +func NewCredentialsClient(cc grpc.ClientConnInterface) CredentialsClient { + return &credentialsClient{cc} +} + +func (c *credentialsClient) GetExternalServiceCredentials(ctx context.Context, in *GetExternalServiceCredentialsRequest, opts ...grpc.CallOption) (*GetExternalServiceCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetExternalServiceCredentialsResponse) + err := c.cc.Invoke(ctx, Credentials_GetExternalServiceCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *credentialsClient) GetDeliveryCertificate(ctx context.Context, in *GetDeliveryCertificateRequest, opts ...grpc.CallOption) (*GetDeliveryCertificateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetDeliveryCertificateResponse) + err := c.cc.Invoke(ctx, Credentials_GetDeliveryCertificate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *credentialsClient) GetGroupCredentials(ctx context.Context, in *GetGroupCredentialsRequest, opts ...grpc.CallOption) (*GetGroupCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetGroupCredentialsResponse) + err := c.cc.Invoke(ctx, Credentials_GetGroupCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *credentialsClient) GetCreateCallLinkCredentials(ctx context.Context, in *GetCreateCallLinkCredentialsRequest, opts ...grpc.CallOption) (*GetCreateCallLinkCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetCreateCallLinkCredentialsResponse) + err := c.cc.Invoke(ctx, Credentials_GetCreateCallLinkCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CredentialsServer is the server API for Credentials service. +// All implementations must embed UnimplementedCredentialsServer +// for forward compatibility. +// +// Provides methods for obtaining and verifying credentials that allow an +// authenticated user to authenticate in another service or context without +// revealing their identity. +type CredentialsServer interface { + // Generates and returns an external service credentials for the caller. + GetExternalServiceCredentials(context.Context, *GetExternalServiceCredentialsRequest) (*GetExternalServiceCredentialsResponse, error) + // Generates a pair of delivery certificates that the holder can include to + // identify themselves to a message recipient (but not the server) in a + // sealed-sender message. + GetDeliveryCertificate(context.Context, *GetDeliveryCertificateRequest) (*GetDeliveryCertificateResponse, error) + // Generates a set of zero-knowledge credentials for various group-related + // actions. + GetGroupCredentials(context.Context, *GetGroupCredentialsRequest) (*GetGroupCredentialsResponse, error) + // Generates zero-knowledge credentials for creating call links. + GetCreateCallLinkCredentials(context.Context, *GetCreateCallLinkCredentialsRequest) (*GetCreateCallLinkCredentialsResponse, error) + mustEmbedUnimplementedCredentialsServer() +} + +// UnimplementedCredentialsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCredentialsServer struct{} + +func (UnimplementedCredentialsServer) GetExternalServiceCredentials(context.Context, *GetExternalServiceCredentialsRequest) (*GetExternalServiceCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetExternalServiceCredentials not implemented") +} +func (UnimplementedCredentialsServer) GetDeliveryCertificate(context.Context, *GetDeliveryCertificateRequest) (*GetDeliveryCertificateResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetDeliveryCertificate not implemented") +} +func (UnimplementedCredentialsServer) GetGroupCredentials(context.Context, *GetGroupCredentialsRequest) (*GetGroupCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetGroupCredentials not implemented") +} +func (UnimplementedCredentialsServer) GetCreateCallLinkCredentials(context.Context, *GetCreateCallLinkCredentialsRequest) (*GetCreateCallLinkCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetCreateCallLinkCredentials not implemented") +} +func (UnimplementedCredentialsServer) mustEmbedUnimplementedCredentialsServer() {} +func (UnimplementedCredentialsServer) testEmbeddedByValue() {} + +// UnsafeCredentialsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CredentialsServer will +// result in compilation errors. +type UnsafeCredentialsServer interface { + mustEmbedUnimplementedCredentialsServer() +} + +func RegisterCredentialsServer(s grpc.ServiceRegistrar, srv CredentialsServer) { + // If the following call panics, it indicates UnimplementedCredentialsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Credentials_ServiceDesc, srv) +} + +func _Credentials_GetExternalServiceCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExternalServiceCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CredentialsServer).GetExternalServiceCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Credentials_GetExternalServiceCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CredentialsServer).GetExternalServiceCredentials(ctx, req.(*GetExternalServiceCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Credentials_GetDeliveryCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDeliveryCertificateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CredentialsServer).GetDeliveryCertificate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Credentials_GetDeliveryCertificate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CredentialsServer).GetDeliveryCertificate(ctx, req.(*GetDeliveryCertificateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Credentials_GetGroupCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CredentialsServer).GetGroupCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Credentials_GetGroupCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CredentialsServer).GetGroupCredentials(ctx, req.(*GetGroupCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Credentials_GetCreateCallLinkCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCreateCallLinkCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CredentialsServer).GetCreateCallLinkCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Credentials_GetCreateCallLinkCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CredentialsServer).GetCreateCallLinkCredentials(ctx, req.(*GetCreateCallLinkCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Credentials_ServiceDesc is the grpc.ServiceDesc for Credentials service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Credentials_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.credentials.Credentials", + HandlerType: (*CredentialsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetExternalServiceCredentials", + Handler: _Credentials_GetExternalServiceCredentials_Handler, + }, + { + MethodName: "GetDeliveryCertificate", + Handler: _Credentials_GetDeliveryCertificate_Handler, + }, + { + MethodName: "GetGroupCredentials", + Handler: _Credentials_GetGroupCredentials_Handler, + }, + { + MethodName: "GetCreateCallLinkCredentials", + Handler: _Credentials_GetCreateCallLinkCredentials_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/credentials.proto", +} + +const ( + CredentialsAnonymous_CheckSvrCredentials_FullMethodName = "/org.signal.chat.credentials.CredentialsAnonymous/CheckSvrCredentials" +) + +// CredentialsAnonymousClient is the client API for CredentialsAnonymous service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for working with previously-generated credentials without +// revealing an association between the credentials and the caller's identity to +// the server. +type CredentialsAnonymousClient interface { + // Given a list of secure value recovery (SVR) service credentials and a phone + // number, checks and returns which of the provided credentials were generated + // by the user with the given phone number and have not yet expired. + CheckSvrCredentials(ctx context.Context, in *CheckSvrCredentialsRequest, opts ...grpc.CallOption) (*CheckSvrCredentialsResponse, error) +} + +type credentialsAnonymousClient struct { + cc grpc.ClientConnInterface +} + +func NewCredentialsAnonymousClient(cc grpc.ClientConnInterface) CredentialsAnonymousClient { + return &credentialsAnonymousClient{cc} +} + +func (c *credentialsAnonymousClient) CheckSvrCredentials(ctx context.Context, in *CheckSvrCredentialsRequest, opts ...grpc.CallOption) (*CheckSvrCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckSvrCredentialsResponse) + err := c.cc.Invoke(ctx, CredentialsAnonymous_CheckSvrCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CredentialsAnonymousServer is the server API for CredentialsAnonymous service. +// All implementations must embed UnimplementedCredentialsAnonymousServer +// for forward compatibility. +// +// Provides methods for working with previously-generated credentials without +// revealing an association between the credentials and the caller's identity to +// the server. +type CredentialsAnonymousServer interface { + // Given a list of secure value recovery (SVR) service credentials and a phone + // number, checks and returns which of the provided credentials were generated + // by the user with the given phone number and have not yet expired. + CheckSvrCredentials(context.Context, *CheckSvrCredentialsRequest) (*CheckSvrCredentialsResponse, error) + mustEmbedUnimplementedCredentialsAnonymousServer() +} + +// UnimplementedCredentialsAnonymousServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCredentialsAnonymousServer struct{} + +func (UnimplementedCredentialsAnonymousServer) CheckSvrCredentials(context.Context, *CheckSvrCredentialsRequest) (*CheckSvrCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CheckSvrCredentials not implemented") +} +func (UnimplementedCredentialsAnonymousServer) mustEmbedUnimplementedCredentialsAnonymousServer() {} +func (UnimplementedCredentialsAnonymousServer) testEmbeddedByValue() {} + +// UnsafeCredentialsAnonymousServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CredentialsAnonymousServer will +// result in compilation errors. +type UnsafeCredentialsAnonymousServer interface { + mustEmbedUnimplementedCredentialsAnonymousServer() +} + +func RegisterCredentialsAnonymousServer(s grpc.ServiceRegistrar, srv CredentialsAnonymousServer) { + // If the following call panics, it indicates UnimplementedCredentialsAnonymousServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&CredentialsAnonymous_ServiceDesc, srv) +} + +func _CredentialsAnonymous_CheckSvrCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckSvrCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CredentialsAnonymousServer).CheckSvrCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CredentialsAnonymous_CheckSvrCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CredentialsAnonymousServer).CheckSvrCredentials(ctx, req.(*CheckSvrCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CredentialsAnonymous_ServiceDesc is the grpc.ServiceDesc for CredentialsAnonymous service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CredentialsAnonymous_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.credentials.CredentialsAnonymous", + HandlerType: (*CredentialsAnonymousServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CheckSvrCredentials", + Handler: _CredentialsAnonymous_CheckSvrCredentials_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/credentials.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/device/device.pb.go b/pkg/signalmeow/protobuf/rpc/device/device.pb.go new file mode 100644 index 0000000..c9881f6 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/device/device.pb.go @@ -0,0 +1,922 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/device.proto + +package device + +import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetDevicesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDevicesRequest) Reset() { + *x = GetDevicesRequest{} + mi := &file_org_signal_chat_device_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDevicesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDevicesRequest) ProtoMessage() {} + +func (x *GetDevicesRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDevicesRequest.ProtoReflect.Descriptor instead. +func (*GetDevicesRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{0} +} + +type GetDevicesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of devices linked to the authenticated account. + Devices []*GetDevicesResponse_LinkedDevice `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDevicesResponse) Reset() { + *x = GetDevicesResponse{} + mi := &file_org_signal_chat_device_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDevicesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDevicesResponse) ProtoMessage() {} + +func (x *GetDevicesResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDevicesResponse.ProtoReflect.Descriptor instead. +func (*GetDevicesResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{1} +} + +func (x *GetDevicesResponse) GetDevices() []*GetDevicesResponse_LinkedDevice { + if x != nil { + return x.Devices + } + return nil +} + +type RemoveDeviceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier for the device to remove from the authenticated account. The + // identifier must not be for the primary device. + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveDeviceRequest) Reset() { + *x = RemoveDeviceRequest{} + mi := &file_org_signal_chat_device_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveDeviceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDeviceRequest) ProtoMessage() {} + +func (x *RemoveDeviceRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveDeviceRequest.ProtoReflect.Descriptor instead. +func (*RemoveDeviceRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{2} +} + +func (x *RemoveDeviceRequest) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +type SetDeviceNameRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A sequence of bytes that encodes an encrypted human-readable name for this + // device. + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The identifier for the device for which to set a name. + Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDeviceNameRequest) Reset() { + *x = SetDeviceNameRequest{} + mi := &file_org_signal_chat_device_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDeviceNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDeviceNameRequest) ProtoMessage() {} + +func (x *SetDeviceNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDeviceNameRequest.ProtoReflect.Descriptor instead. +func (*SetDeviceNameRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{3} +} + +func (x *SetDeviceNameRequest) GetName() []byte { + if x != nil { + return x.Name + } + return nil +} + +func (x *SetDeviceNameRequest) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +type SetDeviceNameResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SetDeviceNameResponse_Success + // *SetDeviceNameResponse_TargetDeviceNotFound + Response isSetDeviceNameResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDeviceNameResponse) Reset() { + *x = SetDeviceNameResponse{} + mi := &file_org_signal_chat_device_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDeviceNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDeviceNameResponse) ProtoMessage() {} + +func (x *SetDeviceNameResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDeviceNameResponse.ProtoReflect.Descriptor instead. +func (*SetDeviceNameResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{4} +} + +func (x *SetDeviceNameResponse) GetResponse() isSetDeviceNameResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SetDeviceNameResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*SetDeviceNameResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *SetDeviceNameResponse) GetTargetDeviceNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*SetDeviceNameResponse_TargetDeviceNotFound); ok { + return x.TargetDeviceNotFound + } + } + return nil +} + +type isSetDeviceNameResponse_Response interface { + isSetDeviceNameResponse_Response() +} + +type SetDeviceNameResponse_Success struct { + // The device name was successfully set + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type SetDeviceNameResponse_TargetDeviceNotFound struct { + // No device with the provided identifier was found on the account + TargetDeviceNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=target_device_not_found,json=targetDeviceNotFound,proto3,oneof"` +} + +func (*SetDeviceNameResponse_Success) isSetDeviceNameResponse_Response() {} + +func (*SetDeviceNameResponse_TargetDeviceNotFound) isSetDeviceNameResponse_Response() {} + +type RemoveDeviceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveDeviceResponse) Reset() { + *x = RemoveDeviceResponse{} + mi := &file_org_signal_chat_device_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveDeviceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDeviceResponse) ProtoMessage() {} + +func (x *RemoveDeviceResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveDeviceResponse.ProtoReflect.Descriptor instead. +func (*RemoveDeviceResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{5} +} + +type SetPushTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to TokenRequest: + // + // *SetPushTokenRequest_ApnsTokenRequest_ + // *SetPushTokenRequest_FcmTokenRequest_ + TokenRequest isSetPushTokenRequest_TokenRequest `protobuf_oneof:"token_request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPushTokenRequest) Reset() { + *x = SetPushTokenRequest{} + mi := &file_org_signal_chat_device_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPushTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPushTokenRequest) ProtoMessage() {} + +func (x *SetPushTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPushTokenRequest.ProtoReflect.Descriptor instead. +func (*SetPushTokenRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{6} +} + +func (x *SetPushTokenRequest) GetTokenRequest() isSetPushTokenRequest_TokenRequest { + if x != nil { + return x.TokenRequest + } + return nil +} + +func (x *SetPushTokenRequest) GetApnsTokenRequest() *SetPushTokenRequest_ApnsTokenRequest { + if x != nil { + if x, ok := x.TokenRequest.(*SetPushTokenRequest_ApnsTokenRequest_); ok { + return x.ApnsTokenRequest + } + } + return nil +} + +func (x *SetPushTokenRequest) GetFcmTokenRequest() *SetPushTokenRequest_FcmTokenRequest { + if x != nil { + if x, ok := x.TokenRequest.(*SetPushTokenRequest_FcmTokenRequest_); ok { + return x.FcmTokenRequest + } + } + return nil +} + +type isSetPushTokenRequest_TokenRequest interface { + isSetPushTokenRequest_TokenRequest() +} + +type SetPushTokenRequest_ApnsTokenRequest_ struct { + // If present, specifies the APNs device token(s) the server will use to + // send new message notifications to the authenticated device. + ApnsTokenRequest *SetPushTokenRequest_ApnsTokenRequest `protobuf:"bytes,1,opt,name=apns_token_request,json=apnsTokenRequest,proto3,oneof"` +} + +type SetPushTokenRequest_FcmTokenRequest_ struct { + // If present, specifies the FCM push token the server will use to send new + // message notifications to the authenticated device. + FcmTokenRequest *SetPushTokenRequest_FcmTokenRequest `protobuf:"bytes,2,opt,name=fcm_token_request,json=fcmTokenRequest,proto3,oneof"` +} + +func (*SetPushTokenRequest_ApnsTokenRequest_) isSetPushTokenRequest_TokenRequest() {} + +func (*SetPushTokenRequest_FcmTokenRequest_) isSetPushTokenRequest_TokenRequest() {} + +type SetPushTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPushTokenResponse) Reset() { + *x = SetPushTokenResponse{} + mi := &file_org_signal_chat_device_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPushTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPushTokenResponse) ProtoMessage() {} + +func (x *SetPushTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPushTokenResponse.ProtoReflect.Descriptor instead. +func (*SetPushTokenResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{7} +} + +type ClearPushTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClearPushTokenRequest) Reset() { + *x = ClearPushTokenRequest{} + mi := &file_org_signal_chat_device_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClearPushTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClearPushTokenRequest) ProtoMessage() {} + +func (x *ClearPushTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClearPushTokenRequest.ProtoReflect.Descriptor instead. +func (*ClearPushTokenRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{8} +} + +type ClearPushTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClearPushTokenResponse) Reset() { + *x = ClearPushTokenResponse{} + mi := &file_org_signal_chat_device_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClearPushTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClearPushTokenResponse) ProtoMessage() {} + +func (x *ClearPushTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClearPushTokenResponse.ProtoReflect.Descriptor instead. +func (*ClearPushTokenResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{9} +} + +type SetCapabilitiesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Capabilities []common.DeviceCapability `protobuf:"varint,1,rep,packed,name=capabilities,proto3,enum=org.signal.chat.common.DeviceCapability" json:"capabilities,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetCapabilitiesRequest) Reset() { + *x = SetCapabilitiesRequest{} + mi := &file_org_signal_chat_device_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetCapabilitiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetCapabilitiesRequest) ProtoMessage() {} + +func (x *SetCapabilitiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetCapabilitiesRequest.ProtoReflect.Descriptor instead. +func (*SetCapabilitiesRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{10} +} + +func (x *SetCapabilitiesRequest) GetCapabilities() []common.DeviceCapability { + if x != nil { + return x.Capabilities + } + return nil +} + +type SetCapabilitiesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetCapabilitiesResponse) Reset() { + *x = SetCapabilitiesResponse{} + mi := &file_org_signal_chat_device_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetCapabilitiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetCapabilitiesResponse) ProtoMessage() {} + +func (x *SetCapabilitiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetCapabilitiesResponse.ProtoReflect.Descriptor instead. +func (*SetCapabilitiesResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{11} +} + +type GetDevicesResponse_LinkedDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier for the device within an account. + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // A sequence of bytes that encodes an encrypted human-readable name for + // this device. + Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // The approximate time, in milliseconds since the epoch, at which this + // device last connected to the server. + LastSeen uint64 `protobuf:"varint,3,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` + // The registration ID of the given device. + RegistrationId uint32 `protobuf:"varint,4,opt,name=registration_id,json=registrationId,proto3" json:"registration_id,omitempty"` + // A sequence of bytes that encodes the time, + // in milliseconds since the epoch, at which this device was + // attached to its parent account. + CreatedAtCiphertext []byte `protobuf:"bytes,5,opt,name=created_at_ciphertext,json=createdAtCiphertext,proto3" json:"created_at_ciphertext,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDevicesResponse_LinkedDevice) Reset() { + *x = GetDevicesResponse_LinkedDevice{} + mi := &file_org_signal_chat_device_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDevicesResponse_LinkedDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDevicesResponse_LinkedDevice) ProtoMessage() {} + +func (x *GetDevicesResponse_LinkedDevice) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDevicesResponse_LinkedDevice.ProtoReflect.Descriptor instead. +func (*GetDevicesResponse_LinkedDevice) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *GetDevicesResponse_LinkedDevice) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *GetDevicesResponse_LinkedDevice) GetName() []byte { + if x != nil { + return x.Name + } + return nil +} + +func (x *GetDevicesResponse_LinkedDevice) GetLastSeen() uint64 { + if x != nil { + return x.LastSeen + } + return 0 +} + +func (x *GetDevicesResponse_LinkedDevice) GetRegistrationId() uint32 { + if x != nil { + return x.RegistrationId + } + return 0 +} + +func (x *GetDevicesResponse_LinkedDevice) GetCreatedAtCiphertext() []byte { + if x != nil { + return x.CreatedAtCiphertext + } + return nil +} + +type SetPushTokenRequest_ApnsTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A "standard" APNs device token. + ApnsToken string `protobuf:"bytes,1,opt,name=apns_token,json=apnsToken,proto3" json:"apns_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPushTokenRequest_ApnsTokenRequest) Reset() { + *x = SetPushTokenRequest_ApnsTokenRequest{} + mi := &file_org_signal_chat_device_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPushTokenRequest_ApnsTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPushTokenRequest_ApnsTokenRequest) ProtoMessage() {} + +func (x *SetPushTokenRequest_ApnsTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPushTokenRequest_ApnsTokenRequest.ProtoReflect.Descriptor instead. +func (*SetPushTokenRequest_ApnsTokenRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *SetPushTokenRequest_ApnsTokenRequest) GetApnsToken() string { + if x != nil { + return x.ApnsToken + } + return "" +} + +type SetPushTokenRequest_FcmTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An FCM push token. + FcmToken string `protobuf:"bytes,1,opt,name=fcm_token,json=fcmToken,proto3" json:"fcm_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPushTokenRequest_FcmTokenRequest) Reset() { + *x = SetPushTokenRequest_FcmTokenRequest{} + mi := &file_org_signal_chat_device_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPushTokenRequest_FcmTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPushTokenRequest_FcmTokenRequest) ProtoMessage() {} + +func (x *SetPushTokenRequest_FcmTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_device_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPushTokenRequest_FcmTokenRequest.ProtoReflect.Descriptor instead. +func (*SetPushTokenRequest_FcmTokenRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_device_proto_rawDescGZIP(), []int{6, 1} +} + +func (x *SetPushTokenRequest_FcmTokenRequest) GetFcmToken() string { + if x != nil { + return x.FcmToken + } + return "" +} + +var File_org_signal_chat_device_proto protoreflect.FileDescriptor + +const file_org_signal_chat_device_proto_rawDesc = "" + + "\n" + + "\x1corg/signal/chat/device.proto\x12\x16org.signal.chat.device\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\x13\n" + + "\x11GetDevicesRequest\"\x9f\x02\n" + + "\x12GetDevicesResponse\x12Q\n" + + "\adevices\x18\x01 \x03(\v27.org.signal.chat.device.GetDevicesResponse.LinkedDeviceR\adevices\x1a\xb5\x01\n" + + "\fLinkedDevice\x12\x0e\n" + + "\x02id\x18\x01 \x01(\rR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\fR\x04name\x12\x1b\n" + + "\tlast_seen\x18\x03 \x01(\x04R\blastSeen\x120\n" + + "\x0fregistration_id\x18\x04 \x01(\rB\a\xb2\x97\"\x03\x10\xff\x7fR\x0eregistrationId\x122\n" + + "\x15created_at_ciphertext\x18\x05 \x01(\fR\x13createdAtCiphertext\"%\n" + + "\x13RemoveDeviceRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\rR\x02id\"E\n" + + "\x14SetDeviceNameRequest\x12\x1d\n" + + "\x04name\x18\x01 \x01(\fB\t\x9a\x97\"\x05\b\x01\x10\xe1\x01R\x04name\x12\x0e\n" + + "\x02id\x18\x02 \x01(\rR\x02id\"\xc1\x01\n" + + "\x15SetDeviceNameResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12h\n" + + "\x17target_device_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\x14targetDeviceNotFoundB\n" + + "\n" + + "\bresponse\"\x16\n" + + "\x14RemoveDeviceResponse\"\xee\x02\n" + + "\x13SetPushTokenRequest\x12l\n" + + "\x12apns_token_request\x18\x01 \x01(\v2<.org.signal.chat.device.SetPushTokenRequest.ApnsTokenRequestH\x00R\x10apnsTokenRequest\x12i\n" + + "\x11fcm_token_request\x18\x02 \x01(\v2;.org.signal.chat.device.SetPushTokenRequest.FcmTokenRequestH\x00R\x0ffcmTokenRequest\x1a7\n" + + "\x10ApnsTokenRequest\x12#\n" + + "\n" + + "apns_token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\tapnsToken\x1a4\n" + + "\x0fFcmTokenRequest\x12!\n" + + "\tfcm_token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\bfcmTokenB\x0f\n" + + "\rtoken_request\"\x16\n" + + "\x14SetPushTokenResponse\"\x17\n" + + "\x15ClearPushTokenRequest\"\x18\n" + + "\x16ClearPushTokenResponse\"f\n" + + "\x16SetCapabilitiesRequest\x12L\n" + + "\fcapabilities\x18\x01 \x03(\x0e2(.org.signal.chat.common.DeviceCapabilityR\fcapabilities\"\x19\n" + + "\x17SetCapabilitiesResponse2\xa9\x05\n" + + "\aDevices\x12e\n" + + "\n" + + "GetDevices\x12).org.signal.chat.device.GetDevicesRequest\x1a*.org.signal.chat.device.GetDevicesResponse\"\x00\x12k\n" + + "\fRemoveDevice\x12+.org.signal.chat.device.RemoveDeviceRequest\x1a,.org.signal.chat.device.RemoveDeviceResponse\"\x00\x12n\n" + + "\rSetDeviceName\x12,.org.signal.chat.device.SetDeviceNameRequest\x1a-.org.signal.chat.device.SetDeviceNameResponse\"\x00\x12k\n" + + "\fSetPushToken\x12+.org.signal.chat.device.SetPushTokenRequest\x1a,.org.signal.chat.device.SetPushTokenResponse\"\x00\x12q\n" + + "\x0eClearPushToken\x12-.org.signal.chat.device.ClearPushTokenRequest\x1a..org.signal.chat.device.ClearPushTokenResponse\"\x00\x12t\n" + + "\x0fSetCapabilities\x12..org.signal.chat.device.SetCapabilitiesRequest\x1a/.org.signal.chat.device.SetCapabilitiesResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_device_proto_rawDescOnce sync.Once + file_org_signal_chat_device_proto_rawDescData []byte +) + +func file_org_signal_chat_device_proto_rawDescGZIP() []byte { + file_org_signal_chat_device_proto_rawDescOnce.Do(func() { + file_org_signal_chat_device_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_device_proto_rawDesc), len(file_org_signal_chat_device_proto_rawDesc))) + }) + return file_org_signal_chat_device_proto_rawDescData +} + +var file_org_signal_chat_device_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_org_signal_chat_device_proto_goTypes = []any{ + (*GetDevicesRequest)(nil), // 0: org.signal.chat.device.GetDevicesRequest + (*GetDevicesResponse)(nil), // 1: org.signal.chat.device.GetDevicesResponse + (*RemoveDeviceRequest)(nil), // 2: org.signal.chat.device.RemoveDeviceRequest + (*SetDeviceNameRequest)(nil), // 3: org.signal.chat.device.SetDeviceNameRequest + (*SetDeviceNameResponse)(nil), // 4: org.signal.chat.device.SetDeviceNameResponse + (*RemoveDeviceResponse)(nil), // 5: org.signal.chat.device.RemoveDeviceResponse + (*SetPushTokenRequest)(nil), // 6: org.signal.chat.device.SetPushTokenRequest + (*SetPushTokenResponse)(nil), // 7: org.signal.chat.device.SetPushTokenResponse + (*ClearPushTokenRequest)(nil), // 8: org.signal.chat.device.ClearPushTokenRequest + (*ClearPushTokenResponse)(nil), // 9: org.signal.chat.device.ClearPushTokenResponse + (*SetCapabilitiesRequest)(nil), // 10: org.signal.chat.device.SetCapabilitiesRequest + (*SetCapabilitiesResponse)(nil), // 11: org.signal.chat.device.SetCapabilitiesResponse + (*GetDevicesResponse_LinkedDevice)(nil), // 12: org.signal.chat.device.GetDevicesResponse.LinkedDevice + (*SetPushTokenRequest_ApnsTokenRequest)(nil), // 13: org.signal.chat.device.SetPushTokenRequest.ApnsTokenRequest + (*SetPushTokenRequest_FcmTokenRequest)(nil), // 14: org.signal.chat.device.SetPushTokenRequest.FcmTokenRequest + (*emptypb.Empty)(nil), // 15: google.protobuf.Empty + (*errors.NotFound)(nil), // 16: org.signal.chat.errors.NotFound + (common.DeviceCapability)(0), // 17: org.signal.chat.common.DeviceCapability +} +var file_org_signal_chat_device_proto_depIdxs = []int32{ + 12, // 0: org.signal.chat.device.GetDevicesResponse.devices:type_name -> org.signal.chat.device.GetDevicesResponse.LinkedDevice + 15, // 1: org.signal.chat.device.SetDeviceNameResponse.success:type_name -> google.protobuf.Empty + 16, // 2: org.signal.chat.device.SetDeviceNameResponse.target_device_not_found:type_name -> org.signal.chat.errors.NotFound + 13, // 3: org.signal.chat.device.SetPushTokenRequest.apns_token_request:type_name -> org.signal.chat.device.SetPushTokenRequest.ApnsTokenRequest + 14, // 4: org.signal.chat.device.SetPushTokenRequest.fcm_token_request:type_name -> org.signal.chat.device.SetPushTokenRequest.FcmTokenRequest + 17, // 5: org.signal.chat.device.SetCapabilitiesRequest.capabilities:type_name -> org.signal.chat.common.DeviceCapability + 0, // 6: org.signal.chat.device.Devices.GetDevices:input_type -> org.signal.chat.device.GetDevicesRequest + 2, // 7: org.signal.chat.device.Devices.RemoveDevice:input_type -> org.signal.chat.device.RemoveDeviceRequest + 3, // 8: org.signal.chat.device.Devices.SetDeviceName:input_type -> org.signal.chat.device.SetDeviceNameRequest + 6, // 9: org.signal.chat.device.Devices.SetPushToken:input_type -> org.signal.chat.device.SetPushTokenRequest + 8, // 10: org.signal.chat.device.Devices.ClearPushToken:input_type -> org.signal.chat.device.ClearPushTokenRequest + 10, // 11: org.signal.chat.device.Devices.SetCapabilities:input_type -> org.signal.chat.device.SetCapabilitiesRequest + 1, // 12: org.signal.chat.device.Devices.GetDevices:output_type -> org.signal.chat.device.GetDevicesResponse + 5, // 13: org.signal.chat.device.Devices.RemoveDevice:output_type -> org.signal.chat.device.RemoveDeviceResponse + 4, // 14: org.signal.chat.device.Devices.SetDeviceName:output_type -> org.signal.chat.device.SetDeviceNameResponse + 7, // 15: org.signal.chat.device.Devices.SetPushToken:output_type -> org.signal.chat.device.SetPushTokenResponse + 9, // 16: org.signal.chat.device.Devices.ClearPushToken:output_type -> org.signal.chat.device.ClearPushTokenResponse + 11, // 17: org.signal.chat.device.Devices.SetCapabilities:output_type -> org.signal.chat.device.SetCapabilitiesResponse + 12, // [12:18] is the sub-list for method output_type + 6, // [6:12] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_device_proto_init() } +func file_org_signal_chat_device_proto_init() { + if File_org_signal_chat_device_proto != nil { + return + } + file_org_signal_chat_device_proto_msgTypes[4].OneofWrappers = []any{ + (*SetDeviceNameResponse_Success)(nil), + (*SetDeviceNameResponse_TargetDeviceNotFound)(nil), + } + file_org_signal_chat_device_proto_msgTypes[6].OneofWrappers = []any{ + (*SetPushTokenRequest_ApnsTokenRequest_)(nil), + (*SetPushTokenRequest_FcmTokenRequest_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_device_proto_rawDesc), len(file_org_signal_chat_device_proto_rawDesc)), + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_device_proto_goTypes, + DependencyIndexes: file_org_signal_chat_device_proto_depIdxs, + MessageInfos: file_org_signal_chat_device_proto_msgTypes, + }.Build() + File_org_signal_chat_device_proto = out.File + file_org_signal_chat_device_proto_goTypes = nil + file_org_signal_chat_device_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/device/device_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/device/device_grpc.pb.go new file mode 100644 index 0000000..fb11aa6 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/device/device_grpc.pb.go @@ -0,0 +1,349 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/device.proto + +package device + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Devices_GetDevices_FullMethodName = "/org.signal.chat.device.Devices/GetDevices" + Devices_RemoveDevice_FullMethodName = "/org.signal.chat.device.Devices/RemoveDevice" + Devices_SetDeviceName_FullMethodName = "/org.signal.chat.device.Devices/SetDeviceName" + Devices_SetPushToken_FullMethodName = "/org.signal.chat.device.Devices/SetPushToken" + Devices_ClearPushToken_FullMethodName = "/org.signal.chat.device.Devices/ClearPushToken" + Devices_SetCapabilities_FullMethodName = "/org.signal.chat.device.Devices/SetCapabilities" +) + +// DevicesClient is the client API for Devices service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for working with devices attached to a Signal account. +type DevicesClient interface { + // Returns a list of devices associated with the caller's account. + GetDevices(ctx context.Context, in *GetDevicesRequest, opts ...grpc.CallOption) (*GetDevicesResponse, error) + // Removes a linked device from the caller's account. + // + // Linked devices may only remove themselves. Primary devices may remove + // any device other than themselves. + RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) + // Sets the encrypted human-readable name for a specific devices. Primary + // devices may change the name of any device associated with their account, + // but linked devices may only change their own name. The response will + // indicate if the target device was not found. + SetDeviceName(ctx context.Context, in *SetDeviceNameRequest, opts ...grpc.CallOption) (*SetDeviceNameResponse, error) + // Sets the token(s) the server should use to send new message notifications + // to the authenticated device. + SetPushToken(ctx context.Context, in *SetPushTokenRequest, opts ...grpc.CallOption) (*SetPushTokenResponse, error) + // Removes any push tokens associated with the authenticated device. After + // calling this method, the server will assume that the authenticated device + // will periodically poll for new messages. + ClearPushToken(ctx context.Context, in *ClearPushTokenRequest, opts ...grpc.CallOption) (*ClearPushTokenResponse, error) + // Declares that the authenticated device supports certain features. + SetCapabilities(ctx context.Context, in *SetCapabilitiesRequest, opts ...grpc.CallOption) (*SetCapabilitiesResponse, error) +} + +type devicesClient struct { + cc grpc.ClientConnInterface +} + +func NewDevicesClient(cc grpc.ClientConnInterface) DevicesClient { + return &devicesClient{cc} +} + +func (c *devicesClient) GetDevices(ctx context.Context, in *GetDevicesRequest, opts ...grpc.CallOption) (*GetDevicesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetDevicesResponse) + err := c.cc.Invoke(ctx, Devices_GetDevices_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *devicesClient) RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RemoveDeviceResponse) + err := c.cc.Invoke(ctx, Devices_RemoveDevice_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *devicesClient) SetDeviceName(ctx context.Context, in *SetDeviceNameRequest, opts ...grpc.CallOption) (*SetDeviceNameResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetDeviceNameResponse) + err := c.cc.Invoke(ctx, Devices_SetDeviceName_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *devicesClient) SetPushToken(ctx context.Context, in *SetPushTokenRequest, opts ...grpc.CallOption) (*SetPushTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPushTokenResponse) + err := c.cc.Invoke(ctx, Devices_SetPushToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *devicesClient) ClearPushToken(ctx context.Context, in *ClearPushTokenRequest, opts ...grpc.CallOption) (*ClearPushTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ClearPushTokenResponse) + err := c.cc.Invoke(ctx, Devices_ClearPushToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *devicesClient) SetCapabilities(ctx context.Context, in *SetCapabilitiesRequest, opts ...grpc.CallOption) (*SetCapabilitiesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetCapabilitiesResponse) + err := c.cc.Invoke(ctx, Devices_SetCapabilities_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DevicesServer is the server API for Devices service. +// All implementations must embed UnimplementedDevicesServer +// for forward compatibility. +// +// Provides methods for working with devices attached to a Signal account. +type DevicesServer interface { + // Returns a list of devices associated with the caller's account. + GetDevices(context.Context, *GetDevicesRequest) (*GetDevicesResponse, error) + // Removes a linked device from the caller's account. + // + // Linked devices may only remove themselves. Primary devices may remove + // any device other than themselves. + RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error) + // Sets the encrypted human-readable name for a specific devices. Primary + // devices may change the name of any device associated with their account, + // but linked devices may only change their own name. The response will + // indicate if the target device was not found. + SetDeviceName(context.Context, *SetDeviceNameRequest) (*SetDeviceNameResponse, error) + // Sets the token(s) the server should use to send new message notifications + // to the authenticated device. + SetPushToken(context.Context, *SetPushTokenRequest) (*SetPushTokenResponse, error) + // Removes any push tokens associated with the authenticated device. After + // calling this method, the server will assume that the authenticated device + // will periodically poll for new messages. + ClearPushToken(context.Context, *ClearPushTokenRequest) (*ClearPushTokenResponse, error) + // Declares that the authenticated device supports certain features. + SetCapabilities(context.Context, *SetCapabilitiesRequest) (*SetCapabilitiesResponse, error) + mustEmbedUnimplementedDevicesServer() +} + +// UnimplementedDevicesServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDevicesServer struct{} + +func (UnimplementedDevicesServer) GetDevices(context.Context, *GetDevicesRequest) (*GetDevicesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetDevices not implemented") +} +func (UnimplementedDevicesServer) RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RemoveDevice not implemented") +} +func (UnimplementedDevicesServer) SetDeviceName(context.Context, *SetDeviceNameRequest) (*SetDeviceNameResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetDeviceName not implemented") +} +func (UnimplementedDevicesServer) SetPushToken(context.Context, *SetPushTokenRequest) (*SetPushTokenResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetPushToken not implemented") +} +func (UnimplementedDevicesServer) ClearPushToken(context.Context, *ClearPushTokenRequest) (*ClearPushTokenResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ClearPushToken not implemented") +} +func (UnimplementedDevicesServer) SetCapabilities(context.Context, *SetCapabilitiesRequest) (*SetCapabilitiesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetCapabilities not implemented") +} +func (UnimplementedDevicesServer) mustEmbedUnimplementedDevicesServer() {} +func (UnimplementedDevicesServer) testEmbeddedByValue() {} + +// UnsafeDevicesServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DevicesServer will +// result in compilation errors. +type UnsafeDevicesServer interface { + mustEmbedUnimplementedDevicesServer() +} + +func RegisterDevicesServer(s grpc.ServiceRegistrar, srv DevicesServer) { + // If the following call panics, it indicates UnimplementedDevicesServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Devices_ServiceDesc, srv) +} + +func _Devices_GetDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDevicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DevicesServer).GetDevices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Devices_GetDevices_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DevicesServer).GetDevices(ctx, req.(*GetDevicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Devices_RemoveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveDeviceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DevicesServer).RemoveDevice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Devices_RemoveDevice_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DevicesServer).RemoveDevice(ctx, req.(*RemoveDeviceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Devices_SetDeviceName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetDeviceNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DevicesServer).SetDeviceName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Devices_SetDeviceName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DevicesServer).SetDeviceName(ctx, req.(*SetDeviceNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Devices_SetPushToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPushTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DevicesServer).SetPushToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Devices_SetPushToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DevicesServer).SetPushToken(ctx, req.(*SetPushTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Devices_ClearPushToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClearPushTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DevicesServer).ClearPushToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Devices_ClearPushToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DevicesServer).ClearPushToken(ctx, req.(*ClearPushTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Devices_SetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetCapabilitiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DevicesServer).SetCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Devices_SetCapabilities_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DevicesServer).SetCapabilities(ctx, req.(*SetCapabilitiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Devices_ServiceDesc is the grpc.ServiceDesc for Devices service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Devices_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.device.Devices", + HandlerType: (*DevicesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetDevices", + Handler: _Devices_GetDevices_Handler, + }, + { + MethodName: "RemoveDevice", + Handler: _Devices_RemoveDevice_Handler, + }, + { + MethodName: "SetDeviceName", + Handler: _Devices_SetDeviceName_Handler, + }, + { + MethodName: "SetPushToken", + Handler: _Devices_SetPushToken_Handler, + }, + { + MethodName: "ClearPushToken", + Handler: _Devices_ClearPushToken_Handler, + }, + { + MethodName: "SetCapabilities", + Handler: _Devices_SetCapabilities_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/device.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/donations/donations.pb.go b/pkg/signalmeow/protobuf/rpc/donations/donations.pb.go new file mode 100644 index 0000000..df63597 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/donations/donations.pb.go @@ -0,0 +1,373 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/donations.proto + +package donations + +import ( + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RedeemReceiptRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Presentation of the ZK receipt acquired when the subscription was created + ReceiptCredentialPresentation []byte `protobuf:"bytes,1,opt,name=receiptCredentialPresentation,proto3" json:"receiptCredentialPresentation,omitempty"` + // If true, the corresponding badge should be visible on the profile + Visible bool `protobuf:"varint,2,opt,name=visible,proto3" json:"visible,omitempty"` + // If true, and the new badge is visible, it should be the primary badge on the profile + Primary bool `protobuf:"varint,3,opt,name=primary,proto3" json:"primary,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RedeemReceiptRequest) Reset() { + *x = RedeemReceiptRequest{} + mi := &file_org_signal_chat_donations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RedeemReceiptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedeemReceiptRequest) ProtoMessage() {} + +func (x *RedeemReceiptRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_donations_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedeemReceiptRequest.ProtoReflect.Descriptor instead. +func (*RedeemReceiptRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{0} +} + +func (x *RedeemReceiptRequest) GetReceiptCredentialPresentation() []byte { + if x != nil { + return x.ReceiptCredentialPresentation + } + return nil +} + +func (x *RedeemReceiptRequest) GetVisible() bool { + if x != nil { + return x.Visible + } + return false +} + +func (x *RedeemReceiptRequest) GetPrimary() bool { + if x != nil { + return x.Primary + } + return false +} + +type RedeemReceiptResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *RedeemReceiptResponse_Success + // *RedeemReceiptResponse_FailedAuthentication + // *RedeemReceiptResponse_AlreadyRedeemed + Response isRedeemReceiptResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RedeemReceiptResponse) Reset() { + *x = RedeemReceiptResponse{} + mi := &file_org_signal_chat_donations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RedeemReceiptResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedeemReceiptResponse) ProtoMessage() {} + +func (x *RedeemReceiptResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_donations_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedeemReceiptResponse.ProtoReflect.Descriptor instead. +func (*RedeemReceiptResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{1} +} + +func (x *RedeemReceiptResponse) GetResponse() isRedeemReceiptResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *RedeemReceiptResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*RedeemReceiptResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *RedeemReceiptResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*RedeemReceiptResponse_FailedAuthentication); ok { + return x.FailedAuthentication + } + } + return nil +} + +func (x *RedeemReceiptResponse) GetAlreadyRedeemed() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*RedeemReceiptResponse_AlreadyRedeemed); ok { + return x.AlreadyRedeemed + } + } + return nil +} + +type isRedeemReceiptResponse_Response interface { + isRedeemReceiptResponse_Response() +} + +type RedeemReceiptResponse_Success struct { + // The receipt was successfully redeemed + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type RedeemReceiptResponse_FailedAuthentication struct { + // The provided presentation is invalid + FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` +} + +type RedeemReceiptResponse_AlreadyRedeemed struct { + // The receipt was already redeemed for a different account + AlreadyRedeemed *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=already_redeemed,json=alreadyRedeemed,proto3,oneof"` +} + +func (*RedeemReceiptResponse_Success) isRedeemReceiptResponse_Response() {} + +func (*RedeemReceiptResponse_FailedAuthentication) isRedeemReceiptResponse_Response() {} + +func (*RedeemReceiptResponse_AlreadyRedeemed) isRedeemReceiptResponse_Response() {} + +type CreateDonationPermitRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // a serialized libsignal DonationPermitRequest + DonationPermitRequest []byte `protobuf:"bytes,1,opt,name=donation_permit_request,json=donationPermitRequest,proto3" json:"donation_permit_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateDonationPermitRequest) Reset() { + *x = CreateDonationPermitRequest{} + mi := &file_org_signal_chat_donations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateDonationPermitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDonationPermitRequest) ProtoMessage() {} + +func (x *CreateDonationPermitRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_donations_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDonationPermitRequest.ProtoReflect.Descriptor instead. +func (*CreateDonationPermitRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateDonationPermitRequest) GetDonationPermitRequest() []byte { + if x != nil { + return x.DonationPermitRequest + } + return nil +} + +type CreateDonationPermitResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // a serialized libsignal DonationPermitResponse + DonationPermitResponse []byte `protobuf:"bytes,1,opt,name=donation_permit_response,json=donationPermitResponse,proto3" json:"donation_permit_response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateDonationPermitResponse) Reset() { + *x = CreateDonationPermitResponse{} + mi := &file_org_signal_chat_donations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateDonationPermitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDonationPermitResponse) ProtoMessage() {} + +func (x *CreateDonationPermitResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_donations_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDonationPermitResponse.ProtoReflect.Descriptor instead. +func (*CreateDonationPermitResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateDonationPermitResponse) GetDonationPermitResponse() []byte { + if x != nil { + return x.DonationPermitResponse + } + return nil +} + +var File_org_signal_chat_donations_proto protoreflect.FileDescriptor + +const file_org_signal_chat_donations_proto_rawDesc = "" + + "\n" + + "\x1forg/signal/chat/donations.proto\x12\x19org.signal.chat.donations\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"\x98\x01\n" + + "\x14RedeemReceiptRequest\x12L\n" + + "\x1dreceiptCredentialPresentation\x18\x01 \x01(\fB\x06\xa2\x97\"\x02\xc9\x02R\x1dreceiptCredentialPresentation\x12\x18\n" + + "\avisible\x18\x02 \x01(\bR\avisible\x12\x18\n" + + "\aprimary\x18\x03 \x01(\bR\aprimary\"\xc9\x02\n" + + "\x15RedeemReceiptResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" + + "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x12m\n" + + "\x10already_redeemed\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemedB\n" + + "\n" + + "\bresponse\"[\n" + + "\x1bCreateDonationPermitRequest\x12<\n" + + "\x17donation_permit_request\x18\x01 \x01(\fB\x04\x88\x97\"\x01R\x15donationPermitRequest\"X\n" + + "\x1cCreateDonationPermitResponse\x128\n" + + "\x18donation_permit_response\x18\x01 \x01(\fR\x16donationPermitResponse2\x93\x02\n" + + "\tDonations\x12t\n" + + "\rRedeemReceipt\x12/.org.signal.chat.donations.RedeemReceiptRequest\x1a0.org.signal.chat.donations.RedeemReceiptResponse\"\x00\x12\x89\x01\n" + + "\x14CreateDonationPermit\x126.org.signal.chat.donations.CreateDonationPermitRequest\x1a7.org.signal.chat.donations.CreateDonationPermitResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_donations_proto_rawDescOnce sync.Once + file_org_signal_chat_donations_proto_rawDescData []byte +) + +func file_org_signal_chat_donations_proto_rawDescGZIP() []byte { + file_org_signal_chat_donations_proto_rawDescOnce.Do(func() { + file_org_signal_chat_donations_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_donations_proto_rawDesc), len(file_org_signal_chat_donations_proto_rawDesc))) + }) + return file_org_signal_chat_donations_proto_rawDescData +} + +var file_org_signal_chat_donations_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_org_signal_chat_donations_proto_goTypes = []any{ + (*RedeemReceiptRequest)(nil), // 0: org.signal.chat.donations.RedeemReceiptRequest + (*RedeemReceiptResponse)(nil), // 1: org.signal.chat.donations.RedeemReceiptResponse + (*CreateDonationPermitRequest)(nil), // 2: org.signal.chat.donations.CreateDonationPermitRequest + (*CreateDonationPermitResponse)(nil), // 3: org.signal.chat.donations.CreateDonationPermitResponse + (*emptypb.Empty)(nil), // 4: google.protobuf.Empty + (*errors.FailedZkAuthentication)(nil), // 5: org.signal.chat.errors.FailedZkAuthentication + (*errors.FailedPrecondition)(nil), // 6: org.signal.chat.errors.FailedPrecondition +} +var file_org_signal_chat_donations_proto_depIdxs = []int32{ + 4, // 0: org.signal.chat.donations.RedeemReceiptResponse.success:type_name -> google.protobuf.Empty + 5, // 1: org.signal.chat.donations.RedeemReceiptResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 6, // 2: org.signal.chat.donations.RedeemReceiptResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition + 0, // 3: org.signal.chat.donations.Donations.RedeemReceipt:input_type -> org.signal.chat.donations.RedeemReceiptRequest + 2, // 4: org.signal.chat.donations.Donations.CreateDonationPermit:input_type -> org.signal.chat.donations.CreateDonationPermitRequest + 1, // 5: org.signal.chat.donations.Donations.RedeemReceipt:output_type -> org.signal.chat.donations.RedeemReceiptResponse + 3, // 6: org.signal.chat.donations.Donations.CreateDonationPermit:output_type -> org.signal.chat.donations.CreateDonationPermitResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_donations_proto_init() } +func file_org_signal_chat_donations_proto_init() { + if File_org_signal_chat_donations_proto != nil { + return + } + file_org_signal_chat_donations_proto_msgTypes[1].OneofWrappers = []any{ + (*RedeemReceiptResponse_Success)(nil), + (*RedeemReceiptResponse_FailedAuthentication)(nil), + (*RedeemReceiptResponse_AlreadyRedeemed)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_donations_proto_rawDesc), len(file_org_signal_chat_donations_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_donations_proto_goTypes, + DependencyIndexes: file_org_signal_chat_donations_proto_depIdxs, + MessageInfos: file_org_signal_chat_donations_proto_msgTypes, + }.Build() + File_org_signal_chat_donations_proto = out.File + file_org_signal_chat_donations_proto_goTypes = nil + file_org_signal_chat_donations_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go new file mode 100644 index 0000000..7868dd8 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go @@ -0,0 +1,177 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/donations.proto + +package donations + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Donations_RedeemReceipt_FullMethodName = "/org.signal.chat.donations.Donations/RedeemReceipt" + Donations_CreateDonationPermit_FullMethodName = "/org.signal.chat.donations.Donations/CreateDonationPermit" +) + +// DonationsClient is the client API for Donations service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DonationsClient interface { + // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials + // to add a badge to the account. After successful redemption, profile + // responses will include the corresponding badge (if configured as visible) + // until the expiration time on the receipt. + RedeemReceipt(ctx context.Context, in *RedeemReceiptRequest, opts ...grpc.CallOption) (*RedeemReceiptResponse, error) + // Generate a set of anonymous, single-use, permits for use with /v1/subscription endpoints. + // + // If rate limited, reduce requested permit count and/or try again after the prescribed delay. + CreateDonationPermit(ctx context.Context, in *CreateDonationPermitRequest, opts ...grpc.CallOption) (*CreateDonationPermitResponse, error) +} + +type donationsClient struct { + cc grpc.ClientConnInterface +} + +func NewDonationsClient(cc grpc.ClientConnInterface) DonationsClient { + return &donationsClient{cc} +} + +func (c *donationsClient) RedeemReceipt(ctx context.Context, in *RedeemReceiptRequest, opts ...grpc.CallOption) (*RedeemReceiptResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RedeemReceiptResponse) + err := c.cc.Invoke(ctx, Donations_RedeemReceipt_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *donationsClient) CreateDonationPermit(ctx context.Context, in *CreateDonationPermitRequest, opts ...grpc.CallOption) (*CreateDonationPermitResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateDonationPermitResponse) + err := c.cc.Invoke(ctx, Donations_CreateDonationPermit_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DonationsServer is the server API for Donations service. +// All implementations must embed UnimplementedDonationsServer +// for forward compatibility. +type DonationsServer interface { + // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials + // to add a badge to the account. After successful redemption, profile + // responses will include the corresponding badge (if configured as visible) + // until the expiration time on the receipt. + RedeemReceipt(context.Context, *RedeemReceiptRequest) (*RedeemReceiptResponse, error) + // Generate a set of anonymous, single-use, permits for use with /v1/subscription endpoints. + // + // If rate limited, reduce requested permit count and/or try again after the prescribed delay. + CreateDonationPermit(context.Context, *CreateDonationPermitRequest) (*CreateDonationPermitResponse, error) + mustEmbedUnimplementedDonationsServer() +} + +// UnimplementedDonationsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDonationsServer struct{} + +func (UnimplementedDonationsServer) RedeemReceipt(context.Context, *RedeemReceiptRequest) (*RedeemReceiptResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RedeemReceipt not implemented") +} +func (UnimplementedDonationsServer) CreateDonationPermit(context.Context, *CreateDonationPermitRequest) (*CreateDonationPermitResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateDonationPermit not implemented") +} +func (UnimplementedDonationsServer) mustEmbedUnimplementedDonationsServer() {} +func (UnimplementedDonationsServer) testEmbeddedByValue() {} + +// UnsafeDonationsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DonationsServer will +// result in compilation errors. +type UnsafeDonationsServer interface { + mustEmbedUnimplementedDonationsServer() +} + +func RegisterDonationsServer(s grpc.ServiceRegistrar, srv DonationsServer) { + // If the following call panics, it indicates UnimplementedDonationsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Donations_ServiceDesc, srv) +} + +func _Donations_RedeemReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RedeemReceiptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DonationsServer).RedeemReceipt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Donations_RedeemReceipt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DonationsServer).RedeemReceipt(ctx, req.(*RedeemReceiptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Donations_CreateDonationPermit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDonationPermitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DonationsServer).CreateDonationPermit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Donations_CreateDonationPermit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DonationsServer).CreateDonationPermit(ctx, req.(*CreateDonationPermitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Donations_ServiceDesc is the grpc.ServiceDesc for Donations service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Donations_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.donations.Donations", + HandlerType: (*DonationsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RedeemReceipt", + Handler: _Donations_RedeemReceipt_Handler, + }, + { + MethodName: "CreateDonationPermit", + Handler: _Donations_CreateDonationPermit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/donations.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/errors/errors.pb.go b/pkg/signalmeow/protobuf/rpc/errors/errors.pb.go new file mode 100644 index 0000000..ba862bd --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/errors/errors.pb.go @@ -0,0 +1,269 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/errors.proto + +package errors + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Response message that indicates a particular resource was not found. +type NotFound struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NotFound) Reset() { + *x = NotFound{} + mi := &file_org_signal_chat_errors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NotFound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotFound) ProtoMessage() {} + +func (x *NotFound) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_errors_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotFound.ProtoReflect.Descriptor instead. +func (*NotFound) Descriptor() ([]byte, []int) { + return file_org_signal_chat_errors_proto_rawDescGZIP(), []int{0} +} + +// Response message that indicates that some precondition of the request was not +// met. For example, if there was a request to update foo, but foo had not been +// set, this would be an appropriate error. +type FailedPrecondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An optional description indicating what precondition failed. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FailedPrecondition) Reset() { + *x = FailedPrecondition{} + mi := &file_org_signal_chat_errors_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FailedPrecondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailedPrecondition) ProtoMessage() {} + +func (x *FailedPrecondition) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_errors_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailedPrecondition.ProtoReflect.Descriptor instead. +func (*FailedPrecondition) Descriptor() ([]byte, []int) { + return file_org_signal_chat_errors_proto_rawDescGZIP(), []int{1} +} + +func (x *FailedPrecondition) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// Response message that authentication via an anonymous credential failed. +type FailedZkAuthentication struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An optional description with additional information about the failure. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FailedZkAuthentication) Reset() { + *x = FailedZkAuthentication{} + mi := &file_org_signal_chat_errors_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FailedZkAuthentication) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailedZkAuthentication) ProtoMessage() {} + +func (x *FailedZkAuthentication) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_errors_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailedZkAuthentication.ProtoReflect.Descriptor instead. +func (*FailedZkAuthentication) Descriptor() ([]byte, []int) { + return file_org_signal_chat_errors_proto_rawDescGZIP(), []int{2} +} + +func (x *FailedZkAuthentication) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// Response message that indicates authorization to perform an unidentified +// operation via an endorsement or access key failed +type FailedUnidentifiedAuthorization struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An optional description with additional information about the failure. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FailedUnidentifiedAuthorization) Reset() { + *x = FailedUnidentifiedAuthorization{} + mi := &file_org_signal_chat_errors_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FailedUnidentifiedAuthorization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailedUnidentifiedAuthorization) ProtoMessage() {} + +func (x *FailedUnidentifiedAuthorization) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_errors_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailedUnidentifiedAuthorization.ProtoReflect.Descriptor instead. +func (*FailedUnidentifiedAuthorization) Descriptor() ([]byte, []int) { + return file_org_signal_chat_errors_proto_rawDescGZIP(), []int{3} +} + +func (x *FailedUnidentifiedAuthorization) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +var File_org_signal_chat_errors_proto protoreflect.FileDescriptor + +const file_org_signal_chat_errors_proto_rawDesc = "" + + "\n" + + "\x1corg/signal/chat/errors.proto\x12\x16org.signal.chat.errors\"\n" + + "\n" + + "\bNotFound\"6\n" + + "\x12FailedPrecondition\x12 \n" + + "\vdescription\x18\x01 \x01(\tR\vdescription\":\n" + + "\x16FailedZkAuthentication\x12 \n" + + "\vdescription\x18\x01 \x01(\tR\vdescription\"C\n" + + "\x1fFailedUnidentifiedAuthorization\x12 \n" + + "\vdescription\x18\x01 \x01(\tR\vdescriptionB\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_errors_proto_rawDescOnce sync.Once + file_org_signal_chat_errors_proto_rawDescData []byte +) + +func file_org_signal_chat_errors_proto_rawDescGZIP() []byte { + file_org_signal_chat_errors_proto_rawDescOnce.Do(func() { + file_org_signal_chat_errors_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_errors_proto_rawDesc), len(file_org_signal_chat_errors_proto_rawDesc))) + }) + return file_org_signal_chat_errors_proto_rawDescData +} + +var file_org_signal_chat_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_org_signal_chat_errors_proto_goTypes = []any{ + (*NotFound)(nil), // 0: org.signal.chat.errors.NotFound + (*FailedPrecondition)(nil), // 1: org.signal.chat.errors.FailedPrecondition + (*FailedZkAuthentication)(nil), // 2: org.signal.chat.errors.FailedZkAuthentication + (*FailedUnidentifiedAuthorization)(nil), // 3: org.signal.chat.errors.FailedUnidentifiedAuthorization +} +var file_org_signal_chat_errors_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_errors_proto_init() } +func file_org_signal_chat_errors_proto_init() { + if File_org_signal_chat_errors_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_errors_proto_rawDesc), len(file_org_signal_chat_errors_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_org_signal_chat_errors_proto_goTypes, + DependencyIndexes: file_org_signal_chat_errors_proto_depIdxs, + MessageInfos: file_org_signal_chat_errors_proto_msgTypes, + }.Build() + File_org_signal_chat_errors_proto = out.File + file_org_signal_chat_errors_proto_goTypes = nil + file_org_signal_chat_errors_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/keys/keys.pb.go b/pkg/signalmeow/protobuf/rpc/keys/keys.pb.go new file mode 100644 index 0000000..89be3b3 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/keys/keys.pb.go @@ -0,0 +1,1217 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/keys.proto + +package keys + +import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetPreKeyCountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPreKeyCountRequest) Reset() { + *x = GetPreKeyCountRequest{} + mi := &file_org_signal_chat_keys_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPreKeyCountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreKeyCountRequest) ProtoMessage() {} + +func (x *GetPreKeyCountRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreKeyCountRequest.ProtoReflect.Descriptor instead. +func (*GetPreKeyCountRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{0} +} + +type GetPreKeyCountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The approximate number of one-time EC pre-keys stored for the + // authenticated device and associated with the caller's ACI. + AciEcPreKeyCount uint32 `protobuf:"varint,1,opt,name=aci_ec_pre_key_count,json=aciEcPreKeyCount,proto3" json:"aci_ec_pre_key_count,omitempty"` + // The approximate number of one-time Kyber pre-keys stored for the + // authenticated device and associated with the caller's ACI. + AciKemPreKeyCount uint32 `protobuf:"varint,2,opt,name=aci_kem_pre_key_count,json=aciKemPreKeyCount,proto3" json:"aci_kem_pre_key_count,omitempty"` + // The approximate number of one-time EC pre-keys stored for the + // authenticated device and associated with the caller's PNI. 0 if + // the account does not possess a phone number. + PniEcPreKeyCount uint32 `protobuf:"varint,3,opt,name=pni_ec_pre_key_count,json=pniEcPreKeyCount,proto3" json:"pni_ec_pre_key_count,omitempty"` + // The approximate number of one-time KEM pre-keys stored for the + // authenticated device and associated with the caller's PNI. 0 if + // the account does not possess a phone number. + PniKemPreKeyCount uint32 `protobuf:"varint,4,opt,name=pni_kem_pre_key_count,json=pniKemPreKeyCount,proto3" json:"pni_kem_pre_key_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPreKeyCountResponse) Reset() { + *x = GetPreKeyCountResponse{} + mi := &file_org_signal_chat_keys_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPreKeyCountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreKeyCountResponse) ProtoMessage() {} + +func (x *GetPreKeyCountResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreKeyCountResponse.ProtoReflect.Descriptor instead. +func (*GetPreKeyCountResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{1} +} + +func (x *GetPreKeyCountResponse) GetAciEcPreKeyCount() uint32 { + if x != nil { + return x.AciEcPreKeyCount + } + return 0 +} + +func (x *GetPreKeyCountResponse) GetAciKemPreKeyCount() uint32 { + if x != nil { + return x.AciKemPreKeyCount + } + return 0 +} + +func (x *GetPreKeyCountResponse) GetPniEcPreKeyCount() uint32 { + if x != nil { + return x.PniEcPreKeyCount + } + return 0 +} + +func (x *GetPreKeyCountResponse) GetPniKemPreKeyCount() uint32 { + if x != nil { + return x.PniKemPreKeyCount + } + return 0 +} + +type GetPreKeysRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier of the account for which to retrieve pre-keys. + TargetIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=target_identifier,json=targetIdentifier,proto3" json:"target_identifier,omitempty"` + // The ID of the device associated with the targeted account for which to + // retrieve pre-keys. If not set, pre-keys are returned for all devices + // associated with the targeted account. + DeviceId *uint32 `protobuf:"varint,2,opt,name=device_id,json=deviceId,proto3,oneof" json:"device_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPreKeysRequest) Reset() { + *x = GetPreKeysRequest{} + mi := &file_org_signal_chat_keys_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPreKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreKeysRequest) ProtoMessage() {} + +func (x *GetPreKeysRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreKeysRequest.ProtoReflect.Descriptor instead. +func (*GetPreKeysRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{2} +} + +func (x *GetPreKeysRequest) GetTargetIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.TargetIdentifier + } + return nil +} + +func (x *GetPreKeysRequest) GetDeviceId() uint32 { + if x != nil && x.DeviceId != nil { + return *x.DeviceId + } + return 0 +} + +type GetPreKeysAnonymousRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The request to retrieve pre-keys for a specific account/device(s). + Request *GetPreKeysRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + // A means to authorize the request. + // + // Types that are valid to be assigned to Authorization: + // + // *GetPreKeysAnonymousRequest_UnidentifiedAccessKey + // *GetPreKeysAnonymousRequest_GroupSendToken + // *GetPreKeysAnonymousRequest_UnrestrictedAccess + Authorization isGetPreKeysAnonymousRequest_Authorization `protobuf_oneof:"authorization"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPreKeysAnonymousRequest) Reset() { + *x = GetPreKeysAnonymousRequest{} + mi := &file_org_signal_chat_keys_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPreKeysAnonymousRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreKeysAnonymousRequest) ProtoMessage() {} + +func (x *GetPreKeysAnonymousRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreKeysAnonymousRequest.ProtoReflect.Descriptor instead. +func (*GetPreKeysAnonymousRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{3} +} + +func (x *GetPreKeysAnonymousRequest) GetRequest() *GetPreKeysRequest { + if x != nil { + return x.Request + } + return nil +} + +func (x *GetPreKeysAnonymousRequest) GetAuthorization() isGetPreKeysAnonymousRequest_Authorization { + if x != nil { + return x.Authorization + } + return nil +} + +func (x *GetPreKeysAnonymousRequest) GetUnidentifiedAccessKey() []byte { + if x != nil { + if x, ok := x.Authorization.(*GetPreKeysAnonymousRequest_UnidentifiedAccessKey); ok { + return x.UnidentifiedAccessKey + } + } + return nil +} + +func (x *GetPreKeysAnonymousRequest) GetGroupSendToken() []byte { + if x != nil { + if x, ok := x.Authorization.(*GetPreKeysAnonymousRequest_GroupSendToken); ok { + return x.GroupSendToken + } + } + return nil +} + +func (x *GetPreKeysAnonymousRequest) GetUnrestrictedAccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Authorization.(*GetPreKeysAnonymousRequest_UnrestrictedAccess); ok { + return x.UnrestrictedAccess + } + } + return nil +} + +type isGetPreKeysAnonymousRequest_Authorization interface { + isGetPreKeysAnonymousRequest_Authorization() +} + +type GetPreKeysAnonymousRequest_UnidentifiedAccessKey struct { + // The unidentified access key (UAK) for the targeted account. + UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` +} + +type GetPreKeysAnonymousRequest_GroupSendToken struct { + // A group send endorsement token for the targeted account. + GroupSendToken []byte `protobuf:"bytes,3,opt,name=group_send_token,json=groupSendToken,proto3,oneof"` +} + +type GetPreKeysAnonymousRequest_UnrestrictedAccess struct { + // The destination account allows unrestricted unidentified access + UnrestrictedAccess *emptypb.Empty `protobuf:"bytes,4,opt,name=unrestricted_access,json=unrestrictedAccess,proto3,oneof"` +} + +func (*GetPreKeysAnonymousRequest_UnidentifiedAccessKey) isGetPreKeysAnonymousRequest_Authorization() { +} + +func (*GetPreKeysAnonymousRequest_GroupSendToken) isGetPreKeysAnonymousRequest_Authorization() {} + +func (*GetPreKeysAnonymousRequest_UnrestrictedAccess) isGetPreKeysAnonymousRequest_Authorization() {} + +type DevicePreKeyBundle struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The EC signed pre-key associated with the targeted + // account/device/identity. + EcSignedPreKey *common.EcSignedPreKey `protobuf:"bytes,1,opt,name=ec_signed_pre_key,json=ecSignedPreKey,proto3" json:"ec_signed_pre_key,omitempty"` + // A one-time EC pre-key for the targeted account/device/identity. May not + // be set if no one-time EC pre-keys are available. + EcOneTimePreKey *common.EcPreKey `protobuf:"bytes,2,opt,name=ec_one_time_pre_key,json=ecOneTimePreKey,proto3" json:"ec_one_time_pre_key,omitempty"` + // A one-time KEM pre-key (or a last-resort KEM pre-key) for the targeted + // account/device/identity. + KemOneTimePreKey *common.KemSignedPreKey `protobuf:"bytes,3,opt,name=kem_one_time_pre_key,json=kemOneTimePreKey,proto3" json:"kem_one_time_pre_key,omitempty"` + // The registration ID for the targeted account/device/identity. + RegistrationId uint32 `protobuf:"varint,4,opt,name=registration_id,json=registrationId,proto3" json:"registration_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DevicePreKeyBundle) Reset() { + *x = DevicePreKeyBundle{} + mi := &file_org_signal_chat_keys_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DevicePreKeyBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DevicePreKeyBundle) ProtoMessage() {} + +func (x *DevicePreKeyBundle) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DevicePreKeyBundle.ProtoReflect.Descriptor instead. +func (*DevicePreKeyBundle) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{4} +} + +func (x *DevicePreKeyBundle) GetEcSignedPreKey() *common.EcSignedPreKey { + if x != nil { + return x.EcSignedPreKey + } + return nil +} + +func (x *DevicePreKeyBundle) GetEcOneTimePreKey() *common.EcPreKey { + if x != nil { + return x.EcOneTimePreKey + } + return nil +} + +func (x *DevicePreKeyBundle) GetKemOneTimePreKey() *common.KemSignedPreKey { + if x != nil { + return x.KemOneTimePreKey + } + return nil +} + +func (x *DevicePreKeyBundle) GetRegistrationId() uint32 { + if x != nil { + return x.RegistrationId + } + return 0 +} + +type AccountPreKeyBundles struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identity key associated with the targeted account/identity. + IdentityKey []byte `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` + // A map of device IDs to pre-key "bundles" for the targeted account. + DevicePreKeys map[uint32]*DevicePreKeyBundle `protobuf:"bytes,2,rep,name=device_pre_keys,json=devicePreKeys,proto3" json:"device_pre_keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Whether the account has enabled sealed sender from anyone. Always false + // if the request was for a PNI, which does not allow any unidentified access. + UnrestrictedUnidentifiedAccess bool `protobuf:"varint,3,opt,name=unrestricted_unidentified_access,json=unrestrictedUnidentifiedAccess,proto3" json:"unrestricted_unidentified_access,omitempty"` + // If the target supports unidentified access and has an unidentified access + // key, a fingerprint of the target's UAK. This may be used to detect a change + // in the UAK that the sender has for the target before actually sending a message. Otherwise, empty. + UnidentifiedAccessKeyFingerprint []byte `protobuf:"bytes,4,opt,name=unidentified_access_key_fingerprint,json=unidentifiedAccessKeyFingerprint,proto3" json:"unidentified_access_key_fingerprint,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountPreKeyBundles) Reset() { + *x = AccountPreKeyBundles{} + mi := &file_org_signal_chat_keys_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountPreKeyBundles) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountPreKeyBundles) ProtoMessage() {} + +func (x *AccountPreKeyBundles) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountPreKeyBundles.ProtoReflect.Descriptor instead. +func (*AccountPreKeyBundles) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{5} +} + +func (x *AccountPreKeyBundles) GetIdentityKey() []byte { + if x != nil { + return x.IdentityKey + } + return nil +} + +func (x *AccountPreKeyBundles) GetDevicePreKeys() map[uint32]*DevicePreKeyBundle { + if x != nil { + return x.DevicePreKeys + } + return nil +} + +func (x *AccountPreKeyBundles) GetUnrestrictedUnidentifiedAccess() bool { + if x != nil { + return x.UnrestrictedUnidentifiedAccess + } + return false +} + +func (x *AccountPreKeyBundles) GetUnidentifiedAccessKeyFingerprint() []byte { + if x != nil { + return x.UnidentifiedAccessKeyFingerprint + } + return nil +} + +type GetPreKeysResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetPreKeysResponse_PreKeys + // *GetPreKeysResponse_TargetNotFound + Response isGetPreKeysResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPreKeysResponse) Reset() { + *x = GetPreKeysResponse{} + mi := &file_org_signal_chat_keys_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPreKeysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreKeysResponse) ProtoMessage() {} + +func (x *GetPreKeysResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreKeysResponse.ProtoReflect.Descriptor instead. +func (*GetPreKeysResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{6} +} + +func (x *GetPreKeysResponse) GetResponse() isGetPreKeysResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetPreKeysResponse) GetPreKeys() *AccountPreKeyBundles { + if x != nil { + if x, ok := x.Response.(*GetPreKeysResponse_PreKeys); ok { + return x.PreKeys + } + } + return nil +} + +func (x *GetPreKeysResponse) GetTargetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*GetPreKeysResponse_TargetNotFound); ok { + return x.TargetNotFound + } + } + return nil +} + +type isGetPreKeysResponse_Response interface { + isGetPreKeysResponse_Response() +} + +type GetPreKeysResponse_PreKeys struct { + // The requested pre-key bundles + PreKeys *AccountPreKeyBundles `protobuf:"bytes,1,opt,name=pre_keys,json=preKeys,proto3,oneof"` +} + +type GetPreKeysResponse_TargetNotFound struct { + // Either the target account was not found, no active device with the given + // ID (if specified) was found on the target account. + TargetNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=target_not_found,json=targetNotFound,proto3,oneof"` +} + +func (*GetPreKeysResponse_PreKeys) isGetPreKeysResponse_Response() {} + +func (*GetPreKeysResponse_TargetNotFound) isGetPreKeysResponse_Response() {} + +type GetPreKeysAnonymousResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetPreKeysAnonymousResponse_PreKeys + // *GetPreKeysAnonymousResponse_TargetNotFound + // *GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization + Response isGetPreKeysAnonymousResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPreKeysAnonymousResponse) Reset() { + *x = GetPreKeysAnonymousResponse{} + mi := &file_org_signal_chat_keys_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPreKeysAnonymousResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreKeysAnonymousResponse) ProtoMessage() {} + +func (x *GetPreKeysAnonymousResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreKeysAnonymousResponse.ProtoReflect.Descriptor instead. +func (*GetPreKeysAnonymousResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{7} +} + +func (x *GetPreKeysAnonymousResponse) GetResponse() isGetPreKeysAnonymousResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetPreKeysAnonymousResponse) GetPreKeys() *AccountPreKeyBundles { + if x != nil { + if x, ok := x.Response.(*GetPreKeysAnonymousResponse_PreKeys); ok { + return x.PreKeys + } + } + return nil +} + +func (x *GetPreKeysAnonymousResponse) GetTargetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*GetPreKeysAnonymousResponse_TargetNotFound); ok { + return x.TargetNotFound + } + } + return nil +} + +func (x *GetPreKeysAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization); ok { + return x.FailedUnidentifiedAuthorization + } + } + return nil +} + +type isGetPreKeysAnonymousResponse_Response interface { + isGetPreKeysAnonymousResponse_Response() +} + +type GetPreKeysAnonymousResponse_PreKeys struct { + // The requested pre-key bundles + PreKeys *AccountPreKeyBundles `protobuf:"bytes,1,opt,name=pre_keys,json=preKeys,proto3,oneof"` +} + +type GetPreKeysAnonymousResponse_TargetNotFound struct { + // Either the target account was not found, no active device with the given + // ID (if specified) was found on the target account. + TargetNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=target_not_found,json=targetNotFound,proto3,oneof"` +} + +type GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization struct { + // The provided unidentified authorization credential was invalid + FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` +} + +func (*GetPreKeysAnonymousResponse_PreKeys) isGetPreKeysAnonymousResponse_Response() {} + +func (*GetPreKeysAnonymousResponse_TargetNotFound) isGetPreKeysAnonymousResponse_Response() {} + +func (*GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization) isGetPreKeysAnonymousResponse_Response() { +} + +type SetOneTimeEcPreKeysRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identity type (i.e. ACI/PNI) with which the keys in this request are + // associated. + IdentityType common.IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` + // The unsigned EC pre-keys to be stored. + PreKeys []*common.EcPreKey `protobuf:"bytes,2,rep,name=pre_keys,json=preKeys,proto3" json:"pre_keys,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetOneTimeEcPreKeysRequest) Reset() { + *x = SetOneTimeEcPreKeysRequest{} + mi := &file_org_signal_chat_keys_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetOneTimeEcPreKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOneTimeEcPreKeysRequest) ProtoMessage() {} + +func (x *SetOneTimeEcPreKeysRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOneTimeEcPreKeysRequest.ProtoReflect.Descriptor instead. +func (*SetOneTimeEcPreKeysRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{8} +} + +func (x *SetOneTimeEcPreKeysRequest) GetIdentityType() common.IdentityType { + if x != nil { + return x.IdentityType + } + return common.IdentityType(0) +} + +func (x *SetOneTimeEcPreKeysRequest) GetPreKeys() []*common.EcPreKey { + if x != nil { + return x.PreKeys + } + return nil +} + +type SetOneTimeKemSignedPreKeysRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identity type (i.e. ACI/PNI) with which the keys in this request are + // associated. + IdentityType common.IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` + // The KEM pre-keys to be stored. + PreKeys []*common.KemSignedPreKey `protobuf:"bytes,2,rep,name=pre_keys,json=preKeys,proto3" json:"pre_keys,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetOneTimeKemSignedPreKeysRequest) Reset() { + *x = SetOneTimeKemSignedPreKeysRequest{} + mi := &file_org_signal_chat_keys_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetOneTimeKemSignedPreKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOneTimeKemSignedPreKeysRequest) ProtoMessage() {} + +func (x *SetOneTimeKemSignedPreKeysRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOneTimeKemSignedPreKeysRequest.ProtoReflect.Descriptor instead. +func (*SetOneTimeKemSignedPreKeysRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{9} +} + +func (x *SetOneTimeKemSignedPreKeysRequest) GetIdentityType() common.IdentityType { + if x != nil { + return x.IdentityType + } + return common.IdentityType(0) +} + +func (x *SetOneTimeKemSignedPreKeysRequest) GetPreKeys() []*common.KemSignedPreKey { + if x != nil { + return x.PreKeys + } + return nil +} + +type SetEcSignedPreKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identity type (i.e. ACI/PNI) with which this key is associated. + IdentityType common.IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` + // The signed EC pre-key itself. + SignedPreKey *common.EcSignedPreKey `protobuf:"bytes,2,opt,name=signed_pre_key,json=signedPreKey,proto3" json:"signed_pre_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetEcSignedPreKeyRequest) Reset() { + *x = SetEcSignedPreKeyRequest{} + mi := &file_org_signal_chat_keys_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetEcSignedPreKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetEcSignedPreKeyRequest) ProtoMessage() {} + +func (x *SetEcSignedPreKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetEcSignedPreKeyRequest.ProtoReflect.Descriptor instead. +func (*SetEcSignedPreKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{10} +} + +func (x *SetEcSignedPreKeyRequest) GetIdentityType() common.IdentityType { + if x != nil { + return x.IdentityType + } + return common.IdentityType(0) +} + +func (x *SetEcSignedPreKeyRequest) GetSignedPreKey() *common.EcSignedPreKey { + if x != nil { + return x.SignedPreKey + } + return nil +} + +type SetKemLastResortPreKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identity type (i.e. ACI/PNI) with which this key is associated. + IdentityType common.IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` + // The signed KEM pre-key itself. + SignedPreKey *common.KemSignedPreKey `protobuf:"bytes,2,opt,name=signed_pre_key,json=signedPreKey,proto3" json:"signed_pre_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetKemLastResortPreKeyRequest) Reset() { + *x = SetKemLastResortPreKeyRequest{} + mi := &file_org_signal_chat_keys_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetKemLastResortPreKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetKemLastResortPreKeyRequest) ProtoMessage() {} + +func (x *SetKemLastResortPreKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetKemLastResortPreKeyRequest.ProtoReflect.Descriptor instead. +func (*SetKemLastResortPreKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{11} +} + +func (x *SetKemLastResortPreKeyRequest) GetIdentityType() common.IdentityType { + if x != nil { + return x.IdentityType + } + return common.IdentityType(0) +} + +func (x *SetKemLastResortPreKeyRequest) GetSignedPreKey() *common.KemSignedPreKey { + if x != nil { + return x.SignedPreKey + } + return nil +} + +type SetPreKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPreKeyResponse) Reset() { + *x = SetPreKeyResponse{} + mi := &file_org_signal_chat_keys_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPreKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPreKeyResponse) ProtoMessage() {} + +func (x *SetPreKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPreKeyResponse.ProtoReflect.Descriptor instead. +func (*SetPreKeyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{12} +} + +type CheckIdentityKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier of the account for which we want to check the associated identity key fingerprint. + TargetIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=target_identifier,json=targetIdentifier,proto3" json:"target_identifier,omitempty"` + // The most significant 4 bytes of the SHA-256 hash of the identity key associated with the target account/identity type. + Fingerprint []byte `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckIdentityKeyRequest) Reset() { + *x = CheckIdentityKeyRequest{} + mi := &file_org_signal_chat_keys_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckIdentityKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckIdentityKeyRequest) ProtoMessage() {} + +func (x *CheckIdentityKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckIdentityKeyRequest.ProtoReflect.Descriptor instead. +func (*CheckIdentityKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{13} +} + +func (x *CheckIdentityKeyRequest) GetTargetIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.TargetIdentifier + } + return nil +} + +func (x *CheckIdentityKeyRequest) GetFingerprint() []byte { + if x != nil { + return x.Fingerprint + } + return nil +} + +type CheckIdentityKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier of the account for which there is a mismatch between the client and server identity key fingerprints. + TargetIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=target_identifier,json=targetIdentifier,proto3" json:"target_identifier,omitempty"` + // The identity key that is stored by the server for the target account/identity type. + IdentityKey []byte `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckIdentityKeyResponse) Reset() { + *x = CheckIdentityKeyResponse{} + mi := &file_org_signal_chat_keys_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckIdentityKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckIdentityKeyResponse) ProtoMessage() {} + +func (x *CheckIdentityKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_keys_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckIdentityKeyResponse.ProtoReflect.Descriptor instead. +func (*CheckIdentityKeyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{14} +} + +func (x *CheckIdentityKeyResponse) GetTargetIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.TargetIdentifier + } + return nil +} + +func (x *CheckIdentityKeyResponse) GetIdentityKey() []byte { + if x != nil { + return x.IdentityKey + } + return nil +} + +var File_org_signal_chat_keys_proto protoreflect.FileDescriptor + +const file_org_signal_chat_keys_proto_rawDesc = "" + + "\n" + + "\x1aorg/signal/chat/keys.proto\x12\x14org.signal.chat.keys\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\x17\n" + + "\x15GetPreKeyCountRequest\"\xdc\x01\n" + + "\x16GetPreKeyCountResponse\x12.\n" + + "\x14aci_ec_pre_key_count\x18\x01 \x01(\rR\x10aciEcPreKeyCount\x120\n" + + "\x15aci_kem_pre_key_count\x18\x02 \x01(\rR\x11aciKemPreKeyCount\x12.\n" + + "\x14pni_ec_pre_key_count\x18\x03 \x01(\rR\x10pniEcPreKeyCount\x120\n" + + "\x15pni_kem_pre_key_count\x18\x04 \x01(\rR\x11pniKemPreKeyCount\"\x9b\x01\n" + + "\x11GetPreKeysRequest\x12V\n" + + "\x11target_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x10targetIdentifier\x12 \n" + + "\tdevice_id\x18\x02 \x01(\rH\x00R\bdeviceId\x88\x01\x01B\f\n" + + "\n" + + "_device_id\"\xa1\x02\n" + + "\x1aGetPreKeysAnonymousRequest\x12A\n" + + "\arequest\x18\x01 \x01(\v2'.org.signal.chat.keys.GetPreKeysRequestR\arequest\x128\n" + + "\x17unidentified_access_key\x18\x02 \x01(\fH\x00R\x15unidentifiedAccessKey\x12*\n" + + "\x10group_send_token\x18\x03 \x01(\fH\x00R\x0egroupSendToken\x12I\n" + + "\x13unrestricted_access\x18\x04 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x12unrestrictedAccessB\x0f\n" + + "\rauthorization\"\xb9\x02\n" + + "\x12DevicePreKeyBundle\x12Q\n" + + "\x11ec_signed_pre_key\x18\x01 \x01(\v2&.org.signal.chat.common.EcSignedPreKeyR\x0eecSignedPreKey\x12N\n" + + "\x13ec_one_time_pre_key\x18\x02 \x01(\v2 .org.signal.chat.common.EcPreKeyR\x0fecOneTimePreKey\x12W\n" + + "\x14kem_one_time_pre_key\x18\x03 \x01(\v2'.org.signal.chat.common.KemSignedPreKeyR\x10kemOneTimePreKey\x12'\n" + + "\x0fregistration_id\x18\x04 \x01(\rR\x0eregistrationId\"\xa5\x03\n" + + "\x14AccountPreKeyBundles\x12!\n" + + "\fidentity_key\x18\x01 \x01(\fR\videntityKey\x12e\n" + + "\x0fdevice_pre_keys\x18\x02 \x03(\v2=.org.signal.chat.keys.AccountPreKeyBundles.DevicePreKeysEntryR\rdevicePreKeys\x12H\n" + + " unrestricted_unidentified_access\x18\x03 \x01(\bR\x1eunrestrictedUnidentifiedAccess\x12M\n" + + "#unidentified_access_key_fingerprint\x18\x04 \x01(\fR unidentifiedAccessKeyFingerprint\x1aj\n" + + "\x12DevicePreKeysEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12>\n" + + "\x05value\x18\x02 \x01(\v2(.org.signal.chat.keys.DevicePreKeyBundleR\x05value:\x028\x01\"\xc6\x01\n" + + "\x12GetPreKeysResponse\x12G\n" + + "\bpre_keys\x18\x01 \x01(\v2*.org.signal.chat.keys.AccountPreKeyBundlesH\x00R\apreKeys\x12[\n" + + "\x10target_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\x0etargetNotFoundB\n" + + "\n" + + "\bresponse\"\xfe\x02\n" + + "\x1bGetPreKeysAnonymousResponse\x12G\n" + + "\bpre_keys\x18\x01 \x01(\v2*.org.signal.chat.keys.AccountPreKeyBundlesH\x00R\apreKeys\x12[\n" + + "\x10target_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\x0etargetNotFound\x12\xac\x01\n" + + "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + + "\n" + + "\bresponse\"\xae\x01\n" + + "\x1aSetOneTimeEcPreKeysRequest\x12I\n" + + "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeR\fidentityType\x12E\n" + + "\bpre_keys\x18\x02 \x03(\v2 .org.signal.chat.common.EcPreKeyB\b\x9a\x97\"\x04\b\x01\x10dR\apreKeys\"\xbc\x01\n" + + "!SetOneTimeKemSignedPreKeysRequest\x12I\n" + + "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeR\fidentityType\x12L\n" + + "\bpre_keys\x18\x02 \x03(\v2'.org.signal.chat.common.KemSignedPreKeyB\b\x9a\x97\"\x04\b\x01\x10dR\apreKeys\"\xb9\x01\n" + + "\x18SetEcSignedPreKeyRequest\x12I\n" + + "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeR\fidentityType\x12R\n" + + "\x0esigned_pre_key\x18\x02 \x01(\v2&.org.signal.chat.common.EcSignedPreKeyB\x04\xb8\x97\"\x01R\fsignedPreKey\"\xbf\x01\n" + + "\x1dSetKemLastResortPreKeyRequest\x12I\n" + + "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeR\fidentityType\x12S\n" + + "\x0esigned_pre_key\x18\x02 \x01(\v2'.org.signal.chat.common.KemSignedPreKeyB\x04\xb8\x97\"\x01R\fsignedPreKey\"\x13\n" + + "\x11SetPreKeyResponse\"\x9a\x01\n" + + "\x17CheckIdentityKeyRequest\x12V\n" + + "\x11target_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x10targetIdentifier\x12'\n" + + "\vfingerprint\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x04R\vfingerprint\"\x95\x01\n" + + "\x18CheckIdentityKeyResponse\x12V\n" + + "\x11target_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x10targetIdentifier\x12!\n" + + "\fidentity_key\x18\x02 \x01(\fR\videntityKey2\xbf\x05\n" + + "\x04Keys\x12m\n" + + "\x0eGetPreKeyCount\x12+.org.signal.chat.keys.GetPreKeyCountRequest\x1a,.org.signal.chat.keys.GetPreKeyCountResponse\"\x00\x12a\n" + + "\n" + + "GetPreKeys\x12'.org.signal.chat.keys.GetPreKeysRequest\x1a(.org.signal.chat.keys.GetPreKeysResponse\"\x00\x12r\n" + + "\x13SetOneTimeEcPreKeys\x120.org.signal.chat.keys.SetOneTimeEcPreKeysRequest\x1a'.org.signal.chat.keys.SetPreKeyResponse\"\x00\x12\x80\x01\n" + + "\x1aSetOneTimeKemSignedPreKeys\x127.org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest\x1a'.org.signal.chat.keys.SetPreKeyResponse\"\x00\x12n\n" + + "\x11SetEcSignedPreKey\x12..org.signal.chat.keys.SetEcSignedPreKeyRequest\x1a'.org.signal.chat.keys.SetPreKeyResponse\"\x00\x12x\n" + + "\x16SetKemLastResortPreKey\x123.org.signal.chat.keys.SetKemLastResortPreKeyRequest\x1a'.org.signal.chat.keys.SetPreKeyResponse\"\x00\x1a\x04\xc8\xd5\"\x012\x84\x02\n" + + "\rKeysAnonymous\x12s\n" + + "\n" + + "GetPreKeys\x120.org.signal.chat.keys.GetPreKeysAnonymousRequest\x1a1.org.signal.chat.keys.GetPreKeysAnonymousResponse\"\x00\x12x\n" + + "\x11CheckIdentityKeys\x12-.org.signal.chat.keys.CheckIdentityKeyRequest\x1a..org.signal.chat.keys.CheckIdentityKeyResponse\"\x00(\x010\x01\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_keys_proto_rawDescOnce sync.Once + file_org_signal_chat_keys_proto_rawDescData []byte +) + +func file_org_signal_chat_keys_proto_rawDescGZIP() []byte { + file_org_signal_chat_keys_proto_rawDescOnce.Do(func() { + file_org_signal_chat_keys_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_keys_proto_rawDesc), len(file_org_signal_chat_keys_proto_rawDesc))) + }) + return file_org_signal_chat_keys_proto_rawDescData +} + +var file_org_signal_chat_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_org_signal_chat_keys_proto_goTypes = []any{ + (*GetPreKeyCountRequest)(nil), // 0: org.signal.chat.keys.GetPreKeyCountRequest + (*GetPreKeyCountResponse)(nil), // 1: org.signal.chat.keys.GetPreKeyCountResponse + (*GetPreKeysRequest)(nil), // 2: org.signal.chat.keys.GetPreKeysRequest + (*GetPreKeysAnonymousRequest)(nil), // 3: org.signal.chat.keys.GetPreKeysAnonymousRequest + (*DevicePreKeyBundle)(nil), // 4: org.signal.chat.keys.DevicePreKeyBundle + (*AccountPreKeyBundles)(nil), // 5: org.signal.chat.keys.AccountPreKeyBundles + (*GetPreKeysResponse)(nil), // 6: org.signal.chat.keys.GetPreKeysResponse + (*GetPreKeysAnonymousResponse)(nil), // 7: org.signal.chat.keys.GetPreKeysAnonymousResponse + (*SetOneTimeEcPreKeysRequest)(nil), // 8: org.signal.chat.keys.SetOneTimeEcPreKeysRequest + (*SetOneTimeKemSignedPreKeysRequest)(nil), // 9: org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest + (*SetEcSignedPreKeyRequest)(nil), // 10: org.signal.chat.keys.SetEcSignedPreKeyRequest + (*SetKemLastResortPreKeyRequest)(nil), // 11: org.signal.chat.keys.SetKemLastResortPreKeyRequest + (*SetPreKeyResponse)(nil), // 12: org.signal.chat.keys.SetPreKeyResponse + (*CheckIdentityKeyRequest)(nil), // 13: org.signal.chat.keys.CheckIdentityKeyRequest + (*CheckIdentityKeyResponse)(nil), // 14: org.signal.chat.keys.CheckIdentityKeyResponse + nil, // 15: org.signal.chat.keys.AccountPreKeyBundles.DevicePreKeysEntry + (*common.ServiceIdentifier)(nil), // 16: org.signal.chat.common.ServiceIdentifier + (*emptypb.Empty)(nil), // 17: google.protobuf.Empty + (*common.EcSignedPreKey)(nil), // 18: org.signal.chat.common.EcSignedPreKey + (*common.EcPreKey)(nil), // 19: org.signal.chat.common.EcPreKey + (*common.KemSignedPreKey)(nil), // 20: org.signal.chat.common.KemSignedPreKey + (*errors.NotFound)(nil), // 21: org.signal.chat.errors.NotFound + (*errors.FailedUnidentifiedAuthorization)(nil), // 22: org.signal.chat.errors.FailedUnidentifiedAuthorization + (common.IdentityType)(0), // 23: org.signal.chat.common.IdentityType +} +var file_org_signal_chat_keys_proto_depIdxs = []int32{ + 16, // 0: org.signal.chat.keys.GetPreKeysRequest.target_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 2, // 1: org.signal.chat.keys.GetPreKeysAnonymousRequest.request:type_name -> org.signal.chat.keys.GetPreKeysRequest + 17, // 2: org.signal.chat.keys.GetPreKeysAnonymousRequest.unrestricted_access:type_name -> google.protobuf.Empty + 18, // 3: org.signal.chat.keys.DevicePreKeyBundle.ec_signed_pre_key:type_name -> org.signal.chat.common.EcSignedPreKey + 19, // 4: org.signal.chat.keys.DevicePreKeyBundle.ec_one_time_pre_key:type_name -> org.signal.chat.common.EcPreKey + 20, // 5: org.signal.chat.keys.DevicePreKeyBundle.kem_one_time_pre_key:type_name -> org.signal.chat.common.KemSignedPreKey + 15, // 6: org.signal.chat.keys.AccountPreKeyBundles.device_pre_keys:type_name -> org.signal.chat.keys.AccountPreKeyBundles.DevicePreKeysEntry + 5, // 7: org.signal.chat.keys.GetPreKeysResponse.pre_keys:type_name -> org.signal.chat.keys.AccountPreKeyBundles + 21, // 8: org.signal.chat.keys.GetPreKeysResponse.target_not_found:type_name -> org.signal.chat.errors.NotFound + 5, // 9: org.signal.chat.keys.GetPreKeysAnonymousResponse.pre_keys:type_name -> org.signal.chat.keys.AccountPreKeyBundles + 21, // 10: org.signal.chat.keys.GetPreKeysAnonymousResponse.target_not_found:type_name -> org.signal.chat.errors.NotFound + 22, // 11: org.signal.chat.keys.GetPreKeysAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 23, // 12: org.signal.chat.keys.SetOneTimeEcPreKeysRequest.identity_type:type_name -> org.signal.chat.common.IdentityType + 19, // 13: org.signal.chat.keys.SetOneTimeEcPreKeysRequest.pre_keys:type_name -> org.signal.chat.common.EcPreKey + 23, // 14: org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest.identity_type:type_name -> org.signal.chat.common.IdentityType + 20, // 15: org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest.pre_keys:type_name -> org.signal.chat.common.KemSignedPreKey + 23, // 16: org.signal.chat.keys.SetEcSignedPreKeyRequest.identity_type:type_name -> org.signal.chat.common.IdentityType + 18, // 17: org.signal.chat.keys.SetEcSignedPreKeyRequest.signed_pre_key:type_name -> org.signal.chat.common.EcSignedPreKey + 23, // 18: org.signal.chat.keys.SetKemLastResortPreKeyRequest.identity_type:type_name -> org.signal.chat.common.IdentityType + 20, // 19: org.signal.chat.keys.SetKemLastResortPreKeyRequest.signed_pre_key:type_name -> org.signal.chat.common.KemSignedPreKey + 16, // 20: org.signal.chat.keys.CheckIdentityKeyRequest.target_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 16, // 21: org.signal.chat.keys.CheckIdentityKeyResponse.target_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 4, // 22: org.signal.chat.keys.AccountPreKeyBundles.DevicePreKeysEntry.value:type_name -> org.signal.chat.keys.DevicePreKeyBundle + 0, // 23: org.signal.chat.keys.Keys.GetPreKeyCount:input_type -> org.signal.chat.keys.GetPreKeyCountRequest + 2, // 24: org.signal.chat.keys.Keys.GetPreKeys:input_type -> org.signal.chat.keys.GetPreKeysRequest + 8, // 25: org.signal.chat.keys.Keys.SetOneTimeEcPreKeys:input_type -> org.signal.chat.keys.SetOneTimeEcPreKeysRequest + 9, // 26: org.signal.chat.keys.Keys.SetOneTimeKemSignedPreKeys:input_type -> org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest + 10, // 27: org.signal.chat.keys.Keys.SetEcSignedPreKey:input_type -> org.signal.chat.keys.SetEcSignedPreKeyRequest + 11, // 28: org.signal.chat.keys.Keys.SetKemLastResortPreKey:input_type -> org.signal.chat.keys.SetKemLastResortPreKeyRequest + 3, // 29: org.signal.chat.keys.KeysAnonymous.GetPreKeys:input_type -> org.signal.chat.keys.GetPreKeysAnonymousRequest + 13, // 30: org.signal.chat.keys.KeysAnonymous.CheckIdentityKeys:input_type -> org.signal.chat.keys.CheckIdentityKeyRequest + 1, // 31: org.signal.chat.keys.Keys.GetPreKeyCount:output_type -> org.signal.chat.keys.GetPreKeyCountResponse + 6, // 32: org.signal.chat.keys.Keys.GetPreKeys:output_type -> org.signal.chat.keys.GetPreKeysResponse + 12, // 33: org.signal.chat.keys.Keys.SetOneTimeEcPreKeys:output_type -> org.signal.chat.keys.SetPreKeyResponse + 12, // 34: org.signal.chat.keys.Keys.SetOneTimeKemSignedPreKeys:output_type -> org.signal.chat.keys.SetPreKeyResponse + 12, // 35: org.signal.chat.keys.Keys.SetEcSignedPreKey:output_type -> org.signal.chat.keys.SetPreKeyResponse + 12, // 36: org.signal.chat.keys.Keys.SetKemLastResortPreKey:output_type -> org.signal.chat.keys.SetPreKeyResponse + 7, // 37: org.signal.chat.keys.KeysAnonymous.GetPreKeys:output_type -> org.signal.chat.keys.GetPreKeysAnonymousResponse + 14, // 38: org.signal.chat.keys.KeysAnonymous.CheckIdentityKeys:output_type -> org.signal.chat.keys.CheckIdentityKeyResponse + 31, // [31:39] is the sub-list for method output_type + 23, // [23:31] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_keys_proto_init() } +func file_org_signal_chat_keys_proto_init() { + if File_org_signal_chat_keys_proto != nil { + return + } + file_org_signal_chat_keys_proto_msgTypes[2].OneofWrappers = []any{} + file_org_signal_chat_keys_proto_msgTypes[3].OneofWrappers = []any{ + (*GetPreKeysAnonymousRequest_UnidentifiedAccessKey)(nil), + (*GetPreKeysAnonymousRequest_GroupSendToken)(nil), + (*GetPreKeysAnonymousRequest_UnrestrictedAccess)(nil), + } + file_org_signal_chat_keys_proto_msgTypes[6].OneofWrappers = []any{ + (*GetPreKeysResponse_PreKeys)(nil), + (*GetPreKeysResponse_TargetNotFound)(nil), + } + file_org_signal_chat_keys_proto_msgTypes[7].OneofWrappers = []any{ + (*GetPreKeysAnonymousResponse_PreKeys)(nil), + (*GetPreKeysAnonymousResponse_TargetNotFound)(nil), + (*GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_keys_proto_rawDesc), len(file_org_signal_chat_keys_proto_rawDesc)), + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_org_signal_chat_keys_proto_goTypes, + DependencyIndexes: file_org_signal_chat_keys_proto_depIdxs, + MessageInfos: file_org_signal_chat_keys_proto_msgTypes, + }.Build() + File_org_signal_chat_keys_proto = out.File + file_org_signal_chat_keys_proto_goTypes = nil + file_org_signal_chat_keys_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/keys/keys_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/keys/keys_grpc.pb.go new file mode 100644 index 0000000..c2a20c4 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/keys/keys_grpc.pb.go @@ -0,0 +1,524 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/keys.proto + +package keys + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Keys_GetPreKeyCount_FullMethodName = "/org.signal.chat.keys.Keys/GetPreKeyCount" + Keys_GetPreKeys_FullMethodName = "/org.signal.chat.keys.Keys/GetPreKeys" + Keys_SetOneTimeEcPreKeys_FullMethodName = "/org.signal.chat.keys.Keys/SetOneTimeEcPreKeys" + Keys_SetOneTimeKemSignedPreKeys_FullMethodName = "/org.signal.chat.keys.Keys/SetOneTimeKemSignedPreKeys" + Keys_SetEcSignedPreKey_FullMethodName = "/org.signal.chat.keys.Keys/SetEcSignedPreKey" + Keys_SetKemLastResortPreKey_FullMethodName = "/org.signal.chat.keys.Keys/SetKemLastResortPreKey" +) + +// KeysClient is the client API for Keys service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for working with pre-keys. +type KeysClient interface { + // Retrieves an approximate count of the number of the various kinds of + // pre-keys stored for the authenticated device. + GetPreKeyCount(ctx context.Context, in *GetPreKeyCountRequest, opts ...grpc.CallOption) (*GetPreKeyCountResponse, error) + // Retrieves a set of pre-keys for establishing a session with the targeted + // device or devices. Note that callers with an unidentified access key for + // the targeted account should use the version of this method in + // `KeysAnonymous` instead. + GetPreKeys(ctx context.Context, in *GetPreKeysRequest, opts ...grpc.CallOption) (*GetPreKeysResponse, error) + // Uploads a new set of one-time EC pre-keys for the authenticated device, + // clearing any previously-stored pre-keys. Note that all keys submitted via + // a single call to this method _must_ have the same identity type (i.e. if + // the first key has an ACI identity type, then all other keys in the same + // stream must also have an ACI identity type). The provided list of pre-keys + // must be non-empty. + SetOneTimeEcPreKeys(ctx context.Context, in *SetOneTimeEcPreKeysRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) + // Uploads a new set of one-time KEM pre-keys for the authenticated device, + // clearing any previously-stored pre-keys. Note that all keys submitted via + // a single call to this method _must_ have the same identity type (i.e. if + // the first key has an ACI identity type, then all other keys in the same + // stream must also have an ACI identity type). The provided list of pre-keys + // must be non-empty. + SetOneTimeKemSignedPreKeys(ctx context.Context, in *SetOneTimeKemSignedPreKeysRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) + // Sets the signed EC pre-key for one identity (i.e. ACI or PNI) associated + // with the authenticated device. + SetEcSignedPreKey(ctx context.Context, in *SetEcSignedPreKeyRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) + // Sets the last-resort KEM pre-key for one identity (i.e. ACI or PNI) + // associated with the authenticated device. + SetKemLastResortPreKey(ctx context.Context, in *SetKemLastResortPreKeyRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) +} + +type keysClient struct { + cc grpc.ClientConnInterface +} + +func NewKeysClient(cc grpc.ClientConnInterface) KeysClient { + return &keysClient{cc} +} + +func (c *keysClient) GetPreKeyCount(ctx context.Context, in *GetPreKeyCountRequest, opts ...grpc.CallOption) (*GetPreKeyCountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPreKeyCountResponse) + err := c.cc.Invoke(ctx, Keys_GetPreKeyCount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) GetPreKeys(ctx context.Context, in *GetPreKeysRequest, opts ...grpc.CallOption) (*GetPreKeysResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPreKeysResponse) + err := c.cc.Invoke(ctx, Keys_GetPreKeys_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) SetOneTimeEcPreKeys(ctx context.Context, in *SetOneTimeEcPreKeysRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPreKeyResponse) + err := c.cc.Invoke(ctx, Keys_SetOneTimeEcPreKeys_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) SetOneTimeKemSignedPreKeys(ctx context.Context, in *SetOneTimeKemSignedPreKeysRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPreKeyResponse) + err := c.cc.Invoke(ctx, Keys_SetOneTimeKemSignedPreKeys_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) SetEcSignedPreKey(ctx context.Context, in *SetEcSignedPreKeyRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPreKeyResponse) + err := c.cc.Invoke(ctx, Keys_SetEcSignedPreKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) SetKemLastResortPreKey(ctx context.Context, in *SetKemLastResortPreKeyRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPreKeyResponse) + err := c.cc.Invoke(ctx, Keys_SetKemLastResortPreKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KeysServer is the server API for Keys service. +// All implementations must embed UnimplementedKeysServer +// for forward compatibility. +// +// Provides methods for working with pre-keys. +type KeysServer interface { + // Retrieves an approximate count of the number of the various kinds of + // pre-keys stored for the authenticated device. + GetPreKeyCount(context.Context, *GetPreKeyCountRequest) (*GetPreKeyCountResponse, error) + // Retrieves a set of pre-keys for establishing a session with the targeted + // device or devices. Note that callers with an unidentified access key for + // the targeted account should use the version of this method in + // `KeysAnonymous` instead. + GetPreKeys(context.Context, *GetPreKeysRequest) (*GetPreKeysResponse, error) + // Uploads a new set of one-time EC pre-keys for the authenticated device, + // clearing any previously-stored pre-keys. Note that all keys submitted via + // a single call to this method _must_ have the same identity type (i.e. if + // the first key has an ACI identity type, then all other keys in the same + // stream must also have an ACI identity type). The provided list of pre-keys + // must be non-empty. + SetOneTimeEcPreKeys(context.Context, *SetOneTimeEcPreKeysRequest) (*SetPreKeyResponse, error) + // Uploads a new set of one-time KEM pre-keys for the authenticated device, + // clearing any previously-stored pre-keys. Note that all keys submitted via + // a single call to this method _must_ have the same identity type (i.e. if + // the first key has an ACI identity type, then all other keys in the same + // stream must also have an ACI identity type). The provided list of pre-keys + // must be non-empty. + SetOneTimeKemSignedPreKeys(context.Context, *SetOneTimeKemSignedPreKeysRequest) (*SetPreKeyResponse, error) + // Sets the signed EC pre-key for one identity (i.e. ACI or PNI) associated + // with the authenticated device. + SetEcSignedPreKey(context.Context, *SetEcSignedPreKeyRequest) (*SetPreKeyResponse, error) + // Sets the last-resort KEM pre-key for one identity (i.e. ACI or PNI) + // associated with the authenticated device. + SetKemLastResortPreKey(context.Context, *SetKemLastResortPreKeyRequest) (*SetPreKeyResponse, error) + mustEmbedUnimplementedKeysServer() +} + +// UnimplementedKeysServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedKeysServer struct{} + +func (UnimplementedKeysServer) GetPreKeyCount(context.Context, *GetPreKeyCountRequest) (*GetPreKeyCountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPreKeyCount not implemented") +} +func (UnimplementedKeysServer) GetPreKeys(context.Context, *GetPreKeysRequest) (*GetPreKeysResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPreKeys not implemented") +} +func (UnimplementedKeysServer) SetOneTimeEcPreKeys(context.Context, *SetOneTimeEcPreKeysRequest) (*SetPreKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetOneTimeEcPreKeys not implemented") +} +func (UnimplementedKeysServer) SetOneTimeKemSignedPreKeys(context.Context, *SetOneTimeKemSignedPreKeysRequest) (*SetPreKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetOneTimeKemSignedPreKeys not implemented") +} +func (UnimplementedKeysServer) SetEcSignedPreKey(context.Context, *SetEcSignedPreKeyRequest) (*SetPreKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetEcSignedPreKey not implemented") +} +func (UnimplementedKeysServer) SetKemLastResortPreKey(context.Context, *SetKemLastResortPreKeyRequest) (*SetPreKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetKemLastResortPreKey not implemented") +} +func (UnimplementedKeysServer) mustEmbedUnimplementedKeysServer() {} +func (UnimplementedKeysServer) testEmbeddedByValue() {} + +// UnsafeKeysServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KeysServer will +// result in compilation errors. +type UnsafeKeysServer interface { + mustEmbedUnimplementedKeysServer() +} + +func RegisterKeysServer(s grpc.ServiceRegistrar, srv KeysServer) { + // If the following call panics, it indicates UnimplementedKeysServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Keys_ServiceDesc, srv) +} + +func _Keys_GetPreKeyCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPreKeyCountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).GetPreKeyCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Keys_GetPreKeyCount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).GetPreKeyCount(ctx, req.(*GetPreKeyCountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_GetPreKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPreKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).GetPreKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Keys_GetPreKeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).GetPreKeys(ctx, req.(*GetPreKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_SetOneTimeEcPreKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetOneTimeEcPreKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).SetOneTimeEcPreKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Keys_SetOneTimeEcPreKeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).SetOneTimeEcPreKeys(ctx, req.(*SetOneTimeEcPreKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_SetOneTimeKemSignedPreKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetOneTimeKemSignedPreKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).SetOneTimeKemSignedPreKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Keys_SetOneTimeKemSignedPreKeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).SetOneTimeKemSignedPreKeys(ctx, req.(*SetOneTimeKemSignedPreKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_SetEcSignedPreKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetEcSignedPreKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).SetEcSignedPreKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Keys_SetEcSignedPreKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).SetEcSignedPreKey(ctx, req.(*SetEcSignedPreKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_SetKemLastResortPreKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetKemLastResortPreKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).SetKemLastResortPreKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Keys_SetKemLastResortPreKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).SetKemLastResortPreKey(ctx, req.(*SetKemLastResortPreKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Keys_ServiceDesc is the grpc.ServiceDesc for Keys service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Keys_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.keys.Keys", + HandlerType: (*KeysServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPreKeyCount", + Handler: _Keys_GetPreKeyCount_Handler, + }, + { + MethodName: "GetPreKeys", + Handler: _Keys_GetPreKeys_Handler, + }, + { + MethodName: "SetOneTimeEcPreKeys", + Handler: _Keys_SetOneTimeEcPreKeys_Handler, + }, + { + MethodName: "SetOneTimeKemSignedPreKeys", + Handler: _Keys_SetOneTimeKemSignedPreKeys_Handler, + }, + { + MethodName: "SetEcSignedPreKey", + Handler: _Keys_SetEcSignedPreKey_Handler, + }, + { + MethodName: "SetKemLastResortPreKey", + Handler: _Keys_SetKemLastResortPreKey_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/keys.proto", +} + +const ( + KeysAnonymous_GetPreKeys_FullMethodName = "/org.signal.chat.keys.KeysAnonymous/GetPreKeys" + KeysAnonymous_CheckIdentityKeys_FullMethodName = "/org.signal.chat.keys.KeysAnonymous/CheckIdentityKeys" +) + +// KeysAnonymousClient is the client API for KeysAnonymous service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for working with pre-keys using "unidentified access" +// credentials. +type KeysAnonymousClient interface { + // Retrieves a set of pre-keys for establishing a session with the targeted + // device or devices. Callers must not submit any self-identifying credentials + // when calling this method and must instead present the targeted account's + // unidentified access key as an anonymous authentication mechanism. Callers + // without an unidentified access key should use the equivalent, authenticated + // method in `Keys` instead. + GetPreKeys(ctx context.Context, in *GetPreKeysAnonymousRequest, opts ...grpc.CallOption) (*GetPreKeysAnonymousResponse, error) + // Checks identity key fingerprints of the target accounts. + // + // Returns a stream of elements, each one representing an account that had a mismatched + // identity key fingerprint with the server and the corresponding identity key stored by the server. + CheckIdentityKeys(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[CheckIdentityKeyRequest, CheckIdentityKeyResponse], error) +} + +type keysAnonymousClient struct { + cc grpc.ClientConnInterface +} + +func NewKeysAnonymousClient(cc grpc.ClientConnInterface) KeysAnonymousClient { + return &keysAnonymousClient{cc} +} + +func (c *keysAnonymousClient) GetPreKeys(ctx context.Context, in *GetPreKeysAnonymousRequest, opts ...grpc.CallOption) (*GetPreKeysAnonymousResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPreKeysAnonymousResponse) + err := c.cc.Invoke(ctx, KeysAnonymous_GetPreKeys_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysAnonymousClient) CheckIdentityKeys(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[CheckIdentityKeyRequest, CheckIdentityKeyResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &KeysAnonymous_ServiceDesc.Streams[0], KeysAnonymous_CheckIdentityKeys_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[CheckIdentityKeyRequest, CheckIdentityKeyResponse]{ClientStream: stream} + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type KeysAnonymous_CheckIdentityKeysClient = grpc.BidiStreamingClient[CheckIdentityKeyRequest, CheckIdentityKeyResponse] + +// KeysAnonymousServer is the server API for KeysAnonymous service. +// All implementations must embed UnimplementedKeysAnonymousServer +// for forward compatibility. +// +// Provides methods for working with pre-keys using "unidentified access" +// credentials. +type KeysAnonymousServer interface { + // Retrieves a set of pre-keys for establishing a session with the targeted + // device or devices. Callers must not submit any self-identifying credentials + // when calling this method and must instead present the targeted account's + // unidentified access key as an anonymous authentication mechanism. Callers + // without an unidentified access key should use the equivalent, authenticated + // method in `Keys` instead. + GetPreKeys(context.Context, *GetPreKeysAnonymousRequest) (*GetPreKeysAnonymousResponse, error) + // Checks identity key fingerprints of the target accounts. + // + // Returns a stream of elements, each one representing an account that had a mismatched + // identity key fingerprint with the server and the corresponding identity key stored by the server. + CheckIdentityKeys(grpc.BidiStreamingServer[CheckIdentityKeyRequest, CheckIdentityKeyResponse]) error + mustEmbedUnimplementedKeysAnonymousServer() +} + +// UnimplementedKeysAnonymousServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedKeysAnonymousServer struct{} + +func (UnimplementedKeysAnonymousServer) GetPreKeys(context.Context, *GetPreKeysAnonymousRequest) (*GetPreKeysAnonymousResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPreKeys not implemented") +} +func (UnimplementedKeysAnonymousServer) CheckIdentityKeys(grpc.BidiStreamingServer[CheckIdentityKeyRequest, CheckIdentityKeyResponse]) error { + return status.Error(codes.Unimplemented, "method CheckIdentityKeys not implemented") +} +func (UnimplementedKeysAnonymousServer) mustEmbedUnimplementedKeysAnonymousServer() {} +func (UnimplementedKeysAnonymousServer) testEmbeddedByValue() {} + +// UnsafeKeysAnonymousServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KeysAnonymousServer will +// result in compilation errors. +type UnsafeKeysAnonymousServer interface { + mustEmbedUnimplementedKeysAnonymousServer() +} + +func RegisterKeysAnonymousServer(s grpc.ServiceRegistrar, srv KeysAnonymousServer) { + // If the following call panics, it indicates UnimplementedKeysAnonymousServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&KeysAnonymous_ServiceDesc, srv) +} + +func _KeysAnonymous_GetPreKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPreKeysAnonymousRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysAnonymousServer).GetPreKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeysAnonymous_GetPreKeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysAnonymousServer).GetPreKeys(ctx, req.(*GetPreKeysAnonymousRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeysAnonymous_CheckIdentityKeys_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(KeysAnonymousServer).CheckIdentityKeys(&grpc.GenericServerStream[CheckIdentityKeyRequest, CheckIdentityKeyResponse]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type KeysAnonymous_CheckIdentityKeysServer = grpc.BidiStreamingServer[CheckIdentityKeyRequest, CheckIdentityKeyResponse] + +// KeysAnonymous_ServiceDesc is the grpc.ServiceDesc for KeysAnonymous service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var KeysAnonymous_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.keys.KeysAnonymous", + HandlerType: (*KeysAnonymousServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPreKeys", + Handler: _KeysAnonymous_GetPreKeys_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "CheckIdentityKeys", + Handler: _KeysAnonymous_CheckIdentityKeys_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "org/signal/chat/keys.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase.pb.go b/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase.pb.go new file mode 100644 index 0000000..7a75a86 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase.pb.go @@ -0,0 +1,378 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/login_purchase.proto + +package login_purchase + +import ( + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + subscriptions "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/subscriptions" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateLoginReceiptCredentialRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment processor. Currently, only GOOGLE_PLAY_BILLING and + // APPLE_APP_STORE are supported. + Processor subscriptions.PaymentProvider `protobuf:"varint,1,opt,name=processor,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"processor,omitempty"` + // The identifier of a completed purchase for a signal login within the + // payment provider + PurchaseIdentifier string `protobuf:"bytes,2,opt,name=purchase_identifier,json=purchaseIdentifier,proto3" json:"purchase_identifier,omitempty"` + // The receipt credential request. Subsequent retries to create a login + // credential for the same purchase_identifier must use an identical + // receipt_credential_request. + // + // Callers must validate that the generated receipt credential has the + // following properties: + // + // - Level == 300 (The login level) + // - ExpirationTime % 86400 == 0 + // - ExpirationTime == PurchaseTime + (5 * 366 * 86400) +/- (7 * 86400) + ReceiptCredentialRequest []byte `protobuf:"bytes,3,opt,name=receipt_credential_request,json=receiptCredentialRequest,proto3" json:"receipt_credential_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateLoginReceiptCredentialRequest) Reset() { + *x = CreateLoginReceiptCredentialRequest{} + mi := &file_org_signal_chat_login_purchase_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateLoginReceiptCredentialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateLoginReceiptCredentialRequest) ProtoMessage() {} + +func (x *CreateLoginReceiptCredentialRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_login_purchase_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateLoginReceiptCredentialRequest.ProtoReflect.Descriptor instead. +func (*CreateLoginReceiptCredentialRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_login_purchase_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateLoginReceiptCredentialRequest) GetProcessor() subscriptions.PaymentProvider { + if x != nil { + return x.Processor + } + return subscriptions.PaymentProvider(0) +} + +func (x *CreateLoginReceiptCredentialRequest) GetPurchaseIdentifier() string { + if x != nil { + return x.PurchaseIdentifier + } + return "" +} + +func (x *CreateLoginReceiptCredentialRequest) GetReceiptCredentialRequest() []byte { + if x != nil { + return x.ReceiptCredentialRequest + } + return nil +} + +type CreateLoginReceiptCredentialResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *CreateLoginReceiptCredentialResponse_Result + // *CreateLoginReceiptCredentialResponse_PaymentStillProcessing + // *CreateLoginReceiptCredentialResponse_PaymentRequired + // *CreateLoginReceiptCredentialResponse_PaymentNotFound + // *CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued + Response isCreateLoginReceiptCredentialResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateLoginReceiptCredentialResponse) Reset() { + *x = CreateLoginReceiptCredentialResponse{} + mi := &file_org_signal_chat_login_purchase_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateLoginReceiptCredentialResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateLoginReceiptCredentialResponse) ProtoMessage() {} + +func (x *CreateLoginReceiptCredentialResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_login_purchase_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateLoginReceiptCredentialResponse.ProtoReflect.Descriptor instead. +func (*CreateLoginReceiptCredentialResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_login_purchase_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateLoginReceiptCredentialResponse) GetResponse() isCreateLoginReceiptCredentialResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *CreateLoginReceiptCredentialResponse) GetResult() *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult { + if x != nil { + if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_Result); ok { + return x.Result + } + } + return nil +} + +func (x *CreateLoginReceiptCredentialResponse) GetPaymentStillProcessing() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_PaymentStillProcessing); ok { + return x.PaymentStillProcessing + } + } + return nil +} + +func (x *CreateLoginReceiptCredentialResponse) GetPaymentRequired() *subscriptions.PaymentRequired { + if x != nil { + if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_PaymentRequired); ok { + return x.PaymentRequired + } + } + return nil +} + +func (x *CreateLoginReceiptCredentialResponse) GetPaymentNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_PaymentNotFound); ok { + return x.PaymentNotFound + } + } + return nil +} + +func (x *CreateLoginReceiptCredentialResponse) GetReceiptAlreadyIssued() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued); ok { + return x.ReceiptAlreadyIssued + } + } + return nil +} + +type isCreateLoginReceiptCredentialResponse_Response interface { + isCreateLoginReceiptCredentialResponse_Response() +} + +type CreateLoginReceiptCredentialResponse_Result struct { + Result *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type CreateLoginReceiptCredentialResponse_PaymentStillProcessing struct { + // The purchase is still pending with the payment provider. The client may retry later. + PaymentStillProcessing *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=payment_still_processing,json=paymentStillProcessing,proto3,oneof"` +} + +type CreateLoginReceiptCredentialResponse_PaymentRequired struct { + // The purchase did not complete successfully. + PaymentRequired *subscriptions.PaymentRequired `protobuf:"bytes,3,opt,name=payment_required,json=paymentRequired,proto3,oneof"` +} + +type CreateLoginReceiptCredentialResponse_PaymentNotFound struct { + // The payment provider has no purchase with the provided purchase_identifier + PaymentNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=payment_not_found,json=paymentNotFound,proto3,oneof"` +} + +type CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued struct { + // The purchase was already redeemed for a receipt credential, but with a different receipt credential request + ReceiptAlreadyIssued *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=receipt_already_issued,json=receiptAlreadyIssued,proto3,oneof"` +} + +func (*CreateLoginReceiptCredentialResponse_Result) isCreateLoginReceiptCredentialResponse_Response() { +} + +func (*CreateLoginReceiptCredentialResponse_PaymentStillProcessing) isCreateLoginReceiptCredentialResponse_Response() { +} + +func (*CreateLoginReceiptCredentialResponse_PaymentRequired) isCreateLoginReceiptCredentialResponse_Response() { +} + +func (*CreateLoginReceiptCredentialResponse_PaymentNotFound) isCreateLoginReceiptCredentialResponse_Response() { +} + +func (*CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued) isCreateLoginReceiptCredentialResponse_Response() { +} + +type CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReceiptCredentialResponse []byte `protobuf:"bytes,1,opt,name=receipt_credential_response,json=receiptCredentialResponse,proto3" json:"receipt_credential_response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) Reset() { + *x = CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult{} + mi := &file_org_signal_chat_login_purchase_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) ProtoMessage() {} + +func (x *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_login_purchase_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult.ProtoReflect.Descriptor instead. +func (*CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_login_purchase_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) GetReceiptCredentialResponse() []byte { + if x != nil { + return x.ReceiptCredentialResponse + } + return nil +} + +var File_org_signal_chat_login_purchase_proto protoreflect.FileDescriptor + +const file_org_signal_chat_login_purchase_proto_rawDesc = "" + + "\n" + + "$org/signal/chat/login_purchase.proto\x12\x18org.signal.chat.purchase\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\x1a#org/signal/chat/subscriptions.proto\"\xef\x01\n" + + "#CreateLoginReceiptCredentialRequest\x12M\n" + + "\tprocessor\x18\x01 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderB\x04\x90\x97\"\x01R\tprocessor\x125\n" + + "\x13purchase_identifier\x18\x02 \x01(\tB\x04\x88\x97\"\x01R\x12purchaseIdentifier\x12B\n" + + "\x1areceipt_credential_request\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\x18receiptCredentialRequest\"\xf1\x05\n" + + "$CreateLoginReceiptCredentialResponse\x12{\n" + + "\x06result\x18\x01 \x01(\v2a.org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.CreateLoginReceiptCredentialResultH\x00R\x06result\x12\x84\x01\n" + + "\x18payment_still_processing\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18payment_still_processingH\x00R\x16paymentStillProcessing\x12l\n" + + "\x10payment_required\x18\x03 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12e\n" + + "\x11payment_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x15\xc2\xd5\"\x11payment_not_foundH\x00R\x0fpaymentNotFound\x12~\n" + + "\x16receipt_already_issued\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1a\xc2\xd5\"\x16receipt_already_issuedH\x00R\x14receiptAlreadyIssued\x1ad\n" + + "\"CreateLoginReceiptCredentialResult\x12>\n" + + "\x1breceipt_credential_response\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + + "\n" + + "\bresponse2\xb7\x01\n" + + "\rLoginPurchase\x12\x9f\x01\n" + + "\x1cCreateLoginReceiptCredential\x12=.org.signal.chat.purchase.CreateLoginReceiptCredentialRequest\x1a>.org.signal.chat.purchase.CreateLoginReceiptCredentialResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_login_purchase_proto_rawDescOnce sync.Once + file_org_signal_chat_login_purchase_proto_rawDescData []byte +) + +func file_org_signal_chat_login_purchase_proto_rawDescGZIP() []byte { + file_org_signal_chat_login_purchase_proto_rawDescOnce.Do(func() { + file_org_signal_chat_login_purchase_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_login_purchase_proto_rawDesc), len(file_org_signal_chat_login_purchase_proto_rawDesc))) + }) + return file_org_signal_chat_login_purchase_proto_rawDescData +} + +var file_org_signal_chat_login_purchase_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_org_signal_chat_login_purchase_proto_goTypes = []any{ + (*CreateLoginReceiptCredentialRequest)(nil), // 0: org.signal.chat.purchase.CreateLoginReceiptCredentialRequest + (*CreateLoginReceiptCredentialResponse)(nil), // 1: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse + (*CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult)(nil), // 2: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.CreateLoginReceiptCredentialResult + (subscriptions.PaymentProvider)(0), // 3: org.signal.chat.purchase.PaymentProvider + (*errors.FailedPrecondition)(nil), // 4: org.signal.chat.errors.FailedPrecondition + (*subscriptions.PaymentRequired)(nil), // 5: org.signal.chat.purchase.PaymentRequired + (*errors.NotFound)(nil), // 6: org.signal.chat.errors.NotFound +} +var file_org_signal_chat_login_purchase_proto_depIdxs = []int32{ + 3, // 0: org.signal.chat.purchase.CreateLoginReceiptCredentialRequest.processor:type_name -> org.signal.chat.purchase.PaymentProvider + 2, // 1: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.result:type_name -> org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.CreateLoginReceiptCredentialResult + 4, // 2: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.payment_still_processing:type_name -> org.signal.chat.errors.FailedPrecondition + 5, // 3: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired + 6, // 4: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.payment_not_found:type_name -> org.signal.chat.errors.NotFound + 4, // 5: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.receipt_already_issued:type_name -> org.signal.chat.errors.FailedPrecondition + 0, // 6: org.signal.chat.purchase.LoginPurchase.CreateLoginReceiptCredential:input_type -> org.signal.chat.purchase.CreateLoginReceiptCredentialRequest + 1, // 7: org.signal.chat.purchase.LoginPurchase.CreateLoginReceiptCredential:output_type -> org.signal.chat.purchase.CreateLoginReceiptCredentialResponse + 7, // [7:8] is the sub-list for method output_type + 6, // [6:7] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_login_purchase_proto_init() } +func file_org_signal_chat_login_purchase_proto_init() { + if File_org_signal_chat_login_purchase_proto != nil { + return + } + file_org_signal_chat_login_purchase_proto_msgTypes[1].OneofWrappers = []any{ + (*CreateLoginReceiptCredentialResponse_Result)(nil), + (*CreateLoginReceiptCredentialResponse_PaymentStillProcessing)(nil), + (*CreateLoginReceiptCredentialResponse_PaymentRequired)(nil), + (*CreateLoginReceiptCredentialResponse_PaymentNotFound)(nil), + (*CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_login_purchase_proto_rawDesc), len(file_org_signal_chat_login_purchase_proto_rawDesc)), + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_login_purchase_proto_goTypes, + DependencyIndexes: file_org_signal_chat_login_purchase_proto_depIdxs, + MessageInfos: file_org_signal_chat_login_purchase_proto_msgTypes, + }.Build() + File_org_signal_chat_login_purchase_proto = out.File + file_org_signal_chat_login_purchase_proto_goTypes = nil + file_org_signal_chat_login_purchase_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase_grpc.pb.go new file mode 100644 index 0000000..38d4ce3 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase_grpc.pb.go @@ -0,0 +1,135 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/login_purchase.proto + +package login_purchase + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + LoginPurchase_CreateLoginReceiptCredential_FullMethodName = "/org.signal.chat.purchase.LoginPurchase/CreateLoginReceiptCredential" +) + +// LoginPurchaseClient is the client API for LoginPurchase service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Service for one-time purchases of logins +type LoginPurchaseClient interface { + // Obtain a ZK receipt credential for a completed one-time login payment. + // + // The receipt credential can then be presented at registration + CreateLoginReceiptCredential(ctx context.Context, in *CreateLoginReceiptCredentialRequest, opts ...grpc.CallOption) (*CreateLoginReceiptCredentialResponse, error) +} + +type loginPurchaseClient struct { + cc grpc.ClientConnInterface +} + +func NewLoginPurchaseClient(cc grpc.ClientConnInterface) LoginPurchaseClient { + return &loginPurchaseClient{cc} +} + +func (c *loginPurchaseClient) CreateLoginReceiptCredential(ctx context.Context, in *CreateLoginReceiptCredentialRequest, opts ...grpc.CallOption) (*CreateLoginReceiptCredentialResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateLoginReceiptCredentialResponse) + err := c.cc.Invoke(ctx, LoginPurchase_CreateLoginReceiptCredential_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// LoginPurchaseServer is the server API for LoginPurchase service. +// All implementations must embed UnimplementedLoginPurchaseServer +// for forward compatibility. +// +// Service for one-time purchases of logins +type LoginPurchaseServer interface { + // Obtain a ZK receipt credential for a completed one-time login payment. + // + // The receipt credential can then be presented at registration + CreateLoginReceiptCredential(context.Context, *CreateLoginReceiptCredentialRequest) (*CreateLoginReceiptCredentialResponse, error) + mustEmbedUnimplementedLoginPurchaseServer() +} + +// UnimplementedLoginPurchaseServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedLoginPurchaseServer struct{} + +func (UnimplementedLoginPurchaseServer) CreateLoginReceiptCredential(context.Context, *CreateLoginReceiptCredentialRequest) (*CreateLoginReceiptCredentialResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateLoginReceiptCredential not implemented") +} +func (UnimplementedLoginPurchaseServer) mustEmbedUnimplementedLoginPurchaseServer() {} +func (UnimplementedLoginPurchaseServer) testEmbeddedByValue() {} + +// UnsafeLoginPurchaseServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LoginPurchaseServer will +// result in compilation errors. +type UnsafeLoginPurchaseServer interface { + mustEmbedUnimplementedLoginPurchaseServer() +} + +func RegisterLoginPurchaseServer(s grpc.ServiceRegistrar, srv LoginPurchaseServer) { + // If the following call panics, it indicates UnimplementedLoginPurchaseServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&LoginPurchase_ServiceDesc, srv) +} + +func _LoginPurchase_CreateLoginReceiptCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateLoginReceiptCredentialRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LoginPurchaseServer).CreateLoginReceiptCredential(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LoginPurchase_CreateLoginReceiptCredential_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LoginPurchaseServer).CreateLoginReceiptCredential(ctx, req.(*CreateLoginReceiptCredentialRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// LoginPurchase_ServiceDesc is the grpc.ServiceDesc for LoginPurchase service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var LoginPurchase_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.purchase.LoginPurchase", + HandlerType: (*LoginPurchaseServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateLoginReceiptCredential", + Handler: _LoginPurchase_CreateLoginReceiptCredential_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/login_purchase.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go b/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go new file mode 100644 index 0000000..2286bd3 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go @@ -0,0 +1,1986 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/messages.proto + +package messages + +import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SendMessageType int32 + +const ( + SendMessageType_UNSPECIFIED SendMessageType = 0 + // A double-ratchet message represents a "normal," "unsealed-sender" message + // encrypted using the Double Ratchet within an established Signal session. + SendMessageType_DOUBLE_RATCHET SendMessageType = 1 + // A prekey message begins a new Signal session. The `content` of a prekey + // message is a superset of a double-ratchet message's `content` and + // contains the sender's identity public key and information identifying the + // pre-keys used in the message's ciphertext. + SendMessageType_PREKEY_MESSAGE SendMessageType = 2 + // A plaintext message is used solely to convey encryption error receipts + // and never contains encrypted message content. Encryption error receipts + // must be delivered in plaintext because encryption/decryption of a prior + // message failed and there is no reason to believe that + // encryption/decryption of subsequent messages with the same key material + // would succeed. + // + // Critically, plaintext messages never have "real" message content + // generated by users. Plaintext messages include sender information. + SendMessageType_PLAINTEXT_CONTENT SendMessageType = 3 + // An unidentified sender message is an encrypted message. No other + // information about the type of the encrypted message is known to the server. + // + // Unidenitfied sender messages require an unidentified access token or a + // group send endorsement token to prove the unidentified sender is authorized + // to send messages to the destination. + SendMessageType_UNIDENTIFIED_SENDER SendMessageType = 4 +) + +// Enum value maps for SendMessageType. +var ( + SendMessageType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "DOUBLE_RATCHET", + 2: "PREKEY_MESSAGE", + 3: "PLAINTEXT_CONTENT", + 4: "UNIDENTIFIED_SENDER", + } + SendMessageType_value = map[string]int32{ + "UNSPECIFIED": 0, + "DOUBLE_RATCHET": 1, + "PREKEY_MESSAGE": 2, + "PLAINTEXT_CONTENT": 3, + "UNIDENTIFIED_SENDER": 4, + } +) + +func (x SendMessageType) Enum() *SendMessageType { + p := new(SendMessageType) + *p = x + return p +} + +func (x SendMessageType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SendMessageType) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_messages_proto_enumTypes[0].Descriptor() +} + +func (SendMessageType) Type() protoreflect.EnumType { + return &file_org_signal_chat_messages_proto_enumTypes[0] +} + +func (x SendMessageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SendMessageType.Descriptor instead. +func (SendMessageType) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{0} +} + +type ChallengeRequired_ChallengeType int32 + +const ( + ChallengeRequired_UNSPECIFIED ChallengeRequired_ChallengeType = 0 + // A challenge that callers can fulfill by completing a captcha. + ChallengeRequired_CAPTCHA ChallengeRequired_ChallengeType = 1 + // A challenge that callers can fulfill by supplying a token delivered via + // push notification. + ChallengeRequired_PUSH_CHALLENGE ChallengeRequired_ChallengeType = 2 +) + +// Enum value maps for ChallengeRequired_ChallengeType. +var ( + ChallengeRequired_ChallengeType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CAPTCHA", + 2: "PUSH_CHALLENGE", + } + ChallengeRequired_ChallengeType_value = map[string]int32{ + "UNSPECIFIED": 0, + "CAPTCHA": 1, + "PUSH_CHALLENGE": 2, + } +) + +func (x ChallengeRequired_ChallengeType) Enum() *ChallengeRequired_ChallengeType { + p := new(ChallengeRequired_ChallengeType) + *p = x + return p +} + +func (x ChallengeRequired_ChallengeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChallengeRequired_ChallengeType) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_messages_proto_enumTypes[1].Descriptor() +} + +func (ChallengeRequired_ChallengeType) Type() protoreflect.EnumType { + return &file_org_signal_chat_messages_proto_enumTypes[1] +} + +func (x ChallengeRequired_ChallengeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChallengeRequired_ChallengeType.Descriptor instead. +func (ChallengeRequired_ChallengeType) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{17, 0} +} + +type GetMessagesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Request: + // + // *GetMessagesRequest_Options + // *GetMessagesRequest_ServerGuidAck + Request isGetMessagesRequest_Request `protobuf_oneof:"request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessagesRequest) Reset() { + *x = GetMessagesRequest{} + mi := &file_org_signal_chat_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessagesRequest) ProtoMessage() {} + +func (x *GetMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMessagesRequest.ProtoReflect.Descriptor instead. +func (*GetMessagesRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{0} +} + +func (x *GetMessagesRequest) GetRequest() isGetMessagesRequest_Request { + if x != nil { + return x.Request + } + return nil +} + +func (x *GetMessagesRequest) GetOptions() *GetMessagesRequest_GetMessageOptions { + if x != nil { + if x, ok := x.Request.(*GetMessagesRequest_Options); ok { + return x.Options + } + } + return nil +} + +func (x *GetMessagesRequest) GetServerGuidAck() []byte { + if x != nil { + if x, ok := x.Request.(*GetMessagesRequest_ServerGuidAck); ok { + return x.ServerGuidAck + } + } + return nil +} + +type isGetMessagesRequest_Request interface { + isGetMessagesRequest_Request() +} + +type GetMessagesRequest_Options struct { + // Configuration options for the message stream. Required for the first + // request of the stream, forbidden on subsequent reqeusts. + Options *GetMessagesRequest_GetMessageOptions `protobuf:"bytes,1,opt,name=options,proto3,oneof"` +} + +type GetMessagesRequest_ServerGuidAck struct { + // The server_guid of an envelope previously returned in a + // GetMessagesResponse that has been successfully processed by the caller. + // Forbidden on the first request of the stream, required on subsequent + // requests. + ServerGuidAck []byte `protobuf:"bytes,2,opt,name=server_guid_ack,json=serverGuidAck,proto3,oneof"` +} + +func (*GetMessagesRequest_Options) isGetMessagesRequest_Request() {} + +func (*GetMessagesRequest_ServerGuidAck) isGetMessagesRequest_Request() {} + +// The reason why a GetMessages RPC is being closed by the server. +type GetMessagesStreamClosed struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Reason: + // + // *GetMessagesStreamClosed_ConflictingStream + Reason isGetMessagesStreamClosed_Reason `protobuf_oneof:"reason"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessagesStreamClosed) Reset() { + *x = GetMessagesStreamClosed{} + mi := &file_org_signal_chat_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessagesStreamClosed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessagesStreamClosed) ProtoMessage() {} + +func (x *GetMessagesStreamClosed) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMessagesStreamClosed.ProtoReflect.Descriptor instead. +func (*GetMessagesStreamClosed) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{1} +} + +func (x *GetMessagesStreamClosed) GetReason() isGetMessagesStreamClosed_Reason { + if x != nil { + return x.Reason + } + return nil +} + +func (x *GetMessagesStreamClosed) GetConflictingStream() *emptypb.Empty { + if x != nil { + if x, ok := x.Reason.(*GetMessagesStreamClosed_ConflictingStream); ok { + return x.ConflictingStream + } + } + return nil +} + +type isGetMessagesStreamClosed_Reason interface { + isGetMessagesStreamClosed_Reason() +} + +type GetMessagesStreamClosed_ConflictingStream struct { + // Another caller has opened a GetMessages stream for the same device. + ConflictingStream *emptypb.Empty `protobuf:"bytes,1,opt,name=conflicting_stream,json=conflictingStream,proto3,oneof"` +} + +func (*GetMessagesStreamClosed_ConflictingStream) isGetMessagesStreamClosed_Reason() {} + +type GetMessagesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetMessagesResponse_Envelope + // *GetMessagesResponse_QueueEmpty + Response isGetMessagesResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessagesResponse) Reset() { + *x = GetMessagesResponse{} + mi := &file_org_signal_chat_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessagesResponse) ProtoMessage() {} + +func (x *GetMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMessagesResponse.ProtoReflect.Descriptor instead. +func (*GetMessagesResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{2} +} + +func (x *GetMessagesResponse) GetResponse() isGetMessagesResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetMessagesResponse) GetEnvelope() *signalpb.Envelope { + if x != nil { + if x, ok := x.Response.(*GetMessagesResponse_Envelope); ok { + return x.Envelope + } + } + return nil +} + +func (x *GetMessagesResponse) GetQueueEmpty() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*GetMessagesResponse_QueueEmpty); ok { + return x.QueueEmpty + } + } + return nil +} + +type isGetMessagesResponse_Response interface { + isGetMessagesResponse_Response() +} + +type GetMessagesResponse_Envelope struct { + // A message. On successful receipt of an envelope the caller should ack + // the envelope by sending a GetMessagesRequest with the envelope's server + // guid. Acks should only be sent for envelopes received on the currently + // open RPC. + Envelope *signalpb.Envelope `protobuf:"bytes,1,opt,name=envelope,proto3,oneof"` +} + +type GetMessagesResponse_QueueEmpty struct { + // An indicator that all outstanding messages for the device have been + // drained and acked by the client. The stream will remain open and continue + // to deliver newly arrived messages. + QueueEmpty *emptypb.Empty `protobuf:"bytes,2,opt,name=queue_empty,json=queueEmpty,proto3,oneof"` +} + +func (*GetMessagesResponse_Envelope) isGetMessagesResponse_Response() {} + +func (*GetMessagesResponse_QueueEmpty) isGetMessagesResponse_Response() {} + +type IndividualRecipientMessageBundle struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The time, in milliseconds since the epoch, at which this message was + // originally sent from the perspective of the sender. Note that the maximum + // allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date + // for additional details and discussion. + Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // A map of device IDs to individual messages. Generally, callers must include + // one message for each device linked to the destination account. In cases of + // "sync messages" where a sender is distributing information to other devices + // linked to the sender's account, senders may omit a message for the sending + // device. + Messages map[uint32]*IndividualRecipientMessageBundle_Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IndividualRecipientMessageBundle) Reset() { + *x = IndividualRecipientMessageBundle{} + mi := &file_org_signal_chat_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IndividualRecipientMessageBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndividualRecipientMessageBundle) ProtoMessage() {} + +func (x *IndividualRecipientMessageBundle) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IndividualRecipientMessageBundle.ProtoReflect.Descriptor instead. +func (*IndividualRecipientMessageBundle) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{3} +} + +func (x *IndividualRecipientMessageBundle) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *IndividualRecipientMessageBundle) GetMessages() map[uint32]*IndividualRecipientMessageBundle_Message { + if x != nil { + return x.Messages + } + return nil +} + +type SendAuthenticatedSenderMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier of the account to which to deliver the message. + Destination *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + // If true, this message will only be delivered to destination devices that + // have an active message delivery channel with a Signal server. + Ephemeral bool `protobuf:"varint,2,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + Urgent bool `protobuf:"varint,3,opt,name=urgent,proto3" json:"urgent,omitempty"` + // The messages to send to the destination account. + Messages *IndividualRecipientMessageBundle `protobuf:"bytes,4,opt,name=messages,proto3" json:"messages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendAuthenticatedSenderMessageRequest) Reset() { + *x = SendAuthenticatedSenderMessageRequest{} + mi := &file_org_signal_chat_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendAuthenticatedSenderMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendAuthenticatedSenderMessageRequest) ProtoMessage() {} + +func (x *SendAuthenticatedSenderMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendAuthenticatedSenderMessageRequest.ProtoReflect.Descriptor instead. +func (*SendAuthenticatedSenderMessageRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{4} +} + +func (x *SendAuthenticatedSenderMessageRequest) GetDestination() *common.ServiceIdentifier { + if x != nil { + return x.Destination + } + return nil +} + +func (x *SendAuthenticatedSenderMessageRequest) GetEphemeral() bool { + if x != nil { + return x.Ephemeral + } + return false +} + +func (x *SendAuthenticatedSenderMessageRequest) GetUrgent() bool { + if x != nil { + return x.Urgent + } + return false +} + +func (x *SendAuthenticatedSenderMessageRequest) GetMessages() *IndividualRecipientMessageBundle { + if x != nil { + return x.Messages + } + return nil +} + +type SendMessageAuthenticatedSenderResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The outcome of the message delivery + // + // Types that are valid to be assigned to Response: + // + // *SendMessageAuthenticatedSenderResponse_Success + // *SendMessageAuthenticatedSenderResponse_MismatchedDevices + // *SendMessageAuthenticatedSenderResponse_ChallengeRequired + // *SendMessageAuthenticatedSenderResponse_DestinationNotFound + Response isSendMessageAuthenticatedSenderResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendMessageAuthenticatedSenderResponse) Reset() { + *x = SendMessageAuthenticatedSenderResponse{} + mi := &file_org_signal_chat_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendMessageAuthenticatedSenderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMessageAuthenticatedSenderResponse) ProtoMessage() {} + +func (x *SendMessageAuthenticatedSenderResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMessageAuthenticatedSenderResponse.ProtoReflect.Descriptor instead. +func (*SendMessageAuthenticatedSenderResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{5} +} + +func (x *SendMessageAuthenticatedSenderResponse) GetResponse() isSendMessageAuthenticatedSenderResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SendMessageAuthenticatedSenderResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*SendMessageAuthenticatedSenderResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *SendMessageAuthenticatedSenderResponse) GetMismatchedDevices() *MismatchedDevices { + if x != nil { + if x, ok := x.Response.(*SendMessageAuthenticatedSenderResponse_MismatchedDevices); ok { + return x.MismatchedDevices + } + } + return nil +} + +func (x *SendMessageAuthenticatedSenderResponse) GetChallengeRequired() *ChallengeRequired { + if x != nil { + if x, ok := x.Response.(*SendMessageAuthenticatedSenderResponse_ChallengeRequired); ok { + return x.ChallengeRequired + } + } + return nil +} + +func (x *SendMessageAuthenticatedSenderResponse) GetDestinationNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*SendMessageAuthenticatedSenderResponse_DestinationNotFound); ok { + return x.DestinationNotFound + } + } + return nil +} + +type isSendMessageAuthenticatedSenderResponse_Response interface { + isSendMessageAuthenticatedSenderResponse_Response() +} + +type SendMessageAuthenticatedSenderResponse_Success struct { + // The message was successfully delivered to all destination devices + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type SendMessageAuthenticatedSenderResponse_MismatchedDevices struct { + // A list of discrepancies between the destination devices identified in a + // request to send a message and the devices that are actually linked to an + // account. + MismatchedDevices *MismatchedDevices `protobuf:"bytes,2,opt,name=mismatched_devices,json=mismatchedDevices,proto3,oneof"` +} + +type SendMessageAuthenticatedSenderResponse_ChallengeRequired struct { + // A description of a challenge callers must complete before sending + // additional messages. + ChallengeRequired *ChallengeRequired `protobuf:"bytes,3,opt,name=challenge_required,json=challengeRequired,proto3,oneof"` +} + +type SendMessageAuthenticatedSenderResponse_DestinationNotFound struct { + // The destination account did not exist + DestinationNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=destination_not_found,json=destinationNotFound,proto3,oneof"` +} + +func (*SendMessageAuthenticatedSenderResponse_Success) isSendMessageAuthenticatedSenderResponse_Response() { +} + +func (*SendMessageAuthenticatedSenderResponse_MismatchedDevices) isSendMessageAuthenticatedSenderResponse_Response() { +} + +func (*SendMessageAuthenticatedSenderResponse_ChallengeRequired) isSendMessageAuthenticatedSenderResponse_Response() { +} + +func (*SendMessageAuthenticatedSenderResponse_DestinationNotFound) isSendMessageAuthenticatedSenderResponse_Response() { +} + +type SendSyncMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + Urgent bool `protobuf:"varint,1,opt,name=urgent,proto3" json:"urgent,omitempty"` + // The messages to send to the destination account. + Messages *IndividualRecipientMessageBundle `protobuf:"bytes,2,opt,name=messages,proto3" json:"messages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendSyncMessageRequest) Reset() { + *x = SendSyncMessageRequest{} + mi := &file_org_signal_chat_messages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendSyncMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendSyncMessageRequest) ProtoMessage() {} + +func (x *SendSyncMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendSyncMessageRequest.ProtoReflect.Descriptor instead. +func (*SendSyncMessageRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{6} +} + +func (x *SendSyncMessageRequest) GetUrgent() bool { + if x != nil { + return x.Urgent + } + return false +} + +func (x *SendSyncMessageRequest) GetMessages() *IndividualRecipientMessageBundle { + if x != nil { + return x.Messages + } + return nil +} + +type SendSealedSenderMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier of the account to which to deliver the message. + Destination *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + // If true, this message will only be delivered to destination devices that + // have an active message delivery channel with a Signal server. + Ephemeral bool `protobuf:"varint,2,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + Urgent bool `protobuf:"varint,3,opt,name=urgent,proto3" json:"urgent,omitempty"` + // The messages to send to the destination account. + Messages *IndividualRecipientMessageBundle `protobuf:"bytes,4,opt,name=messages,proto3" json:"messages,omitempty"` + // A means to authorize the request. + // + // Types that are valid to be assigned to Authorization: + // + // *SendSealedSenderMessageRequest_UnidentifiedAccessKey + // *SendSealedSenderMessageRequest_GroupSendToken + // *SendSealedSenderMessageRequest_UnrestrictedAccess + Authorization isSendSealedSenderMessageRequest_Authorization `protobuf_oneof:"authorization"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendSealedSenderMessageRequest) Reset() { + *x = SendSealedSenderMessageRequest{} + mi := &file_org_signal_chat_messages_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendSealedSenderMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendSealedSenderMessageRequest) ProtoMessage() {} + +func (x *SendSealedSenderMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendSealedSenderMessageRequest.ProtoReflect.Descriptor instead. +func (*SendSealedSenderMessageRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{7} +} + +func (x *SendSealedSenderMessageRequest) GetDestination() *common.ServiceIdentifier { + if x != nil { + return x.Destination + } + return nil +} + +func (x *SendSealedSenderMessageRequest) GetEphemeral() bool { + if x != nil { + return x.Ephemeral + } + return false +} + +func (x *SendSealedSenderMessageRequest) GetUrgent() bool { + if x != nil { + return x.Urgent + } + return false +} + +func (x *SendSealedSenderMessageRequest) GetMessages() *IndividualRecipientMessageBundle { + if x != nil { + return x.Messages + } + return nil +} + +func (x *SendSealedSenderMessageRequest) GetAuthorization() isSendSealedSenderMessageRequest_Authorization { + if x != nil { + return x.Authorization + } + return nil +} + +func (x *SendSealedSenderMessageRequest) GetUnidentifiedAccessKey() []byte { + if x != nil { + if x, ok := x.Authorization.(*SendSealedSenderMessageRequest_UnidentifiedAccessKey); ok { + return x.UnidentifiedAccessKey + } + } + return nil +} + +func (x *SendSealedSenderMessageRequest) GetGroupSendToken() []byte { + if x != nil { + if x, ok := x.Authorization.(*SendSealedSenderMessageRequest_GroupSendToken); ok { + return x.GroupSendToken + } + } + return nil +} + +func (x *SendSealedSenderMessageRequest) GetUnrestrictedAccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Authorization.(*SendSealedSenderMessageRequest_UnrestrictedAccess); ok { + return x.UnrestrictedAccess + } + } + return nil +} + +type isSendSealedSenderMessageRequest_Authorization interface { + isSendSealedSenderMessageRequest_Authorization() +} + +type SendSealedSenderMessageRequest_UnidentifiedAccessKey struct { + // The unidentified access key (UAK) for the destination account. + UnidentifiedAccessKey []byte `protobuf:"bytes,5,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` +} + +type SendSealedSenderMessageRequest_GroupSendToken struct { + // A group send endorsement token for the destination account. + GroupSendToken []byte `protobuf:"bytes,6,opt,name=group_send_token,json=groupSendToken,proto3,oneof"` +} + +type SendSealedSenderMessageRequest_UnrestrictedAccess struct { + // The destination account allows unrestricted unidentified access + UnrestrictedAccess *emptypb.Empty `protobuf:"bytes,7,opt,name=unrestricted_access,json=unrestrictedAccess,proto3,oneof"` +} + +func (*SendSealedSenderMessageRequest_UnidentifiedAccessKey) isSendSealedSenderMessageRequest_Authorization() { +} + +func (*SendSealedSenderMessageRequest_GroupSendToken) isSendSealedSenderMessageRequest_Authorization() { +} + +func (*SendSealedSenderMessageRequest_UnrestrictedAccess) isSendSealedSenderMessageRequest_Authorization() { +} + +type SendStoryMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier of the account to which to deliver the message. + Destination *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + Urgent bool `protobuf:"varint,2,opt,name=urgent,proto3" json:"urgent,omitempty"` + // The messages to send to the destination account. + Messages *IndividualRecipientMessageBundle `protobuf:"bytes,3,opt,name=messages,proto3" json:"messages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendStoryMessageRequest) Reset() { + *x = SendStoryMessageRequest{} + mi := &file_org_signal_chat_messages_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendStoryMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendStoryMessageRequest) ProtoMessage() {} + +func (x *SendStoryMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendStoryMessageRequest.ProtoReflect.Descriptor instead. +func (*SendStoryMessageRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{8} +} + +func (x *SendStoryMessageRequest) GetDestination() *common.ServiceIdentifier { + if x != nil { + return x.Destination + } + return nil +} + +func (x *SendStoryMessageRequest) GetUrgent() bool { + if x != nil { + return x.Urgent + } + return false +} + +func (x *SendStoryMessageRequest) GetMessages() *IndividualRecipientMessageBundle { + if x != nil { + return x.Messages + } + return nil +} + +type SendMessageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The outcome of the message delivery + // + // Types that are valid to be assigned to Response: + // + // *SendMessageResponse_Success + // *SendMessageResponse_MismatchedDevices + // *SendMessageResponse_FailedUnidentifiedAuthorization + // *SendMessageResponse_DestinationNotFound + Response isSendMessageResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendMessageResponse) Reset() { + *x = SendMessageResponse{} + mi := &file_org_signal_chat_messages_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMessageResponse) ProtoMessage() {} + +func (x *SendMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMessageResponse.ProtoReflect.Descriptor instead. +func (*SendMessageResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{9} +} + +func (x *SendMessageResponse) GetResponse() isSendMessageResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SendMessageResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*SendMessageResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *SendMessageResponse) GetMismatchedDevices() *MismatchedDevices { + if x != nil { + if x, ok := x.Response.(*SendMessageResponse_MismatchedDevices); ok { + return x.MismatchedDevices + } + } + return nil +} + +func (x *SendMessageResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*SendMessageResponse_FailedUnidentifiedAuthorization); ok { + return x.FailedUnidentifiedAuthorization + } + } + return nil +} + +func (x *SendMessageResponse) GetDestinationNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*SendMessageResponse_DestinationNotFound); ok { + return x.DestinationNotFound + } + } + return nil +} + +type isSendMessageResponse_Response interface { + isSendMessageResponse_Response() +} + +type SendMessageResponse_Success struct { + // The message was successfully delivered to all destination devices + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type SendMessageResponse_MismatchedDevices struct { + // A list of discrepancies between the destination devices identified in a + // request to send a message and the devices that are actually linked to an + // account. + MismatchedDevices *MismatchedDevices `protobuf:"bytes,2,opt,name=mismatched_devices,json=mismatchedDevices,proto3,oneof"` +} + +type SendMessageResponse_FailedUnidentifiedAuthorization struct { + // The provided unidentified authorization credential was invalid + FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` +} + +type SendMessageResponse_DestinationNotFound struct { + // The destination account did not exist + DestinationNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=destination_not_found,json=destinationNotFound,proto3,oneof"` +} + +func (*SendMessageResponse_Success) isSendMessageResponse_Response() {} + +func (*SendMessageResponse_MismatchedDevices) isSendMessageResponse_Response() {} + +func (*SendMessageResponse_FailedUnidentifiedAuthorization) isSendMessageResponse_Response() {} + +func (*SendMessageResponse_DestinationNotFound) isSendMessageResponse_Response() {} + +type MultiRecipientMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The time, in milliseconds since the epoch, at which this message was + // originally sent from the perspective of the sender. Note that the maximum + // allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date + // for additional details and discussion. + Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // The serialized multi-recipient message payload. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // 256 KiB payload + (5000 * 100) of overhead + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MultiRecipientMessage) Reset() { + *x = MultiRecipientMessage{} + mi := &file_org_signal_chat_messages_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MultiRecipientMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiRecipientMessage) ProtoMessage() {} + +func (x *MultiRecipientMessage) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MultiRecipientMessage.ProtoReflect.Descriptor instead. +func (*MultiRecipientMessage) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{10} +} + +func (x *MultiRecipientMessage) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *MultiRecipientMessage) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +type SendMultiRecipientMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If true, this message will only be delivered to destination devices that + // have an active message delivery channel with a Signal server. + Ephemeral bool `protobuf:"varint,1,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + Urgent bool `protobuf:"varint,2,opt,name=urgent,proto3" json:"urgent,omitempty"` + // The multi-recipient message to send to all destination accounts and + // devices. + Message *MultiRecipientMessage `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + // A group send endorsement token for the destination account. + GroupSendToken []byte `protobuf:"bytes,4,opt,name=group_send_token,json=groupSendToken,proto3" json:"group_send_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendMultiRecipientMessageRequest) Reset() { + *x = SendMultiRecipientMessageRequest{} + mi := &file_org_signal_chat_messages_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendMultiRecipientMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMultiRecipientMessageRequest) ProtoMessage() {} + +func (x *SendMultiRecipientMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMultiRecipientMessageRequest.ProtoReflect.Descriptor instead. +func (*SendMultiRecipientMessageRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{11} +} + +func (x *SendMultiRecipientMessageRequest) GetEphemeral() bool { + if x != nil { + return x.Ephemeral + } + return false +} + +func (x *SendMultiRecipientMessageRequest) GetUrgent() bool { + if x != nil { + return x.Urgent + } + return false +} + +func (x *SendMultiRecipientMessageRequest) GetMessage() *MultiRecipientMessage { + if x != nil { + return x.Message + } + return nil +} + +func (x *SendMultiRecipientMessageRequest) GetGroupSendToken() []byte { + if x != nil { + return x.GroupSendToken + } + return nil +} + +type SendMultiRecipientStoryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Indicates whether this message is urgent and should trigger a high-priority + // notification if the destination device does not have an active message + // delivery channel with a Signal server + Urgent bool `protobuf:"varint,1,opt,name=urgent,proto3" json:"urgent,omitempty"` + // The multi-recipient story message to send to all destination accounts and + // devices. + Message *MultiRecipientMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendMultiRecipientStoryRequest) Reset() { + *x = SendMultiRecipientStoryRequest{} + mi := &file_org_signal_chat_messages_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendMultiRecipientStoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMultiRecipientStoryRequest) ProtoMessage() {} + +func (x *SendMultiRecipientStoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMultiRecipientStoryRequest.ProtoReflect.Descriptor instead. +func (*SendMultiRecipientStoryRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{12} +} + +func (x *SendMultiRecipientStoryRequest) GetUrgent() bool { + if x != nil { + return x.Urgent + } + return false +} + +func (x *SendMultiRecipientStoryRequest) GetMessage() *MultiRecipientMessage { + if x != nil { + return x.Message + } + return nil +} + +type MultiRecipientSuccess struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of destination service identifiers that could not be resolved to + // registered Signal accounts. The message in the original request was sent + // to all service identifiers/devices in the original request except for the + // destination devices associated with the service identifiers in this list. + UnresolvedRecipients []*common.ServiceIdentifier `protobuf:"bytes,1,rep,name=unresolved_recipients,json=unresolvedRecipients,proto3" json:"unresolved_recipients,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MultiRecipientSuccess) Reset() { + *x = MultiRecipientSuccess{} + mi := &file_org_signal_chat_messages_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MultiRecipientSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiRecipientSuccess) ProtoMessage() {} + +func (x *MultiRecipientSuccess) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MultiRecipientSuccess.ProtoReflect.Descriptor instead. +func (*MultiRecipientSuccess) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{13} +} + +func (x *MultiRecipientSuccess) GetUnresolvedRecipients() []*common.ServiceIdentifier { + if x != nil { + return x.UnresolvedRecipients + } + return nil +} + +type SendMultiRecipientMessageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The outcome of the message delivery + // + // Types that are valid to be assigned to Response: + // + // *SendMultiRecipientMessageResponse_Success + // *SendMultiRecipientMessageResponse_MismatchedDevices + // *SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization + Response isSendMultiRecipientMessageResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendMultiRecipientMessageResponse) Reset() { + *x = SendMultiRecipientMessageResponse{} + mi := &file_org_signal_chat_messages_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendMultiRecipientMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMultiRecipientMessageResponse) ProtoMessage() {} + +func (x *SendMultiRecipientMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendMultiRecipientMessageResponse.ProtoReflect.Descriptor instead. +func (*SendMultiRecipientMessageResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{14} +} + +func (x *SendMultiRecipientMessageResponse) GetResponse() isSendMultiRecipientMessageResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SendMultiRecipientMessageResponse) GetSuccess() *MultiRecipientSuccess { + if x != nil { + if x, ok := x.Response.(*SendMultiRecipientMessageResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *SendMultiRecipientMessageResponse) GetMismatchedDevices() *MultiRecipientMismatchedDevices { + if x != nil { + if x, ok := x.Response.(*SendMultiRecipientMessageResponse_MismatchedDevices); ok { + return x.MismatchedDevices + } + } + return nil +} + +func (x *SendMultiRecipientMessageResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization); ok { + return x.FailedUnidentifiedAuthorization + } + } + return nil +} + +type isSendMultiRecipientMessageResponse_Response interface { + isSendMultiRecipientMessageResponse_Response() +} + +type SendMultiRecipientMessageResponse_Success struct { + // The message was sent to at least some of the destination accounts/devices + // identified in the original request. + Success *MultiRecipientSuccess `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type SendMultiRecipientMessageResponse_MismatchedDevices struct { + // A list of sets of discrepancies between the destination devices + // identified in a request to send a message and the devices that are + // actually linked to a destination account. + MismatchedDevices *MultiRecipientMismatchedDevices `protobuf:"bytes,2,opt,name=mismatched_devices,json=mismatchedDevices,proto3,oneof"` +} + +type SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization struct { + // The provided unidentified authorization credential was invalid + FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` +} + +func (*SendMultiRecipientMessageResponse_Success) isSendMultiRecipientMessageResponse_Response() {} + +func (*SendMultiRecipientMessageResponse_MismatchedDevices) isSendMultiRecipientMessageResponse_Response() { +} + +func (*SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization) isSendMultiRecipientMessageResponse_Response() { +} + +type MismatchedDevices struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier to which the devices named in this object are + // linked. + ServiceIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3" json:"service_identifier,omitempty"` + // A list of device IDs that are linked to the destination account, but were + // not included in the collection of messages bound for the destination + // account. + MissingDevices []uint32 `protobuf:"varint,2,rep,packed,name=missing_devices,json=missingDevices,proto3" json:"missing_devices,omitempty"` + // A list of device IDs that were included in the collection of messages bound + // for the destination account, but are not currently linked to the + // destination account. + ExtraDevices []uint32 `protobuf:"varint,3,rep,packed,name=extra_devices,json=extraDevices,proto3" json:"extra_devices,omitempty"` + // A list of device IDs that present in the collection of messages bound for + // the destination account and are linked to the destination account, but have + // a different registration ID than the registration ID presented by the + // sender (indicating that the destination device has likely been replaced by + // another device). + StaleDevices []uint32 `protobuf:"varint,4,rep,packed,name=stale_devices,json=staleDevices,proto3" json:"stale_devices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MismatchedDevices) Reset() { + *x = MismatchedDevices{} + mi := &file_org_signal_chat_messages_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MismatchedDevices) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MismatchedDevices) ProtoMessage() {} + +func (x *MismatchedDevices) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MismatchedDevices.ProtoReflect.Descriptor instead. +func (*MismatchedDevices) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{15} +} + +func (x *MismatchedDevices) GetServiceIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.ServiceIdentifier + } + return nil +} + +func (x *MismatchedDevices) GetMissingDevices() []uint32 { + if x != nil { + return x.MissingDevices + } + return nil +} + +func (x *MismatchedDevices) GetExtraDevices() []uint32 { + if x != nil { + return x.ExtraDevices + } + return nil +} + +func (x *MismatchedDevices) GetStaleDevices() []uint32 { + if x != nil { + return x.StaleDevices + } + return nil +} + +type MultiRecipientMismatchedDevices struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of sets of discrepancies between the destination devices identified + // in a request to send a message and the devices that are actually linked to + // a destination account. + MismatchedDevices []*MismatchedDevices `protobuf:"bytes,1,rep,name=mismatched_devices,json=mismatchedDevices,proto3" json:"mismatched_devices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MultiRecipientMismatchedDevices) Reset() { + *x = MultiRecipientMismatchedDevices{} + mi := &file_org_signal_chat_messages_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MultiRecipientMismatchedDevices) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiRecipientMismatchedDevices) ProtoMessage() {} + +func (x *MultiRecipientMismatchedDevices) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MultiRecipientMismatchedDevices.ProtoReflect.Descriptor instead. +func (*MultiRecipientMismatchedDevices) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{16} +} + +func (x *MultiRecipientMismatchedDevices) GetMismatchedDevices() []*MismatchedDevices { + if x != nil { + return x.MismatchedDevices + } + return nil +} + +type ChallengeRequired struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An opaque token identifying this challenge request. Clients must generally + // submit this token when submitting a challenge response. + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + // A list of challenge types callers may choose to complete to resolve the + // challenge requirement. May be empty, in which case callers cannot resolve + // the challenge by any means other than waiting. + ChallengeOptions []ChallengeRequired_ChallengeType `protobuf:"varint,2,rep,packed,name=challenge_options,json=challengeOptions,proto3,enum=org.signal.chat.messages.ChallengeRequired_ChallengeType" json:"challenge_options,omitempty"` + // A duration (in seconds) after which the challenge requirement may be + // resolved by simply waiting. May not be set if the challenge cannot be + // resolved by waiting. + RetryAfterSeconds *uint64 `protobuf:"varint,3,opt,name=retry_after_seconds,json=retryAfterSeconds,proto3,oneof" json:"retry_after_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChallengeRequired) Reset() { + *x = ChallengeRequired{} + mi := &file_org_signal_chat_messages_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChallengeRequired) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChallengeRequired) ProtoMessage() {} + +func (x *ChallengeRequired) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChallengeRequired.ProtoReflect.Descriptor instead. +func (*ChallengeRequired) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{17} +} + +func (x *ChallengeRequired) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *ChallengeRequired) GetChallengeOptions() []ChallengeRequired_ChallengeType { + if x != nil { + return x.ChallengeOptions + } + return nil +} + +func (x *ChallengeRequired) GetRetryAfterSeconds() uint64 { + if x != nil && x.RetryAfterSeconds != nil { + return *x.RetryAfterSeconds + } + return 0 +} + +type GetMessagesRequest_GetMessageOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If present and true, the server will not deliver any messages with the + // story flag set. This flag may only be set on the first GetMessagesRequest + // sent from the client to the server in an RPC stream. + DropStories bool `protobuf:"varint,1,opt,name=drop_stories,json=dropStories,proto3" json:"drop_stories,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessagesRequest_GetMessageOptions) Reset() { + *x = GetMessagesRequest_GetMessageOptions{} + mi := &file_org_signal_chat_messages_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessagesRequest_GetMessageOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessagesRequest_GetMessageOptions) ProtoMessage() {} + +func (x *GetMessagesRequest_GetMessageOptions) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMessagesRequest_GetMessageOptions.ProtoReflect.Descriptor instead. +func (*GetMessagesRequest_GetMessageOptions) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *GetMessagesRequest_GetMessageOptions) GetDropStories() bool { + if x != nil { + return x.DropStories + } + return false +} + +// A message for an individual device linked to a destination account. +type IndividualRecipientMessageBundle_Message struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The registration ID for the destination device. + RegistrationId uint32 `protobuf:"varint,1,opt,name=registration_id,json=registrationId,proto3" json:"registration_id,omitempty"` + // The content of the message to deliver to the destination device. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // 256 KiB + // The message type of the message. If this message is part of an + // unidentified send, this must be UNIDENTIFIED_SENDER + Type SendMessageType `protobuf:"varint,3,opt,name=type,proto3,enum=org.signal.chat.messages.SendMessageType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IndividualRecipientMessageBundle_Message) Reset() { + *x = IndividualRecipientMessageBundle_Message{} + mi := &file_org_signal_chat_messages_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IndividualRecipientMessageBundle_Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndividualRecipientMessageBundle_Message) ProtoMessage() {} + +func (x *IndividualRecipientMessageBundle_Message) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IndividualRecipientMessageBundle_Message.ProtoReflect.Descriptor instead. +func (*IndividualRecipientMessageBundle_Message) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *IndividualRecipientMessageBundle_Message) GetRegistrationId() uint32 { + if x != nil { + return x.RegistrationId + } + return 0 +} + +func (x *IndividualRecipientMessageBundle_Message) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *IndividualRecipientMessageBundle_Message) GetType() SendMessageType { + if x != nil { + return x.Type + } + return SendMessageType_UNSPECIFIED +} + +var File_org_signal_chat_messages_proto protoreflect.FileDescriptor + +const file_org_signal_chat_messages_proto_rawDesc = "" + + "\n" + + "\x1eorg/signal/chat/messages.proto\x12\x18org.signal.chat.messages\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\x1a\x1csignalpb/SignalService.proto\"\xdd\x01\n" + + "\x12GetMessagesRequest\x12Z\n" + + "\aoptions\x18\x01 \x01(\v2>.org.signal.chat.messages.GetMessagesRequest.GetMessageOptionsH\x00R\aoptions\x12(\n" + + "\x0fserver_guid_ack\x18\x02 \x01(\fH\x00R\rserverGuidAck\x1a6\n" + + "\x11GetMessageOptions\x12!\n" + + "\fdrop_stories\x18\x01 \x01(\bR\vdropStoriesB\t\n" + + "\arequest\"l\n" + + "\x17GetMessagesStreamClosed\x12G\n" + + "\x12conflicting_stream\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x11conflictingStreamB\b\n" + + "\x06reason\"\x93\x01\n" + + "\x13GetMessagesResponse\x125\n" + + "\benvelope\x18\x01 \x01(\v2\x17.signalservice.EnvelopeH\x00R\benvelope\x129\n" + + "\vqueue_empty\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R\n" + + "queueEmptyB\n" + + "\n" + + "\bresponse\"\xe1\x03\n" + + " IndividualRecipientMessageBundle\x12-\n" + + "\ttimestamp\x18\x01 \x01(\x04B\x0f\xb2\x97\"\v\b\x01\x10\x80\x80\xf0\x96\x8c\xc1\xac\x0fR\ttimestamp\x12j\n" + + "\bmessages\x18\x02 \x03(\v2H.org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntryB\x04\x88\x97\"\x01R\bmessages\x1a\xa0\x01\n" + + "\aMessage\x120\n" + + "\x0fregistration_id\x18\x01 \x01(\rB\a\xb2\x97\"\x03\x10\xff\x7fR\x0eregistrationId\x12$\n" + + "\apayload\x18\x02 \x01(\fB\n" + + "\x9a\x97\"\x06\b\x01\x10\x80\x80\x10R\apayload\x12=\n" + + "\x04type\x18\x03 \x01(\x0e2).org.signal.chat.messages.SendMessageTypeR\x04type\x1a\x7f\n" + + "\rMessagesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12X\n" + + "\x05value\x18\x02 \x01(\v2B.org.signal.chat.messages.IndividualRecipientMessageBundle.MessageR\x05value:\x028\x01\"\x82\x02\n" + + "%SendAuthenticatedSenderMessageRequest\x12K\n" + + "\vdestination\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\vdestination\x12\x1c\n" + + "\tephemeral\x18\x02 \x01(\bR\tephemeral\x12\x16\n" + + "\x06urgent\x18\x03 \x01(\bR\x06urgent\x12V\n" + + "\bmessages\x18\x04 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\bmessages\"\xc7\x03\n" + + "&SendMessageAuthenticatedSenderResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12t\n" + + "\x12mismatched_devices\x18\x02 \x01(\v2+.org.signal.chat.messages.MismatchedDevicesB\x16\xc2\xd5\"\x12mismatched_devicesH\x00R\x11mismatchedDevices\x12t\n" + + "\x12challenge_required\x18\x03 \x01(\v2+.org.signal.chat.messages.ChallengeRequiredB\x16\xc2\xd5\"\x12challenge_requiredH\x00R\x11challengeRequired\x12q\n" + + "\x15destination_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x19\xc2\xd5\"\x15destination_not_foundH\x00R\x13destinationNotFoundB\n" + + "\n" + + "\bresponse\"\x88\x01\n" + + "\x16SendSyncMessageRequest\x12\x16\n" + + "\x06urgent\x18\x01 \x01(\bR\x06urgent\x12V\n" + + "\bmessages\x18\x02 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\bmessages\"\xc4\x03\n" + + "\x1eSendSealedSenderMessageRequest\x12K\n" + + "\vdestination\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\vdestination\x12\x1c\n" + + "\tephemeral\x18\x02 \x01(\bR\tephemeral\x12\x16\n" + + "\x06urgent\x18\x03 \x01(\bR\x06urgent\x12V\n" + + "\bmessages\x18\x04 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\bmessages\x12?\n" + + "\x17unidentified_access_key\x18\x05 \x01(\fB\x05\xa2\x97\"\x01\x10H\x00R\x15unidentifiedAccessKey\x12*\n" + + "\x10group_send_token\x18\x06 \x01(\fH\x00R\x0egroupSendToken\x12I\n" + + "\x13unrestricted_access\x18\a \x01(\v2\x16.google.protobuf.EmptyH\x00R\x12unrestrictedAccessB\x0f\n" + + "\rauthorization\"\xd6\x01\n" + + "\x17SendStoryMessageRequest\x12K\n" + + "\vdestination\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\vdestination\x12\x16\n" + + "\x06urgent\x18\x02 \x01(\bR\x06urgent\x12V\n" + + "\bmessages\x18\x03 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\bmessages\"\xed\x03\n" + + "\x13SendMessageResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12t\n" + + "\x12mismatched_devices\x18\x02 \x01(\v2+.org.signal.chat.messages.MismatchedDevicesB\x16\xc2\xd5\"\x12mismatched_devicesH\x00R\x11mismatchedDevices\x12\xac\x01\n" + + "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorization\x12q\n" + + "\x15destination_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x19\xc2\xd5\"\x15destination_not_foundH\x00R\x13destinationNotFoundB\n" + + "\n" + + "\bresponse\"j\n" + + "\x15MultiRecipientMessage\x12-\n" + + "\ttimestamp\x18\x01 \x01(\x04B\x0f\xb2\x97\"\v\b\x01\x10\x80\x80\xf0\x96\x8c\xc1\xac\x0fR\ttimestamp\x12\"\n" + + "\apayload\x18\x02 \x01(\fB\b\x9a\x97\"\x04\x10\xa0\xc2.R\apayload\"\xd3\x01\n" + + " SendMultiRecipientMessageRequest\x12\x1c\n" + + "\tephemeral\x18\x01 \x01(\bR\tephemeral\x12\x16\n" + + "\x06urgent\x18\x02 \x01(\bR\x06urgent\x12I\n" + + "\amessage\x18\x03 \x01(\v2/.org.signal.chat.messages.MultiRecipientMessageR\amessage\x12.\n" + + "\x10group_send_token\x18\x04 \x01(\fB\x04\x88\x97\"\x01R\x0egroupSendToken\"\x83\x01\n" + + "\x1eSendMultiRecipientStoryRequest\x12\x16\n" + + "\x06urgent\x18\x01 \x01(\bR\x06urgent\x12I\n" + + "\amessage\x18\x02 \x01(\v2/.org.signal.chat.messages.MultiRecipientMessageR\amessage\"w\n" + + "\x15MultiRecipientSuccess\x12^\n" + + "\x15unresolved_recipients\x18\x01 \x03(\v2).org.signal.chat.common.ServiceIdentifierR\x14unresolvedRecipients\"\xb0\x03\n" + + "!SendMultiRecipientMessageResponse\x12K\n" + + "\asuccess\x18\x01 \x01(\v2/.org.signal.chat.messages.MultiRecipientSuccessH\x00R\asuccess\x12\x82\x01\n" + + "\x12mismatched_devices\x18\x02 \x01(\v29.org.signal.chat.messages.MultiRecipientMismatchedDevicesB\x16\xc2\xd5\"\x12mismatched_devicesH\x00R\x11mismatchedDevices\x12\xac\x01\n" + + "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + + "\n" + + "\bresponse\"\xfe\x01\n" + + "\x11MismatchedDevices\x12X\n" + + "\x12service_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x11serviceIdentifier\x121\n" + + "\x0fmissing_devices\x18\x02 \x03(\rB\bҗ\"\x042\x02\x10\x7fR\x0emissingDevices\x12-\n" + + "\rextra_devices\x18\x03 \x03(\rB\bҗ\"\x042\x02\x10\x7fR\fextraDevices\x12-\n" + + "\rstale_devices\x18\x04 \x03(\rB\bҗ\"\x042\x02\x10\x7fR\fstaleDevices\"}\n" + + "\x1fMultiRecipientMismatchedDevices\x12Z\n" + + "\x12mismatched_devices\x18\x01 \x03(\v2+.org.signal.chat.messages.MismatchedDevicesR\x11mismatchedDevices\"\xa1\x02\n" + + "\x11ChallengeRequired\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12f\n" + + "\x11challenge_options\x18\x02 \x03(\x0e29.org.signal.chat.messages.ChallengeRequired.ChallengeTypeR\x10challengeOptions\x123\n" + + "\x13retry_after_seconds\x18\x03 \x01(\x04H\x00R\x11retryAfterSeconds\x88\x01\x01\"A\n" + + "\rChallengeType\x12\x0f\n" + + "\vUNSPECIFIED\x10\x00\x12\v\n" + + "\aCAPTCHA\x10\x01\x12\x12\n" + + "\x0ePUSH_CHALLENGE\x10\x02B\x16\n" + + "\x14_retry_after_seconds*z\n" + + "\x0fSendMessageType\x12\x0f\n" + + "\vUNSPECIFIED\x10\x00\x12\x12\n" + + "\x0eDOUBLE_RATCHET\x10\x01\x12\x12\n" + + "\x0ePREKEY_MESSAGE\x10\x02\x12\x15\n" + + "\x11PLAINTEXT_CONTENT\x10\x03\x12\x17\n" + + "\x13UNIDENTIFIED_SENDER\x10\x042\xa1\x03\n" + + "\bMessages\x12\x92\x01\n" + + "\vSendMessage\x12?.org.signal.chat.messages.SendAuthenticatedSenderMessageRequest\x1a@.org.signal.chat.messages.SendMessageAuthenticatedSenderResponse\"\x00\x12\x87\x01\n" + + "\x0fSendSyncMessage\x120.org.signal.chat.messages.SendSyncMessageRequest\x1a@.org.signal.chat.messages.SendMessageAuthenticatedSenderResponse\"\x00\x12p\n" + + "\vGetMessages\x12,.org.signal.chat.messages.GetMessagesRequest\x1a-.org.signal.chat.messages.GetMessagesResponse\"\x00(\x010\x01\x1a\x04\xc8\xd5\"\x012\xc2\x04\n" + + "\x11MessagesAnonymous\x12\x87\x01\n" + + "\x1aSendSingleRecipientMessage\x128.org.signal.chat.messages.SendSealedSenderMessageRequest\x1a-.org.signal.chat.messages.SendMessageResponse\"\x00\x12\x96\x01\n" + + "\x19SendMultiRecipientMessage\x12:.org.signal.chat.messages.SendMultiRecipientMessageRequest\x1a;.org.signal.chat.messages.SendMultiRecipientMessageResponse\"\x00\x12o\n" + + "\tSendStory\x121.org.signal.chat.messages.SendStoryMessageRequest\x1a-.org.signal.chat.messages.SendMessageResponse\"\x00\x12\x92\x01\n" + + "\x17SendMultiRecipientStory\x128.org.signal.chat.messages.SendMultiRecipientStoryRequest\x1a;.org.signal.chat.messages.SendMultiRecipientMessageResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_messages_proto_rawDescOnce sync.Once + file_org_signal_chat_messages_proto_rawDescData []byte +) + +func file_org_signal_chat_messages_proto_rawDescGZIP() []byte { + file_org_signal_chat_messages_proto_rawDescOnce.Do(func() { + file_org_signal_chat_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_messages_proto_rawDesc), len(file_org_signal_chat_messages_proto_rawDesc))) + }) + return file_org_signal_chat_messages_proto_rawDescData +} + +var file_org_signal_chat_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_org_signal_chat_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_org_signal_chat_messages_proto_goTypes = []any{ + (SendMessageType)(0), // 0: org.signal.chat.messages.SendMessageType + (ChallengeRequired_ChallengeType)(0), // 1: org.signal.chat.messages.ChallengeRequired.ChallengeType + (*GetMessagesRequest)(nil), // 2: org.signal.chat.messages.GetMessagesRequest + (*GetMessagesStreamClosed)(nil), // 3: org.signal.chat.messages.GetMessagesStreamClosed + (*GetMessagesResponse)(nil), // 4: org.signal.chat.messages.GetMessagesResponse + (*IndividualRecipientMessageBundle)(nil), // 5: org.signal.chat.messages.IndividualRecipientMessageBundle + (*SendAuthenticatedSenderMessageRequest)(nil), // 6: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest + (*SendMessageAuthenticatedSenderResponse)(nil), // 7: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse + (*SendSyncMessageRequest)(nil), // 8: org.signal.chat.messages.SendSyncMessageRequest + (*SendSealedSenderMessageRequest)(nil), // 9: org.signal.chat.messages.SendSealedSenderMessageRequest + (*SendStoryMessageRequest)(nil), // 10: org.signal.chat.messages.SendStoryMessageRequest + (*SendMessageResponse)(nil), // 11: org.signal.chat.messages.SendMessageResponse + (*MultiRecipientMessage)(nil), // 12: org.signal.chat.messages.MultiRecipientMessage + (*SendMultiRecipientMessageRequest)(nil), // 13: org.signal.chat.messages.SendMultiRecipientMessageRequest + (*SendMultiRecipientStoryRequest)(nil), // 14: org.signal.chat.messages.SendMultiRecipientStoryRequest + (*MultiRecipientSuccess)(nil), // 15: org.signal.chat.messages.MultiRecipientSuccess + (*SendMultiRecipientMessageResponse)(nil), // 16: org.signal.chat.messages.SendMultiRecipientMessageResponse + (*MismatchedDevices)(nil), // 17: org.signal.chat.messages.MismatchedDevices + (*MultiRecipientMismatchedDevices)(nil), // 18: org.signal.chat.messages.MultiRecipientMismatchedDevices + (*ChallengeRequired)(nil), // 19: org.signal.chat.messages.ChallengeRequired + (*GetMessagesRequest_GetMessageOptions)(nil), // 20: org.signal.chat.messages.GetMessagesRequest.GetMessageOptions + (*IndividualRecipientMessageBundle_Message)(nil), // 21: org.signal.chat.messages.IndividualRecipientMessageBundle.Message + nil, // 22: org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry + (*emptypb.Empty)(nil), // 23: google.protobuf.Empty + (*signalpb.Envelope)(nil), // 24: signalservice.Envelope + (*common.ServiceIdentifier)(nil), // 25: org.signal.chat.common.ServiceIdentifier + (*errors.NotFound)(nil), // 26: org.signal.chat.errors.NotFound + (*errors.FailedUnidentifiedAuthorization)(nil), // 27: org.signal.chat.errors.FailedUnidentifiedAuthorization +} +var file_org_signal_chat_messages_proto_depIdxs = []int32{ + 20, // 0: org.signal.chat.messages.GetMessagesRequest.options:type_name -> org.signal.chat.messages.GetMessagesRequest.GetMessageOptions + 23, // 1: org.signal.chat.messages.GetMessagesStreamClosed.conflicting_stream:type_name -> google.protobuf.Empty + 24, // 2: org.signal.chat.messages.GetMessagesResponse.envelope:type_name -> signalservice.Envelope + 23, // 3: org.signal.chat.messages.GetMessagesResponse.queue_empty:type_name -> google.protobuf.Empty + 22, // 4: org.signal.chat.messages.IndividualRecipientMessageBundle.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry + 25, // 5: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier + 5, // 6: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle + 23, // 7: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.success:type_name -> google.protobuf.Empty + 17, // 8: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices + 19, // 9: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.challenge_required:type_name -> org.signal.chat.messages.ChallengeRequired + 26, // 10: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.destination_not_found:type_name -> org.signal.chat.errors.NotFound + 5, // 11: org.signal.chat.messages.SendSyncMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle + 25, // 12: org.signal.chat.messages.SendSealedSenderMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier + 5, // 13: org.signal.chat.messages.SendSealedSenderMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle + 23, // 14: org.signal.chat.messages.SendSealedSenderMessageRequest.unrestricted_access:type_name -> google.protobuf.Empty + 25, // 15: org.signal.chat.messages.SendStoryMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier + 5, // 16: org.signal.chat.messages.SendStoryMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle + 23, // 17: org.signal.chat.messages.SendMessageResponse.success:type_name -> google.protobuf.Empty + 17, // 18: org.signal.chat.messages.SendMessageResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices + 27, // 19: org.signal.chat.messages.SendMessageResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 26, // 20: org.signal.chat.messages.SendMessageResponse.destination_not_found:type_name -> org.signal.chat.errors.NotFound + 12, // 21: org.signal.chat.messages.SendMultiRecipientMessageRequest.message:type_name -> org.signal.chat.messages.MultiRecipientMessage + 12, // 22: org.signal.chat.messages.SendMultiRecipientStoryRequest.message:type_name -> org.signal.chat.messages.MultiRecipientMessage + 25, // 23: org.signal.chat.messages.MultiRecipientSuccess.unresolved_recipients:type_name -> org.signal.chat.common.ServiceIdentifier + 15, // 24: org.signal.chat.messages.SendMultiRecipientMessageResponse.success:type_name -> org.signal.chat.messages.MultiRecipientSuccess + 18, // 25: org.signal.chat.messages.SendMultiRecipientMessageResponse.mismatched_devices:type_name -> org.signal.chat.messages.MultiRecipientMismatchedDevices + 27, // 26: org.signal.chat.messages.SendMultiRecipientMessageResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 25, // 27: org.signal.chat.messages.MismatchedDevices.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 17, // 28: org.signal.chat.messages.MultiRecipientMismatchedDevices.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices + 1, // 29: org.signal.chat.messages.ChallengeRequired.challenge_options:type_name -> org.signal.chat.messages.ChallengeRequired.ChallengeType + 0, // 30: org.signal.chat.messages.IndividualRecipientMessageBundle.Message.type:type_name -> org.signal.chat.messages.SendMessageType + 21, // 31: org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry.value:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle.Message + 6, // 32: org.signal.chat.messages.Messages.SendMessage:input_type -> org.signal.chat.messages.SendAuthenticatedSenderMessageRequest + 8, // 33: org.signal.chat.messages.Messages.SendSyncMessage:input_type -> org.signal.chat.messages.SendSyncMessageRequest + 2, // 34: org.signal.chat.messages.Messages.GetMessages:input_type -> org.signal.chat.messages.GetMessagesRequest + 9, // 35: org.signal.chat.messages.MessagesAnonymous.SendSingleRecipientMessage:input_type -> org.signal.chat.messages.SendSealedSenderMessageRequest + 13, // 36: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientMessage:input_type -> org.signal.chat.messages.SendMultiRecipientMessageRequest + 10, // 37: org.signal.chat.messages.MessagesAnonymous.SendStory:input_type -> org.signal.chat.messages.SendStoryMessageRequest + 14, // 38: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientStory:input_type -> org.signal.chat.messages.SendMultiRecipientStoryRequest + 7, // 39: org.signal.chat.messages.Messages.SendMessage:output_type -> org.signal.chat.messages.SendMessageAuthenticatedSenderResponse + 7, // 40: org.signal.chat.messages.Messages.SendSyncMessage:output_type -> org.signal.chat.messages.SendMessageAuthenticatedSenderResponse + 4, // 41: org.signal.chat.messages.Messages.GetMessages:output_type -> org.signal.chat.messages.GetMessagesResponse + 11, // 42: org.signal.chat.messages.MessagesAnonymous.SendSingleRecipientMessage:output_type -> org.signal.chat.messages.SendMessageResponse + 16, // 43: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientMessage:output_type -> org.signal.chat.messages.SendMultiRecipientMessageResponse + 11, // 44: org.signal.chat.messages.MessagesAnonymous.SendStory:output_type -> org.signal.chat.messages.SendMessageResponse + 16, // 45: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientStory:output_type -> org.signal.chat.messages.SendMultiRecipientMessageResponse + 39, // [39:46] is the sub-list for method output_type + 32, // [32:39] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_messages_proto_init() } +func file_org_signal_chat_messages_proto_init() { + if File_org_signal_chat_messages_proto != nil { + return + } + file_org_signal_chat_messages_proto_msgTypes[0].OneofWrappers = []any{ + (*GetMessagesRequest_Options)(nil), + (*GetMessagesRequest_ServerGuidAck)(nil), + } + file_org_signal_chat_messages_proto_msgTypes[1].OneofWrappers = []any{ + (*GetMessagesStreamClosed_ConflictingStream)(nil), + } + file_org_signal_chat_messages_proto_msgTypes[2].OneofWrappers = []any{ + (*GetMessagesResponse_Envelope)(nil), + (*GetMessagesResponse_QueueEmpty)(nil), + } + file_org_signal_chat_messages_proto_msgTypes[5].OneofWrappers = []any{ + (*SendMessageAuthenticatedSenderResponse_Success)(nil), + (*SendMessageAuthenticatedSenderResponse_MismatchedDevices)(nil), + (*SendMessageAuthenticatedSenderResponse_ChallengeRequired)(nil), + (*SendMessageAuthenticatedSenderResponse_DestinationNotFound)(nil), + } + file_org_signal_chat_messages_proto_msgTypes[7].OneofWrappers = []any{ + (*SendSealedSenderMessageRequest_UnidentifiedAccessKey)(nil), + (*SendSealedSenderMessageRequest_GroupSendToken)(nil), + (*SendSealedSenderMessageRequest_UnrestrictedAccess)(nil), + } + file_org_signal_chat_messages_proto_msgTypes[9].OneofWrappers = []any{ + (*SendMessageResponse_Success)(nil), + (*SendMessageResponse_MismatchedDevices)(nil), + (*SendMessageResponse_FailedUnidentifiedAuthorization)(nil), + (*SendMessageResponse_DestinationNotFound)(nil), + } + file_org_signal_chat_messages_proto_msgTypes[14].OneofWrappers = []any{ + (*SendMultiRecipientMessageResponse_Success)(nil), + (*SendMultiRecipientMessageResponse_MismatchedDevices)(nil), + (*SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization)(nil), + } + file_org_signal_chat_messages_proto_msgTypes[17].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_messages_proto_rawDesc), len(file_org_signal_chat_messages_proto_rawDesc)), + NumEnums: 2, + NumMessages: 21, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_org_signal_chat_messages_proto_goTypes, + DependencyIndexes: file_org_signal_chat_messages_proto_depIdxs, + EnumInfos: file_org_signal_chat_messages_proto_enumTypes, + MessageInfos: file_org_signal_chat_messages_proto_msgTypes, + }.Build() + File_org_signal_chat_messages_proto = out.File + file_org_signal_chat_messages_proto_goTypes = nil + file_org_signal_chat_messages_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go new file mode 100644 index 0000000..d9b0a6d --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go @@ -0,0 +1,490 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/messages.proto + +package messages + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Messages_SendMessage_FullMethodName = "/org.signal.chat.messages.Messages/SendMessage" + Messages_SendSyncMessage_FullMethodName = "/org.signal.chat.messages.Messages/SendSyncMessage" + Messages_GetMessages_FullMethodName = "/org.signal.chat.messages.Messages/GetMessages" +) + +// MessagesClient is the client API for Messages service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for sending "unsealed sender" messages. +type MessagesClient interface { + // Sends an "unsealed sender" message to all devices linked to a single + // destination account. + // + // The destination account must not be the same as the authenticated caller. + // Callers should use `SendSyncMessage` to send messages to themselves. + SendMessage(ctx context.Context, in *SendAuthenticatedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) + // Sends a "sync" message to all other devices linked to the authenticated + // sender's account. + SendSyncMessage(ctx context.Context, in *SendSyncMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) + // Retrieve messages for the authenticated device. When the caller receives + // and successfully processes a message returned in a GetMessagesResponse they + // must send a corresponding GetMessagesRequest indicating that the message + // has been processed (an ack). Acks should only be sent for messages + // delivered via the currently open RPC. + // + // Only the first GetMessagesRequest may contain request parameters that + // configure the stream. The first request must not contain an ack. + // + // The server will keep the stream open until the client disconnects. Only + // one GetMessages stream may be open per device. If a second GetMessages + // stream is opened, the server may terminate any of the streams with + // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be + // present in the error details. + GetMessages(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse], error) +} + +type messagesClient struct { + cc grpc.ClientConnInterface +} + +func NewMessagesClient(cc grpc.ClientConnInterface) MessagesClient { + return &messagesClient{cc} +} + +func (c *messagesClient) SendMessage(ctx context.Context, in *SendAuthenticatedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SendMessageAuthenticatedSenderResponse) + err := c.cc.Invoke(ctx, Messages_SendMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messagesClient) SendSyncMessage(ctx context.Context, in *SendSyncMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SendMessageAuthenticatedSenderResponse) + err := c.cc.Invoke(ctx, Messages_SendSyncMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messagesClient) GetMessages(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Messages_ServiceDesc.Streams[0], Messages_GetMessages_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[GetMessagesRequest, GetMessagesResponse]{ClientStream: stream} + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Messages_GetMessagesClient = grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse] + +// MessagesServer is the server API for Messages service. +// All implementations must embed UnimplementedMessagesServer +// for forward compatibility. +// +// Provides methods for sending "unsealed sender" messages. +type MessagesServer interface { + // Sends an "unsealed sender" message to all devices linked to a single + // destination account. + // + // The destination account must not be the same as the authenticated caller. + // Callers should use `SendSyncMessage` to send messages to themselves. + SendMessage(context.Context, *SendAuthenticatedSenderMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) + // Sends a "sync" message to all other devices linked to the authenticated + // sender's account. + SendSyncMessage(context.Context, *SendSyncMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) + // Retrieve messages for the authenticated device. When the caller receives + // and successfully processes a message returned in a GetMessagesResponse they + // must send a corresponding GetMessagesRequest indicating that the message + // has been processed (an ack). Acks should only be sent for messages + // delivered via the currently open RPC. + // + // Only the first GetMessagesRequest may contain request parameters that + // configure the stream. The first request must not contain an ack. + // + // The server will keep the stream open until the client disconnects. Only + // one GetMessages stream may be open per device. If a second GetMessages + // stream is opened, the server may terminate any of the streams with + // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be + // present in the error details. + GetMessages(grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]) error + mustEmbedUnimplementedMessagesServer() +} + +// UnimplementedMessagesServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMessagesServer struct{} + +func (UnimplementedMessagesServer) SendMessage(context.Context, *SendAuthenticatedSenderMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SendMessage not implemented") +} +func (UnimplementedMessagesServer) SendSyncMessage(context.Context, *SendSyncMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SendSyncMessage not implemented") +} +func (UnimplementedMessagesServer) GetMessages(grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]) error { + return status.Error(codes.Unimplemented, "method GetMessages not implemented") +} +func (UnimplementedMessagesServer) mustEmbedUnimplementedMessagesServer() {} +func (UnimplementedMessagesServer) testEmbeddedByValue() {} + +// UnsafeMessagesServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MessagesServer will +// result in compilation errors. +type UnsafeMessagesServer interface { + mustEmbedUnimplementedMessagesServer() +} + +func RegisterMessagesServer(s grpc.ServiceRegistrar, srv MessagesServer) { + // If the following call panics, it indicates UnimplementedMessagesServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Messages_ServiceDesc, srv) +} + +func _Messages_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendAuthenticatedSenderMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessagesServer).SendMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Messages_SendMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessagesServer).SendMessage(ctx, req.(*SendAuthenticatedSenderMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Messages_SendSyncMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendSyncMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessagesServer).SendSyncMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Messages_SendSyncMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessagesServer).SendSyncMessage(ctx, req.(*SendSyncMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Messages_GetMessages_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MessagesServer).GetMessages(&grpc.GenericServerStream[GetMessagesRequest, GetMessagesResponse]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Messages_GetMessagesServer = grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse] + +// Messages_ServiceDesc is the grpc.ServiceDesc for Messages service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Messages_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.messages.Messages", + HandlerType: (*MessagesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SendMessage", + Handler: _Messages_SendMessage_Handler, + }, + { + MethodName: "SendSyncMessage", + Handler: _Messages_SendSyncMessage_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetMessages", + Handler: _Messages_GetMessages_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "org/signal/chat/messages.proto", +} + +const ( + MessagesAnonymous_SendSingleRecipientMessage_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendSingleRecipientMessage" + MessagesAnonymous_SendMultiRecipientMessage_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendMultiRecipientMessage" + MessagesAnonymous_SendStory_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendStory" + MessagesAnonymous_SendMultiRecipientStory_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendMultiRecipientStory" +) + +// MessagesAnonymousClient is the client API for MessagesAnonymous service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for sending "sealed sender" messages. +type MessagesAnonymousClient interface { + // Sends a "sealed sender" message to all devices linked to a single + // destination account. + // + // If this RPC is authorized with an unidentified access key, it will fail + // with an authorization failure if the credential is invalid OR if the + // destination account was not found. If it is authorized using a group send + // token, it will fail with an authorization failure if the credential is + // invalid and with an destination not found error if the account does not + // exist + SendSingleRecipientMessage(ctx context.Context, in *SendSealedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) + // Sends a "sealed sender" message with a common payload to all devices linked + // to multiple destination accounts. + SendMultiRecipientMessage(ctx context.Context, in *SendMultiRecipientMessageRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) + // Sends a story message to devices linked to a single destination account. + SendStory(ctx context.Context, in *SendStoryMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) + // Sends a story message with a common payload to devices linked to devices + // linked to multiple destination accounts. + SendMultiRecipientStory(ctx context.Context, in *SendMultiRecipientStoryRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) +} + +type messagesAnonymousClient struct { + cc grpc.ClientConnInterface +} + +func NewMessagesAnonymousClient(cc grpc.ClientConnInterface) MessagesAnonymousClient { + return &messagesAnonymousClient{cc} +} + +func (c *messagesAnonymousClient) SendSingleRecipientMessage(ctx context.Context, in *SendSealedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SendMessageResponse) + err := c.cc.Invoke(ctx, MessagesAnonymous_SendSingleRecipientMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messagesAnonymousClient) SendMultiRecipientMessage(ctx context.Context, in *SendMultiRecipientMessageRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SendMultiRecipientMessageResponse) + err := c.cc.Invoke(ctx, MessagesAnonymous_SendMultiRecipientMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messagesAnonymousClient) SendStory(ctx context.Context, in *SendStoryMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SendMessageResponse) + err := c.cc.Invoke(ctx, MessagesAnonymous_SendStory_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messagesAnonymousClient) SendMultiRecipientStory(ctx context.Context, in *SendMultiRecipientStoryRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SendMultiRecipientMessageResponse) + err := c.cc.Invoke(ctx, MessagesAnonymous_SendMultiRecipientStory_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MessagesAnonymousServer is the server API for MessagesAnonymous service. +// All implementations must embed UnimplementedMessagesAnonymousServer +// for forward compatibility. +// +// Provides methods for sending "sealed sender" messages. +type MessagesAnonymousServer interface { + // Sends a "sealed sender" message to all devices linked to a single + // destination account. + // + // If this RPC is authorized with an unidentified access key, it will fail + // with an authorization failure if the credential is invalid OR if the + // destination account was not found. If it is authorized using a group send + // token, it will fail with an authorization failure if the credential is + // invalid and with an destination not found error if the account does not + // exist + SendSingleRecipientMessage(context.Context, *SendSealedSenderMessageRequest) (*SendMessageResponse, error) + // Sends a "sealed sender" message with a common payload to all devices linked + // to multiple destination accounts. + SendMultiRecipientMessage(context.Context, *SendMultiRecipientMessageRequest) (*SendMultiRecipientMessageResponse, error) + // Sends a story message to devices linked to a single destination account. + SendStory(context.Context, *SendStoryMessageRequest) (*SendMessageResponse, error) + // Sends a story message with a common payload to devices linked to devices + // linked to multiple destination accounts. + SendMultiRecipientStory(context.Context, *SendMultiRecipientStoryRequest) (*SendMultiRecipientMessageResponse, error) + mustEmbedUnimplementedMessagesAnonymousServer() +} + +// UnimplementedMessagesAnonymousServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMessagesAnonymousServer struct{} + +func (UnimplementedMessagesAnonymousServer) SendSingleRecipientMessage(context.Context, *SendSealedSenderMessageRequest) (*SendMessageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SendSingleRecipientMessage not implemented") +} +func (UnimplementedMessagesAnonymousServer) SendMultiRecipientMessage(context.Context, *SendMultiRecipientMessageRequest) (*SendMultiRecipientMessageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SendMultiRecipientMessage not implemented") +} +func (UnimplementedMessagesAnonymousServer) SendStory(context.Context, *SendStoryMessageRequest) (*SendMessageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SendStory not implemented") +} +func (UnimplementedMessagesAnonymousServer) SendMultiRecipientStory(context.Context, *SendMultiRecipientStoryRequest) (*SendMultiRecipientMessageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SendMultiRecipientStory not implemented") +} +func (UnimplementedMessagesAnonymousServer) mustEmbedUnimplementedMessagesAnonymousServer() {} +func (UnimplementedMessagesAnonymousServer) testEmbeddedByValue() {} + +// UnsafeMessagesAnonymousServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MessagesAnonymousServer will +// result in compilation errors. +type UnsafeMessagesAnonymousServer interface { + mustEmbedUnimplementedMessagesAnonymousServer() +} + +func RegisterMessagesAnonymousServer(s grpc.ServiceRegistrar, srv MessagesAnonymousServer) { + // If the following call panics, it indicates UnimplementedMessagesAnonymousServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&MessagesAnonymous_ServiceDesc, srv) +} + +func _MessagesAnonymous_SendSingleRecipientMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendSealedSenderMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessagesAnonymousServer).SendSingleRecipientMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MessagesAnonymous_SendSingleRecipientMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessagesAnonymousServer).SendSingleRecipientMessage(ctx, req.(*SendSealedSenderMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MessagesAnonymous_SendMultiRecipientMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendMultiRecipientMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessagesAnonymousServer).SendMultiRecipientMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MessagesAnonymous_SendMultiRecipientMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessagesAnonymousServer).SendMultiRecipientMessage(ctx, req.(*SendMultiRecipientMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MessagesAnonymous_SendStory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendStoryMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessagesAnonymousServer).SendStory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MessagesAnonymous_SendStory_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessagesAnonymousServer).SendStory(ctx, req.(*SendStoryMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MessagesAnonymous_SendMultiRecipientStory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendMultiRecipientStoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessagesAnonymousServer).SendMultiRecipientStory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MessagesAnonymous_SendMultiRecipientStory_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessagesAnonymousServer).SendMultiRecipientStory(ctx, req.(*SendMultiRecipientStoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MessagesAnonymous_ServiceDesc is the grpc.ServiceDesc for MessagesAnonymous service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MessagesAnonymous_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.messages.MessagesAnonymous", + HandlerType: (*MessagesAnonymousServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SendSingleRecipientMessage", + Handler: _MessagesAnonymous_SendSingleRecipientMessage_Handler, + }, + { + MethodName: "SendMultiRecipientMessage", + Handler: _MessagesAnonymous_SendMultiRecipientMessage_Handler, + }, + { + MethodName: "SendStory", + Handler: _MessagesAnonymous_SendStory_Handler, + }, + { + MethodName: "SendMultiRecipientStory", + Handler: _MessagesAnonymous_SendMultiRecipientStory_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/messages.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go new file mode 100644 index 0000000..507d508 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go @@ -0,0 +1,1345 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/one_time_donations.proto + +package one_time_donations + +import ( + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + subscriptions "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/subscriptions" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The amount is below the minimum for the currency. +type AmountBelowMinimumError struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The minimum amount for the currency + Minimum string `protobuf:"bytes,1,opt,name=minimum,proto3" json:"minimum,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AmountBelowMinimumError) Reset() { + *x = AmountBelowMinimumError{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AmountBelowMinimumError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AmountBelowMinimumError) ProtoMessage() {} + +func (x *AmountBelowMinimumError) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AmountBelowMinimumError.ProtoReflect.Descriptor instead. +func (*AmountBelowMinimumError) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{0} +} + +func (x *AmountBelowMinimumError) GetMinimum() string { + if x != nil { + return x.Minimum + } + return "" +} + +// The SEPA Direct Debit amount exceeds the allowed maximum. +type AmountAboveSepaLimitError struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The maximum amount for a SEPA transaction + Maximum string `protobuf:"bytes,1,opt,name=maximum,proto3" json:"maximum,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AmountAboveSepaLimitError) Reset() { + *x = AmountAboveSepaLimitError{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AmountAboveSepaLimitError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AmountAboveSepaLimitError) ProtoMessage() {} + +func (x *AmountAboveSepaLimitError) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AmountAboveSepaLimitError.ProtoReflect.Descriptor instead. +func (*AmountAboveSepaLimitError) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{1} +} + +func (x *AmountAboveSepaLimitError) GetMaximum() string { + if x != nil { + return x.Maximum + } + return "" +} + +type CreateBoostRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + // The amount to pay in the [currency's minor unit](https://docs.stripe.com/currencies#minor-units) + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // The level for the boost payment + Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` + // The payment method + PaymentMethod subscriptions.PaymentMethod `protobuf:"varint,4,opt,name=payment_method,json=paymentMethod,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"payment_method,omitempty"` + // A donation permit retrieved from Donations.createDonationPermit + DonationPermit []byte `protobuf:"bytes,5,opt,name=donation_permit,json=donationPermit,proto3" json:"donation_permit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBoostRequest) Reset() { + *x = CreateBoostRequest{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBoostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBoostRequest) ProtoMessage() {} + +func (x *CreateBoostRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBoostRequest.ProtoReflect.Descriptor instead. +func (*CreateBoostRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateBoostRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *CreateBoostRequest) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *CreateBoostRequest) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *CreateBoostRequest) GetPaymentMethod() subscriptions.PaymentMethod { + if x != nil { + return x.PaymentMethod + } + return subscriptions.PaymentMethod(0) +} + +func (x *CreateBoostRequest) GetDonationPermit() []byte { + if x != nil { + return x.DonationPermit + } + return nil +} + +type CreateBoostResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *CreateBoostResponse_ClientSecret + // *CreateBoostResponse_AmountBelowMinimum + // *CreateBoostResponse_AmountAboveSepaLimit + // *CreateBoostResponse_UnsupportedCurrency + // *CreateBoostResponse_UnsupportedLevel + // *CreateBoostResponse_PermitRejected + // *CreateBoostResponse_InvalidAmount + Response isCreateBoostResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBoostResponse) Reset() { + *x = CreateBoostResponse{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBoostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBoostResponse) ProtoMessage() {} + +func (x *CreateBoostResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBoostResponse.ProtoReflect.Descriptor instead. +func (*CreateBoostResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateBoostResponse) GetResponse() isCreateBoostResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *CreateBoostResponse) GetClientSecret() string { + if x != nil { + if x, ok := x.Response.(*CreateBoostResponse_ClientSecret); ok { + return x.ClientSecret + } + } + return "" +} + +func (x *CreateBoostResponse) GetAmountBelowMinimum() *AmountBelowMinimumError { + if x != nil { + if x, ok := x.Response.(*CreateBoostResponse_AmountBelowMinimum); ok { + return x.AmountBelowMinimum + } + } + return nil +} + +func (x *CreateBoostResponse) GetAmountAboveSepaLimit() *AmountAboveSepaLimitError { + if x != nil { + if x, ok := x.Response.(*CreateBoostResponse_AmountAboveSepaLimit); ok { + return x.AmountAboveSepaLimit + } + } + return nil +} + +func (x *CreateBoostResponse) GetUnsupportedCurrency() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreateBoostResponse_UnsupportedCurrency); ok { + return x.UnsupportedCurrency + } + } + return nil +} + +func (x *CreateBoostResponse) GetUnsupportedLevel() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreateBoostResponse_UnsupportedLevel); ok { + return x.UnsupportedLevel + } + } + return nil +} + +func (x *CreateBoostResponse) GetPermitRejected() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*CreateBoostResponse_PermitRejected); ok { + return x.PermitRejected + } + } + return nil +} + +func (x *CreateBoostResponse) GetInvalidAmount() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreateBoostResponse_InvalidAmount); ok { + return x.InvalidAmount + } + } + return nil +} + +type isCreateBoostResponse_Response interface { + isCreateBoostResponse_Response() +} + +type CreateBoostResponse_ClientSecret struct { + // A client secret that can be used to complete a stripe PaymentIntent + ClientSecret string `protobuf:"bytes,1,opt,name=client_secret,json=clientSecret,proto3,oneof"` +} + +type CreateBoostResponse_AmountBelowMinimum struct { + // The amount is below the minimum for the currency + AmountBelowMinimum *AmountBelowMinimumError `protobuf:"bytes,2,opt,name=amount_below_minimum,json=amountBelowMinimum,proto3,oneof"` +} + +type CreateBoostResponse_AmountAboveSepaLimit struct { + // The amount exceeds the maximum for SEPA Direct Debit + AmountAboveSepaLimit *AmountAboveSepaLimitError `protobuf:"bytes,3,opt,name=amount_above_sepa_limit,json=amountAboveSepaLimit,proto3,oneof"` +} + +type CreateBoostResponse_UnsupportedCurrency struct { + // The requested currency is not supported for the given payment method + UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` +} + +type CreateBoostResponse_UnsupportedLevel struct { + // The requested level is not a valid one-time donation level + UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` +} + +type CreateBoostResponse_PermitRejected struct { + // Donation permit was invalid or already spent + PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,6,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` +} + +type CreateBoostResponse_InvalidAmount struct { + // The amount in the specified currency is not supported by the payment provider + InvalidAmount *errors.FailedPrecondition `protobuf:"bytes,7,opt,name=invalid_amount,json=invalidAmount,proto3,oneof"` +} + +func (*CreateBoostResponse_ClientSecret) isCreateBoostResponse_Response() {} + +func (*CreateBoostResponse_AmountBelowMinimum) isCreateBoostResponse_Response() {} + +func (*CreateBoostResponse_AmountAboveSepaLimit) isCreateBoostResponse_Response() {} + +func (*CreateBoostResponse_UnsupportedCurrency) isCreateBoostResponse_Response() {} + +func (*CreateBoostResponse_UnsupportedLevel) isCreateBoostResponse_Response() {} + +func (*CreateBoostResponse_PermitRejected) isCreateBoostResponse_Response() {} + +func (*CreateBoostResponse_InvalidAmount) isCreateBoostResponse_Response() {} + +type CreatePayPalBoostRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + // Amount in the currency's minor unit (e.g. cents for USD), must be >= 1 + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // Donation level. + Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` + // URL to redirect the user to after PayPal approval + ReturnUrl string `protobuf:"bytes,4,opt,name=return_url,json=returnUrl,proto3" json:"return_url,omitempty"` + // URL to redirect the user to if they cancel + CancelUrl string `protobuf:"bytes,5,opt,name=cancel_url,json=cancelUrl,proto3" json:"cancel_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePayPalBoostRequest) Reset() { + *x = CreatePayPalBoostRequest{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePayPalBoostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePayPalBoostRequest) ProtoMessage() {} + +func (x *CreatePayPalBoostRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePayPalBoostRequest.ProtoReflect.Descriptor instead. +func (*CreatePayPalBoostRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{4} +} + +func (x *CreatePayPalBoostRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *CreatePayPalBoostRequest) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *CreatePayPalBoostRequest) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *CreatePayPalBoostRequest) GetReturnUrl() string { + if x != nil { + return x.ReturnUrl + } + return "" +} + +func (x *CreatePayPalBoostRequest) GetCancelUrl() string { + if x != nil { + return x.CancelUrl + } + return "" +} + +type CreatePayPalBoostResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *CreatePayPalBoostResponse_Result + // *CreatePayPalBoostResponse_AmountBelowMinimum + // *CreatePayPalBoostResponse_UnsupportedCurrency + // *CreatePayPalBoostResponse_UnsupportedLevel + Response isCreatePayPalBoostResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePayPalBoostResponse) Reset() { + *x = CreatePayPalBoostResponse{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePayPalBoostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePayPalBoostResponse) ProtoMessage() {} + +func (x *CreatePayPalBoostResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePayPalBoostResponse.ProtoReflect.Descriptor instead. +func (*CreatePayPalBoostResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{5} +} + +func (x *CreatePayPalBoostResponse) GetResponse() isCreatePayPalBoostResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *CreatePayPalBoostResponse) GetResult() *CreatePayPalBoostResponse_CreatePayPalBoostResult { + if x != nil { + if x, ok := x.Response.(*CreatePayPalBoostResponse_Result); ok { + return x.Result + } + } + return nil +} + +func (x *CreatePayPalBoostResponse) GetAmountBelowMinimum() *AmountBelowMinimumError { + if x != nil { + if x, ok := x.Response.(*CreatePayPalBoostResponse_AmountBelowMinimum); ok { + return x.AmountBelowMinimum + } + } + return nil +} + +func (x *CreatePayPalBoostResponse) GetUnsupportedCurrency() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreatePayPalBoostResponse_UnsupportedCurrency); ok { + return x.UnsupportedCurrency + } + } + return nil +} + +func (x *CreatePayPalBoostResponse) GetUnsupportedLevel() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreatePayPalBoostResponse_UnsupportedLevel); ok { + return x.UnsupportedLevel + } + } + return nil +} + +type isCreatePayPalBoostResponse_Response interface { + isCreatePayPalBoostResponse_Response() +} + +type CreatePayPalBoostResponse_Result struct { + Result *CreatePayPalBoostResponse_CreatePayPalBoostResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type CreatePayPalBoostResponse_AmountBelowMinimum struct { + // The amount is below the minimum for the currency + AmountBelowMinimum *AmountBelowMinimumError `protobuf:"bytes,2,opt,name=amount_below_minimum,json=amountBelowMinimum,proto3,oneof"` +} + +type CreatePayPalBoostResponse_UnsupportedCurrency struct { + // The requested currency is not supported for PayPal + UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` +} + +type CreatePayPalBoostResponse_UnsupportedLevel struct { + // The requested level is not a valid one-time donation level + UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` +} + +func (*CreatePayPalBoostResponse_Result) isCreatePayPalBoostResponse_Response() {} + +func (*CreatePayPalBoostResponse_AmountBelowMinimum) isCreatePayPalBoostResponse_Response() {} + +func (*CreatePayPalBoostResponse_UnsupportedCurrency) isCreatePayPalBoostResponse_Response() {} + +func (*CreatePayPalBoostResponse_UnsupportedLevel) isCreatePayPalBoostResponse_Response() {} + +type ConfirmPayPalBoostRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + // Amount in the currency's minor unit, must be >= 1 + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // Donation level. + Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` + // PayPal payer ID from the approval redirect + PayerId string `protobuf:"bytes,4,opt,name=payer_id,json=payerId,proto3" json:"payer_id,omitempty"` + // PayPal payment ID (PAYID-…) from CreatePayPalBoost + PaymentId string `protobuf:"bytes,5,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` + // PayPal payment token (EC-…) from the approval redirect + PaymentToken string `protobuf:"bytes,6,opt,name=payment_token,json=paymentToken,proto3" json:"payment_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmPayPalBoostRequest) Reset() { + *x = ConfirmPayPalBoostRequest{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmPayPalBoostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmPayPalBoostRequest) ProtoMessage() {} + +func (x *ConfirmPayPalBoostRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmPayPalBoostRequest.ProtoReflect.Descriptor instead. +func (*ConfirmPayPalBoostRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{6} +} + +func (x *ConfirmPayPalBoostRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *ConfirmPayPalBoostRequest) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *ConfirmPayPalBoostRequest) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *ConfirmPayPalBoostRequest) GetPayerId() string { + if x != nil { + return x.PayerId + } + return "" +} + +func (x *ConfirmPayPalBoostRequest) GetPaymentId() string { + if x != nil { + return x.PaymentId + } + return "" +} + +func (x *ConfirmPayPalBoostRequest) GetPaymentToken() string { + if x != nil { + return x.PaymentToken + } + return "" +} + +type ConfirmPayPalBoostResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *ConfirmPayPalBoostResponse_Result + // *ConfirmPayPalBoostResponse_AmountBelowMinimum + // *ConfirmPayPalBoostResponse_UnsupportedCurrency + // *ConfirmPayPalBoostResponse_UnsupportedLevel + // *ConfirmPayPalBoostResponse_ChargeFailure + Response isConfirmPayPalBoostResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmPayPalBoostResponse) Reset() { + *x = ConfirmPayPalBoostResponse{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmPayPalBoostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmPayPalBoostResponse) ProtoMessage() {} + +func (x *ConfirmPayPalBoostResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmPayPalBoostResponse.ProtoReflect.Descriptor instead. +func (*ConfirmPayPalBoostResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{7} +} + +func (x *ConfirmPayPalBoostResponse) GetResponse() isConfirmPayPalBoostResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *ConfirmPayPalBoostResponse) GetResult() *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult { + if x != nil { + if x, ok := x.Response.(*ConfirmPayPalBoostResponse_Result); ok { + return x.Result + } + } + return nil +} + +func (x *ConfirmPayPalBoostResponse) GetAmountBelowMinimum() *AmountBelowMinimumError { + if x != nil { + if x, ok := x.Response.(*ConfirmPayPalBoostResponse_AmountBelowMinimum); ok { + return x.AmountBelowMinimum + } + } + return nil +} + +func (x *ConfirmPayPalBoostResponse) GetUnsupportedCurrency() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ConfirmPayPalBoostResponse_UnsupportedCurrency); ok { + return x.UnsupportedCurrency + } + } + return nil +} + +func (x *ConfirmPayPalBoostResponse) GetUnsupportedLevel() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ConfirmPayPalBoostResponse_UnsupportedLevel); ok { + return x.UnsupportedLevel + } + } + return nil +} + +func (x *ConfirmPayPalBoostResponse) GetChargeFailure() *subscriptions.ChargeFailure { + if x != nil { + if x, ok := x.Response.(*ConfirmPayPalBoostResponse_ChargeFailure); ok { + return x.ChargeFailure + } + } + return nil +} + +type isConfirmPayPalBoostResponse_Response interface { + isConfirmPayPalBoostResponse_Response() +} + +type ConfirmPayPalBoostResponse_Result struct { + Result *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type ConfirmPayPalBoostResponse_AmountBelowMinimum struct { + // The amount is below the minimum for the currency + AmountBelowMinimum *AmountBelowMinimumError `protobuf:"bytes,2,opt,name=amount_below_minimum,json=amountBelowMinimum,proto3,oneof"` +} + +type ConfirmPayPalBoostResponse_UnsupportedCurrency struct { + // The requested currency is not supported for PayPal + UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` +} + +type ConfirmPayPalBoostResponse_UnsupportedLevel struct { + // The requested level is not a valid one-time donation level + UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` +} + +type ConfirmPayPalBoostResponse_ChargeFailure struct { + // The payment failed; see charge failure details + ChargeFailure *subscriptions.ChargeFailure `protobuf:"bytes,5,opt,name=charge_failure,json=chargeFailure,proto3,oneof"` +} + +func (*ConfirmPayPalBoostResponse_Result) isConfirmPayPalBoostResponse_Response() {} + +func (*ConfirmPayPalBoostResponse_AmountBelowMinimum) isConfirmPayPalBoostResponse_Response() {} + +func (*ConfirmPayPalBoostResponse_UnsupportedCurrency) isConfirmPayPalBoostResponse_Response() {} + +func (*ConfirmPayPalBoostResponse_UnsupportedLevel) isConfirmPayPalBoostResponse_Response() {} + +func (*ConfirmPayPalBoostResponse_ChargeFailure) isConfirmPayPalBoostResponse_Response() {} + +type CreateBoostReceiptCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // a payment ID from the processor + PaymentIntentId string `protobuf:"bytes,1,opt,name=payment_intent_id,json=paymentIntentId,proto3" json:"payment_intent_id,omitempty"` + // ZK blind-signature receipt credential request bytes + ReceiptCredentialRequest []byte `protobuf:"bytes,2,opt,name=receipt_credential_request,json=receiptCredentialRequest,proto3" json:"receipt_credential_request,omitempty"` + // The processor that handled the payment + Processor subscriptions.PaymentProvider `protobuf:"varint,3,opt,name=processor,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"processor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBoostReceiptCredentialsRequest) Reset() { + *x = CreateBoostReceiptCredentialsRequest{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBoostReceiptCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBoostReceiptCredentialsRequest) ProtoMessage() {} + +func (x *CreateBoostReceiptCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBoostReceiptCredentialsRequest.ProtoReflect.Descriptor instead. +func (*CreateBoostReceiptCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateBoostReceiptCredentialsRequest) GetPaymentIntentId() string { + if x != nil { + return x.PaymentIntentId + } + return "" +} + +func (x *CreateBoostReceiptCredentialsRequest) GetReceiptCredentialRequest() []byte { + if x != nil { + return x.ReceiptCredentialRequest + } + return nil +} + +func (x *CreateBoostReceiptCredentialsRequest) GetProcessor() subscriptions.PaymentProvider { + if x != nil { + return x.Processor + } + return subscriptions.PaymentProvider(0) +} + +type CreateBoostReceiptCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *CreateBoostReceiptCredentialsResponse_Result + // *CreateBoostReceiptCredentialsResponse_PaymentStillProcessing + // *CreateBoostReceiptCredentialsResponse_PaymentRequired + // *CreateBoostReceiptCredentialsResponse_PaymentNotFound + // *CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued + Response isCreateBoostReceiptCredentialsResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBoostReceiptCredentialsResponse) Reset() { + *x = CreateBoostReceiptCredentialsResponse{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBoostReceiptCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBoostReceiptCredentialsResponse) ProtoMessage() {} + +func (x *CreateBoostReceiptCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBoostReceiptCredentialsResponse.ProtoReflect.Descriptor instead. +func (*CreateBoostReceiptCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateBoostReceiptCredentialsResponse) GetResponse() isCreateBoostReceiptCredentialsResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *CreateBoostReceiptCredentialsResponse) GetResult() *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult { + if x != nil { + if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_Result); ok { + return x.Result + } + } + return nil +} + +func (x *CreateBoostReceiptCredentialsResponse) GetPaymentStillProcessing() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing); ok { + return x.PaymentStillProcessing + } + } + return nil +} + +func (x *CreateBoostReceiptCredentialsResponse) GetPaymentRequired() *subscriptions.PaymentRequired { + if x != nil { + if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentRequired); ok { + return x.PaymentRequired + } + } + return nil +} + +func (x *CreateBoostReceiptCredentialsResponse) GetPaymentNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentNotFound); ok { + return x.PaymentNotFound + } + } + return nil +} + +func (x *CreateBoostReceiptCredentialsResponse) GetReceiptAlreadyIssued() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued); ok { + return x.ReceiptAlreadyIssued + } + } + return nil +} + +type isCreateBoostReceiptCredentialsResponse_Response interface { + isCreateBoostReceiptCredentialsResponse_Response() +} + +type CreateBoostReceiptCredentialsResponse_Result struct { + Result *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type CreateBoostReceiptCredentialsResponse_PaymentStillProcessing struct { + // Payment is still processing; client should retry + PaymentStillProcessing *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=payment_still_processing,json=paymentStillProcessing,proto3,oneof"` +} + +type CreateBoostReceiptCredentialsResponse_PaymentRequired struct { + // Payment failed + PaymentRequired *subscriptions.PaymentRequired `protobuf:"bytes,3,opt,name=payment_required,json=paymentRequired,proto3,oneof"` +} + +type CreateBoostReceiptCredentialsResponse_PaymentNotFound struct { + // Payment intent not found + PaymentNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=payment_not_found,json=paymentNotFound,proto3,oneof"` +} + +type CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued struct { + // A receipt credential was already issued for this payment + ReceiptAlreadyIssued *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=receipt_already_issued,json=receiptAlreadyIssued,proto3,oneof"` +} + +func (*CreateBoostReceiptCredentialsResponse_Result) isCreateBoostReceiptCredentialsResponse_Response() { +} + +func (*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing) isCreateBoostReceiptCredentialsResponse_Response() { +} + +func (*CreateBoostReceiptCredentialsResponse_PaymentRequired) isCreateBoostReceiptCredentialsResponse_Response() { +} + +func (*CreateBoostReceiptCredentialsResponse_PaymentNotFound) isCreateBoostReceiptCredentialsResponse_Response() { +} + +func (*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued) isCreateBoostReceiptCredentialsResponse_Response() { +} + +type CreatePayPalBoostResponse_CreatePayPalBoostResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + ApprovalUrl string `protobuf:"bytes,1,opt,name=approval_url,json=approvalUrl,proto3" json:"approval_url,omitempty"` + PaymentId string `protobuf:"bytes,2,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) Reset() { + *x = CreatePayPalBoostResponse_CreatePayPalBoostResult{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePayPalBoostResponse_CreatePayPalBoostResult) ProtoMessage() {} + +func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePayPalBoostResponse_CreatePayPalBoostResult.ProtoReflect.Descriptor instead. +func (*CreatePayPalBoostResponse_CreatePayPalBoostResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) GetApprovalUrl() string { + if x != nil { + return x.ApprovalUrl + } + return "" +} + +func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) GetPaymentId() string { + if x != nil { + return x.PaymentId + } + return "" +} + +type ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + PaymentId string `protobuf:"bytes,1,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) Reset() { + *x = ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) ProtoMessage() {} + +func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult.ProtoReflect.Descriptor instead. +func (*ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) GetPaymentId() string { + if x != nil { + return x.PaymentId + } + return "" +} + +type CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReceiptCredentialResponse []byte `protobuf:"bytes,1,opt,name=receipt_credential_response,json=receiptCredentialResponse,proto3" json:"receipt_credential_response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) Reset() { + *x = CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult{} + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) ProtoMessage() {} + +func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult.ProtoReflect.Descriptor instead. +func (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) GetReceiptCredentialResponse() []byte { + if x != nil { + return x.ReceiptCredentialResponse + } + return nil +} + +var File_org_signal_chat_one_time_donations_proto protoreflect.FileDescriptor + +const file_org_signal_chat_one_time_donations_proto_rawDesc = "" + + "\n" + + "(org/signal/chat/one_time_donations.proto\x12\x18org.signal.chat.purchase\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\x1a#org/signal/chat/subscriptions.proto\"3\n" + + "\x17AmountBelowMinimumError\x12\x18\n" + + "\aminimum\x18\x01 \x01(\tR\aminimum\"5\n" + + "\x19AmountAboveSepaLimitError\x12\x18\n" + + "\amaximum\x18\x01 \x01(\tR\amaximum\"\xfa\x01\n" + + "\x12CreateBoostRequest\x12!\n" + + "\bcurrency\x18\x01 \x01(\tB\x05\xa2\x97\"\x01\x03R\bcurrency\x12\x1e\n" + + "\x06amount\x18\x02 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x06amount\x12\x1c\n" + + "\x05level\x18\x03 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x05level\x12T\n" + + "\x0epayment_method\x18\x04 \x01(\x0e2'.org.signal.chat.purchase.PaymentMethodB\x04\x90\x97\"\x01R\rpaymentMethod\x12-\n" + + "\x0fdonation_permit\x18\x05 \x01(\fB\x04\x88\x97\"\x01R\x0edonationPermit\"\x9b\x06\n" + + "\x13CreateBoostResponse\x12%\n" + + "\rclient_secret\x18\x01 \x01(\tH\x00R\fclientSecret\x12\x7f\n" + + "\x14amount_below_minimum\x18\x02 \x01(\v21.org.signal.chat.purchase.AmountBelowMinimumErrorB\x18\xc2\xd5\"\x14amount_below_minimumH\x00R\x12amountBelowMinimum\x12\x89\x01\n" + + "\x17amount_above_sepa_limit\x18\x03 \x01(\v23.org.signal.chat.purchase.AmountAboveSepaLimitErrorB\x1b\xc2\xd5\"\x17amount_above_sepa_limitH\x00R\x14amountAboveSepaLimit\x12y\n" + + "\x14unsupported_currency\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12p\n" + + "\x11unsupported_level\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x12n\n" + + "\x0fpermit_rejected\x18\x06 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejected\x12g\n" + + "\x0einvalid_amount\x18\a \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x12\xc2\xd5\"\x0einvalid_amountH\x00R\rinvalidAmountB\n" + + "\n" + + "\bresponse\"\xc5\x01\n" + + "\x18CreatePayPalBoostRequest\x12!\n" + + "\bcurrency\x18\x01 \x01(\tB\x05\xa2\x97\"\x01\x03R\bcurrency\x12\x1e\n" + + "\x06amount\x18\x02 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x06amount\x12\x1c\n" + + "\x05level\x18\x03 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x05level\x12#\n" + + "\n" + + "return_url\x18\x04 \x01(\tB\x04\x88\x97\"\x01R\treturnUrl\x12#\n" + + "\n" + + "cancel_url\x18\x05 \x01(\tB\x04\x88\x97\"\x01R\tcancelUrl\"\xd9\x04\n" + + "\x19CreatePayPalBoostResponse\x12e\n" + + "\x06result\x18\x01 \x01(\v2K.org.signal.chat.purchase.CreatePayPalBoostResponse.CreatePayPalBoostResultH\x00R\x06result\x12\x7f\n" + + "\x14amount_below_minimum\x18\x02 \x01(\v21.org.signal.chat.purchase.AmountBelowMinimumErrorB\x18\xc2\xd5\"\x14amount_below_minimumH\x00R\x12amountBelowMinimum\x12y\n" + + "\x14unsupported_currency\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12p\n" + + "\x11unsupported_level\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x1a[\n" + + "\x17CreatePayPalBoostResult\x12!\n" + + "\fapproval_url\x18\x01 \x01(\tR\vapprovalUrl\x12\x1d\n" + + "\n" + + "payment_id\x18\x02 \x01(\tR\tpaymentIdB\n" + + "\n" + + "\bresponse\"\xed\x01\n" + + "\x19ConfirmPayPalBoostRequest\x12!\n" + + "\bcurrency\x18\x01 \x01(\tB\x05\xa2\x97\"\x01\x03R\bcurrency\x12\x1e\n" + + "\x06amount\x18\x02 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x06amount\x12\x1c\n" + + "\x05level\x18\x03 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x05level\x12\x1f\n" + + "\bpayer_id\x18\x04 \x01(\tB\x04\x88\x97\"\x01R\apayerId\x12#\n" + + "\n" + + "payment_id\x18\x05 \x01(\tB\x04\x88\x97\"\x01R\tpaymentId\x12)\n" + + "\rpayment_token\x18\x06 \x01(\tB\x04\x88\x97\"\x01R\fpaymentToken\"\xa0\x05\n" + + "\x1aConfirmPayPalBoostResponse\x12g\n" + + "\x06result\x18\x01 \x01(\v2M.org.signal.chat.purchase.ConfirmPayPalBoostResponse.ConfirmPayPalBoostResultH\x00R\x06result\x12\x7f\n" + + "\x14amount_below_minimum\x18\x02 \x01(\v21.org.signal.chat.purchase.AmountBelowMinimumErrorB\x18\xc2\xd5\"\x14amount_below_minimumH\x00R\x12amountBelowMinimum\x12y\n" + + "\x14unsupported_currency\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12p\n" + + "\x11unsupported_level\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x12d\n" + + "\x0echarge_failure\x18\x05 \x01(\v2'.org.signal.chat.purchase.ChargeFailureB\x12\xc2\xd5\"\x0echarge_failureH\x00R\rchargeFailure\x1a9\n" + + "\x18ConfirmPayPalBoostResult\x12\x1d\n" + + "\n" + + "payment_id\x18\x01 \x01(\tR\tpaymentIdB\n" + + "\n" + + "\bresponse\"\xeb\x01\n" + + "$CreateBoostReceiptCredentialsRequest\x120\n" + + "\x11payment_intent_id\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x0fpaymentIntentId\x12B\n" + + "\x1areceipt_credential_request\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\x18receiptCredentialRequest\x12M\n" + + "\tprocessor\x18\x03 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderB\x04\x90\x97\"\x01R\tprocessor\"\xf5\x05\n" + + "%CreateBoostReceiptCredentialsResponse\x12}\n" + + "\x06result\x18\x01 \x01(\v2c.org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResultH\x00R\x06result\x12\x84\x01\n" + + "\x18payment_still_processing\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18payment_still_processingH\x00R\x16paymentStillProcessing\x12l\n" + + "\x10payment_required\x18\x03 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12e\n" + + "\x11payment_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x15\xc2\xd5\"\x11payment_not_foundH\x00R\x0fpaymentNotFound\x12~\n" + + "\x16receipt_already_issued\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1a\xc2\xd5\"\x16receipt_already_issuedH\x00R\x14receiptAlreadyIssued\x1ae\n" + + "#CreateBoostReceiptCredentialsResult\x12>\n" + + "\x1breceipt_credential_response\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + + "\n" + + "\bresponse2\xaf\x04\n" + + "\x10OneTimeDonations\x12l\n" + + "\vCreateBoost\x12,.org.signal.chat.purchase.CreateBoostRequest\x1a-.org.signal.chat.purchase.CreateBoostResponse\"\x00\x12~\n" + + "\x11CreatePayPalBoost\x122.org.signal.chat.purchase.CreatePayPalBoostRequest\x1a3.org.signal.chat.purchase.CreatePayPalBoostResponse\"\x00\x12\x81\x01\n" + + "\x12ConfirmPayPalBoost\x123.org.signal.chat.purchase.ConfirmPayPalBoostRequest\x1a4.org.signal.chat.purchase.ConfirmPayPalBoostResponse\"\x00\x12\xa2\x01\n" + + "\x1dCreateBoostReceiptCredentials\x12>.org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest\x1a?.org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_one_time_donations_proto_rawDescOnce sync.Once + file_org_signal_chat_one_time_donations_proto_rawDescData []byte +) + +func file_org_signal_chat_one_time_donations_proto_rawDescGZIP() []byte { + file_org_signal_chat_one_time_donations_proto_rawDescOnce.Do(func() { + file_org_signal_chat_one_time_donations_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_one_time_donations_proto_rawDesc), len(file_org_signal_chat_one_time_donations_proto_rawDesc))) + }) + return file_org_signal_chat_one_time_donations_proto_rawDescData +} + +var file_org_signal_chat_one_time_donations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_org_signal_chat_one_time_donations_proto_goTypes = []any{ + (*AmountBelowMinimumError)(nil), // 0: org.signal.chat.purchase.AmountBelowMinimumError + (*AmountAboveSepaLimitError)(nil), // 1: org.signal.chat.purchase.AmountAboveSepaLimitError + (*CreateBoostRequest)(nil), // 2: org.signal.chat.purchase.CreateBoostRequest + (*CreateBoostResponse)(nil), // 3: org.signal.chat.purchase.CreateBoostResponse + (*CreatePayPalBoostRequest)(nil), // 4: org.signal.chat.purchase.CreatePayPalBoostRequest + (*CreatePayPalBoostResponse)(nil), // 5: org.signal.chat.purchase.CreatePayPalBoostResponse + (*ConfirmPayPalBoostRequest)(nil), // 6: org.signal.chat.purchase.ConfirmPayPalBoostRequest + (*ConfirmPayPalBoostResponse)(nil), // 7: org.signal.chat.purchase.ConfirmPayPalBoostResponse + (*CreateBoostReceiptCredentialsRequest)(nil), // 8: org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest + (*CreateBoostReceiptCredentialsResponse)(nil), // 9: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse + (*CreatePayPalBoostResponse_CreatePayPalBoostResult)(nil), // 10: org.signal.chat.purchase.CreatePayPalBoostResponse.CreatePayPalBoostResult + (*ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult)(nil), // 11: org.signal.chat.purchase.ConfirmPayPalBoostResponse.ConfirmPayPalBoostResult + (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult)(nil), // 12: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResult + (subscriptions.PaymentMethod)(0), // 13: org.signal.chat.purchase.PaymentMethod + (*errors.FailedPrecondition)(nil), // 14: org.signal.chat.errors.FailedPrecondition + (*errors.FailedZkAuthentication)(nil), // 15: org.signal.chat.errors.FailedZkAuthentication + (*subscriptions.ChargeFailure)(nil), // 16: org.signal.chat.purchase.ChargeFailure + (subscriptions.PaymentProvider)(0), // 17: org.signal.chat.purchase.PaymentProvider + (*subscriptions.PaymentRequired)(nil), // 18: org.signal.chat.purchase.PaymentRequired + (*errors.NotFound)(nil), // 19: org.signal.chat.errors.NotFound +} +var file_org_signal_chat_one_time_donations_proto_depIdxs = []int32{ + 13, // 0: org.signal.chat.purchase.CreateBoostRequest.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod + 0, // 1: org.signal.chat.purchase.CreateBoostResponse.amount_below_minimum:type_name -> org.signal.chat.purchase.AmountBelowMinimumError + 1, // 2: org.signal.chat.purchase.CreateBoostResponse.amount_above_sepa_limit:type_name -> org.signal.chat.purchase.AmountAboveSepaLimitError + 14, // 3: org.signal.chat.purchase.CreateBoostResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition + 14, // 4: org.signal.chat.purchase.CreateBoostResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition + 15, // 5: org.signal.chat.purchase.CreateBoostResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication + 14, // 6: org.signal.chat.purchase.CreateBoostResponse.invalid_amount:type_name -> org.signal.chat.errors.FailedPrecondition + 10, // 7: org.signal.chat.purchase.CreatePayPalBoostResponse.result:type_name -> org.signal.chat.purchase.CreatePayPalBoostResponse.CreatePayPalBoostResult + 0, // 8: org.signal.chat.purchase.CreatePayPalBoostResponse.amount_below_minimum:type_name -> org.signal.chat.purchase.AmountBelowMinimumError + 14, // 9: org.signal.chat.purchase.CreatePayPalBoostResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition + 14, // 10: org.signal.chat.purchase.CreatePayPalBoostResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition + 11, // 11: org.signal.chat.purchase.ConfirmPayPalBoostResponse.result:type_name -> org.signal.chat.purchase.ConfirmPayPalBoostResponse.ConfirmPayPalBoostResult + 0, // 12: org.signal.chat.purchase.ConfirmPayPalBoostResponse.amount_below_minimum:type_name -> org.signal.chat.purchase.AmountBelowMinimumError + 14, // 13: org.signal.chat.purchase.ConfirmPayPalBoostResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition + 14, // 14: org.signal.chat.purchase.ConfirmPayPalBoostResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition + 16, // 15: org.signal.chat.purchase.ConfirmPayPalBoostResponse.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure + 17, // 16: org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest.processor:type_name -> org.signal.chat.purchase.PaymentProvider + 12, // 17: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.result:type_name -> org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResult + 14, // 18: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_still_processing:type_name -> org.signal.chat.errors.FailedPrecondition + 18, // 19: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired + 19, // 20: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_not_found:type_name -> org.signal.chat.errors.NotFound + 14, // 21: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.receipt_already_issued:type_name -> org.signal.chat.errors.FailedPrecondition + 2, // 22: org.signal.chat.purchase.OneTimeDonations.CreateBoost:input_type -> org.signal.chat.purchase.CreateBoostRequest + 4, // 23: org.signal.chat.purchase.OneTimeDonations.CreatePayPalBoost:input_type -> org.signal.chat.purchase.CreatePayPalBoostRequest + 6, // 24: org.signal.chat.purchase.OneTimeDonations.ConfirmPayPalBoost:input_type -> org.signal.chat.purchase.ConfirmPayPalBoostRequest + 8, // 25: org.signal.chat.purchase.OneTimeDonations.CreateBoostReceiptCredentials:input_type -> org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest + 3, // 26: org.signal.chat.purchase.OneTimeDonations.CreateBoost:output_type -> org.signal.chat.purchase.CreateBoostResponse + 5, // 27: org.signal.chat.purchase.OneTimeDonations.CreatePayPalBoost:output_type -> org.signal.chat.purchase.CreatePayPalBoostResponse + 7, // 28: org.signal.chat.purchase.OneTimeDonations.ConfirmPayPalBoost:output_type -> org.signal.chat.purchase.ConfirmPayPalBoostResponse + 9, // 29: org.signal.chat.purchase.OneTimeDonations.CreateBoostReceiptCredentials:output_type -> org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse + 26, // [26:30] is the sub-list for method output_type + 22, // [22:26] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_one_time_donations_proto_init() } +func file_org_signal_chat_one_time_donations_proto_init() { + if File_org_signal_chat_one_time_donations_proto != nil { + return + } + file_org_signal_chat_one_time_donations_proto_msgTypes[3].OneofWrappers = []any{ + (*CreateBoostResponse_ClientSecret)(nil), + (*CreateBoostResponse_AmountBelowMinimum)(nil), + (*CreateBoostResponse_AmountAboveSepaLimit)(nil), + (*CreateBoostResponse_UnsupportedCurrency)(nil), + (*CreateBoostResponse_UnsupportedLevel)(nil), + (*CreateBoostResponse_PermitRejected)(nil), + (*CreateBoostResponse_InvalidAmount)(nil), + } + file_org_signal_chat_one_time_donations_proto_msgTypes[5].OneofWrappers = []any{ + (*CreatePayPalBoostResponse_Result)(nil), + (*CreatePayPalBoostResponse_AmountBelowMinimum)(nil), + (*CreatePayPalBoostResponse_UnsupportedCurrency)(nil), + (*CreatePayPalBoostResponse_UnsupportedLevel)(nil), + } + file_org_signal_chat_one_time_donations_proto_msgTypes[7].OneofWrappers = []any{ + (*ConfirmPayPalBoostResponse_Result)(nil), + (*ConfirmPayPalBoostResponse_AmountBelowMinimum)(nil), + (*ConfirmPayPalBoostResponse_UnsupportedCurrency)(nil), + (*ConfirmPayPalBoostResponse_UnsupportedLevel)(nil), + (*ConfirmPayPalBoostResponse_ChargeFailure)(nil), + } + file_org_signal_chat_one_time_donations_proto_msgTypes[9].OneofWrappers = []any{ + (*CreateBoostReceiptCredentialsResponse_Result)(nil), + (*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing)(nil), + (*CreateBoostReceiptCredentialsResponse_PaymentRequired)(nil), + (*CreateBoostReceiptCredentialsResponse_PaymentNotFound)(nil), + (*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_one_time_donations_proto_rawDesc), len(file_org_signal_chat_one_time_donations_proto_rawDesc)), + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_one_time_donations_proto_goTypes, + DependencyIndexes: file_org_signal_chat_one_time_donations_proto_depIdxs, + MessageInfos: file_org_signal_chat_one_time_donations_proto_msgTypes, + }.Build() + File_org_signal_chat_one_time_donations_proto = out.File + file_org_signal_chat_one_time_donations_proto_goTypes = nil + file_org_signal_chat_one_time_donations_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go new file mode 100644 index 0000000..e80afa8 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go @@ -0,0 +1,263 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/one_time_donations.proto + +package one_time_donations + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + OneTimeDonations_CreateBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreateBoost" + OneTimeDonations_CreatePayPalBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreatePayPalBoost" + OneTimeDonations_ConfirmPayPalBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/ConfirmPayPalBoost" + OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreateBoostReceiptCredentials" +) + +// OneTimeDonationsClient is the client API for OneTimeDonations service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Service for making one-time donation payments (boost and gift) +// +// Configuration for one-time donations can be found in ProductConfiguration. +type OneTimeDonationsClient interface { + // Create a Stripe payment intent and return a client secret that can be used to complete the payment. + // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials + CreateBoost(ctx context.Context, in *CreateBoostRequest, opts ...grpc.CallOption) (*CreateBoostResponse, error) + // Create a PayPal one-time payment. + // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token + CreatePayPalBoost(ctx context.Context, in *CreatePayPalBoostRequest, opts ...grpc.CallOption) (*CreatePayPalBoostResponse, error) + // Confirm a PayPal one-time payment + ConfirmPayPalBoost(ctx context.Context, in *ConfirmPayPalBoostRequest, opts ...grpc.CallOption) (*ConfirmPayPalBoostResponse, error) + // Obtain a ZK receipt credential for a completed one-time donation payment. + // The receipt credential can then be used to redeem the one-time donation entitlement + // via Donations.RedeemReceipt + CreateBoostReceiptCredentials(ctx context.Context, in *CreateBoostReceiptCredentialsRequest, opts ...grpc.CallOption) (*CreateBoostReceiptCredentialsResponse, error) +} + +type oneTimeDonationsClient struct { + cc grpc.ClientConnInterface +} + +func NewOneTimeDonationsClient(cc grpc.ClientConnInterface) OneTimeDonationsClient { + return &oneTimeDonationsClient{cc} +} + +func (c *oneTimeDonationsClient) CreateBoost(ctx context.Context, in *CreateBoostRequest, opts ...grpc.CallOption) (*CreateBoostResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateBoostResponse) + err := c.cc.Invoke(ctx, OneTimeDonations_CreateBoost_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *oneTimeDonationsClient) CreatePayPalBoost(ctx context.Context, in *CreatePayPalBoostRequest, opts ...grpc.CallOption) (*CreatePayPalBoostResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreatePayPalBoostResponse) + err := c.cc.Invoke(ctx, OneTimeDonations_CreatePayPalBoost_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *oneTimeDonationsClient) ConfirmPayPalBoost(ctx context.Context, in *ConfirmPayPalBoostRequest, opts ...grpc.CallOption) (*ConfirmPayPalBoostResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ConfirmPayPalBoostResponse) + err := c.cc.Invoke(ctx, OneTimeDonations_ConfirmPayPalBoost_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *oneTimeDonationsClient) CreateBoostReceiptCredentials(ctx context.Context, in *CreateBoostReceiptCredentialsRequest, opts ...grpc.CallOption) (*CreateBoostReceiptCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateBoostReceiptCredentialsResponse) + err := c.cc.Invoke(ctx, OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OneTimeDonationsServer is the server API for OneTimeDonations service. +// All implementations must embed UnimplementedOneTimeDonationsServer +// for forward compatibility. +// +// Service for making one-time donation payments (boost and gift) +// +// Configuration for one-time donations can be found in ProductConfiguration. +type OneTimeDonationsServer interface { + // Create a Stripe payment intent and return a client secret that can be used to complete the payment. + // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials + CreateBoost(context.Context, *CreateBoostRequest) (*CreateBoostResponse, error) + // Create a PayPal one-time payment. + // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token + CreatePayPalBoost(context.Context, *CreatePayPalBoostRequest) (*CreatePayPalBoostResponse, error) + // Confirm a PayPal one-time payment + ConfirmPayPalBoost(context.Context, *ConfirmPayPalBoostRequest) (*ConfirmPayPalBoostResponse, error) + // Obtain a ZK receipt credential for a completed one-time donation payment. + // The receipt credential can then be used to redeem the one-time donation entitlement + // via Donations.RedeemReceipt + CreateBoostReceiptCredentials(context.Context, *CreateBoostReceiptCredentialsRequest) (*CreateBoostReceiptCredentialsResponse, error) + mustEmbedUnimplementedOneTimeDonationsServer() +} + +// UnimplementedOneTimeDonationsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedOneTimeDonationsServer struct{} + +func (UnimplementedOneTimeDonationsServer) CreateBoost(context.Context, *CreateBoostRequest) (*CreateBoostResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateBoost not implemented") +} +func (UnimplementedOneTimeDonationsServer) CreatePayPalBoost(context.Context, *CreatePayPalBoostRequest) (*CreatePayPalBoostResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreatePayPalBoost not implemented") +} +func (UnimplementedOneTimeDonationsServer) ConfirmPayPalBoost(context.Context, *ConfirmPayPalBoostRequest) (*ConfirmPayPalBoostResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ConfirmPayPalBoost not implemented") +} +func (UnimplementedOneTimeDonationsServer) CreateBoostReceiptCredentials(context.Context, *CreateBoostReceiptCredentialsRequest) (*CreateBoostReceiptCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateBoostReceiptCredentials not implemented") +} +func (UnimplementedOneTimeDonationsServer) mustEmbedUnimplementedOneTimeDonationsServer() {} +func (UnimplementedOneTimeDonationsServer) testEmbeddedByValue() {} + +// UnsafeOneTimeDonationsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OneTimeDonationsServer will +// result in compilation errors. +type UnsafeOneTimeDonationsServer interface { + mustEmbedUnimplementedOneTimeDonationsServer() +} + +func RegisterOneTimeDonationsServer(s grpc.ServiceRegistrar, srv OneTimeDonationsServer) { + // If the following call panics, it indicates UnimplementedOneTimeDonationsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&OneTimeDonations_ServiceDesc, srv) +} + +func _OneTimeDonations_CreateBoost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBoostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OneTimeDonationsServer).CreateBoost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OneTimeDonations_CreateBoost_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OneTimeDonationsServer).CreateBoost(ctx, req.(*CreateBoostRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OneTimeDonations_CreatePayPalBoost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePayPalBoostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OneTimeDonationsServer).CreatePayPalBoost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OneTimeDonations_CreatePayPalBoost_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OneTimeDonationsServer).CreatePayPalBoost(ctx, req.(*CreatePayPalBoostRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OneTimeDonations_ConfirmPayPalBoost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConfirmPayPalBoostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OneTimeDonationsServer).ConfirmPayPalBoost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OneTimeDonations_ConfirmPayPalBoost_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OneTimeDonationsServer).ConfirmPayPalBoost(ctx, req.(*ConfirmPayPalBoostRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OneTimeDonations_CreateBoostReceiptCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBoostReceiptCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OneTimeDonationsServer).CreateBoostReceiptCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OneTimeDonationsServer).CreateBoostReceiptCredentials(ctx, req.(*CreateBoostReceiptCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OneTimeDonations_ServiceDesc is the grpc.ServiceDesc for OneTimeDonations service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OneTimeDonations_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.purchase.OneTimeDonations", + HandlerType: (*OneTimeDonationsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBoost", + Handler: _OneTimeDonations_CreateBoost_Handler, + }, + { + MethodName: "CreatePayPalBoost", + Handler: _OneTimeDonations_CreatePayPalBoost_Handler, + }, + { + MethodName: "ConfirmPayPalBoost", + Handler: _OneTimeDonations_ConfirmPayPalBoost_Handler, + }, + { + MethodName: "CreateBoostReceiptCredentials", + Handler: _OneTimeDonations_CreateBoostReceiptCredentials_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/one_time_donations.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/payments/payments.pb.go b/pkg/signalmeow/protobuf/rpc/payments/payments.pb.go new file mode 100644 index 0000000..4daf8a4 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/payments/payments.pb.go @@ -0,0 +1,242 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/payments.proto + +package payments + +import ( + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetCurrencyConversionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCurrencyConversionsRequest) Reset() { + *x = GetCurrencyConversionsRequest{} + mi := &file_org_signal_chat_payments_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCurrencyConversionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrencyConversionsRequest) ProtoMessage() {} + +func (x *GetCurrencyConversionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_payments_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCurrencyConversionsRequest.ProtoReflect.Descriptor instead. +func (*GetCurrencyConversionsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_payments_proto_rawDescGZIP(), []int{0} +} + +type GetCurrencyConversionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Currencies []*GetCurrencyConversionsResponse_CurrencyConversionEntity `protobuf:"bytes,2,rep,name=currencies,proto3" json:"currencies,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCurrencyConversionsResponse) Reset() { + *x = GetCurrencyConversionsResponse{} + mi := &file_org_signal_chat_payments_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCurrencyConversionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrencyConversionsResponse) ProtoMessage() {} + +func (x *GetCurrencyConversionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_payments_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCurrencyConversionsResponse.ProtoReflect.Descriptor instead. +func (*GetCurrencyConversionsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_payments_proto_rawDescGZIP(), []int{1} +} + +func (x *GetCurrencyConversionsResponse) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetCurrencyConversionsResponse) GetCurrencies() []*GetCurrencyConversionsResponse_CurrencyConversionEntity { + if x != nil { + return x.Currencies + } + return nil +} + +type GetCurrencyConversionsResponse_CurrencyConversionEntity struct { + state protoimpl.MessageState `protogen:"open.v1"` + Base string `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Conversions map[string]string `protobuf:"bytes,2,rep,name=conversions,proto3" json:"conversions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) Reset() { + *x = GetCurrencyConversionsResponse_CurrencyConversionEntity{} + mi := &file_org_signal_chat_payments_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrencyConversionsResponse_CurrencyConversionEntity) ProtoMessage() {} + +func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_payments_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCurrencyConversionsResponse_CurrencyConversionEntity.ProtoReflect.Descriptor instead. +func (*GetCurrencyConversionsResponse_CurrencyConversionEntity) Descriptor() ([]byte, []int) { + return file_org_signal_chat_payments_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) GetBase() string { + if x != nil { + return x.Base + } + return "" +} + +func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) GetConversions() map[string]string { + if x != nil { + return x.Conversions + } + return nil +} + +var File_org_signal_chat_payments_proto protoreflect.FileDescriptor + +const file_org_signal_chat_payments_proto_rawDesc = "" + + "\n" + + "\x1eorg/signal/chat/payments.proto\x12\x18org.signal.chat.payments\x1a\x1dorg/signal/chat/require.proto\"\x1f\n" + + "\x1dGetCurrencyConversionsRequest\"\xa9\x03\n" + + "\x1eGetCurrencyConversionsResponse\x12\x1c\n" + + "\ttimestamp\x18\x01 \x01(\x04R\ttimestamp\x12q\n" + + "\n" + + "currencies\x18\x02 \x03(\v2Q.org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntityR\n" + + "currencies\x1a\xf5\x01\n" + + "\x18CurrencyConversionEntity\x12\x12\n" + + "\x04base\x18\x01 \x01(\tR\x04base\x12\x84\x01\n" + + "\vconversions\x18\x02 \x03(\v2b.org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.ConversionsEntryR\vconversions\x1a>\n" + + "\x10ConversionsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xa0\x01\n" + + "\bPayments\x12\x8d\x01\n" + + "\x16GetCurrencyConversions\x127.org.signal.chat.payments.GetCurrencyConversionsRequest\x1a8.org.signal.chat.payments.GetCurrencyConversionsResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_payments_proto_rawDescOnce sync.Once + file_org_signal_chat_payments_proto_rawDescData []byte +) + +func file_org_signal_chat_payments_proto_rawDescGZIP() []byte { + file_org_signal_chat_payments_proto_rawDescOnce.Do(func() { + file_org_signal_chat_payments_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_payments_proto_rawDesc), len(file_org_signal_chat_payments_proto_rawDesc))) + }) + return file_org_signal_chat_payments_proto_rawDescData +} + +var file_org_signal_chat_payments_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_org_signal_chat_payments_proto_goTypes = []any{ + (*GetCurrencyConversionsRequest)(nil), // 0: org.signal.chat.payments.GetCurrencyConversionsRequest + (*GetCurrencyConversionsResponse)(nil), // 1: org.signal.chat.payments.GetCurrencyConversionsResponse + (*GetCurrencyConversionsResponse_CurrencyConversionEntity)(nil), // 2: org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity + nil, // 3: org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.ConversionsEntry +} +var file_org_signal_chat_payments_proto_depIdxs = []int32{ + 2, // 0: org.signal.chat.payments.GetCurrencyConversionsResponse.currencies:type_name -> org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity + 3, // 1: org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.conversions:type_name -> org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.ConversionsEntry + 0, // 2: org.signal.chat.payments.Payments.GetCurrencyConversions:input_type -> org.signal.chat.payments.GetCurrencyConversionsRequest + 1, // 3: org.signal.chat.payments.Payments.GetCurrencyConversions:output_type -> org.signal.chat.payments.GetCurrencyConversionsResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_payments_proto_init() } +func file_org_signal_chat_payments_proto_init() { + if File_org_signal_chat_payments_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_payments_proto_rawDesc), len(file_org_signal_chat_payments_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_payments_proto_goTypes, + DependencyIndexes: file_org_signal_chat_payments_proto_depIdxs, + MessageInfos: file_org_signal_chat_payments_proto_msgTypes, + }.Build() + File_org_signal_chat_payments_proto = out.File + file_org_signal_chat_payments_proto_goTypes = nil + file_org_signal_chat_payments_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/payments/payments_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/payments/payments_grpc.pb.go new file mode 100644 index 0000000..7f79a03 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/payments/payments_grpc.pb.go @@ -0,0 +1,129 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/payments.proto + +package payments + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Payments_GetCurrencyConversions_FullMethodName = "/org.signal.chat.payments.Payments/GetCurrencyConversions" +) + +// PaymentsClient is the client API for Payments service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for working with payments. +type PaymentsClient interface { + GetCurrencyConversions(ctx context.Context, in *GetCurrencyConversionsRequest, opts ...grpc.CallOption) (*GetCurrencyConversionsResponse, error) +} + +type paymentsClient struct { + cc grpc.ClientConnInterface +} + +func NewPaymentsClient(cc grpc.ClientConnInterface) PaymentsClient { + return &paymentsClient{cc} +} + +func (c *paymentsClient) GetCurrencyConversions(ctx context.Context, in *GetCurrencyConversionsRequest, opts ...grpc.CallOption) (*GetCurrencyConversionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetCurrencyConversionsResponse) + err := c.cc.Invoke(ctx, Payments_GetCurrencyConversions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PaymentsServer is the server API for Payments service. +// All implementations must embed UnimplementedPaymentsServer +// for forward compatibility. +// +// Provides methods for working with payments. +type PaymentsServer interface { + GetCurrencyConversions(context.Context, *GetCurrencyConversionsRequest) (*GetCurrencyConversionsResponse, error) + mustEmbedUnimplementedPaymentsServer() +} + +// UnimplementedPaymentsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPaymentsServer struct{} + +func (UnimplementedPaymentsServer) GetCurrencyConversions(context.Context, *GetCurrencyConversionsRequest) (*GetCurrencyConversionsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetCurrencyConversions not implemented") +} +func (UnimplementedPaymentsServer) mustEmbedUnimplementedPaymentsServer() {} +func (UnimplementedPaymentsServer) testEmbeddedByValue() {} + +// UnsafePaymentsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PaymentsServer will +// result in compilation errors. +type UnsafePaymentsServer interface { + mustEmbedUnimplementedPaymentsServer() +} + +func RegisterPaymentsServer(s grpc.ServiceRegistrar, srv PaymentsServer) { + // If the following call panics, it indicates UnimplementedPaymentsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Payments_ServiceDesc, srv) +} + +func _Payments_GetCurrencyConversions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCurrencyConversionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentsServer).GetCurrencyConversions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payments_GetCurrencyConversions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentsServer).GetCurrencyConversions(ctx, req.(*GetCurrencyConversionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Payments_ServiceDesc is the grpc.ServiceDesc for Payments service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Payments_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.payments.Payments", + HandlerType: (*PaymentsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetCurrencyConversions", + Handler: _Payments_GetCurrencyConversions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/payments.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go new file mode 100644 index 0000000..bd1b669 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go @@ -0,0 +1,648 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/product_configuration.proto + +package product_configuration + +import ( + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + subscriptions "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/subscriptions" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetConfigurationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigurationRequest) Reset() { + *x = GetConfigurationRequest{} + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigurationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigurationRequest) ProtoMessage() {} + +func (x *GetConfigurationRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigurationRequest.ProtoReflect.Descriptor instead. +func (*GetConfigurationRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{0} +} + +type GetConfigurationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Map of lower-cased ISO 3 currency codes to currency-specific configuration + Currencies map[string]*CurrencyConfiguration `protobuf:"bytes,1,rep,name=currencies,proto3" json:"currencies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Map of numeric donation level IDs to level-specific badge configuration + BadgeLevels map[uint64]*LevelConfiguration `protobuf:"bytes,2,rep,name=badge_levels,json=badgeLevels,proto3" json:"badge_levels,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Configuration for backup subscription options + Backup *BackupConfiguration `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"` + // Maximum value of a one-time SEPA donation + SepaMaximumEuros string `protobuf:"bytes,4,opt,name=sepa_maximum_euros,json=sepaMaximumEuros,proto3" json:"sepa_maximum_euros,omitempty"` + // Configuration for one-time Signal Login purchases + Login *LoginConfiguration `protobuf:"bytes,5,opt,name=login,proto3" json:"login,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigurationResponse) Reset() { + *x = GetConfigurationResponse{} + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigurationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigurationResponse) ProtoMessage() {} + +func (x *GetConfigurationResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigurationResponse.ProtoReflect.Descriptor instead. +func (*GetConfigurationResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{1} +} + +func (x *GetConfigurationResponse) GetCurrencies() map[string]*CurrencyConfiguration { + if x != nil { + return x.Currencies + } + return nil +} + +func (x *GetConfigurationResponse) GetBadgeLevels() map[uint64]*LevelConfiguration { + if x != nil { + return x.BadgeLevels + } + return nil +} + +func (x *GetConfigurationResponse) GetBackup() *BackupConfiguration { + if x != nil { + return x.Backup + } + return nil +} + +func (x *GetConfigurationResponse) GetSepaMaximumEuros() string { + if x != nil { + return x.SepaMaximumEuros + } + return "" +} + +func (x *GetConfigurationResponse) GetLogin() *LoginConfiguration { + if x != nil { + return x.Login + } + return nil +} + +type AmountList struct { + state protoimpl.MessageState `protogen:"open.v1"` + // NOTE: this is a string instead of a numeric type because it is intended + // for display purposes only + Amounts []string `protobuf:"bytes,1,rep,name=amounts,proto3" json:"amounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AmountList) Reset() { + *x = AmountList{} + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AmountList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AmountList) ProtoMessage() {} + +func (x *AmountList) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AmountList.ProtoReflect.Descriptor instead. +func (*AmountList) Descriptor() ([]byte, []int) { + return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{2} +} + +func (x *AmountList) GetAmounts() []string { + if x != nil { + return x.Amounts + } + return nil +} + +type CurrencyConfiguration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Minimum one-time donation + // NOTE: this is a string instead of a numeric type because it is intended + // for display purposes only + Minimum string `protobuf:"bytes,1,opt,name=minimum,proto3" json:"minimum,omitempty"` + // Map of one-time donation level IDs to suggested amounts + OneTime map[uint64]*AmountList `protobuf:"bytes,2,rep,name=one_time,json=oneTime,proto3" json:"one_time,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Map of subscription level IDs to the amount charged + Subscription map[uint64]string `protobuf:"bytes,3,rep,name=subscription,proto3" json:"subscription,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Map of backup subscription level IDs to the amount charged + BackupSubscription map[uint64]string `protobuf:"bytes,4,rep,name=backup_subscription,json=backupSubscription,proto3" json:"backup_subscription,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + SupportedPaymentMethods []subscriptions.PaymentMethod `protobuf:"varint,5,rep,packed,name=supported_payment_methods,json=supportedPaymentMethods,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"supported_payment_methods,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CurrencyConfiguration) Reset() { + *x = CurrencyConfiguration{} + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CurrencyConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrencyConfiguration) ProtoMessage() {} + +func (x *CurrencyConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CurrencyConfiguration.ProtoReflect.Descriptor instead. +func (*CurrencyConfiguration) Descriptor() ([]byte, []int) { + return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{3} +} + +func (x *CurrencyConfiguration) GetMinimum() string { + if x != nil { + return x.Minimum + } + return "" +} + +func (x *CurrencyConfiguration) GetOneTime() map[uint64]*AmountList { + if x != nil { + return x.OneTime + } + return nil +} + +func (x *CurrencyConfiguration) GetSubscription() map[uint64]string { + if x != nil { + return x.Subscription + } + return nil +} + +func (x *CurrencyConfiguration) GetBackupSubscription() map[uint64]string { + if x != nil { + return x.BackupSubscription + } + return nil +} + +func (x *CurrencyConfiguration) GetSupportedPaymentMethods() []subscriptions.PaymentMethod { + if x != nil { + return x.SupportedPaymentMethods + } + return nil +} + +type LevelConfiguration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ID of the badge awarded at this level. Resolve to full badge details + // via RemoteConfiguration.GetBadges. + BadgeId string `protobuf:"bytes,1,opt,name=badge_id,json=badgeId,proto3" json:"badge_id,omitempty"` + // The duration for which a badge is valid. Present only for + // one-time (boost, gift) badges + BadgeDurationSeconds *uint64 `protobuf:"varint,2,opt,name=badge_duration_seconds,json=badgeDurationSeconds,proto3,oneof" json:"badge_duration_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LevelConfiguration) Reset() { + *x = LevelConfiguration{} + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LevelConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LevelConfiguration) ProtoMessage() {} + +func (x *LevelConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LevelConfiguration.ProtoReflect.Descriptor instead. +func (*LevelConfiguration) Descriptor() ([]byte, []int) { + return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{4} +} + +func (x *LevelConfiguration) GetBadgeId() string { + if x != nil { + return x.BadgeId + } + return "" +} + +func (x *LevelConfiguration) GetBadgeDurationSeconds() uint64 { + if x != nil && x.BadgeDurationSeconds != nil { + return *x.BadgeDurationSeconds + } + return 0 +} + +// Configuration for a backup level - use to present appropriate client interfaces +type BackupLevelConfiguration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The amount of media storage in bytes that a paying subscriber may store + StorageAllowanceBytes uint64 `protobuf:"varint,1,opt,name=storage_allowance_bytes,json=storageAllowanceBytes,proto3" json:"storage_allowance_bytes,omitempty"` + // The play billing productID associated with this backup level + PlayProductId string `protobuf:"bytes,2,opt,name=play_product_id,json=playProductId,proto3" json:"play_product_id,omitempty"` + // The duration, in days, for which your backed up media is retained on the server after you stop refreshing with a paid credential + MediaTtlDays uint64 `protobuf:"varint,3,opt,name=media_ttl_days,json=mediaTtlDays,proto3" json:"media_ttl_days,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BackupLevelConfiguration) Reset() { + *x = BackupLevelConfiguration{} + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BackupLevelConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackupLevelConfiguration) ProtoMessage() {} + +func (x *BackupLevelConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackupLevelConfiguration.ProtoReflect.Descriptor instead. +func (*BackupLevelConfiguration) Descriptor() ([]byte, []int) { + return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{5} +} + +func (x *BackupLevelConfiguration) GetStorageAllowanceBytes() uint64 { + if x != nil { + return x.StorageAllowanceBytes + } + return 0 +} + +func (x *BackupLevelConfiguration) GetPlayProductId() string { + if x != nil { + return x.PlayProductId + } + return "" +} + +func (x *BackupLevelConfiguration) GetMediaTtlDays() uint64 { + if x != nil { + return x.MediaTtlDays + } + return 0 +} + +type BackupConfiguration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A map of numeric backup level IDs to level-specific backup configuration + Levels map[uint64]*BackupLevelConfiguration `protobuf:"bytes,1,rep,name=levels,proto3" json:"levels,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The number of days of media a free tier backup user gets + FreeTierMediaDays uint64 `protobuf:"varint,2,opt,name=free_tier_media_days,json=freeTierMediaDays,proto3" json:"free_tier_media_days,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BackupConfiguration) Reset() { + *x = BackupConfiguration{} + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BackupConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackupConfiguration) ProtoMessage() {} + +func (x *BackupConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackupConfiguration.ProtoReflect.Descriptor instead. +func (*BackupConfiguration) Descriptor() ([]byte, []int) { + return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{6} +} + +func (x *BackupConfiguration) GetLevels() map[uint64]*BackupLevelConfiguration { + if x != nil { + return x.Levels + } + return nil +} + +func (x *BackupConfiguration) GetFreeTierMediaDays() uint64 { + if x != nil { + return x.FreeTierMediaDays + } + return 0 +} + +// Configuration for one-time Signal Login purchases +type LoginConfiguration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The receipt level associated with a Signal Login purchase + Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + // The play billing productID associated with a Signal Login purchase + PlayProductId string `protobuf:"bytes,2,opt,name=play_product_id,json=playProductId,proto3" json:"play_product_id,omitempty"` + // The App Store productID associated with a Signal Login purchase + AppStoreProductId string `protobuf:"bytes,3,opt,name=app_store_product_id,json=appStoreProductId,proto3" json:"app_store_product_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoginConfiguration) Reset() { + *x = LoginConfiguration{} + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoginConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoginConfiguration) ProtoMessage() {} + +func (x *LoginConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_product_configuration_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoginConfiguration.ProtoReflect.Descriptor instead. +func (*LoginConfiguration) Descriptor() ([]byte, []int) { + return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{7} +} + +func (x *LoginConfiguration) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *LoginConfiguration) GetPlayProductId() string { + if x != nil { + return x.PlayProductId + } + return "" +} + +func (x *LoginConfiguration) GetAppStoreProductId() string { + if x != nil { + return x.AppStoreProductId + } + return "" +} + +var File_org_signal_chat_product_configuration_proto protoreflect.FileDescriptor + +const file_org_signal_chat_product_configuration_proto_rawDesc = "" + + "\n" + + "+org/signal/chat/product_configuration.proto\x12\x18org.signal.chat.purchase\x1a\x1dorg/signal/chat/require.proto\x1a#org/signal/chat/subscriptions.proto\"\x19\n" + + "\x17GetConfigurationRequest\"\xfd\x04\n" + + "\x18GetConfigurationResponse\x12b\n" + + "\n" + + "currencies\x18\x01 \x03(\v2B.org.signal.chat.purchase.GetConfigurationResponse.CurrenciesEntryR\n" + + "currencies\x12f\n" + + "\fbadge_levels\x18\x02 \x03(\v2C.org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntryR\vbadgeLevels\x12E\n" + + "\x06backup\x18\x03 \x01(\v2-.org.signal.chat.purchase.BackupConfigurationR\x06backup\x12,\n" + + "\x12sepa_maximum_euros\x18\x04 \x01(\tR\x10sepaMaximumEuros\x12B\n" + + "\x05login\x18\x05 \x01(\v2,.org.signal.chat.purchase.LoginConfigurationR\x05login\x1an\n" + + "\x0fCurrenciesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12E\n" + + "\x05value\x18\x02 \x01(\v2/.org.signal.chat.purchase.CurrencyConfigurationR\x05value:\x028\x01\x1al\n" + + "\x10BadgeLevelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12B\n" + + "\x05value\x18\x02 \x01(\v2,.org.signal.chat.purchase.LevelConfigurationR\x05value:\x028\x01\"&\n" + + "\n" + + "AmountList\x12\x18\n" + + "\aamounts\x18\x01 \x03(\tR\aamounts\"\xba\x05\n" + + "\x15CurrencyConfiguration\x12\x18\n" + + "\aminimum\x18\x01 \x01(\tR\aminimum\x12W\n" + + "\bone_time\x18\x02 \x03(\v2<.org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntryR\aoneTime\x12e\n" + + "\fsubscription\x18\x03 \x03(\v2A.org.signal.chat.purchase.CurrencyConfiguration.SubscriptionEntryR\fsubscription\x12x\n" + + "\x13backup_subscription\x18\x04 \x03(\v2G.org.signal.chat.purchase.CurrencyConfiguration.BackupSubscriptionEntryR\x12backupSubscription\x12c\n" + + "\x19supported_payment_methods\x18\x05 \x03(\x0e2'.org.signal.chat.purchase.PaymentMethodR\x17supportedPaymentMethods\x1a`\n" + + "\fOneTimeEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12:\n" + + "\x05value\x18\x02 \x01(\v2$.org.signal.chat.purchase.AmountListR\x05value:\x028\x01\x1a?\n" + + "\x11SubscriptionEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aE\n" + + "\x17BackupSubscriptionEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x85\x01\n" + + "\x12LevelConfiguration\x12\x19\n" + + "\bbadge_id\x18\x01 \x01(\tR\abadgeId\x129\n" + + "\x16badge_duration_seconds\x18\x02 \x01(\x04H\x00R\x14badgeDurationSeconds\x88\x01\x01B\x19\n" + + "\x17_badge_duration_seconds\"\xa0\x01\n" + + "\x18BackupLevelConfiguration\x126\n" + + "\x17storage_allowance_bytes\x18\x01 \x01(\x04R\x15storageAllowanceBytes\x12&\n" + + "\x0fplay_product_id\x18\x02 \x01(\tR\rplayProductId\x12$\n" + + "\x0emedia_ttl_days\x18\x03 \x01(\x04R\fmediaTtlDays\"\x88\x02\n" + + "\x13BackupConfiguration\x12Q\n" + + "\x06levels\x18\x01 \x03(\v29.org.signal.chat.purchase.BackupConfiguration.LevelsEntryR\x06levels\x12/\n" + + "\x14free_tier_media_days\x18\x02 \x01(\x04R\x11freeTierMediaDays\x1am\n" + + "\vLevelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12H\n" + + "\x05value\x18\x02 \x01(\v22.org.signal.chat.purchase.BackupLevelConfigurationR\x05value:\x028\x01\"\x83\x01\n" + + "\x12LoginConfiguration\x12\x14\n" + + "\x05level\x18\x01 \x01(\x04R\x05level\x12&\n" + + "\x0fplay_product_id\x18\x02 \x01(\tR\rplayProductId\x12/\n" + + "\x14app_store_product_id\x18\x03 \x01(\tR\x11appStoreProductId2\x99\x01\n" + + "\x14ProductConfiguration\x12{\n" + + "\x10GetConfiguration\x121.org.signal.chat.purchase.GetConfigurationRequest\x1a2.org.signal.chat.purchase.GetConfigurationResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_product_configuration_proto_rawDescOnce sync.Once + file_org_signal_chat_product_configuration_proto_rawDescData []byte +) + +func file_org_signal_chat_product_configuration_proto_rawDescGZIP() []byte { + file_org_signal_chat_product_configuration_proto_rawDescOnce.Do(func() { + file_org_signal_chat_product_configuration_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_product_configuration_proto_rawDesc), len(file_org_signal_chat_product_configuration_proto_rawDesc))) + }) + return file_org_signal_chat_product_configuration_proto_rawDescData +} + +var file_org_signal_chat_product_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_org_signal_chat_product_configuration_proto_goTypes = []any{ + (*GetConfigurationRequest)(nil), // 0: org.signal.chat.purchase.GetConfigurationRequest + (*GetConfigurationResponse)(nil), // 1: org.signal.chat.purchase.GetConfigurationResponse + (*AmountList)(nil), // 2: org.signal.chat.purchase.AmountList + (*CurrencyConfiguration)(nil), // 3: org.signal.chat.purchase.CurrencyConfiguration + (*LevelConfiguration)(nil), // 4: org.signal.chat.purchase.LevelConfiguration + (*BackupLevelConfiguration)(nil), // 5: org.signal.chat.purchase.BackupLevelConfiguration + (*BackupConfiguration)(nil), // 6: org.signal.chat.purchase.BackupConfiguration + (*LoginConfiguration)(nil), // 7: org.signal.chat.purchase.LoginConfiguration + nil, // 8: org.signal.chat.purchase.GetConfigurationResponse.CurrenciesEntry + nil, // 9: org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntry + nil, // 10: org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntry + nil, // 11: org.signal.chat.purchase.CurrencyConfiguration.SubscriptionEntry + nil, // 12: org.signal.chat.purchase.CurrencyConfiguration.BackupSubscriptionEntry + nil, // 13: org.signal.chat.purchase.BackupConfiguration.LevelsEntry + (subscriptions.PaymentMethod)(0), // 14: org.signal.chat.purchase.PaymentMethod +} +var file_org_signal_chat_product_configuration_proto_depIdxs = []int32{ + 8, // 0: org.signal.chat.purchase.GetConfigurationResponse.currencies:type_name -> org.signal.chat.purchase.GetConfigurationResponse.CurrenciesEntry + 9, // 1: org.signal.chat.purchase.GetConfigurationResponse.badge_levels:type_name -> org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntry + 6, // 2: org.signal.chat.purchase.GetConfigurationResponse.backup:type_name -> org.signal.chat.purchase.BackupConfiguration + 7, // 3: org.signal.chat.purchase.GetConfigurationResponse.login:type_name -> org.signal.chat.purchase.LoginConfiguration + 10, // 4: org.signal.chat.purchase.CurrencyConfiguration.one_time:type_name -> org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntry + 11, // 5: org.signal.chat.purchase.CurrencyConfiguration.subscription:type_name -> org.signal.chat.purchase.CurrencyConfiguration.SubscriptionEntry + 12, // 6: org.signal.chat.purchase.CurrencyConfiguration.backup_subscription:type_name -> org.signal.chat.purchase.CurrencyConfiguration.BackupSubscriptionEntry + 14, // 7: org.signal.chat.purchase.CurrencyConfiguration.supported_payment_methods:type_name -> org.signal.chat.purchase.PaymentMethod + 13, // 8: org.signal.chat.purchase.BackupConfiguration.levels:type_name -> org.signal.chat.purchase.BackupConfiguration.LevelsEntry + 3, // 9: org.signal.chat.purchase.GetConfigurationResponse.CurrenciesEntry.value:type_name -> org.signal.chat.purchase.CurrencyConfiguration + 4, // 10: org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntry.value:type_name -> org.signal.chat.purchase.LevelConfiguration + 2, // 11: org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntry.value:type_name -> org.signal.chat.purchase.AmountList + 5, // 12: org.signal.chat.purchase.BackupConfiguration.LevelsEntry.value:type_name -> org.signal.chat.purchase.BackupLevelConfiguration + 0, // 13: org.signal.chat.purchase.ProductConfiguration.GetConfiguration:input_type -> org.signal.chat.purchase.GetConfigurationRequest + 1, // 14: org.signal.chat.purchase.ProductConfiguration.GetConfiguration:output_type -> org.signal.chat.purchase.GetConfigurationResponse + 14, // [14:15] is the sub-list for method output_type + 13, // [13:14] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_product_configuration_proto_init() } +func file_org_signal_chat_product_configuration_proto_init() { + if File_org_signal_chat_product_configuration_proto != nil { + return + } + file_org_signal_chat_product_configuration_proto_msgTypes[4].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_product_configuration_proto_rawDesc), len(file_org_signal_chat_product_configuration_proto_rawDesc)), + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_product_configuration_proto_goTypes, + DependencyIndexes: file_org_signal_chat_product_configuration_proto_depIdxs, + MessageInfos: file_org_signal_chat_product_configuration_proto_msgTypes, + }.Build() + File_org_signal_chat_product_configuration_proto = out.File + file_org_signal_chat_product_configuration_proto_goTypes = nil + file_org_signal_chat_product_configuration_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration_grpc.pb.go new file mode 100644 index 0000000..0802e59 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration_grpc.pb.go @@ -0,0 +1,135 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/product_configuration.proto + +package product_configuration + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ProductConfiguration_GetConfiguration_FullMethodName = "/org.signal.chat.purchase.ProductConfiguration/GetConfiguration" +) + +// ProductConfigurationClient is the client API for ProductConfiguration service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Retrieve product metadata for one-time donations, subscriptions, and backups +type ProductConfigurationClient interface { + // Returns configuration for donation subscriptions, backup subscriptions, and one-time donation ( + // "boost" and "gift") minimum and suggested amounts. Badges are referenced by ID only; resolve those + // IDs to full badge details via RemoteConfiguration.GetBadges. + GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) +} + +type productConfigurationClient struct { + cc grpc.ClientConnInterface +} + +func NewProductConfigurationClient(cc grpc.ClientConnInterface) ProductConfigurationClient { + return &productConfigurationClient{cc} +} + +func (c *productConfigurationClient) GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetConfigurationResponse) + err := c.cc.Invoke(ctx, ProductConfiguration_GetConfiguration_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProductConfigurationServer is the server API for ProductConfiguration service. +// All implementations must embed UnimplementedProductConfigurationServer +// for forward compatibility. +// +// Retrieve product metadata for one-time donations, subscriptions, and backups +type ProductConfigurationServer interface { + // Returns configuration for donation subscriptions, backup subscriptions, and one-time donation ( + // "boost" and "gift") minimum and suggested amounts. Badges are referenced by ID only; resolve those + // IDs to full badge details via RemoteConfiguration.GetBadges. + GetConfiguration(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) + mustEmbedUnimplementedProductConfigurationServer() +} + +// UnimplementedProductConfigurationServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedProductConfigurationServer struct{} + +func (UnimplementedProductConfigurationServer) GetConfiguration(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetConfiguration not implemented") +} +func (UnimplementedProductConfigurationServer) mustEmbedUnimplementedProductConfigurationServer() {} +func (UnimplementedProductConfigurationServer) testEmbeddedByValue() {} + +// UnsafeProductConfigurationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProductConfigurationServer will +// result in compilation errors. +type UnsafeProductConfigurationServer interface { + mustEmbedUnimplementedProductConfigurationServer() +} + +func RegisterProductConfigurationServer(s grpc.ServiceRegistrar, srv ProductConfigurationServer) { + // If the following call panics, it indicates UnimplementedProductConfigurationServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ProductConfiguration_ServiceDesc, srv) +} + +func _ProductConfiguration_GetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConfigurationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProductConfigurationServer).GetConfiguration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProductConfiguration_GetConfiguration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProductConfigurationServer).GetConfiguration(ctx, req.(*GetConfigurationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ProductConfiguration_ServiceDesc is the grpc.ServiceDesc for ProductConfiguration service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ProductConfiguration_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.purchase.ProductConfiguration", + HandlerType: (*ProductConfigurationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetConfiguration", + Handler: _ProductConfiguration_GetConfiguration_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/product_configuration.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go b/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go new file mode 100644 index 0000000..2c27314 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go @@ -0,0 +1,2418 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/profile.proto + +package profile + +import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CredentialType int32 + +const ( + CredentialType_CREDENTIAL_TYPE_UNSPECIFIED CredentialType = 0 + CredentialType_CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY CredentialType = 1 +) + +// Enum value maps for CredentialType. +var ( + CredentialType_name = map[int32]string{ + 0: "CREDENTIAL_TYPE_UNSPECIFIED", + 1: "CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY", + } + CredentialType_value = map[string]int32{ + "CREDENTIAL_TYPE_UNSPECIFIED": 0, + "CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY": 1, + } +) + +func (x CredentialType) Enum() *CredentialType { + p := new(CredentialType) + *p = x + return p +} + +func (x CredentialType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CredentialType) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_profile_proto_enumTypes[0].Descriptor() +} + +func (CredentialType) Type() protoreflect.EnumType { + return &file_org_signal_chat_profile_proto_enumTypes[0] +} + +func (x CredentialType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CredentialType.Descriptor instead. +func (CredentialType) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{0} +} + +type SetProfileV1Request_AvatarChange int32 + +const ( + SetProfileV1Request_AVATAR_CHANGE_UNCHANGED SetProfileV1Request_AvatarChange = 0 + SetProfileV1Request_AVATAR_CHANGE_CLEAR SetProfileV1Request_AvatarChange = 1 + SetProfileV1Request_AVATAR_CHANGE_UPDATE SetProfileV1Request_AvatarChange = 2 +) + +// Enum value maps for SetProfileV1Request_AvatarChange. +var ( + SetProfileV1Request_AvatarChange_name = map[int32]string{ + 0: "AVATAR_CHANGE_UNCHANGED", + 1: "AVATAR_CHANGE_CLEAR", + 2: "AVATAR_CHANGE_UPDATE", + } + SetProfileV1Request_AvatarChange_value = map[string]int32{ + "AVATAR_CHANGE_UNCHANGED": 0, + "AVATAR_CHANGE_CLEAR": 1, + "AVATAR_CHANGE_UPDATE": 2, + } +) + +func (x SetProfileV1Request_AvatarChange) Enum() *SetProfileV1Request_AvatarChange { + p := new(SetProfileV1Request_AvatarChange) + *p = x + return p +} + +func (x SetProfileV1Request_AvatarChange) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SetProfileV1Request_AvatarChange) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_profile_proto_enumTypes[1].Descriptor() +} + +func (SetProfileV1Request_AvatarChange) Type() protoreflect.EnumType { + return &file_org_signal_chat_profile_proto_enumTypes[1] +} + +func (x SetProfileV1Request_AvatarChange) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SetProfileV1Request_AvatarChange.Descriptor instead. +func (SetProfileV1Request_AvatarChange) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{0, 0} +} + +type SetProfileV1Request struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ciphertext of a name that users must set on the profile. + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // An enum to indicate what change, if any, is made to the avatar with this request. + AvatarChange SetProfileV1Request_AvatarChange `protobuf:"varint,2,opt,name=avatar_change,json=avatarChange,proto3,enum=org.signal.chat.profile.SetProfileV1Request_AvatarChange" json:"avatar_change,omitempty"` + // The ciphertext of an emoji that users can set on their profile. + AboutEmoji []byte `protobuf:"bytes,3,opt,name=about_emoji,json=aboutEmoji,proto3" json:"about_emoji,omitempty"` + // The ciphertext of a description that users can set on their profile. + About []byte `protobuf:"bytes,4,opt,name=about,proto3" json:"about,omitempty"` + // The ciphertext of the phone-number sharing setting on the profile. 29-byte encrypted boolean. + PhoneNumberSharing []byte `protobuf:"bytes,6,opt,name=phone_number_sharing,json=phoneNumberSharing,proto3" json:"phone_number_sharing,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetProfileV1Request) Reset() { + *x = SetProfileV1Request{} + mi := &file_org_signal_chat_profile_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetProfileV1Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetProfileV1Request) ProtoMessage() {} + +func (x *SetProfileV1Request) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetProfileV1Request.ProtoReflect.Descriptor instead. +func (*SetProfileV1Request) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{0} +} + +func (x *SetProfileV1Request) GetName() []byte { + if x != nil { + return x.Name + } + return nil +} + +func (x *SetProfileV1Request) GetAvatarChange() SetProfileV1Request_AvatarChange { + if x != nil { + return x.AvatarChange + } + return SetProfileV1Request_AVATAR_CHANGE_UNCHANGED +} + +func (x *SetProfileV1Request) GetAboutEmoji() []byte { + if x != nil { + return x.AboutEmoji + } + return nil +} + +func (x *SetProfileV1Request) GetAbout() []byte { + if x != nil { + return x.About + } + return nil +} + +func (x *SetProfileV1Request) GetPhoneNumberSharing() []byte { + if x != nil { + return x.PhoneNumberSharing + } + return nil +} + +type SetProfileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The profile version. Required. + Version []byte `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // The ciphertext of a serialized Profile protobuf. Required. + // 937 max length = 909 plaintext serialization + 28 bytes encryption overhead + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // The SHA-256 hash of the Profile ciphertext being replaced. + // This is used an optimistic lock against concurrent changes. + // + // Optional, if this is the initial request to create a version. + ExpectedCurrentDataHash []byte `protobuf:"bytes,3,opt,name=expected_current_data_hash,json=expectedCurrentDataHash,proto3" json:"expected_current_data_hash,omitempty"` + // The current profile version being updated. + // This is used as an optimistic lock against concurrent changes. + // + // Optional, if there is no current profile version for the account. + ExpectedCurrentVersion []byte `protobuf:"bytes,4,opt,name=expected_current_version,json=expectedCurrentVersion,proto3" json:"expected_current_version,omitempty"` + // The ciphertext of the MobileCoin wallet ID on the profile. + PaymentAddress []byte `protobuf:"bytes,5,opt,name=payment_address,json=paymentAddress,proto3" json:"payment_address,omitempty"` + // A list of badge IDs associated with the profile. + BadgeIds []string `protobuf:"bytes,6,rep,name=badge_ids,json=badgeIds,proto3" json:"badge_ids,omitempty"` + // The profile key commitment. Used to issue a profile key credential response. + // + // Required during the v1 -> v2 migration period. Afterwards will be optional, if this is an update to an existing version. + Commitment []byte `protobuf:"bytes,7,opt,name=commitment,proto3" json:"commitment,omitempty"` + // An embedded v1 request. Required during the v1 -> v2 migration period. + // + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + V1Request *SetProfileV1Request `protobuf:"bytes,15,opt,name=v1Request,proto3" json:"v1Request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetProfileRequest) Reset() { + *x = SetProfileRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetProfileRequest) ProtoMessage() {} + +func (x *SetProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetProfileRequest.ProtoReflect.Descriptor instead. +func (*SetProfileRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{1} +} + +func (x *SetProfileRequest) GetVersion() []byte { + if x != nil { + return x.Version + } + return nil +} + +func (x *SetProfileRequest) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *SetProfileRequest) GetExpectedCurrentDataHash() []byte { + if x != nil { + return x.ExpectedCurrentDataHash + } + return nil +} + +func (x *SetProfileRequest) GetExpectedCurrentVersion() []byte { + if x != nil { + return x.ExpectedCurrentVersion + } + return nil +} + +func (x *SetProfileRequest) GetPaymentAddress() []byte { + if x != nil { + return x.PaymentAddress + } + return nil +} + +func (x *SetProfileRequest) GetBadgeIds() []string { + if x != nil { + return x.BadgeIds + } + return nil +} + +func (x *SetProfileRequest) GetCommitment() []byte { + if x != nil { + return x.Commitment + } + return nil +} + +func (x *SetProfileRequest) GetV1Request() *SetProfileV1Request { + if x != nil { + return x.V1Request + } + return nil +} + +// Indicates that the account is not permitted to set a payment address, +// due to a disallowed country prefix on the account's phone number. +type PaymentsForbiddenInRegion struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentsForbiddenInRegion) Reset() { + *x = PaymentsForbiddenInRegion{} + mi := &file_org_signal_chat_profile_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentsForbiddenInRegion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentsForbiddenInRegion) ProtoMessage() {} + +func (x *PaymentsForbiddenInRegion) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentsForbiddenInRegion.ProtoReflect.Descriptor instead. +func (*PaymentsForbiddenInRegion) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{2} +} + +// Indicates that the account does not have the Profiles v2 capability, which +// is required to call Profiles.SetProfile +type ProfilesV2CapabilityRequired struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProfilesV2CapabilityRequired) Reset() { + *x = ProfilesV2CapabilityRequired{} + mi := &file_org_signal_chat_profile_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProfilesV2CapabilityRequired) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProfilesV2CapabilityRequired) ProtoMessage() {} + +func (x *ProfilesV2CapabilityRequired) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProfilesV2CapabilityRequired.ProtoReflect.Descriptor instead. +func (*ProfilesV2CapabilityRequired) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{3} +} + +type SetProfileResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If the request included a v1 avatar change, this field contains the policy + // and credential used by clients to upload an avatar to the CDN. + // + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + V1AvatarUploadForm *common.S3UploadForm `protobuf:"bytes,15,opt,name=v1_avatar_upload_form,json=v1AvatarUploadForm,proto3,oneof" json:"v1_avatar_upload_form,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetProfileResult) Reset() { + *x = SetProfileResult{} + mi := &file_org_signal_chat_profile_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetProfileResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetProfileResult) ProtoMessage() {} + +func (x *SetProfileResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetProfileResult.ProtoReflect.Descriptor instead. +func (*SetProfileResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{4} +} + +func (x *SetProfileResult) GetV1AvatarUploadForm() *common.S3UploadForm { + if x != nil { + return x.V1AvatarUploadForm + } + return nil +} + +type SetProfileResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SetProfileResponse_Result + // *SetProfileResponse_ExpectedDataWriteConflict + // *SetProfileResponse_PaymentsForbiddenInRegion + // *SetProfileResponse_ExpectedVersionWriteConflict + // *SetProfileResponse_ProfilesV2CapabilityRequired + Response isSetProfileResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetProfileResponse) Reset() { + *x = SetProfileResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetProfileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetProfileResponse) ProtoMessage() {} + +func (x *SetProfileResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetProfileResponse.ProtoReflect.Descriptor instead. +func (*SetProfileResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{5} +} + +func (x *SetProfileResponse) GetResponse() isSetProfileResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SetProfileResponse) GetResult() *SetProfileResult { + if x != nil { + if x, ok := x.Response.(*SetProfileResponse_Result); ok { + return x.Result + } + } + return nil +} + +func (x *SetProfileResponse) GetExpectedDataWriteConflict() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetProfileResponse_ExpectedDataWriteConflict); ok { + return x.ExpectedDataWriteConflict + } + } + return nil +} + +func (x *SetProfileResponse) GetPaymentsForbiddenInRegion() *PaymentsForbiddenInRegion { + if x != nil { + if x, ok := x.Response.(*SetProfileResponse_PaymentsForbiddenInRegion); ok { + return x.PaymentsForbiddenInRegion + } + } + return nil +} + +func (x *SetProfileResponse) GetExpectedVersionWriteConflict() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetProfileResponse_ExpectedVersionWriteConflict); ok { + return x.ExpectedVersionWriteConflict + } + } + return nil +} + +func (x *SetProfileResponse) GetProfilesV2CapabilityRequired() *ProfilesV2CapabilityRequired { + if x != nil { + if x, ok := x.Response.(*SetProfileResponse_ProfilesV2CapabilityRequired); ok { + return x.ProfilesV2CapabilityRequired + } + } + return nil +} + +type isSetProfileResponse_Response interface { + isSetProfileResponse_Response() +} + +type SetProfileResponse_Result struct { + Result *SetProfileResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type SetProfileResponse_ExpectedDataWriteConflict struct { + // The current data hash did not match the request's expectation, indicating + // another device on the account may have written an update the caller does not know about. + ExpectedDataWriteConflict *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=expected_data_write_conflict,json=expectedDataWriteConflict,proto3,oneof"` +} + +type SetProfileResponse_PaymentsForbiddenInRegion struct { + // Payments are not permitted in the account's region, based on its phone + // number or the caller's IP address if the account does not have a phone + // number. The request should be retried without `payment_address. + PaymentsForbiddenInRegion *PaymentsForbiddenInRegion `protobuf:"bytes,3,opt,name=payments_forbidden_in_region,json=paymentsForbiddenInRegion,proto3,oneof"` +} + +type SetProfileResponse_ExpectedVersionWriteConflict struct { + // The current version did not match the request's expectation, indicating + // another device on the account may have created a new version the caller does not know about. + ExpectedVersionWriteConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=expected_version_write_conflict,json=expectedVersionWriteConflict,proto3,oneof"` +} + +type SetProfileResponse_ProfilesV2CapabilityRequired struct { + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + ProfilesV2CapabilityRequired *ProfilesV2CapabilityRequired `protobuf:"bytes,15,opt,name=profiles_v2_capability_required,json=profilesV2CapabilityRequired,proto3,oneof"` +} + +func (*SetProfileResponse_Result) isSetProfileResponse_Response() {} + +func (*SetProfileResponse_ExpectedDataWriteConflict) isSetProfileResponse_Response() {} + +func (*SetProfileResponse_PaymentsForbiddenInRegion) isSetProfileResponse_Response() {} + +func (*SetProfileResponse_ExpectedVersionWriteConflict) isSetProfileResponse_Response() {} + +func (*SetProfileResponse_ProfilesV2CapabilityRequired) isSetProfileResponse_Response() {} + +type GetProfileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ACI of the account for which to get profile data. + AccountIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=account_identifier,json=accountIdentifier,proto3" json:"account_identifier,omitempty"` + // The profile version to retrieve. + Version []byte `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // The `etag` from the previous request for this Profile version. If + // unchanged, the response will omit `profile` and `etag_matched` will be + // `true`. + Etag []byte `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProfileRequest) Reset() { + *x = GetProfileRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProfileRequest) ProtoMessage() {} + +func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProfileRequest.ProtoReflect.Descriptor instead. +func (*GetProfileRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{6} +} + +func (x *GetProfileRequest) GetAccountIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.AccountIdentifier + } + return nil +} + +func (x *GetProfileRequest) GetVersion() []byte { + if x != nil { + return x.Version + } + return nil +} + +func (x *GetProfileRequest) GetEtag() []byte { + if x != nil { + return x.Etag + } + return nil +} + +type GetProfileAnonymousRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Contains the data necessary to request a profile. + Request *GetProfileRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + // Types that are valid to be assigned to Authentication: + // + // *GetProfileAnonymousRequest_UnidentifiedAccessKey + // *GetProfileAnonymousRequest_GroupSendToken + Authentication isGetProfileAnonymousRequest_Authentication `protobuf_oneof:"authentication"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProfileAnonymousRequest) Reset() { + *x = GetProfileAnonymousRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProfileAnonymousRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProfileAnonymousRequest) ProtoMessage() {} + +func (x *GetProfileAnonymousRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProfileAnonymousRequest.ProtoReflect.Descriptor instead. +func (*GetProfileAnonymousRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{7} +} + +func (x *GetProfileAnonymousRequest) GetRequest() *GetProfileRequest { + if x != nil { + return x.Request + } + return nil +} + +func (x *GetProfileAnonymousRequest) GetAuthentication() isGetProfileAnonymousRequest_Authentication { + if x != nil { + return x.Authentication + } + return nil +} + +func (x *GetProfileAnonymousRequest) GetUnidentifiedAccessKey() []byte { + if x != nil { + if x, ok := x.Authentication.(*GetProfileAnonymousRequest_UnidentifiedAccessKey); ok { + return x.UnidentifiedAccessKey + } + } + return nil +} + +func (x *GetProfileAnonymousRequest) GetGroupSendToken() []byte { + if x != nil { + if x, ok := x.Authentication.(*GetProfileAnonymousRequest_GroupSendToken); ok { + return x.GroupSendToken + } + } + return nil +} + +type isGetProfileAnonymousRequest_Authentication interface { + isGetProfileAnonymousRequest_Authentication() +} + +type GetProfileAnonymousRequest_UnidentifiedAccessKey struct { + // The unidentified access key for the targeted account. + UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` +} + +type GetProfileAnonymousRequest_GroupSendToken struct { + // A group send endorsement token for the targeted account. + GroupSendToken []byte `protobuf:"bytes,3,opt,name=group_send_token,json=groupSendToken,proto3,oneof"` +} + +func (*GetProfileAnonymousRequest_UnidentifiedAccessKey) isGetProfileAnonymousRequest_Authentication() { +} + +func (*GetProfileAnonymousRequest_GroupSendToken) isGetProfileAnonymousRequest_Authentication() {} + +type AccountInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The account identity key of the targeted account. + IdentityKey []byte `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` + // A checksum of the unidentified access key for the targeted account. + UnidentifiedAccessKeyFingerprint []byte `protobuf:"bytes,2,opt,name=unidentified_access_key_fingerprint,json=unidentifiedAccessKeyFingerprint,proto3" json:"unidentified_access_key_fingerprint,omitempty"` + // Whether the account has enabled sealed sender from anyone. + UnrestrictedUnidentifiedAccess bool `protobuf:"varint,3,opt,name=unrestricted_unidentified_access,json=unrestrictedUnidentifiedAccess,proto3" json:"unrestricted_unidentified_access,omitempty"` + // A list of the badges ids associated with the account. Metadata to display + // badges may be obtained by cross-referencing badge ids with + // RemoteConfiguration.GetBadges. + BadgeIds []string `protobuf:"bytes,4,rep,name=badge_ids,json=badgeIds,proto3" json:"badge_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountInfo) Reset() { + *x = AccountInfo{} + mi := &file_org_signal_chat_profile_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountInfo) ProtoMessage() {} + +func (x *AccountInfo) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. +func (*AccountInfo) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{8} +} + +func (x *AccountInfo) GetIdentityKey() []byte { + if x != nil { + return x.IdentityKey + } + return nil +} + +func (x *AccountInfo) GetUnidentifiedAccessKeyFingerprint() []byte { + if x != nil { + return x.UnidentifiedAccessKeyFingerprint + } + return nil +} + +func (x *AccountInfo) GetUnrestrictedUnidentifiedAccess() bool { + if x != nil { + return x.UnrestrictedUnidentifiedAccess + } + return false +} + +func (x *AccountInfo) GetBadgeIds() []string { + if x != nil { + return x.BadgeIds + } + return nil +} + +type ProfileResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ciphertext of the requested version of the profile + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // The ciphertext of the MobileCoin wallet ID on the profile. + PaymentAddress []byte `protobuf:"bytes,2,opt,name=payment_address,json=paymentAddress,proto3" json:"payment_address,omitempty"` + // Information about the targeted account + AccountInfo *AccountInfo `protobuf:"bytes,3,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"` + // An entity tag for the profile. This may be used in subsequent requests + // for this profile version to optimize bandwidth. + // + // Note that this hash will not match the expected_data_hash used on + // SetProfile for concurrency control. + // + // Clients may validate that the value has been correctly calculated by + // calculating a 10-byte truncated TupleHash256 as follows: + // + // ``` + // TupleHash256(S = "ProfileETag/v1", L = 80 bits, tuple = [ + // + // data, + // payment_address, + // account_info.identity_key, + // account_info.unidentified_access_key_fingerprint, + // account_info.unrestricted_unidentified_access ? 0x01 : 0x00, + // uint32BE(count(account_info.badge_ids)), + // utf8(id) for each id in sortLexAscendingByUtf8Bytes(account_info.badge_ids), + // + // ]) + // ``` + // + // Absent/empty fields contribute an empty element (not zero bytes omitted): + // a missing payment_address is still a present, zero-length tuple element. + // + // This etag will always exclusively cover the documented fields. If fields + // are added in the future, a new etag field must be introduced. + Etag []byte `protobuf:"bytes,4,opt,name=etag,proto3" json:"etag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProfileResult) Reset() { + *x = ProfileResult{} + mi := &file_org_signal_chat_profile_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProfileResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProfileResult) ProtoMessage() {} + +func (x *ProfileResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProfileResult.ProtoReflect.Descriptor instead. +func (*ProfileResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{9} +} + +func (x *ProfileResult) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *ProfileResult) GetPaymentAddress() []byte { + if x != nil { + return x.PaymentAddress + } + return nil +} + +func (x *ProfileResult) GetAccountInfo() *AccountInfo { + if x != nil { + return x.AccountInfo + } + return nil +} + +func (x *ProfileResult) GetEtag() []byte { + if x != nil { + return x.Etag + } + return nil +} + +type LegacyProfileResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ciphertext of the name on the profile. + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The ciphertext of the description on the profile. + About []byte `protobuf:"bytes,2,opt,name=about,proto3" json:"about,omitempty"` + // The ciphertext of the emoji on the profile. + AboutEmoji []byte `protobuf:"bytes,3,opt,name=about_emoji,json=aboutEmoji,proto3" json:"about_emoji,omitempty"` + // The cdn0 path of the avatar on the profile. + Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` + // The ciphertext of the phone-number sharing setting on the profile. + PhoneNumberSharing []byte `protobuf:"bytes,5,opt,name=phone_number_sharing,json=phoneNumberSharing,proto3" json:"phone_number_sharing,omitempty"` + // The ciphertext of the MobileCoin wallet ID on the profile. + PaymentAddress []byte `protobuf:"bytes,6,opt,name=payment_address,json=paymentAddress,proto3" json:"payment_address,omitempty"` + // Information about the targeted account + AccountInfo *AccountInfo `protobuf:"bytes,7,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LegacyProfileResult) Reset() { + *x = LegacyProfileResult{} + mi := &file_org_signal_chat_profile_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LegacyProfileResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LegacyProfileResult) ProtoMessage() {} + +func (x *LegacyProfileResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LegacyProfileResult.ProtoReflect.Descriptor instead. +func (*LegacyProfileResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{10} +} + +func (x *LegacyProfileResult) GetName() []byte { + if x != nil { + return x.Name + } + return nil +} + +func (x *LegacyProfileResult) GetAbout() []byte { + if x != nil { + return x.About + } + return nil +} + +func (x *LegacyProfileResult) GetAboutEmoji() []byte { + if x != nil { + return x.AboutEmoji + } + return nil +} + +func (x *LegacyProfileResult) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *LegacyProfileResult) GetPhoneNumberSharing() []byte { + if x != nil { + return x.PhoneNumberSharing + } + return nil +} + +func (x *LegacyProfileResult) GetPaymentAddress() []byte { + if x != nil { + return x.PaymentAddress + } + return nil +} + +func (x *LegacyProfileResult) GetAccountInfo() *AccountInfo { + if x != nil { + return x.AccountInfo + } + return nil +} + +type GetProfileResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetProfileResponse_Profile + // *GetProfileResponse_EtagMatched + // *GetProfileResponse_NotFound + // *GetProfileResponse_LegacyProfile + Response isGetProfileResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProfileResponse) Reset() { + *x = GetProfileResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProfileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProfileResponse) ProtoMessage() {} + +func (x *GetProfileResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProfileResponse.ProtoReflect.Descriptor instead. +func (*GetProfileResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{11} +} + +func (x *GetProfileResponse) GetResponse() isGetProfileResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetProfileResponse) GetProfile() *ProfileResult { + if x != nil { + if x, ok := x.Response.(*GetProfileResponse_Profile); ok { + return x.Profile + } + } + return nil +} + +func (x *GetProfileResponse) GetEtagMatched() bool { + if x != nil { + if x, ok := x.Response.(*GetProfileResponse_EtagMatched); ok { + return x.EtagMatched + } + } + return false +} + +func (x *GetProfileResponse) GetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*GetProfileResponse_NotFound); ok { + return x.NotFound + } + } + return nil +} + +func (x *GetProfileResponse) GetLegacyProfile() *LegacyProfileResult { + if x != nil { + if x, ok := x.Response.(*GetProfileResponse_LegacyProfile); ok { + return x.LegacyProfile + } + } + return nil +} + +type isGetProfileResponse_Response interface { + isGetProfileResponse_Response() +} + +type GetProfileResponse_Profile struct { + // The full profile data. The current profile did not match the provided + // etag (or no etag was provided). + Profile *ProfileResult `protobuf:"bytes,1,opt,name=profile,proto3,oneof"` +} + +type GetProfileResponse_EtagMatched struct { + // The current profile matched the provided etag. If present, this will always be true. + EtagMatched bool `protobuf:"varint,2,opt,name=etag_matched,json=etagMatched,proto3,oneof"` +} + +type GetProfileResponse_NotFound struct { + NotFound *errors.NotFound `protobuf:"bytes,3,opt,name=not_found,json=notFound,proto3,oneof"` +} + +type GetProfileResponse_LegacyProfile struct { + // Will be present if there is no v2 Profile data for this version. + // + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + LegacyProfile *LegacyProfileResult `protobuf:"bytes,15,opt,name=legacy_profile,json=legacyProfile,proto3,oneof"` +} + +func (*GetProfileResponse_Profile) isGetProfileResponse_Response() {} + +func (*GetProfileResponse_EtagMatched) isGetProfileResponse_Response() {} + +func (*GetProfileResponse_NotFound) isGetProfileResponse_Response() {} + +func (*GetProfileResponse_LegacyProfile) isGetProfileResponse_Response() {} + +type GetProfileAnonymousResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetProfileAnonymousResponse_Profile + // *GetProfileAnonymousResponse_EtagMatched + // *GetProfileAnonymousResponse_NotFound + // *GetProfileAnonymousResponse_FailedUnidentifiedAuthorization + // *GetProfileAnonymousResponse_ProfileV1 + Response isGetProfileAnonymousResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProfileAnonymousResponse) Reset() { + *x = GetProfileAnonymousResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProfileAnonymousResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProfileAnonymousResponse) ProtoMessage() {} + +func (x *GetProfileAnonymousResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProfileAnonymousResponse.ProtoReflect.Descriptor instead. +func (*GetProfileAnonymousResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{12} +} + +func (x *GetProfileAnonymousResponse) GetResponse() isGetProfileAnonymousResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetProfileAnonymousResponse) GetProfile() *ProfileResult { + if x != nil { + if x, ok := x.Response.(*GetProfileAnonymousResponse_Profile); ok { + return x.Profile + } + } + return nil +} + +func (x *GetProfileAnonymousResponse) GetEtagMatched() bool { + if x != nil { + if x, ok := x.Response.(*GetProfileAnonymousResponse_EtagMatched); ok { + return x.EtagMatched + } + } + return false +} + +func (x *GetProfileAnonymousResponse) GetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*GetProfileAnonymousResponse_NotFound); ok { + return x.NotFound + } + } + return nil +} + +func (x *GetProfileAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization); ok { + return x.FailedUnidentifiedAuthorization + } + } + return nil +} + +func (x *GetProfileAnonymousResponse) GetProfileV1() *LegacyProfileResult { + if x != nil { + if x, ok := x.Response.(*GetProfileAnonymousResponse_ProfileV1); ok { + return x.ProfileV1 + } + } + return nil +} + +type isGetProfileAnonymousResponse_Response interface { + isGetProfileAnonymousResponse_Response() +} + +type GetProfileAnonymousResponse_Profile struct { + // The full profile data. The current profile did not match the provided + // etag (or no etag was provided). + Profile *ProfileResult `protobuf:"bytes,1,opt,name=profile,proto3,oneof"` +} + +type GetProfileAnonymousResponse_EtagMatched struct { + // The current profile matched the provided etag. If present, this will always be true. + EtagMatched bool `protobuf:"varint,2,opt,name=etag_matched,json=etagMatched,proto3,oneof"` +} + +type GetProfileAnonymousResponse_NotFound struct { + NotFound *errors.NotFound `protobuf:"bytes,3,opt,name=not_found,json=notFound,proto3,oneof"` +} + +type GetProfileAnonymousResponse_FailedUnidentifiedAuthorization struct { + FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,4,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` +} + +type GetProfileAnonymousResponse_ProfileV1 struct { + // Will be present if there is no v2 Profile data for this version. + // + // Because this is a temporary field during the migration, it has the highest + // field number without serialization overhead. This is purely aesthetic. + ProfileV1 *LegacyProfileResult `protobuf:"bytes,15,opt,name=profile_v1,json=profileV1,proto3,oneof"` +} + +func (*GetProfileAnonymousResponse_Profile) isGetProfileAnonymousResponse_Response() {} + +func (*GetProfileAnonymousResponse_EtagMatched) isGetProfileAnonymousResponse_Response() {} + +func (*GetProfileAnonymousResponse_NotFound) isGetProfileAnonymousResponse_Response() {} + +func (*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization) isGetProfileAnonymousResponse_Response() { +} + +func (*GetProfileAnonymousResponse_ProfileV1) isGetProfileAnonymousResponse_Response() {} + +type GetExpiringProfileKeyCredentialRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ACI of the account for which to get a profile key credential. + AccountIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=account_identifier,json=accountIdentifier,proto3" json:"account_identifier,omitempty"` + // A zkgroup request for a profile key credential. + CredentialRequest []byte `protobuf:"bytes,2,opt,name=credential_request,json=credentialRequest,proto3" json:"credential_request,omitempty"` + // The type of credential being requested. + CredentialType CredentialType `protobuf:"varint,3,opt,name=credential_type,json=credentialType,proto3,enum=org.signal.chat.profile.CredentialType" json:"credential_type,omitempty"` + // The profile version for which to generate a profile key credential. + Version []byte `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetExpiringProfileKeyCredentialRequest) Reset() { + *x = GetExpiringProfileKeyCredentialRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetExpiringProfileKeyCredentialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExpiringProfileKeyCredentialRequest) ProtoMessage() {} + +func (x *GetExpiringProfileKeyCredentialRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetExpiringProfileKeyCredentialRequest.ProtoReflect.Descriptor instead. +func (*GetExpiringProfileKeyCredentialRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{13} +} + +func (x *GetExpiringProfileKeyCredentialRequest) GetAccountIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.AccountIdentifier + } + return nil +} + +func (x *GetExpiringProfileKeyCredentialRequest) GetCredentialRequest() []byte { + if x != nil { + return x.CredentialRequest + } + return nil +} + +func (x *GetExpiringProfileKeyCredentialRequest) GetCredentialType() CredentialType { + if x != nil { + return x.CredentialType + } + return CredentialType_CREDENTIAL_TYPE_UNSPECIFIED +} + +func (x *GetExpiringProfileKeyCredentialRequest) GetVersion() []byte { + if x != nil { + return x.Version + } + return nil +} + +type GetExpiringProfileKeyCredentialAnonymousRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Contains the data necessary to request an expiring profile key credential. + Request *GetExpiringProfileKeyCredentialRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + // The unidentified access key for the targeted account. + UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3" json:"unidentified_access_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetExpiringProfileKeyCredentialAnonymousRequest) Reset() { + *x = GetExpiringProfileKeyCredentialAnonymousRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetExpiringProfileKeyCredentialAnonymousRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExpiringProfileKeyCredentialAnonymousRequest) ProtoMessage() {} + +func (x *GetExpiringProfileKeyCredentialAnonymousRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetExpiringProfileKeyCredentialAnonymousRequest.ProtoReflect.Descriptor instead. +func (*GetExpiringProfileKeyCredentialAnonymousRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{14} +} + +func (x *GetExpiringProfileKeyCredentialAnonymousRequest) GetRequest() *GetExpiringProfileKeyCredentialRequest { + if x != nil { + return x.Request + } + return nil +} + +func (x *GetExpiringProfileKeyCredentialAnonymousRequest) GetUnidentifiedAccessKey() []byte { + if x != nil { + return x.UnidentifiedAccessKey + } + return nil +} + +type GetExpiringProfileKeyCredentialResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A zkgroup credential used by a client to prove that it has the profile key + // of a targeted account. + ProfileKeyCredential []byte `protobuf:"bytes,1,opt,name=profile_key_credential,json=profileKeyCredential,proto3" json:"profile_key_credential,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetExpiringProfileKeyCredentialResult) Reset() { + *x = GetExpiringProfileKeyCredentialResult{} + mi := &file_org_signal_chat_profile_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetExpiringProfileKeyCredentialResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExpiringProfileKeyCredentialResult) ProtoMessage() {} + +func (x *GetExpiringProfileKeyCredentialResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetExpiringProfileKeyCredentialResult.ProtoReflect.Descriptor instead. +func (*GetExpiringProfileKeyCredentialResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{15} +} + +func (x *GetExpiringProfileKeyCredentialResult) GetProfileKeyCredential() []byte { + if x != nil { + return x.ProfileKeyCredential + } + return nil +} + +type GetExpiringProfileKeyCredentialAnonymousResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetExpiringProfileKeyCredentialAnonymousResponse_Result + // *GetExpiringProfileKeyCredentialAnonymousResponse_NotFound + // *GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization + Response isGetExpiringProfileKeyCredentialAnonymousResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetExpiringProfileKeyCredentialAnonymousResponse) Reset() { + *x = GetExpiringProfileKeyCredentialAnonymousResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetExpiringProfileKeyCredentialAnonymousResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExpiringProfileKeyCredentialAnonymousResponse) ProtoMessage() {} + +func (x *GetExpiringProfileKeyCredentialAnonymousResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetExpiringProfileKeyCredentialAnonymousResponse.ProtoReflect.Descriptor instead. +func (*GetExpiringProfileKeyCredentialAnonymousResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{16} +} + +func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetResponse() isGetExpiringProfileKeyCredentialAnonymousResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetResult() *GetExpiringProfileKeyCredentialResult { + if x != nil { + if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_Result); ok { + return x.Result + } + } + return nil +} + +func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound); ok { + return x.NotFound + } + } + return nil +} + +func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization); ok { + return x.FailedUnidentifiedAuthorization + } + } + return nil +} + +type isGetExpiringProfileKeyCredentialAnonymousResponse_Response interface { + isGetExpiringProfileKeyCredentialAnonymousResponse_Response() +} + +type GetExpiringProfileKeyCredentialAnonymousResponse_Result struct { + Result *GetExpiringProfileKeyCredentialResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type GetExpiringProfileKeyCredentialAnonymousResponse_NotFound struct { + NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` +} + +type GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization struct { + FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` +} + +func (*GetExpiringProfileKeyCredentialAnonymousResponse_Result) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { +} + +func (*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { +} + +func (*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { +} + +type GetAvatarCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AvatarCredentialsRequest []byte `protobuf:"bytes,1,opt,name=avatar_credentials_request,json=avatarCredentialsRequest,proto3" json:"avatar_credentials_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvatarCredentialsRequest) Reset() { + *x = GetAvatarCredentialsRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvatarCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvatarCredentialsRequest) ProtoMessage() {} + +func (x *GetAvatarCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvatarCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetAvatarCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{17} +} + +func (x *GetAvatarCredentialsRequest) GetAvatarCredentialsRequest() []byte { + if x != nil { + return x.AvatarCredentialsRequest + } + return nil +} + +type GetAvatarCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetAvatarCredentialsResponse_AvatarCredentials + // *GetAvatarCredentialsResponse_MissingZkCredentialKey + Response isGetAvatarCredentialsResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvatarCredentialsResponse) Reset() { + *x = GetAvatarCredentialsResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvatarCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvatarCredentialsResponse) ProtoMessage() {} + +func (x *GetAvatarCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvatarCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetAvatarCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{18} +} + +func (x *GetAvatarCredentialsResponse) GetResponse() isGetAvatarCredentialsResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetAvatarCredentialsResponse) GetAvatarCredentials() []byte { + if x != nil { + if x, ok := x.Response.(*GetAvatarCredentialsResponse_AvatarCredentials); ok { + return x.AvatarCredentials + } + } + return nil +} + +func (x *GetAvatarCredentialsResponse) GetMissingZkCredentialKey() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*GetAvatarCredentialsResponse_MissingZkCredentialKey); ok { + return x.MissingZkCredentialKey + } + } + return nil +} + +type isGetAvatarCredentialsResponse_Response interface { + isGetAvatarCredentialsResponse_Response() +} + +type GetAvatarCredentialsResponse_AvatarCredentials struct { + AvatarCredentials []byte `protobuf:"bytes,1,opt,name=avatar_credentials,json=avatarCredentials,proto3,oneof"` +} + +type GetAvatarCredentialsResponse_MissingZkCredentialKey struct { + // the client must call Accounts.SetZkCredentialKey to call this method + MissingZkCredentialKey *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=missing_zk_credential_key,json=missingZkCredentialKey,proto3,oneof"` +} + +func (*GetAvatarCredentialsResponse_AvatarCredentials) isGetAvatarCredentialsResponse_Response() {} + +func (*GetAvatarCredentialsResponse_MissingZkCredentialKey) isGetAvatarCredentialsResponse_Response() { +} + +type GetAvatarUploadFormRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` + // The length of the attachment for the requested upload form. Uploads + // performed with this form will be limited to the provided length. + UploadLength uint32 `protobuf:"varint,2,opt,name=upload_length,json=uploadLength,proto3" json:"upload_length,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvatarUploadFormRequest) Reset() { + *x = GetAvatarUploadFormRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvatarUploadFormRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvatarUploadFormRequest) ProtoMessage() {} + +func (x *GetAvatarUploadFormRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvatarUploadFormRequest.ProtoReflect.Descriptor instead. +func (*GetAvatarUploadFormRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{19} +} + +func (x *GetAvatarUploadFormRequest) GetAvatarCredentialsPresentation() []byte { + if x != nil { + return x.AvatarCredentialsPresentation + } + return nil +} + +func (x *GetAvatarUploadFormRequest) GetUploadLength() uint32 { + if x != nil { + return x.UploadLength + } + return 0 +} + +type GetAvatarUploadFormResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetAvatarUploadFormResponse_AvatarUploadForm + // *GetAvatarUploadFormResponse_InvalidCredentialsPresentation + Response isGetAvatarUploadFormResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvatarUploadFormResponse) Reset() { + *x = GetAvatarUploadFormResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvatarUploadFormResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvatarUploadFormResponse) ProtoMessage() {} + +func (x *GetAvatarUploadFormResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvatarUploadFormResponse.ProtoReflect.Descriptor instead. +func (*GetAvatarUploadFormResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{20} +} + +func (x *GetAvatarUploadFormResponse) GetResponse() isGetAvatarUploadFormResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetAvatarUploadFormResponse) GetAvatarUploadForm() *common.S3UploadForm { + if x != nil { + if x, ok := x.Response.(*GetAvatarUploadFormResponse_AvatarUploadForm); ok { + return x.AvatarUploadForm + } + } + return nil +} + +func (x *GetAvatarUploadFormResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*GetAvatarUploadFormResponse_InvalidCredentialsPresentation); ok { + return x.InvalidCredentialsPresentation + } + } + return nil +} + +type isGetAvatarUploadFormResponse_Response interface { + isGetAvatarUploadFormResponse_Response() +} + +type GetAvatarUploadFormResponse_AvatarUploadForm struct { + AvatarUploadForm *common.S3UploadForm `protobuf:"bytes,1,opt,name=avatar_upload_form,json=avatarUploadForm,proto3,oneof"` +} + +type GetAvatarUploadFormResponse_InvalidCredentialsPresentation struct { + InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` +} + +func (*GetAvatarUploadFormResponse_AvatarUploadForm) isGetAvatarUploadFormResponse_Response() {} + +func (*GetAvatarUploadFormResponse_InvalidCredentialsPresentation) isGetAvatarUploadFormResponse_Response() { +} + +type ExtendAvatarTTLRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExtendAvatarTTLRequest) Reset() { + *x = ExtendAvatarTTLRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExtendAvatarTTLRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtendAvatarTTLRequest) ProtoMessage() {} + +func (x *ExtendAvatarTTLRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtendAvatarTTLRequest.ProtoReflect.Descriptor instead. +func (*ExtendAvatarTTLRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{21} +} + +func (x *ExtendAvatarTTLRequest) GetAvatarCredentialsPresentation() []byte { + if x != nil { + return x.AvatarCredentialsPresentation + } + return nil +} + +type ExtendAvatarTTLResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *ExtendAvatarTTLResponse_Path + // *ExtendAvatarTTLResponse_InvalidCredentialsPresentation + // *ExtendAvatarTTLResponse_NotFound + Response isExtendAvatarTTLResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExtendAvatarTTLResponse) Reset() { + *x = ExtendAvatarTTLResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExtendAvatarTTLResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtendAvatarTTLResponse) ProtoMessage() {} + +func (x *ExtendAvatarTTLResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtendAvatarTTLResponse.ProtoReflect.Descriptor instead. +func (*ExtendAvatarTTLResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{22} +} + +func (x *ExtendAvatarTTLResponse) GetResponse() isExtendAvatarTTLResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *ExtendAvatarTTLResponse) GetPath() string { + if x != nil { + if x, ok := x.Response.(*ExtendAvatarTTLResponse_Path); ok { + return x.Path + } + } + return "" +} + +func (x *ExtendAvatarTTLResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*ExtendAvatarTTLResponse_InvalidCredentialsPresentation); ok { + return x.InvalidCredentialsPresentation + } + } + return nil +} + +func (x *ExtendAvatarTTLResponse) GetNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*ExtendAvatarTTLResponse_NotFound); ok { + return x.NotFound + } + } + return nil +} + +type isExtendAvatarTTLResponse_Response interface { + isExtendAvatarTTLResponse_Response() +} + +type ExtendAvatarTTLResponse_Path struct { + // The avatar that was extended. May be used as a check against state de-synchronization. + Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"` +} + +type ExtendAvatarTTLResponse_InvalidCredentialsPresentation struct { + InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` +} + +type ExtendAvatarTTLResponse_NotFound struct { + // the identity does not have an active avatar + NotFound *errors.NotFound `protobuf:"bytes,3,opt,name=not_found,json=notFound,proto3,oneof"` +} + +func (*ExtendAvatarTTLResponse_Path) isExtendAvatarTTLResponse_Response() {} + +func (*ExtendAvatarTTLResponse_InvalidCredentialsPresentation) isExtendAvatarTTLResponse_Response() {} + +func (*ExtendAvatarTTLResponse_NotFound) isExtendAvatarTTLResponse_Response() {} + +type DeleteAvatarRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAvatarRequest) Reset() { + *x = DeleteAvatarRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAvatarRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAvatarRequest) ProtoMessage() {} + +func (x *DeleteAvatarRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAvatarRequest.ProtoReflect.Descriptor instead. +func (*DeleteAvatarRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{23} +} + +func (x *DeleteAvatarRequest) GetAvatarCredentialsPresentation() []byte { + if x != nil { + return x.AvatarCredentialsPresentation + } + return nil +} + +type DeleteAvatarResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *DeleteAvatarResponse_Success + // *DeleteAvatarResponse_InvalidCredentialsPresentation + Response isDeleteAvatarResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAvatarResponse) Reset() { + *x = DeleteAvatarResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAvatarResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAvatarResponse) ProtoMessage() {} + +func (x *DeleteAvatarResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAvatarResponse.ProtoReflect.Descriptor instead. +func (*DeleteAvatarResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{24} +} + +func (x *DeleteAvatarResponse) GetResponse() isDeleteAvatarResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *DeleteAvatarResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*DeleteAvatarResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *DeleteAvatarResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*DeleteAvatarResponse_InvalidCredentialsPresentation); ok { + return x.InvalidCredentialsPresentation + } + } + return nil +} + +type isDeleteAvatarResponse_Response interface { + isDeleteAvatarResponse_Response() +} + +type DeleteAvatarResponse_Success struct { + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type DeleteAvatarResponse_InvalidCredentialsPresentation struct { + InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` +} + +func (*DeleteAvatarResponse_Success) isDeleteAvatarResponse_Response() {} + +func (*DeleteAvatarResponse_InvalidCredentialsPresentation) isDeleteAvatarResponse_Response() {} + +var File_org_signal_chat_profile_proto protoreflect.FileDescriptor + +const file_org_signal_chat_profile_proto_rawDesc = "" + + "\n" + + "\x1dorg/signal/chat/profile.proto\x12\x17org.signal.chat.profile\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\xf7\x02\n" + + "\x13SetProfileV1Request\x12\x1b\n" + + "\x04name\x18\x01 \x01(\fB\a\xa2\x97\"\x03Q\x9d\x02R\x04name\x12^\n" + + "\ravatar_change\x18\x02 \x01(\x0e29.org.signal.chat.profile.SetProfileV1Request.AvatarChangeR\favatarChange\x12'\n" + + "\vabout_emoji\x18\x03 \x01(\fB\x06\xa2\x97\"\x02\x00.org.signal.chat.profile.GetExpiringProfileKeyCredentialResultH\x00R\x06result\x12N\n" + + "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFound\x12\xac\x01\n" + + "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + + "\n" + + "\bresponse\"[\n" + + "\x1bGetAvatarCredentialsRequest\x12<\n" + + "\x1aavatar_credentials_request\x18\x01 \x01(\fR\x18avatarCredentialsRequest\"\xe4\x01\n" + + "\x1cGetAvatarCredentialsResponse\x12/\n" + + "\x12avatar_credentials\x18\x01 \x01(\fH\x00R\x11avatarCredentials\x12\x86\x01\n" + + "\x19missing_zk_credential_key\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19missing_zk_credential_keyH\x00R\x16missingZkCredentialKeyB\n" + + "\n" + + "\bresponse\"\x96\x01\n" + + "\x1aGetAvatarUploadFormRequest\x12F\n" + + "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\x120\n" + + "\rupload_length\x18\x02 \x01(\rB\v\xb2\x97\"\a\b\x01\x10\x80\x80\x80\x05R\fuploadLength\"\xa2\x02\n" + + "\x1bGetAvatarUploadFormResponse\x12T\n" + + "\x12avatar_upload_form\x18\x01 \x01(\v2$.org.signal.chat.common.S3UploadFormH\x00R\x10avatarUploadForm\x12\xa0\x01\n" + + " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentationB\n" + + "\n" + + "\bresponse\"`\n" + + "\x16ExtendAvatarTTLRequest\x12F\n" + + "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\"\xb5\x02\n" + + "\x17ExtendAvatarTTLResponse\x12\x14\n" + + "\x04path\x18\x01 \x01(\tH\x00R\x04path\x12\xa0\x01\n" + + " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentation\x12U\n" + + "\tnot_found\x18\x03 \x01(\v2 .org.signal.chat.errors.NotFoundB\x14\xc2\xd5\"\x10no_active_avatarH\x00R\bnotFoundB\n" + + "\n" + + "\bresponse\"]\n" + + "\x13DeleteAvatarRequest\x12F\n" + + "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\"\xf9\x01\n" + + "\x14DeleteAvatarResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\xa0\x01\n" + + " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentationB\n" + + "\n" + + "\bresponse*[\n" + + "\x0eCredentialType\x12\x1f\n" + + "\x1bCREDENTIAL_TYPE_UNSPECIFIED\x10\x00\x12(\n" + + "$CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY\x10\x012\xe9\x02\n" + + "\aProfile\x12g\n" + + "\n" + + "SetProfile\x12*.org.signal.chat.profile.SetProfileRequest\x1a+.org.signal.chat.profile.SetProfileResponse\"\x00\x12g\n" + + "\n" + + "GetProfile\x12*.org.signal.chat.profile.GetProfileRequest\x1a+.org.signal.chat.profile.GetProfileResponse\"\x00\x12\x85\x01\n" + + "\x14GetAvatarCredentials\x124.org.signal.chat.profile.GetAvatarCredentialsRequest\x1a5.org.signal.chat.profile.GetAvatarCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xba\x05\n" + + "\x10ProfileAnonymous\x12y\n" + + "\n" + + "GetProfile\x123.org.signal.chat.profile.GetProfileAnonymousRequest\x1a4.org.signal.chat.profile.GetProfileAnonymousResponse\"\x00\x12\xb8\x01\n" + + "\x1fGetExpiringProfileKeyCredential\x12H.org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest\x1aI.org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse\"\x00\x12\x82\x01\n" + + "\x13GetAvatarUploadForm\x123.org.signal.chat.profile.GetAvatarUploadFormRequest\x1a4.org.signal.chat.profile.GetAvatarUploadFormResponse\"\x00\x12v\n" + + "\x0fExtendAvatarTTL\x12/.org.signal.chat.profile.ExtendAvatarTTLRequest\x1a0.org.signal.chat.profile.ExtendAvatarTTLResponse\"\x00\x12m\n" + + "\fDeleteAvatar\x12,.org.signal.chat.profile.DeleteAvatarRequest\x1a-.org.signal.chat.profile.DeleteAvatarResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_profile_proto_rawDescOnce sync.Once + file_org_signal_chat_profile_proto_rawDescData []byte +) + +func file_org_signal_chat_profile_proto_rawDescGZIP() []byte { + file_org_signal_chat_profile_proto_rawDescOnce.Do(func() { + file_org_signal_chat_profile_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_profile_proto_rawDesc), len(file_org_signal_chat_profile_proto_rawDesc))) + }) + return file_org_signal_chat_profile_proto_rawDescData +} + +var file_org_signal_chat_profile_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_org_signal_chat_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_org_signal_chat_profile_proto_goTypes = []any{ + (CredentialType)(0), // 0: org.signal.chat.profile.CredentialType + (SetProfileV1Request_AvatarChange)(0), // 1: org.signal.chat.profile.SetProfileV1Request.AvatarChange + (*SetProfileV1Request)(nil), // 2: org.signal.chat.profile.SetProfileV1Request + (*SetProfileRequest)(nil), // 3: org.signal.chat.profile.SetProfileRequest + (*PaymentsForbiddenInRegion)(nil), // 4: org.signal.chat.profile.PaymentsForbiddenInRegion + (*ProfilesV2CapabilityRequired)(nil), // 5: org.signal.chat.profile.ProfilesV2CapabilityRequired + (*SetProfileResult)(nil), // 6: org.signal.chat.profile.SetProfileResult + (*SetProfileResponse)(nil), // 7: org.signal.chat.profile.SetProfileResponse + (*GetProfileRequest)(nil), // 8: org.signal.chat.profile.GetProfileRequest + (*GetProfileAnonymousRequest)(nil), // 9: org.signal.chat.profile.GetProfileAnonymousRequest + (*AccountInfo)(nil), // 10: org.signal.chat.profile.AccountInfo + (*ProfileResult)(nil), // 11: org.signal.chat.profile.ProfileResult + (*LegacyProfileResult)(nil), // 12: org.signal.chat.profile.LegacyProfileResult + (*GetProfileResponse)(nil), // 13: org.signal.chat.profile.GetProfileResponse + (*GetProfileAnonymousResponse)(nil), // 14: org.signal.chat.profile.GetProfileAnonymousResponse + (*GetExpiringProfileKeyCredentialRequest)(nil), // 15: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest + (*GetExpiringProfileKeyCredentialAnonymousRequest)(nil), // 16: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest + (*GetExpiringProfileKeyCredentialResult)(nil), // 17: org.signal.chat.profile.GetExpiringProfileKeyCredentialResult + (*GetExpiringProfileKeyCredentialAnonymousResponse)(nil), // 18: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse + (*GetAvatarCredentialsRequest)(nil), // 19: org.signal.chat.profile.GetAvatarCredentialsRequest + (*GetAvatarCredentialsResponse)(nil), // 20: org.signal.chat.profile.GetAvatarCredentialsResponse + (*GetAvatarUploadFormRequest)(nil), // 21: org.signal.chat.profile.GetAvatarUploadFormRequest + (*GetAvatarUploadFormResponse)(nil), // 22: org.signal.chat.profile.GetAvatarUploadFormResponse + (*ExtendAvatarTTLRequest)(nil), // 23: org.signal.chat.profile.ExtendAvatarTTLRequest + (*ExtendAvatarTTLResponse)(nil), // 24: org.signal.chat.profile.ExtendAvatarTTLResponse + (*DeleteAvatarRequest)(nil), // 25: org.signal.chat.profile.DeleteAvatarRequest + (*DeleteAvatarResponse)(nil), // 26: org.signal.chat.profile.DeleteAvatarResponse + (*common.S3UploadForm)(nil), // 27: org.signal.chat.common.S3UploadForm + (*errors.FailedPrecondition)(nil), // 28: org.signal.chat.errors.FailedPrecondition + (*common.ServiceIdentifier)(nil), // 29: org.signal.chat.common.ServiceIdentifier + (*errors.NotFound)(nil), // 30: org.signal.chat.errors.NotFound + (*errors.FailedUnidentifiedAuthorization)(nil), // 31: org.signal.chat.errors.FailedUnidentifiedAuthorization + (*errors.FailedZkAuthentication)(nil), // 32: org.signal.chat.errors.FailedZkAuthentication + (*emptypb.Empty)(nil), // 33: google.protobuf.Empty +} +var file_org_signal_chat_profile_proto_depIdxs = []int32{ + 1, // 0: org.signal.chat.profile.SetProfileV1Request.avatar_change:type_name -> org.signal.chat.profile.SetProfileV1Request.AvatarChange + 2, // 1: org.signal.chat.profile.SetProfileRequest.v1Request:type_name -> org.signal.chat.profile.SetProfileV1Request + 27, // 2: org.signal.chat.profile.SetProfileResult.v1_avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm + 6, // 3: org.signal.chat.profile.SetProfileResponse.result:type_name -> org.signal.chat.profile.SetProfileResult + 28, // 4: org.signal.chat.profile.SetProfileResponse.expected_data_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 4, // 5: org.signal.chat.profile.SetProfileResponse.payments_forbidden_in_region:type_name -> org.signal.chat.profile.PaymentsForbiddenInRegion + 28, // 6: org.signal.chat.profile.SetProfileResponse.expected_version_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 5, // 7: org.signal.chat.profile.SetProfileResponse.profiles_v2_capability_required:type_name -> org.signal.chat.profile.ProfilesV2CapabilityRequired + 29, // 8: org.signal.chat.profile.GetProfileRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 8, // 9: org.signal.chat.profile.GetProfileAnonymousRequest.request:type_name -> org.signal.chat.profile.GetProfileRequest + 10, // 10: org.signal.chat.profile.ProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo + 10, // 11: org.signal.chat.profile.LegacyProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo + 11, // 12: org.signal.chat.profile.GetProfileResponse.profile:type_name -> org.signal.chat.profile.ProfileResult + 30, // 13: org.signal.chat.profile.GetProfileResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 12, // 14: org.signal.chat.profile.GetProfileResponse.legacy_profile:type_name -> org.signal.chat.profile.LegacyProfileResult + 11, // 15: org.signal.chat.profile.GetProfileAnonymousResponse.profile:type_name -> org.signal.chat.profile.ProfileResult + 30, // 16: org.signal.chat.profile.GetProfileAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 31, // 17: org.signal.chat.profile.GetProfileAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 12, // 18: org.signal.chat.profile.GetProfileAnonymousResponse.profile_v1:type_name -> org.signal.chat.profile.LegacyProfileResult + 29, // 19: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 0, // 20: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.credential_type:type_name -> org.signal.chat.profile.CredentialType + 15, // 21: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest.request:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest + 17, // 22: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.result:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialResult + 30, // 23: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 31, // 24: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 28, // 25: org.signal.chat.profile.GetAvatarCredentialsResponse.missing_zk_credential_key:type_name -> org.signal.chat.errors.FailedPrecondition + 27, // 26: org.signal.chat.profile.GetAvatarUploadFormResponse.avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm + 32, // 27: org.signal.chat.profile.GetAvatarUploadFormResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 32, // 28: org.signal.chat.profile.ExtendAvatarTTLResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 30, // 29: org.signal.chat.profile.ExtendAvatarTTLResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 33, // 30: org.signal.chat.profile.DeleteAvatarResponse.success:type_name -> google.protobuf.Empty + 32, // 31: org.signal.chat.profile.DeleteAvatarResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 3, // 32: org.signal.chat.profile.Profile.SetProfile:input_type -> org.signal.chat.profile.SetProfileRequest + 8, // 33: org.signal.chat.profile.Profile.GetProfile:input_type -> org.signal.chat.profile.GetProfileRequest + 19, // 34: org.signal.chat.profile.Profile.GetAvatarCredentials:input_type -> org.signal.chat.profile.GetAvatarCredentialsRequest + 9, // 35: org.signal.chat.profile.ProfileAnonymous.GetProfile:input_type -> org.signal.chat.profile.GetProfileAnonymousRequest + 16, // 36: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:input_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest + 21, // 37: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:input_type -> org.signal.chat.profile.GetAvatarUploadFormRequest + 23, // 38: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:input_type -> org.signal.chat.profile.ExtendAvatarTTLRequest + 25, // 39: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:input_type -> org.signal.chat.profile.DeleteAvatarRequest + 7, // 40: org.signal.chat.profile.Profile.SetProfile:output_type -> org.signal.chat.profile.SetProfileResponse + 13, // 41: org.signal.chat.profile.Profile.GetProfile:output_type -> org.signal.chat.profile.GetProfileResponse + 20, // 42: org.signal.chat.profile.Profile.GetAvatarCredentials:output_type -> org.signal.chat.profile.GetAvatarCredentialsResponse + 14, // 43: org.signal.chat.profile.ProfileAnonymous.GetProfile:output_type -> org.signal.chat.profile.GetProfileAnonymousResponse + 18, // 44: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:output_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse + 22, // 45: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:output_type -> org.signal.chat.profile.GetAvatarUploadFormResponse + 24, // 46: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:output_type -> org.signal.chat.profile.ExtendAvatarTTLResponse + 26, // 47: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:output_type -> org.signal.chat.profile.DeleteAvatarResponse + 40, // [40:48] is the sub-list for method output_type + 32, // [32:40] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_profile_proto_init() } +func file_org_signal_chat_profile_proto_init() { + if File_org_signal_chat_profile_proto != nil { + return + } + file_org_signal_chat_profile_proto_msgTypes[4].OneofWrappers = []any{} + file_org_signal_chat_profile_proto_msgTypes[5].OneofWrappers = []any{ + (*SetProfileResponse_Result)(nil), + (*SetProfileResponse_ExpectedDataWriteConflict)(nil), + (*SetProfileResponse_PaymentsForbiddenInRegion)(nil), + (*SetProfileResponse_ExpectedVersionWriteConflict)(nil), + (*SetProfileResponse_ProfilesV2CapabilityRequired)(nil), + } + file_org_signal_chat_profile_proto_msgTypes[7].OneofWrappers = []any{ + (*GetProfileAnonymousRequest_UnidentifiedAccessKey)(nil), + (*GetProfileAnonymousRequest_GroupSendToken)(nil), + } + file_org_signal_chat_profile_proto_msgTypes[11].OneofWrappers = []any{ + (*GetProfileResponse_Profile)(nil), + (*GetProfileResponse_EtagMatched)(nil), + (*GetProfileResponse_NotFound)(nil), + (*GetProfileResponse_LegacyProfile)(nil), + } + file_org_signal_chat_profile_proto_msgTypes[12].OneofWrappers = []any{ + (*GetProfileAnonymousResponse_Profile)(nil), + (*GetProfileAnonymousResponse_EtagMatched)(nil), + (*GetProfileAnonymousResponse_NotFound)(nil), + (*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization)(nil), + (*GetProfileAnonymousResponse_ProfileV1)(nil), + } + file_org_signal_chat_profile_proto_msgTypes[16].OneofWrappers = []any{ + (*GetExpiringProfileKeyCredentialAnonymousResponse_Result)(nil), + (*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound)(nil), + (*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization)(nil), + } + file_org_signal_chat_profile_proto_msgTypes[18].OneofWrappers = []any{ + (*GetAvatarCredentialsResponse_AvatarCredentials)(nil), + (*GetAvatarCredentialsResponse_MissingZkCredentialKey)(nil), + } + file_org_signal_chat_profile_proto_msgTypes[20].OneofWrappers = []any{ + (*GetAvatarUploadFormResponse_AvatarUploadForm)(nil), + (*GetAvatarUploadFormResponse_InvalidCredentialsPresentation)(nil), + } + file_org_signal_chat_profile_proto_msgTypes[22].OneofWrappers = []any{ + (*ExtendAvatarTTLResponse_Path)(nil), + (*ExtendAvatarTTLResponse_InvalidCredentialsPresentation)(nil), + (*ExtendAvatarTTLResponse_NotFound)(nil), + } + file_org_signal_chat_profile_proto_msgTypes[24].OneofWrappers = []any{ + (*DeleteAvatarResponse_Success)(nil), + (*DeleteAvatarResponse_InvalidCredentialsPresentation)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_profile_proto_rawDesc), len(file_org_signal_chat_profile_proto_rawDesc)), + NumEnums: 2, + NumMessages: 25, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_org_signal_chat_profile_proto_goTypes, + DependencyIndexes: file_org_signal_chat_profile_proto_depIdxs, + EnumInfos: file_org_signal_chat_profile_proto_enumTypes, + MessageInfos: file_org_signal_chat_profile_proto_msgTypes, + }.Build() + File_org_signal_chat_profile_proto = out.File + file_org_signal_chat_profile_proto_goTypes = nil + file_org_signal_chat_profile_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go new file mode 100644 index 0000000..f7be155 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go @@ -0,0 +1,513 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/profile.proto + +package profile + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Profile_SetProfile_FullMethodName = "/org.signal.chat.profile.Profile/SetProfile" + Profile_GetProfile_FullMethodName = "/org.signal.chat.profile.Profile/GetProfile" + Profile_GetAvatarCredentials_FullMethodName = "/org.signal.chat.profile.Profile/GetAvatarCredentials" +) + +// ProfileClient is the client API for Profile service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for working with profiles and profile-related data. +type ProfileClient interface { + // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. + SetProfile(ctx context.Context, in *SetProfileRequest, opts ...grpc.CallOption) (*SetProfileResponse, error) + // Retrieves profile data. Callers with an unidentified access key for the account + // should use the version of this method in `ProfileAnonymous` instead. + GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) + // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous + // + // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC + GetAvatarCredentials(ctx context.Context, in *GetAvatarCredentialsRequest, opts ...grpc.CallOption) (*GetAvatarCredentialsResponse, error) +} + +type profileClient struct { + cc grpc.ClientConnInterface +} + +func NewProfileClient(cc grpc.ClientConnInterface) ProfileClient { + return &profileClient{cc} +} + +func (c *profileClient) SetProfile(ctx context.Context, in *SetProfileRequest, opts ...grpc.CallOption) (*SetProfileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetProfileResponse) + err := c.cc.Invoke(ctx, Profile_SetProfile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *profileClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetProfileResponse) + err := c.cc.Invoke(ctx, Profile_GetProfile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *profileClient) GetAvatarCredentials(ctx context.Context, in *GetAvatarCredentialsRequest, opts ...grpc.CallOption) (*GetAvatarCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAvatarCredentialsResponse) + err := c.cc.Invoke(ctx, Profile_GetAvatarCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProfileServer is the server API for Profile service. +// All implementations must embed UnimplementedProfileServer +// for forward compatibility. +// +// Provides methods for working with profiles and profile-related data. +type ProfileServer interface { + // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. + SetProfile(context.Context, *SetProfileRequest) (*SetProfileResponse, error) + // Retrieves profile data. Callers with an unidentified access key for the account + // should use the version of this method in `ProfileAnonymous` instead. + GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) + // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous + // + // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC + GetAvatarCredentials(context.Context, *GetAvatarCredentialsRequest) (*GetAvatarCredentialsResponse, error) + mustEmbedUnimplementedProfileServer() +} + +// UnimplementedProfileServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedProfileServer struct{} + +func (UnimplementedProfileServer) SetProfile(context.Context, *SetProfileRequest) (*SetProfileResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetProfile not implemented") +} +func (UnimplementedProfileServer) GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") +} +func (UnimplementedProfileServer) GetAvatarCredentials(context.Context, *GetAvatarCredentialsRequest) (*GetAvatarCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAvatarCredentials not implemented") +} +func (UnimplementedProfileServer) mustEmbedUnimplementedProfileServer() {} +func (UnimplementedProfileServer) testEmbeddedByValue() {} + +// UnsafeProfileServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProfileServer will +// result in compilation errors. +type UnsafeProfileServer interface { + mustEmbedUnimplementedProfileServer() +} + +func RegisterProfileServer(s grpc.ServiceRegistrar, srv ProfileServer) { + // If the following call panics, it indicates UnimplementedProfileServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Profile_ServiceDesc, srv) +} + +func _Profile_SetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileServer).SetProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Profile_SetProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileServer).SetProfile(ctx, req.(*SetProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Profile_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileServer).GetProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Profile_GetProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileServer).GetProfile(ctx, req.(*GetProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Profile_GetAvatarCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAvatarCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileServer).GetAvatarCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Profile_GetAvatarCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileServer).GetAvatarCredentials(ctx, req.(*GetAvatarCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Profile_ServiceDesc is the grpc.ServiceDesc for Profile service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Profile_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.profile.Profile", + HandlerType: (*ProfileServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SetProfile", + Handler: _Profile_SetProfile_Handler, + }, + { + MethodName: "GetProfile", + Handler: _Profile_GetProfile_Handler, + }, + { + MethodName: "GetAvatarCredentials", + Handler: _Profile_GetAvatarCredentials_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/profile.proto", +} + +const ( + ProfileAnonymous_GetProfile_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetProfile" + ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetExpiringProfileKeyCredential" + ProfileAnonymous_GetAvatarUploadForm_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetAvatarUploadForm" + ProfileAnonymous_ExtendAvatarTTL_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/ExtendAvatarTTL" + ProfileAnonymous_DeleteAvatar_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/DeleteAvatar" +) + +// ProfileAnonymousClient is the client API for ProfileAnonymous service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides methods for working with profiles and profile-related data using "unidentified access" +// credentials. Callers must not submit any self-identifying credentials +// when calling methods in this service and must instead present the targeted account's +// unidentified access key as an anonymous authentication mechanism. Callers +// without an unidentified access key should use the equivalent, authenticated +// methods in `Profile` instead. +type ProfileAnonymousClient interface { + // Retrieves profile data. + GetProfile(ctx context.Context, in *GetProfileAnonymousRequest, opts ...grpc.CallOption) (*GetProfileAnonymousResponse, error) + // Retrieves a profile key credential. + GetExpiringProfileKeyCredential(ctx context.Context, in *GetExpiringProfileKeyCredentialAnonymousRequest, opts ...grpc.CallOption) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) + // Returns credentials to upload a v2 avatar. After uploading the avatar, the client + // must call SetProfile with the new avatar URL in the encrypted `data`. + // + // Because avatars are uploaded anonymously, they have an expiration equal to the + // idle account expiration. Clients must periodically (recommended: every 90 days) + // call ExtendAvatarTTL to extend the TTl. + // + // Note: any existing avatar associated with these credentials will be deleted immediately + GetAvatarUploadForm(ctx context.Context, in *GetAvatarUploadFormRequest, opts ...grpc.CallOption) (*GetAvatarUploadFormResponse, error) + // Extends the TTL of the avatar currently associated with the request’s avatar auth credential + ExtendAvatarTTL(ctx context.Context, in *ExtendAvatarTTLRequest, opts ...grpc.CallOption) (*ExtendAvatarTTLResponse, error) + // Deletes the avatar currently associated with the request’s avatar auth credential. + // + // Clients must also call SetProfile to remove the avatar from the encrypted `data`. + DeleteAvatar(ctx context.Context, in *DeleteAvatarRequest, opts ...grpc.CallOption) (*DeleteAvatarResponse, error) +} + +type profileAnonymousClient struct { + cc grpc.ClientConnInterface +} + +func NewProfileAnonymousClient(cc grpc.ClientConnInterface) ProfileAnonymousClient { + return &profileAnonymousClient{cc} +} + +func (c *profileAnonymousClient) GetProfile(ctx context.Context, in *GetProfileAnonymousRequest, opts ...grpc.CallOption) (*GetProfileAnonymousResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetProfileAnonymousResponse) + err := c.cc.Invoke(ctx, ProfileAnonymous_GetProfile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *profileAnonymousClient) GetExpiringProfileKeyCredential(ctx context.Context, in *GetExpiringProfileKeyCredentialAnonymousRequest, opts ...grpc.CallOption) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetExpiringProfileKeyCredentialAnonymousResponse) + err := c.cc.Invoke(ctx, ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *profileAnonymousClient) GetAvatarUploadForm(ctx context.Context, in *GetAvatarUploadFormRequest, opts ...grpc.CallOption) (*GetAvatarUploadFormResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAvatarUploadFormResponse) + err := c.cc.Invoke(ctx, ProfileAnonymous_GetAvatarUploadForm_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *profileAnonymousClient) ExtendAvatarTTL(ctx context.Context, in *ExtendAvatarTTLRequest, opts ...grpc.CallOption) (*ExtendAvatarTTLResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ExtendAvatarTTLResponse) + err := c.cc.Invoke(ctx, ProfileAnonymous_ExtendAvatarTTL_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *profileAnonymousClient) DeleteAvatar(ctx context.Context, in *DeleteAvatarRequest, opts ...grpc.CallOption) (*DeleteAvatarResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteAvatarResponse) + err := c.cc.Invoke(ctx, ProfileAnonymous_DeleteAvatar_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProfileAnonymousServer is the server API for ProfileAnonymous service. +// All implementations must embed UnimplementedProfileAnonymousServer +// for forward compatibility. +// +// Provides methods for working with profiles and profile-related data using "unidentified access" +// credentials. Callers must not submit any self-identifying credentials +// when calling methods in this service and must instead present the targeted account's +// unidentified access key as an anonymous authentication mechanism. Callers +// without an unidentified access key should use the equivalent, authenticated +// methods in `Profile` instead. +type ProfileAnonymousServer interface { + // Retrieves profile data. + GetProfile(context.Context, *GetProfileAnonymousRequest) (*GetProfileAnonymousResponse, error) + // Retrieves a profile key credential. + GetExpiringProfileKeyCredential(context.Context, *GetExpiringProfileKeyCredentialAnonymousRequest) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) + // Returns credentials to upload a v2 avatar. After uploading the avatar, the client + // must call SetProfile with the new avatar URL in the encrypted `data`. + // + // Because avatars are uploaded anonymously, they have an expiration equal to the + // idle account expiration. Clients must periodically (recommended: every 90 days) + // call ExtendAvatarTTL to extend the TTl. + // + // Note: any existing avatar associated with these credentials will be deleted immediately + GetAvatarUploadForm(context.Context, *GetAvatarUploadFormRequest) (*GetAvatarUploadFormResponse, error) + // Extends the TTL of the avatar currently associated with the request’s avatar auth credential + ExtendAvatarTTL(context.Context, *ExtendAvatarTTLRequest) (*ExtendAvatarTTLResponse, error) + // Deletes the avatar currently associated with the request’s avatar auth credential. + // + // Clients must also call SetProfile to remove the avatar from the encrypted `data`. + DeleteAvatar(context.Context, *DeleteAvatarRequest) (*DeleteAvatarResponse, error) + mustEmbedUnimplementedProfileAnonymousServer() +} + +// UnimplementedProfileAnonymousServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedProfileAnonymousServer struct{} + +func (UnimplementedProfileAnonymousServer) GetProfile(context.Context, *GetProfileAnonymousRequest) (*GetProfileAnonymousResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") +} +func (UnimplementedProfileAnonymousServer) GetExpiringProfileKeyCredential(context.Context, *GetExpiringProfileKeyCredentialAnonymousRequest) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetExpiringProfileKeyCredential not implemented") +} +func (UnimplementedProfileAnonymousServer) GetAvatarUploadForm(context.Context, *GetAvatarUploadFormRequest) (*GetAvatarUploadFormResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAvatarUploadForm not implemented") +} +func (UnimplementedProfileAnonymousServer) ExtendAvatarTTL(context.Context, *ExtendAvatarTTLRequest) (*ExtendAvatarTTLResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ExtendAvatarTTL not implemented") +} +func (UnimplementedProfileAnonymousServer) DeleteAvatar(context.Context, *DeleteAvatarRequest) (*DeleteAvatarResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteAvatar not implemented") +} +func (UnimplementedProfileAnonymousServer) mustEmbedUnimplementedProfileAnonymousServer() {} +func (UnimplementedProfileAnonymousServer) testEmbeddedByValue() {} + +// UnsafeProfileAnonymousServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProfileAnonymousServer will +// result in compilation errors. +type UnsafeProfileAnonymousServer interface { + mustEmbedUnimplementedProfileAnonymousServer() +} + +func RegisterProfileAnonymousServer(s grpc.ServiceRegistrar, srv ProfileAnonymousServer) { + // If the following call panics, it indicates UnimplementedProfileAnonymousServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ProfileAnonymous_ServiceDesc, srv) +} + +func _ProfileAnonymous_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileAnonymousRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileAnonymousServer).GetProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProfileAnonymous_GetProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileAnonymousServer).GetProfile(ctx, req.(*GetProfileAnonymousRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProfileAnonymous_GetExpiringProfileKeyCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExpiringProfileKeyCredentialAnonymousRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileAnonymousServer).GetExpiringProfileKeyCredential(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileAnonymousServer).GetExpiringProfileKeyCredential(ctx, req.(*GetExpiringProfileKeyCredentialAnonymousRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProfileAnonymous_GetAvatarUploadForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAvatarUploadFormRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileAnonymousServer).GetAvatarUploadForm(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProfileAnonymous_GetAvatarUploadForm_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileAnonymousServer).GetAvatarUploadForm(ctx, req.(*GetAvatarUploadFormRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProfileAnonymous_ExtendAvatarTTL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExtendAvatarTTLRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileAnonymousServer).ExtendAvatarTTL(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProfileAnonymous_ExtendAvatarTTL_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileAnonymousServer).ExtendAvatarTTL(ctx, req.(*ExtendAvatarTTLRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProfileAnonymous_DeleteAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAvatarRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileAnonymousServer).DeleteAvatar(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProfileAnonymous_DeleteAvatar_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileAnonymousServer).DeleteAvatar(ctx, req.(*DeleteAvatarRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ProfileAnonymous_ServiceDesc is the grpc.ServiceDesc for ProfileAnonymous service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ProfileAnonymous_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.profile.ProfileAnonymous", + HandlerType: (*ProfileAnonymousServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetProfile", + Handler: _ProfileAnonymous_GetProfile_Handler, + }, + { + MethodName: "GetExpiringProfileKeyCredential", + Handler: _ProfileAnonymous_GetExpiringProfileKeyCredential_Handler, + }, + { + MethodName: "GetAvatarUploadForm", + Handler: _ProfileAnonymous_GetAvatarUploadForm_Handler, + }, + { + MethodName: "ExtendAvatarTTL", + Handler: _ProfileAnonymous_ExtendAvatarTTL_Handler, + }, + { + MethodName: "DeleteAvatar", + Handler: _ProfileAnonymous_DeleteAvatar_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/profile.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration.pb.go b/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration.pb.go new file mode 100644 index 0000000..5747e77 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration.pb.go @@ -0,0 +1,609 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/remote_configuration.proto + +package remote_configuration + +import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetConfigurationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If present, the etag from a prior GetConfigurationResponse. If the + // provided etag matches the current configuration etag, the server may elide + // the configuration response. + Etag []byte `protobuf:"bytes,1,opt,name=etag,proto3" json:"etag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigurationRequest) Reset() { + *x = GetConfigurationRequest{} + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigurationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigurationRequest) ProtoMessage() {} + +func (x *GetConfigurationRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigurationRequest.ProtoReflect.Descriptor instead. +func (*GetConfigurationRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{0} +} + +func (x *GetConfigurationRequest) GetEtag() []byte { + if x != nil { + return x.Etag + } + return nil +} + +type GetConfigurationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetConfigurationResponse_TaggedConfiguration + // *GetConfigurationResponse_EtagMatched + Response isGetConfigurationResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigurationResponse) Reset() { + *x = GetConfigurationResponse{} + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigurationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigurationResponse) ProtoMessage() {} + +func (x *GetConfigurationResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigurationResponse.ProtoReflect.Descriptor instead. +func (*GetConfigurationResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{1} +} + +func (x *GetConfigurationResponse) GetResponse() isGetConfigurationResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetConfigurationResponse) GetTaggedConfiguration() *TaggedConfiguration { + if x != nil { + if x, ok := x.Response.(*GetConfigurationResponse_TaggedConfiguration); ok { + return x.TaggedConfiguration + } + } + return nil +} + +func (x *GetConfigurationResponse) GetEtagMatched() bool { + if x != nil { + if x, ok := x.Response.(*GetConfigurationResponse_EtagMatched); ok { + return x.EtagMatched + } + } + return false +} + +type isGetConfigurationResponse_Response interface { + isGetConfigurationResponse_Response() +} + +type GetConfigurationResponse_TaggedConfiguration struct { + // The full configuration and corresponding etag. + TaggedConfiguration *TaggedConfiguration `protobuf:"bytes,1,opt,name=tagged_configuration,json=taggedConfiguration,proto3,oneof"` +} + +type GetConfigurationResponse_EtagMatched struct { + // The etag in the request matched the current configuration etag. + EtagMatched bool `protobuf:"varint,2,opt,name=etag_matched,json=etagMatched,proto3,oneof"` +} + +func (*GetConfigurationResponse_TaggedConfiguration) isGetConfigurationResponse_Response() {} + +func (*GetConfigurationResponse_EtagMatched) isGetConfigurationResponse_Response() {} + +type Configuration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A map of namespaced configuration keys to their resolved values. All + // configuration values are represented as strings. boolean values are + // represented as the strings "true" or "false". + Configuration map[string]string `protobuf:"bytes,1,rep,name=configuration,proto3" json:"configuration,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Configuration) Reset() { + *x = Configuration{} + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Configuration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Configuration) ProtoMessage() {} + +func (x *Configuration) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Configuration.ProtoReflect.Descriptor instead. +func (*Configuration) Descriptor() ([]byte, []int) { + return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{2} +} + +func (x *Configuration) GetConfiguration() map[string]string { + if x != nil { + return x.Configuration + } + return nil +} + +type TaggedConfiguration struct { + state protoimpl.MessageState `protogen:"open.v1"` + Configuration *Configuration `protobuf:"bytes,1,opt,name=configuration,proto3" json:"configuration,omitempty"` + // An entity tag for `configuration`. This may be supplied in a + // subsequent request to optimize bandwidth when the configuration has not + // changed. + Etag []byte `protobuf:"bytes,2,opt,name=etag,proto3" json:"etag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaggedConfiguration) Reset() { + *x = TaggedConfiguration{} + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaggedConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaggedConfiguration) ProtoMessage() {} + +func (x *TaggedConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaggedConfiguration.ProtoReflect.Descriptor instead. +func (*TaggedConfiguration) Descriptor() ([]byte, []int) { + return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{3} +} + +func (x *TaggedConfiguration) GetConfiguration() *Configuration { + if x != nil { + return x.Configuration + } + return nil +} + +func (x *TaggedConfiguration) GetEtag() []byte { + if x != nil { + return x.Etag + } + return nil +} + +type GetBadgesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If present, the etag from a prior GetBadgesResponse. If the provided etag + // matches the current badge etag, the server may elide the badge response. + Etag []byte `protobuf:"bytes,1,opt,name=etag,proto3" json:"etag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBadgesRequest) Reset() { + *x = GetBadgesRequest{} + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBadgesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBadgesRequest) ProtoMessage() {} + +func (x *GetBadgesRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBadgesRequest.ProtoReflect.Descriptor instead. +func (*GetBadgesRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{4} +} + +func (x *GetBadgesRequest) GetEtag() []byte { + if x != nil { + return x.Etag + } + return nil +} + +type GetBadgesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetBadgesResponse_TaggedBadges + // *GetBadgesResponse_EtagMatched + Response isGetBadgesResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBadgesResponse) Reset() { + *x = GetBadgesResponse{} + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBadgesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBadgesResponse) ProtoMessage() {} + +func (x *GetBadgesResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBadgesResponse.ProtoReflect.Descriptor instead. +func (*GetBadgesResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{5} +} + +func (x *GetBadgesResponse) GetResponse() isGetBadgesResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetBadgesResponse) GetTaggedBadges() *TaggedBadges { + if x != nil { + if x, ok := x.Response.(*GetBadgesResponse_TaggedBadges); ok { + return x.TaggedBadges + } + } + return nil +} + +func (x *GetBadgesResponse) GetEtagMatched() bool { + if x != nil { + if x, ok := x.Response.(*GetBadgesResponse_EtagMatched); ok { + return x.EtagMatched + } + } + return false +} + +type isGetBadgesResponse_Response interface { + isGetBadgesResponse_Response() +} + +type GetBadgesResponse_TaggedBadges struct { + // The full set of badges and corresponding etag. + TaggedBadges *TaggedBadges `protobuf:"bytes,1,opt,name=tagged_badges,json=taggedBadges,proto3,oneof"` +} + +type GetBadgesResponse_EtagMatched struct { + // The etag in the request matched the current badge etag. + EtagMatched bool `protobuf:"varint,2,opt,name=etag_matched,json=etagMatched,proto3,oneof"` +} + +func (*GetBadgesResponse_TaggedBadges) isGetBadgesResponse_Response() {} + +func (*GetBadgesResponse_EtagMatched) isGetBadgesResponse_Response() {} + +type Badges struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A map of badge ID to the detailed information for that badge. + Badges map[string]*common.Badge `protobuf:"bytes,1,rep,name=badges,proto3" json:"badges,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Badges) Reset() { + *x = Badges{} + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Badges) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Badges) ProtoMessage() {} + +func (x *Badges) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Badges.ProtoReflect.Descriptor instead. +func (*Badges) Descriptor() ([]byte, []int) { + return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{6} +} + +func (x *Badges) GetBadges() map[string]*common.Badge { + if x != nil { + return x.Badges + } + return nil +} + +type TaggedBadges struct { + state protoimpl.MessageState `protogen:"open.v1"` + Badges *Badges `protobuf:"bytes,1,opt,name=badges,proto3" json:"badges,omitempty"` + // An entity tag for `badges`. This may be supplied in a subsequent request + // to optimize bandwidth when the set of badges has not changed. + Etag []byte `protobuf:"bytes,2,opt,name=etag,proto3" json:"etag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaggedBadges) Reset() { + *x = TaggedBadges{} + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaggedBadges) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaggedBadges) ProtoMessage() {} + +func (x *TaggedBadges) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaggedBadges.ProtoReflect.Descriptor instead. +func (*TaggedBadges) Descriptor() ([]byte, []int) { + return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{7} +} + +func (x *TaggedBadges) GetBadges() *Badges { + if x != nil { + return x.Badges + } + return nil +} + +func (x *TaggedBadges) GetEtag() []byte { + if x != nil { + return x.Etag + } + return nil +} + +var File_org_signal_chat_remote_configuration_proto protoreflect.FileDescriptor + +const file_org_signal_chat_remote_configuration_proto_rawDesc = "" + + "\n" + + "*org/signal/chat/remote_configuration.proto\x12#org.signal.chat.remoteconfiguration\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"-\n" + + "\x17GetConfigurationRequest\x12\x12\n" + + "\x04etag\x18\x01 \x01(\fR\x04etag\"\xca\x01\n" + + "\x18GetConfigurationResponse\x12m\n" + + "\x14tagged_configuration\x18\x01 \x01(\v28.org.signal.chat.remoteconfiguration.TaggedConfigurationH\x00R\x13taggedConfiguration\x123\n" + + "\fetag_matched\x18\x02 \x01(\bB\x0e\xc2\xd5\"\n" + + "etag_matchH\x00R\vetagMatchedB\n" + + "\n" + + "\bresponse\"\xbe\x01\n" + + "\rConfiguration\x12k\n" + + "\rconfiguration\x18\x01 \x03(\v2E.org.signal.chat.remoteconfiguration.Configuration.ConfigurationEntryR\rconfiguration\x1a@\n" + + "\x12ConfigurationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x83\x01\n" + + "\x13TaggedConfiguration\x12X\n" + + "\rconfiguration\x18\x01 \x01(\v22.org.signal.chat.remoteconfiguration.ConfigurationR\rconfiguration\x12\x12\n" + + "\x04etag\x18\x02 \x01(\fR\x04etag\"&\n" + + "\x10GetBadgesRequest\x12\x12\n" + + "\x04etag\x18\x01 \x01(\fR\x04etag\"\xae\x01\n" + + "\x11GetBadgesResponse\x12X\n" + + "\rtagged_badges\x18\x01 \x01(\v21.org.signal.chat.remoteconfiguration.TaggedBadgesH\x00R\ftaggedBadges\x123\n" + + "\fetag_matched\x18\x02 \x01(\bB\x0e\xc2\xd5\"\n" + + "etag_matchH\x00R\vetagMatchedB\n" + + "\n" + + "\bresponse\"\xb3\x01\n" + + "\x06Badges\x12O\n" + + "\x06badges\x18\x01 \x03(\v27.org.signal.chat.remoteconfiguration.Badges.BadgesEntryR\x06badges\x1aX\n" + + "\vBadgesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x123\n" + + "\x05value\x18\x02 \x01(\v2\x1d.org.signal.chat.common.BadgeR\x05value:\x028\x01\"g\n" + + "\fTaggedBadges\x12C\n" + + "\x06badges\x18\x01 \x01(\v2+.org.signal.chat.remoteconfiguration.BadgesR\x06badges\x12\x12\n" + + "\x04etag\x18\x02 \x01(\fR\x04etag2\xad\x02\n" + + "\x13RemoteConfiguration\x12\x91\x01\n" + + "\x10GetConfiguration\x12<.org.signal.chat.remoteconfiguration.GetConfigurationRequest\x1a=.org.signal.chat.remoteconfiguration.GetConfigurationResponse\"\x00\x12|\n" + + "\tGetBadges\x125.org.signal.chat.remoteconfiguration.GetBadgesRequest\x1a6.org.signal.chat.remoteconfiguration.GetBadgesResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_remote_configuration_proto_rawDescOnce sync.Once + file_org_signal_chat_remote_configuration_proto_rawDescData []byte +) + +func file_org_signal_chat_remote_configuration_proto_rawDescGZIP() []byte { + file_org_signal_chat_remote_configuration_proto_rawDescOnce.Do(func() { + file_org_signal_chat_remote_configuration_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_remote_configuration_proto_rawDesc), len(file_org_signal_chat_remote_configuration_proto_rawDesc))) + }) + return file_org_signal_chat_remote_configuration_proto_rawDescData +} + +var file_org_signal_chat_remote_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_org_signal_chat_remote_configuration_proto_goTypes = []any{ + (*GetConfigurationRequest)(nil), // 0: org.signal.chat.remoteconfiguration.GetConfigurationRequest + (*GetConfigurationResponse)(nil), // 1: org.signal.chat.remoteconfiguration.GetConfigurationResponse + (*Configuration)(nil), // 2: org.signal.chat.remoteconfiguration.Configuration + (*TaggedConfiguration)(nil), // 3: org.signal.chat.remoteconfiguration.TaggedConfiguration + (*GetBadgesRequest)(nil), // 4: org.signal.chat.remoteconfiguration.GetBadgesRequest + (*GetBadgesResponse)(nil), // 5: org.signal.chat.remoteconfiguration.GetBadgesResponse + (*Badges)(nil), // 6: org.signal.chat.remoteconfiguration.Badges + (*TaggedBadges)(nil), // 7: org.signal.chat.remoteconfiguration.TaggedBadges + nil, // 8: org.signal.chat.remoteconfiguration.Configuration.ConfigurationEntry + nil, // 9: org.signal.chat.remoteconfiguration.Badges.BadgesEntry + (*common.Badge)(nil), // 10: org.signal.chat.common.Badge +} +var file_org_signal_chat_remote_configuration_proto_depIdxs = []int32{ + 3, // 0: org.signal.chat.remoteconfiguration.GetConfigurationResponse.tagged_configuration:type_name -> org.signal.chat.remoteconfiguration.TaggedConfiguration + 8, // 1: org.signal.chat.remoteconfiguration.Configuration.configuration:type_name -> org.signal.chat.remoteconfiguration.Configuration.ConfigurationEntry + 2, // 2: org.signal.chat.remoteconfiguration.TaggedConfiguration.configuration:type_name -> org.signal.chat.remoteconfiguration.Configuration + 7, // 3: org.signal.chat.remoteconfiguration.GetBadgesResponse.tagged_badges:type_name -> org.signal.chat.remoteconfiguration.TaggedBadges + 9, // 4: org.signal.chat.remoteconfiguration.Badges.badges:type_name -> org.signal.chat.remoteconfiguration.Badges.BadgesEntry + 6, // 5: org.signal.chat.remoteconfiguration.TaggedBadges.badges:type_name -> org.signal.chat.remoteconfiguration.Badges + 10, // 6: org.signal.chat.remoteconfiguration.Badges.BadgesEntry.value:type_name -> org.signal.chat.common.Badge + 0, // 7: org.signal.chat.remoteconfiguration.RemoteConfiguration.GetConfiguration:input_type -> org.signal.chat.remoteconfiguration.GetConfigurationRequest + 4, // 8: org.signal.chat.remoteconfiguration.RemoteConfiguration.GetBadges:input_type -> org.signal.chat.remoteconfiguration.GetBadgesRequest + 1, // 9: org.signal.chat.remoteconfiguration.RemoteConfiguration.GetConfiguration:output_type -> org.signal.chat.remoteconfiguration.GetConfigurationResponse + 5, // 10: org.signal.chat.remoteconfiguration.RemoteConfiguration.GetBadges:output_type -> org.signal.chat.remoteconfiguration.GetBadgesResponse + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_remote_configuration_proto_init() } +func file_org_signal_chat_remote_configuration_proto_init() { + if File_org_signal_chat_remote_configuration_proto != nil { + return + } + file_org_signal_chat_remote_configuration_proto_msgTypes[1].OneofWrappers = []any{ + (*GetConfigurationResponse_TaggedConfiguration)(nil), + (*GetConfigurationResponse_EtagMatched)(nil), + } + file_org_signal_chat_remote_configuration_proto_msgTypes[5].OneofWrappers = []any{ + (*GetBadgesResponse_TaggedBadges)(nil), + (*GetBadgesResponse_EtagMatched)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_remote_configuration_proto_rawDesc), len(file_org_signal_chat_remote_configuration_proto_rawDesc)), + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_remote_configuration_proto_goTypes, + DependencyIndexes: file_org_signal_chat_remote_configuration_proto_depIdxs, + MessageInfos: file_org_signal_chat_remote_configuration_proto_msgTypes, + }.Build() + File_org_signal_chat_remote_configuration_proto = out.File + file_org_signal_chat_remote_configuration_proto_goTypes = nil + file_org_signal_chat_remote_configuration_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration_grpc.pb.go new file mode 100644 index 0000000..cd8032a --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration_grpc.pb.go @@ -0,0 +1,189 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/remote_configuration.proto + +package remote_configuration + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RemoteConfiguration_GetConfiguration_FullMethodName = "/org.signal.chat.remoteconfiguration.RemoteConfiguration/GetConfiguration" + RemoteConfiguration_GetBadges_FullMethodName = "/org.signal.chat.remoteconfiguration.RemoteConfiguration/GetBadges" +) + +// RemoteConfigurationClient is the client API for RemoteConfiguration service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Provides remote configuration applicable to the authenticated user +type RemoteConfigurationClient interface { + // Fetches the configuration for the authenticated user. Returned + // values are based on the authenticated account and caller's client platform, + // which is derived from the "User-Agent" header. + GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) + // Returns detailed information for all configured badges, keyed by badge ID. + // + // Badge descriptions may contain localized strings. Callers should set their + // language preferences via an "Accept-Language" header on the request + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 + // + // Callers may cache a badges result for up to 1 day before checking (via + // etag) if there are any new updates. + GetBadges(ctx context.Context, in *GetBadgesRequest, opts ...grpc.CallOption) (*GetBadgesResponse, error) +} + +type remoteConfigurationClient struct { + cc grpc.ClientConnInterface +} + +func NewRemoteConfigurationClient(cc grpc.ClientConnInterface) RemoteConfigurationClient { + return &remoteConfigurationClient{cc} +} + +func (c *remoteConfigurationClient) GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetConfigurationResponse) + err := c.cc.Invoke(ctx, RemoteConfiguration_GetConfiguration_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *remoteConfigurationClient) GetBadges(ctx context.Context, in *GetBadgesRequest, opts ...grpc.CallOption) (*GetBadgesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBadgesResponse) + err := c.cc.Invoke(ctx, RemoteConfiguration_GetBadges_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RemoteConfigurationServer is the server API for RemoteConfiguration service. +// All implementations must embed UnimplementedRemoteConfigurationServer +// for forward compatibility. +// +// Provides remote configuration applicable to the authenticated user +type RemoteConfigurationServer interface { + // Fetches the configuration for the authenticated user. Returned + // values are based on the authenticated account and caller's client platform, + // which is derived from the "User-Agent" header. + GetConfiguration(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) + // Returns detailed information for all configured badges, keyed by badge ID. + // + // Badge descriptions may contain localized strings. Callers should set their + // language preferences via an "Accept-Language" header on the request + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 + // + // Callers may cache a badges result for up to 1 day before checking (via + // etag) if there are any new updates. + GetBadges(context.Context, *GetBadgesRequest) (*GetBadgesResponse, error) + mustEmbedUnimplementedRemoteConfigurationServer() +} + +// UnimplementedRemoteConfigurationServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRemoteConfigurationServer struct{} + +func (UnimplementedRemoteConfigurationServer) GetConfiguration(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetConfiguration not implemented") +} +func (UnimplementedRemoteConfigurationServer) GetBadges(context.Context, *GetBadgesRequest) (*GetBadgesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetBadges not implemented") +} +func (UnimplementedRemoteConfigurationServer) mustEmbedUnimplementedRemoteConfigurationServer() {} +func (UnimplementedRemoteConfigurationServer) testEmbeddedByValue() {} + +// UnsafeRemoteConfigurationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RemoteConfigurationServer will +// result in compilation errors. +type UnsafeRemoteConfigurationServer interface { + mustEmbedUnimplementedRemoteConfigurationServer() +} + +func RegisterRemoteConfigurationServer(s grpc.ServiceRegistrar, srv RemoteConfigurationServer) { + // If the following call panics, it indicates UnimplementedRemoteConfigurationServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RemoteConfiguration_ServiceDesc, srv) +} + +func _RemoteConfiguration_GetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConfigurationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RemoteConfigurationServer).GetConfiguration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RemoteConfiguration_GetConfiguration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RemoteConfigurationServer).GetConfiguration(ctx, req.(*GetConfigurationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RemoteConfiguration_GetBadges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBadgesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RemoteConfigurationServer).GetBadges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RemoteConfiguration_GetBadges_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RemoteConfigurationServer).GetBadges(ctx, req.(*GetBadgesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RemoteConfiguration_ServiceDesc is the grpc.ServiceDesc for RemoteConfiguration service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RemoteConfiguration_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.remoteconfiguration.RemoteConfiguration", + HandlerType: (*RemoteConfigurationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetConfiguration", + Handler: _RemoteConfiguration_GetConfiguration_Handler, + }, + { + MethodName: "GetBadges", + Handler: _RemoteConfiguration_GetBadges_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/remote_configuration.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/require/require.pb.go b/pkg/signalmeow/protobuf/rpc/require/require.pb.go new file mode 100644 index 0000000..21b39f0 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/require/require.pb.go @@ -0,0 +1,765 @@ +// +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/require.proto + +package require + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Auth int32 + +const ( + Auth_AUTH_UNSPECIFIED Auth = 0 + Auth_AUTH_ONLY_AUTHENTICATED Auth = 1 + Auth_AUTH_ONLY_ANONYMOUS Auth = 2 +) + +// Enum value maps for Auth. +var ( + Auth_name = map[int32]string{ + 0: "AUTH_UNSPECIFIED", + 1: "AUTH_ONLY_AUTHENTICATED", + 2: "AUTH_ONLY_ANONYMOUS", + } + Auth_value = map[string]int32{ + "AUTH_UNSPECIFIED": 0, + "AUTH_ONLY_AUTHENTICATED": 1, + "AUTH_ONLY_ANONYMOUS": 2, + } +) + +func (x Auth) Enum() *Auth { + p := new(Auth) + *p = x + return p +} + +func (x Auth) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Auth) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_require_proto_enumTypes[0].Descriptor() +} + +func (Auth) Type() protoreflect.EnumType { + return &file_org_signal_chat_require_proto_enumTypes[0] +} + +func (x Auth) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Auth.Descriptor instead. +func (Auth) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_require_proto_rawDescGZIP(), []int{0} +} + +// This is duplicated from common.proto because: +// +// 1. importing would be a circular dependency +// 2. the canonical declaration belongs there +type IdentityType int32 + +const ( + IdentityType_IDENTITY_TYPE_UNSPECIFIED IdentityType = 0 + IdentityType_IDENTITY_TYPE_ACI IdentityType = 1 + IdentityType_IDENTITY_TYPE_PNI IdentityType = 2 +) + +// Enum value maps for IdentityType. +var ( + IdentityType_name = map[int32]string{ + 0: "IDENTITY_TYPE_UNSPECIFIED", + 1: "IDENTITY_TYPE_ACI", + 2: "IDENTITY_TYPE_PNI", + } + IdentityType_value = map[string]int32{ + "IDENTITY_TYPE_UNSPECIFIED": 0, + "IDENTITY_TYPE_ACI": 1, + "IDENTITY_TYPE_PNI": 2, + } +) + +func (x IdentityType) Enum() *IdentityType { + p := new(IdentityType) + *p = x + return p +} + +func (x IdentityType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IdentityType) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_require_proto_enumTypes[1].Descriptor() +} + +func (IdentityType) Type() protoreflect.EnumType { + return &file_org_signal_chat_require_proto_enumTypes[1] +} + +func (x IdentityType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IdentityType.Descriptor instead. +func (IdentityType) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_require_proto_rawDescGZIP(), []int{1} +} + +type ElementConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + NonEmpty *bool `protobuf:"varint,1,opt,name=nonEmpty,proto3,oneof" json:"nonEmpty,omitempty"` + Size *SizeConstraint `protobuf:"bytes,2,opt,name=size,proto3,oneof" json:"size,omitempty"` + ExactlySize []uint32 `protobuf:"varint,3,rep,packed,name=exactlySize,proto3" json:"exactlySize,omitempty"` + E164 *bool `protobuf:"varint,4,opt,name=e164,proto3,oneof" json:"e164,omitempty"` + Base64Url *bool `protobuf:"varint,5,opt,name=base64url,proto3,oneof" json:"base64url,omitempty"` + Range *ValueRangeConstraint `protobuf:"bytes,6,opt,name=range,proto3,oneof" json:"range,omitempty"` + IdentityType *IdentityType `protobuf:"varint,7,opt,name=identityType,proto3,enum=org.signal.chat.require.IdentityType,oneof" json:"identityType,omitempty"` + Specified *bool `protobuf:"varint,8,opt,name=specified,proto3,oneof" json:"specified,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ElementConstraint) Reset() { + *x = ElementConstraint{} + mi := &file_org_signal_chat_require_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ElementConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ElementConstraint) ProtoMessage() {} + +func (x *ElementConstraint) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_require_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ElementConstraint.ProtoReflect.Descriptor instead. +func (*ElementConstraint) Descriptor() ([]byte, []int) { + return file_org_signal_chat_require_proto_rawDescGZIP(), []int{0} +} + +func (x *ElementConstraint) GetNonEmpty() bool { + if x != nil && x.NonEmpty != nil { + return *x.NonEmpty + } + return false +} + +func (x *ElementConstraint) GetSize() *SizeConstraint { + if x != nil { + return x.Size + } + return nil +} + +func (x *ElementConstraint) GetExactlySize() []uint32 { + if x != nil { + return x.ExactlySize + } + return nil +} + +func (x *ElementConstraint) GetE164() bool { + if x != nil && x.E164 != nil { + return *x.E164 + } + return false +} + +func (x *ElementConstraint) GetBase64Url() bool { + if x != nil && x.Base64Url != nil { + return *x.Base64Url + } + return false +} + +func (x *ElementConstraint) GetRange() *ValueRangeConstraint { + if x != nil { + return x.Range + } + return nil +} + +func (x *ElementConstraint) GetIdentityType() IdentityType { + if x != nil && x.IdentityType != nil { + return *x.IdentityType + } + return IdentityType_IDENTITY_TYPE_UNSPECIFIED +} + +func (x *ElementConstraint) GetSpecified() bool { + if x != nil && x.Specified != nil { + return *x.Specified + } + return false +} + +type SizeConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SizeConstraint) Reset() { + *x = SizeConstraint{} + mi := &file_org_signal_chat_require_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SizeConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SizeConstraint) ProtoMessage() {} + +func (x *SizeConstraint) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_require_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SizeConstraint.ProtoReflect.Descriptor instead. +func (*SizeConstraint) Descriptor() ([]byte, []int) { + return file_org_signal_chat_require_proto_rawDescGZIP(), []int{1} +} + +func (x *SizeConstraint) GetMin() uint32 { + if x != nil && x.Min != nil { + return *x.Min + } + return 0 +} + +func (x *SizeConstraint) GetMax() uint32 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +type ValueRangeConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + Min *int64 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + Max *int64 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValueRangeConstraint) Reset() { + *x = ValueRangeConstraint{} + mi := &file_org_signal_chat_require_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValueRangeConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValueRangeConstraint) ProtoMessage() {} + +func (x *ValueRangeConstraint) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_require_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValueRangeConstraint.ProtoReflect.Descriptor instead. +func (*ValueRangeConstraint) Descriptor() ([]byte, []int) { + return file_org_signal_chat_require_proto_rawDescGZIP(), []int{2} +} + +func (x *ValueRangeConstraint) GetMin() int64 { + if x != nil && x.Min != nil { + return *x.Min + } + return 0 +} + +func (x *ValueRangeConstraint) GetMax() int64 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +var file_org_signal_chat_require_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 70001, + Name: "org.signal.chat.require.nonEmpty", + Tag: "varint,70001,opt,name=nonEmpty", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 70002, + Name: "org.signal.chat.require.specified", + Tag: "varint,70002,opt,name=specified", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*SizeConstraint)(nil), + Field: 70003, + Name: "org.signal.chat.require.size", + Tag: "bytes,70003,opt,name=size", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: ([]uint32)(nil), + Field: 70004, + Name: "org.signal.chat.require.exactlySize", + Tag: "varint,70004,rep,packed,name=exactlySize", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 70005, + Name: "org.signal.chat.require.e164", + Tag: "varint,70005,opt,name=e164", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*ValueRangeConstraint)(nil), + Field: 70006, + Name: "org.signal.chat.require.range", + Tag: "bytes,70006,opt,name=range", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 70007, + Name: "org.signal.chat.require.present", + Tag: "varint,70007,opt,name=present", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 70008, + Name: "org.signal.chat.require.base64url", + Tag: "varint,70008,opt,name=base64url", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*IdentityType)(nil), + Field: 70009, + Name: "org.signal.chat.require.identityType", + Tag: "varint,70009,opt,name=identityType,enum=org.signal.chat.require.IdentityType", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*ElementConstraint)(nil), + Field: 70010, + Name: "org.signal.chat.require.each", + Tag: "bytes,70010,opt,name=each", + Filename: "org/signal/chat/require.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*Auth)(nil), + Field: 71001, + Name: "org.signal.chat.require.auth", + Tag: "varint,71001,opt,name=auth,enum=org.signal.chat.require.Auth", + Filename: "org/signal/chat/require.proto", + }, +} + +// Extension fields to descriptorpb.FieldOptions. +var ( + // Requires a field to have content of non-zero size/length. + // Applies to both `optional` and regular fields, i.e. if the field is not set + // or has a default value, it's considered to be empty. This does not apply + // to fields that are contained in a `oneof`. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // string nonEmptyString = 1 [(require.nonEmpty) = true]; + // bytes nonEmptyBytes = 2 [(require.nonEmpty) = true]; + // optional string nonEmptyStringOptional = 3 [(require.nonEmpty) = true]; + // optional bytes nonEmptyBytesOptional = 4 [(require.nonEmpty) = true]; + // repeated string nonEmptyList = 5 [(require.nonEmpty) = true]; + // } + // + // ``` + // + // Applicable to fields of type `string`, `byte`, and `repeated` fields. + // + // optional bool nonEmpty = 70001; + E_NonEmpty = &file_org_signal_chat_require_proto_extTypes[0] + // Requires a enum field to have value with an index greater than zero. + // Applies to both `optional` and regular fields, i.e. if the field is not set or has a default value, + // its index will be <= 0. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // Color color = 1 [(require.specified) = true]; + // } + // + // enum Color { + // COLOR_UNSPECIFIED = 0; + // COLOR_RED = 1; + // COLOR_GREEN = 2; + // COLOR_BLUE = 3; + // } + // + // ``` + // + // optional bool specified = 70002; + E_Specified = &file_org_signal_chat_require_proto_extTypes[1] + // Requires a size/length of a field to be within certain boundaries. + // Applies to both `optional` and regular fields, i.e. if the field is not set + // or has a default value, its size considered to be zero. However, if the + // field is contained in a `oneof` and is not set, this annotation does not + // apply. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // + // string name = 1 [(require.size) = {min: 3, max: 8}]; + // + // optional string address = 2 [(require.size) = {min: 3, max: 8}]; + // } + // + // ``` + // + // Applicable to fields of type `string`, `byte`, and `repeated` fields. + // + // optional org.signal.chat.require.SizeConstraint size = 70003; + E_Size = &file_org_signal_chat_require_proto_extTypes[2] + // Requires a size/length of a field to be within certain boundaries. + // Applies to both `optional` and regular fields, i.e. if the field is not set + // or has a default value, its size considered to be zero. However, if the + // field is contained in a `oneof` and is not set, this annotation does not + // apply. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // + // string zip = 1 [(require.exactlySize) = 5]; + // + // optional string exactlySizeVariants = 2 [(require.exactlySize) = 2, (require.exactlySize) = 4]; + // } + // + // ``` + // + // Applicable to fields of type `string`, `byte`, and `repeated` fields. + // + // repeated uint32 exactlySize = 70004; + E_ExactlySize = &file_org_signal_chat_require_proto_extTypes[3] + // Requires a value of a string field to be a valid E164-normalized phone number. + // If the field is `optional`, this check allows a value to be not set. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // string number = 1 [(require.e164)]; + // } + // ``` + // + // optional bool e164 = 70005; + E_E164 = &file_org_signal_chat_require_proto_extTypes[4] + // Requires an integer value to be within a certain range. The range boundaries are specified + // with the values of type `int32`, which should be enough for all practical purposes. + // + // If the field is `optional`, this check allows a value to be not set. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // int32 byte = 1 [(require.range) = {min: -128, max: 127}]; + // uint32 unsignedByte = 2 [(require.range).max = 255]; + // } + // + // ``` + // + // optional org.signal.chat.require.ValueRangeConstraint range = 70006; + E_Range = &file_org_signal_chat_require_proto_extTypes[5] + // Require a value of a message field to be present. + // + // Applies to both `optional` and regular fields (both of which have explicit + // presence for the message type anyways). This does not apply to fields that + // are contained in a `oneof`. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // message MyMessage {} + // MyMessage myMessage = 1 [(require.present) = true]; + // } + // + // ```` + // + // optional bool present = 70007; + E_Present = &file_org_signal_chat_require_proto_extTypes[6] + // Requires a value of a string field to be a valid base64 URL string. The + // string may be padded or unpadded. If the field is `optional`, this check + // allows a value to be not set. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // string myString = 1 [(require.base64url) = true]; + // } + // ``` + // + // optional bool base64url = 70008; + E_Base64Url = &file_org_signal_chat_require_proto_extTypes[7] + // Requires a common.ServiceIdentifier field to have its IdentityType + // be the given type (`aci` or `pni`). + // + // ``` + // import "org/signal/chat/require.proto"; + // import "org/signal/chat/common.proto"; + // + // message Data { + // common.ServiceIdentifier accountIdentifier = 1 [(require.identityType) = IDENTITY_TYPE_ACI]; + // } + // ``` + // + // optional org.signal.chat.require.IdentityType identityType = 70009; + E_IdentityType = &file_org_signal_chat_require_proto_extTypes[8] + // Applies element-wise constraints to the elements of a `repeated` field. + // Top-level `require.*` annotations on a `repeated` field constrain the + // collection itself (e.g. element count), `each` constrains the + // individual elements. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // message Data { + // // 1-20 username hashes, each exactly 32 bytes + // repeated bytes username_hashes = 1 [ + // (require.size) = {min: 1, max: 20}, + // (require.each) = { exactlySize: 32 } + // ]; + // } + // + // ``` + // + // Applicable only to `repeated` fields. + // + // optional org.signal.chat.require.ElementConstraint each = 70010; + E_Each = &file_org_signal_chat_require_proto_extTypes[9] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // Indicates that all methods in a given service require a certain kind of authentication. + // + // ``` + // import "org/signal/chat/require.proto"; + // + // service AuthService { + // option (require.auth) = AUTH_ONLY_AUTHENTICATED; + // + // rpc AuthenticatedMethod (google.protobuf.Empty) returns (google.protobuf.Empty) {} + // } + // + // ``` + // + // optional org.signal.chat.require.Auth auth = 71001; + E_Auth = &file_org_signal_chat_require_proto_extTypes[10] +) + +var File_org_signal_chat_require_proto protoreflect.FileDescriptor + +const file_org_signal_chat_require_proto_rawDesc = "" + + "\n" + + "\x1dorg/signal/chat/require.proto\x12\x17org.signal.chat.require\x1a google/protobuf/descriptor.proto\"\xe7\x03\n" + + "\x11ElementConstraint\x12\x1f\n" + + "\bnonEmpty\x18\x01 \x01(\bH\x00R\bnonEmpty\x88\x01\x01\x12@\n" + + "\x04size\x18\x02 \x01(\v2'.org.signal.chat.require.SizeConstraintH\x01R\x04size\x88\x01\x01\x12 \n" + + "\vexactlySize\x18\x03 \x03(\rR\vexactlySize\x12\x17\n" + + "\x04e164\x18\x04 \x01(\bH\x02R\x04e164\x88\x01\x01\x12!\n" + + "\tbase64url\x18\x05 \x01(\bH\x03R\tbase64url\x88\x01\x01\x12H\n" + + "\x05range\x18\x06 \x01(\v2-.org.signal.chat.require.ValueRangeConstraintH\x04R\x05range\x88\x01\x01\x12N\n" + + "\fidentityType\x18\a \x01(\x0e2%.org.signal.chat.require.IdentityTypeH\x05R\fidentityType\x88\x01\x01\x12!\n" + + "\tspecified\x18\b \x01(\bH\x06R\tspecified\x88\x01\x01B\v\n" + + "\t_nonEmptyB\a\n" + + "\x05_sizeB\a\n" + + "\x05_e164B\f\n" + + "\n" + + "_base64urlB\b\n" + + "\x06_rangeB\x0f\n" + + "\r_identityTypeB\f\n" + + "\n" + + "_specified\"N\n" + + "\x0eSizeConstraint\x12\x15\n" + + "\x03min\x18\x01 \x01(\rH\x00R\x03min\x88\x01\x01\x12\x15\n" + + "\x03max\x18\x02 \x01(\rH\x01R\x03max\x88\x01\x01B\x06\n" + + "\x04_minB\x06\n" + + "\x04_max\"T\n" + + "\x14ValueRangeConstraint\x12\x15\n" + + "\x03min\x18\x01 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n" + + "\x03max\x18\x02 \x01(\x03H\x01R\x03max\x88\x01\x01B\x06\n" + + "\x04_minB\x06\n" + + "\x04_max*R\n" + + "\x04Auth\x12\x14\n" + + "\x10AUTH_UNSPECIFIED\x10\x00\x12\x1b\n" + + "\x17AUTH_ONLY_AUTHENTICATED\x10\x01\x12\x17\n" + + "\x13AUTH_ONLY_ANONYMOUS\x10\x02*[\n" + + "\fIdentityType\x12\x1d\n" + + "\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x15\n" + + "\x11IDENTITY_TYPE_ACI\x10\x01\x12\x15\n" + + "\x11IDENTITY_TYPE_PNI\x10\x02:>\n" + + "\bnonEmpty\x12\x1d.google.protobuf.FieldOptions\x18\xf1\xa2\x04 \x01(\bR\bnonEmpty\x88\x01\x01:@\n" + + "\tspecified\x12\x1d.google.protobuf.FieldOptions\x18\xf2\xa2\x04 \x01(\bR\tspecified\x88\x01\x01:_\n" + + "\x04size\x12\x1d.google.protobuf.FieldOptions\x18\xf3\xa2\x04 \x01(\v2'.org.signal.chat.require.SizeConstraintR\x04size\x88\x01\x01:A\n" + + "\vexactlySize\x12\x1d.google.protobuf.FieldOptions\x18\xf4\xa2\x04 \x03(\rR\vexactlySize:6\n" + + "\x04e164\x12\x1d.google.protobuf.FieldOptions\x18\xf5\xa2\x04 \x01(\bR\x04e164\x88\x01\x01:g\n" + + "\x05range\x12\x1d.google.protobuf.FieldOptions\x18\xf6\xa2\x04 \x01(\v2-.org.signal.chat.require.ValueRangeConstraintR\x05range\x88\x01\x01:<\n" + + "\apresent\x12\x1d.google.protobuf.FieldOptions\x18\xf7\xa2\x04 \x01(\bR\apresent\x88\x01\x01:@\n" + + "\tbase64url\x12\x1d.google.protobuf.FieldOptions\x18\xf8\xa2\x04 \x01(\bR\tbase64url\x88\x01\x01:m\n" + + "\fidentityType\x12\x1d.google.protobuf.FieldOptions\x18\xf9\xa2\x04 \x01(\x0e2%.org.signal.chat.require.IdentityTypeR\fidentityType\x88\x01\x01:b\n" + + "\x04each\x12\x1d.google.protobuf.FieldOptions\x18\xfa\xa2\x04 \x01(\v2*.org.signal.chat.require.ElementConstraintR\x04each\x88\x01\x01:W\n" + + "\x04auth\x12\x1f.google.protobuf.ServiceOptions\x18٪\x04 \x01(\x0e2\x1d.org.signal.chat.require.AuthR\x04auth\x88\x01\x01B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_require_proto_rawDescOnce sync.Once + file_org_signal_chat_require_proto_rawDescData []byte +) + +func file_org_signal_chat_require_proto_rawDescGZIP() []byte { + file_org_signal_chat_require_proto_rawDescOnce.Do(func() { + file_org_signal_chat_require_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_require_proto_rawDesc), len(file_org_signal_chat_require_proto_rawDesc))) + }) + return file_org_signal_chat_require_proto_rawDescData +} + +var file_org_signal_chat_require_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_org_signal_chat_require_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_org_signal_chat_require_proto_goTypes = []any{ + (Auth)(0), // 0: org.signal.chat.require.Auth + (IdentityType)(0), // 1: org.signal.chat.require.IdentityType + (*ElementConstraint)(nil), // 2: org.signal.chat.require.ElementConstraint + (*SizeConstraint)(nil), // 3: org.signal.chat.require.SizeConstraint + (*ValueRangeConstraint)(nil), // 4: org.signal.chat.require.ValueRangeConstraint + (*descriptorpb.FieldOptions)(nil), // 5: google.protobuf.FieldOptions + (*descriptorpb.ServiceOptions)(nil), // 6: google.protobuf.ServiceOptions +} +var file_org_signal_chat_require_proto_depIdxs = []int32{ + 3, // 0: org.signal.chat.require.ElementConstraint.size:type_name -> org.signal.chat.require.SizeConstraint + 4, // 1: org.signal.chat.require.ElementConstraint.range:type_name -> org.signal.chat.require.ValueRangeConstraint + 1, // 2: org.signal.chat.require.ElementConstraint.identityType:type_name -> org.signal.chat.require.IdentityType + 5, // 3: org.signal.chat.require.nonEmpty:extendee -> google.protobuf.FieldOptions + 5, // 4: org.signal.chat.require.specified:extendee -> google.protobuf.FieldOptions + 5, // 5: org.signal.chat.require.size:extendee -> google.protobuf.FieldOptions + 5, // 6: org.signal.chat.require.exactlySize:extendee -> google.protobuf.FieldOptions + 5, // 7: org.signal.chat.require.e164:extendee -> google.protobuf.FieldOptions + 5, // 8: org.signal.chat.require.range:extendee -> google.protobuf.FieldOptions + 5, // 9: org.signal.chat.require.present:extendee -> google.protobuf.FieldOptions + 5, // 10: org.signal.chat.require.base64url:extendee -> google.protobuf.FieldOptions + 5, // 11: org.signal.chat.require.identityType:extendee -> google.protobuf.FieldOptions + 5, // 12: org.signal.chat.require.each:extendee -> google.protobuf.FieldOptions + 6, // 13: org.signal.chat.require.auth:extendee -> google.protobuf.ServiceOptions + 3, // 14: org.signal.chat.require.size:type_name -> org.signal.chat.require.SizeConstraint + 4, // 15: org.signal.chat.require.range:type_name -> org.signal.chat.require.ValueRangeConstraint + 1, // 16: org.signal.chat.require.identityType:type_name -> org.signal.chat.require.IdentityType + 2, // 17: org.signal.chat.require.each:type_name -> org.signal.chat.require.ElementConstraint + 0, // 18: org.signal.chat.require.auth:type_name -> org.signal.chat.require.Auth + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 14, // [14:19] is the sub-list for extension type_name + 3, // [3:14] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_require_proto_init() } +func file_org_signal_chat_require_proto_init() { + if File_org_signal_chat_require_proto != nil { + return + } + file_org_signal_chat_require_proto_msgTypes[0].OneofWrappers = []any{} + file_org_signal_chat_require_proto_msgTypes[1].OneofWrappers = []any{} + file_org_signal_chat_require_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_require_proto_rawDesc), len(file_org_signal_chat_require_proto_rawDesc)), + NumEnums: 2, + NumMessages: 3, + NumExtensions: 11, + NumServices: 0, + }, + GoTypes: file_org_signal_chat_require_proto_goTypes, + DependencyIndexes: file_org_signal_chat_require_proto_depIdxs, + EnumInfos: file_org_signal_chat_require_proto_enumTypes, + MessageInfos: file_org_signal_chat_require_proto_msgTypes, + ExtensionInfos: file_org_signal_chat_require_proto_extTypes, + }.Build() + File_org_signal_chat_require_proto = out.File + file_org_signal_chat_require_proto_goTypes = nil + file_org_signal_chat_require_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go new file mode 100644 index 0000000..f39f345 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go @@ -0,0 +1,3403 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/subscriptions.proto + +package subscriptions + +import ( + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PaymentProvider int32 + +const ( + PaymentProvider_PAYMENT_PROVIDER_UNKNOWN PaymentProvider = 0 + PaymentProvider_PAYMENT_PROVIDER_STRIPE PaymentProvider = 1 + PaymentProvider_PAYMENT_PROVIDER_BRAINTREE PaymentProvider = 2 + PaymentProvider_PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING PaymentProvider = 3 + PaymentProvider_PAYMENT_PROVIDER_APPLE_APP_STORE PaymentProvider = 4 +) + +// Enum value maps for PaymentProvider. +var ( + PaymentProvider_name = map[int32]string{ + 0: "PAYMENT_PROVIDER_UNKNOWN", + 1: "PAYMENT_PROVIDER_STRIPE", + 2: "PAYMENT_PROVIDER_BRAINTREE", + 3: "PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING", + 4: "PAYMENT_PROVIDER_APPLE_APP_STORE", + } + PaymentProvider_value = map[string]int32{ + "PAYMENT_PROVIDER_UNKNOWN": 0, + "PAYMENT_PROVIDER_STRIPE": 1, + "PAYMENT_PROVIDER_BRAINTREE": 2, + "PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING": 3, + "PAYMENT_PROVIDER_APPLE_APP_STORE": 4, + } +) + +func (x PaymentProvider) Enum() *PaymentProvider { + p := new(PaymentProvider) + *p = x + return p +} + +func (x PaymentProvider) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PaymentProvider) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_subscriptions_proto_enumTypes[0].Descriptor() +} + +func (PaymentProvider) Type() protoreflect.EnumType { + return &file_org_signal_chat_subscriptions_proto_enumTypes[0] +} + +func (x PaymentProvider) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PaymentProvider.Descriptor instead. +func (PaymentProvider) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{0} +} + +type PaymentMethod int32 + +const ( + PaymentMethod_PAYMENT_METHOD_UNKNOWN PaymentMethod = 0 + // A credit card or debit card, including those from Apple Pay and Google Pay + PaymentMethod_PAYMENT_METHOD_CARD PaymentMethod = 1 + // A SEPA debit account + PaymentMethod_PAYMENT_METHOD_SEPA_DEBIT PaymentMethod = 2 + // An iDEAL account + PaymentMethod_PAYMENT_METHOD_IDEAL PaymentMethod = 3 + // A PayPal account + PaymentMethod_PAYMENT_METHOD_PAYPAL PaymentMethod = 4 + PaymentMethod_PAYMENT_METHOD_GOOGLE_PLAY_BILLING PaymentMethod = 5 + PaymentMethod_PAYMENT_METHOD_APPLE_APP_STORE PaymentMethod = 6 +) + +// Enum value maps for PaymentMethod. +var ( + PaymentMethod_name = map[int32]string{ + 0: "PAYMENT_METHOD_UNKNOWN", + 1: "PAYMENT_METHOD_CARD", + 2: "PAYMENT_METHOD_SEPA_DEBIT", + 3: "PAYMENT_METHOD_IDEAL", + 4: "PAYMENT_METHOD_PAYPAL", + 5: "PAYMENT_METHOD_GOOGLE_PLAY_BILLING", + 6: "PAYMENT_METHOD_APPLE_APP_STORE", + } + PaymentMethod_value = map[string]int32{ + "PAYMENT_METHOD_UNKNOWN": 0, + "PAYMENT_METHOD_CARD": 1, + "PAYMENT_METHOD_SEPA_DEBIT": 2, + "PAYMENT_METHOD_IDEAL": 3, + "PAYMENT_METHOD_PAYPAL": 4, + "PAYMENT_METHOD_GOOGLE_PLAY_BILLING": 5, + "PAYMENT_METHOD_APPLE_APP_STORE": 6, + } +) + +func (x PaymentMethod) Enum() *PaymentMethod { + p := new(PaymentMethod) + *p = x + return p +} + +func (x PaymentMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PaymentMethod) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_subscriptions_proto_enumTypes[1].Descriptor() +} + +func (PaymentMethod) Type() protoreflect.EnumType { + return &file_org_signal_chat_subscriptions_proto_enumTypes[1] +} + +func (x PaymentMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PaymentMethod.Descriptor instead. +func (PaymentMethod) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{1} +} + +type SubscriptionStatus int32 + +const ( + SubscriptionStatus_SUBSCRIPTION_STATUS_UNKNOWN SubscriptionStatus = 0 + // The subscription is in good standing and the most recent payment was successful. + SubscriptionStatus_SUBSCRIPTION_STATUS_ACTIVE SubscriptionStatus = 1 + // Payment failed when creating the subscription, or the subscription's start date is in the future. + SubscriptionStatus_SUBSCRIPTION_STATUS_INCOMPLETE SubscriptionStatus = 2 + // Payment on the latest renewal failed but there are processor retries left, or payment wasn't attempted. + SubscriptionStatus_SUBSCRIPTION_STATUS_PAST_DUE SubscriptionStatus = 3 + // The subscription has been canceled. + SubscriptionStatus_SUBSCRIPTION_STATUS_CANCELED SubscriptionStatus = 4 + // The latest renewal hasn't been paid but the subscription remains in place. + SubscriptionStatus_SUBSCRIPTION_STATUS_UNPAID SubscriptionStatus = 5 +) + +// Enum value maps for SubscriptionStatus. +var ( + SubscriptionStatus_name = map[int32]string{ + 0: "SUBSCRIPTION_STATUS_UNKNOWN", + 1: "SUBSCRIPTION_STATUS_ACTIVE", + 2: "SUBSCRIPTION_STATUS_INCOMPLETE", + 3: "SUBSCRIPTION_STATUS_PAST_DUE", + 4: "SUBSCRIPTION_STATUS_CANCELED", + 5: "SUBSCRIPTION_STATUS_UNPAID", + } + SubscriptionStatus_value = map[string]int32{ + "SUBSCRIPTION_STATUS_UNKNOWN": 0, + "SUBSCRIPTION_STATUS_ACTIVE": 1, + "SUBSCRIPTION_STATUS_INCOMPLETE": 2, + "SUBSCRIPTION_STATUS_PAST_DUE": 3, + "SUBSCRIPTION_STATUS_CANCELED": 4, + "SUBSCRIPTION_STATUS_UNPAID": 5, + } +) + +func (x SubscriptionStatus) Enum() *SubscriptionStatus { + p := new(SubscriptionStatus) + *p = x + return p +} + +func (x SubscriptionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubscriptionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_subscriptions_proto_enumTypes[2].Descriptor() +} + +func (SubscriptionStatus) Type() protoreflect.EnumType { + return &file_org_signal_chat_subscriptions_proto_enumTypes[2] +} + +func (x SubscriptionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubscriptionStatus.Descriptor instead. +func (SubscriptionStatus) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{2} +} + +type BankTransferType int32 + +const ( + BankTransferType_BANK_TRANSFER_TYPE_UNKNOWN BankTransferType = 0 + BankTransferType_BANK_TRANSFER_TYPE_SEPA_DEBIT BankTransferType = 1 +) + +// Enum value maps for BankTransferType. +var ( + BankTransferType_name = map[int32]string{ + 0: "BANK_TRANSFER_TYPE_UNKNOWN", + 1: "BANK_TRANSFER_TYPE_SEPA_DEBIT", + } + BankTransferType_value = map[string]int32{ + "BANK_TRANSFER_TYPE_UNKNOWN": 0, + "BANK_TRANSFER_TYPE_SEPA_DEBIT": 1, + } +) + +func (x BankTransferType) Enum() *BankTransferType { + p := new(BankTransferType) + *p = x + return p +} + +func (x BankTransferType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BankTransferType) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_subscriptions_proto_enumTypes[3].Descriptor() +} + +func (BankTransferType) Type() protoreflect.EnumType { + return &file_org_signal_chat_subscriptions_proto_enumTypes[3] +} + +func (x BankTransferType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BankTransferType.Descriptor instead. +func (BankTransferType) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{3} +} + +type UpdateSubscriberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriber_id,json=subscriberId,proto3" json:"subscriber_id,omitempty"` + // A libsignal DonationPermit from rpc Donations.CreateDonationPermit. + // Not required if the subscriber already exists. + DonationPermit []byte `protobuf:"bytes,2,opt,name=donation_permit,json=donationPermit,proto3" json:"donation_permit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateSubscriberRequest) Reset() { + *x = UpdateSubscriberRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateSubscriberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSubscriberRequest) ProtoMessage() {} + +func (x *UpdateSubscriberRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSubscriberRequest.ProtoReflect.Descriptor instead. +func (*UpdateSubscriberRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{0} +} + +func (x *UpdateSubscriberRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +func (x *UpdateSubscriberRequest) GetDonationPermit() []byte { + if x != nil { + return x.DonationPermit + } + return nil +} + +type UpdateSubscriberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *UpdateSubscriberResponse_Success + // *UpdateSubscriberResponse_SubscriberIdMismatch + // *UpdateSubscriberResponse_PermitRejected + Response isUpdateSubscriberResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateSubscriberResponse) Reset() { + *x = UpdateSubscriberResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateSubscriberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSubscriberResponse) ProtoMessage() {} + +func (x *UpdateSubscriberResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSubscriberResponse.ProtoReflect.Descriptor instead. +func (*UpdateSubscriberResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{1} +} + +func (x *UpdateSubscriberResponse) GetResponse() isUpdateSubscriberResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *UpdateSubscriberResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*UpdateSubscriberResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *UpdateSubscriberResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*UpdateSubscriberResponse_SubscriberIdMismatch); ok { + return x.SubscriberIdMismatch + } + } + return nil +} + +func (x *UpdateSubscriberResponse) GetPermitRejected() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*UpdateSubscriberResponse_PermitRejected); ok { + return x.PermitRejected + } + } + return nil +} + +type isUpdateSubscriberResponse_Response interface { + isUpdateSubscriberResponse_Response() +} + +type UpdateSubscriberResponse_Success struct { + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type UpdateSubscriberResponse_SubscriberIdMismatch struct { + // subscriberId authentication failure + SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,2,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` +} + +type UpdateSubscriberResponse_PermitRejected struct { + // The donation permit was expired or already spent + PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,3,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` +} + +func (*UpdateSubscriberResponse_Success) isUpdateSubscriberResponse_Response() {} + +func (*UpdateSubscriberResponse_SubscriberIdMismatch) isUpdateSubscriberResponse_Response() {} + +func (*UpdateSubscriberResponse_PermitRejected) isUpdateSubscriberResponse_Response() {} + +type DeleteSubscriberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSubscriberRequest) Reset() { + *x = DeleteSubscriberRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSubscriberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSubscriberRequest) ProtoMessage() {} + +func (x *DeleteSubscriberRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSubscriberRequest.ProtoReflect.Descriptor instead. +func (*DeleteSubscriberRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{2} +} + +func (x *DeleteSubscriberRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +type DeleteSubscriberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *DeleteSubscriberResponse_Success + // *DeleteSubscriberResponse_SubscriberNotFound + // *DeleteSubscriberResponse_CannotCancelSubscription + Response isDeleteSubscriberResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSubscriberResponse) Reset() { + *x = DeleteSubscriberResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSubscriberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSubscriberResponse) ProtoMessage() {} + +func (x *DeleteSubscriberResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSubscriberResponse.ProtoReflect.Descriptor instead. +func (*DeleteSubscriberResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteSubscriberResponse) GetResponse() isDeleteSubscriberResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *DeleteSubscriberResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*DeleteSubscriberResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *DeleteSubscriberResponse) GetSubscriberNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*DeleteSubscriberResponse_SubscriberNotFound); ok { + return x.SubscriberNotFound + } + } + return nil +} + +func (x *DeleteSubscriberResponse) GetCannotCancelSubscription() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*DeleteSubscriberResponse_CannotCancelSubscription); ok { + return x.CannotCancelSubscription + } + } + return nil +} + +type isDeleteSubscriberResponse_Response interface { + isDeleteSubscriberResponse_Response() +} + +type DeleteSubscriberResponse_Success struct { + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type DeleteSubscriberResponse_SubscriberNotFound struct { + SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` +} + +type DeleteSubscriberResponse_CannotCancelSubscription struct { + // The associated subscription is not a type that can be cancelled by the server. Cancel client-side, and then retry. + CannotCancelSubscription *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=cannot_cancel_subscription,json=cannotCancelSubscription,proto3,oneof"` +} + +func (*DeleteSubscriberResponse_Success) isDeleteSubscriberResponse_Response() {} + +func (*DeleteSubscriberResponse_SubscriberNotFound) isDeleteSubscriberResponse_Response() {} + +func (*DeleteSubscriberResponse_CannotCancelSubscription) isDeleteSubscriberResponse_Response() {} + +type CreatePaymentMethodRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Only PAYMENT_METHOD_CARD, PAYMENT_METHOD_SEPA_DEBIT, and PAYMENT_METHOD_IDEAL are supported; + // other values will result in an INVALID_ARGUMENT error. + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriber_id,json=subscriberId,proto3" json:"subscriber_id,omitempty"` + PaymentMethod PaymentMethod `protobuf:"varint,2,opt,name=payment_method,json=paymentMethod,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"payment_method,omitempty"` + // a libsignal DonationPermit from rpc Donations.CreateDonationPermit + DonationPermit []byte `protobuf:"bytes,3,opt,name=donation_permit,json=donationPermit,proto3" json:"donation_permit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePaymentMethodRequest) Reset() { + *x = CreatePaymentMethodRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePaymentMethodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePaymentMethodRequest) ProtoMessage() {} + +func (x *CreatePaymentMethodRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePaymentMethodRequest.ProtoReflect.Descriptor instead. +func (*CreatePaymentMethodRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{4} +} + +func (x *CreatePaymentMethodRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +func (x *CreatePaymentMethodRequest) GetPaymentMethod() PaymentMethod { + if x != nil { + return x.PaymentMethod + } + return PaymentMethod_PAYMENT_METHOD_UNKNOWN +} + +func (x *CreatePaymentMethodRequest) GetDonationPermit() []byte { + if x != nil { + return x.DonationPermit + } + return nil +} + +type CreatePaymentMethodResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *CreatePaymentMethodResponse_Result + // *CreatePaymentMethodResponse_SubscriberNotFound + // *CreatePaymentMethodResponse_SubscriberIdMismatch + // *CreatePaymentMethodResponse_SubscriptionProcessorConflict + // *CreatePaymentMethodResponse_PermitRejected + Response isCreatePaymentMethodResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePaymentMethodResponse) Reset() { + *x = CreatePaymentMethodResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePaymentMethodResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePaymentMethodResponse) ProtoMessage() {} + +func (x *CreatePaymentMethodResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePaymentMethodResponse.ProtoReflect.Descriptor instead. +func (*CreatePaymentMethodResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{5} +} + +func (x *CreatePaymentMethodResponse) GetResponse() isCreatePaymentMethodResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *CreatePaymentMethodResponse) GetResult() *CreatePaymentMethodResponse_CreatePaymentMethodResult { + if x != nil { + if x, ok := x.Response.(*CreatePaymentMethodResponse_Result); ok { + return x.Result + } + } + return nil +} + +func (x *CreatePaymentMethodResponse) GetSubscriberNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*CreatePaymentMethodResponse_SubscriberNotFound); ok { + return x.SubscriberNotFound + } + } + return nil +} + +func (x *CreatePaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*CreatePaymentMethodResponse_SubscriberIdMismatch); ok { + return x.SubscriberIdMismatch + } + } + return nil +} + +func (x *CreatePaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreatePaymentMethodResponse_SubscriptionProcessorConflict); ok { + return x.SubscriptionProcessorConflict + } + } + return nil +} + +func (x *CreatePaymentMethodResponse) GetPermitRejected() *errors.FailedZkAuthentication { + if x != nil { + if x, ok := x.Response.(*CreatePaymentMethodResponse_PermitRejected); ok { + return x.PermitRejected + } + } + return nil +} + +type isCreatePaymentMethodResponse_Response interface { + isCreatePaymentMethodResponse_Response() +} + +type CreatePaymentMethodResponse_Result struct { + Result *CreatePaymentMethodResponse_CreatePaymentMethodResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type CreatePaymentMethodResponse_SubscriberNotFound struct { + SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` +} + +type CreatePaymentMethodResponse_SubscriberIdMismatch struct { + // subscriberId authentication failure + SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` +} + +type CreatePaymentMethodResponse_SubscriptionProcessorConflict struct { + // New payment processor does not match existing processor associated with the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` +} + +type CreatePaymentMethodResponse_PermitRejected struct { + // The donation permit was expired or already spent + PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,5,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` +} + +func (*CreatePaymentMethodResponse_Result) isCreatePaymentMethodResponse_Response() {} + +func (*CreatePaymentMethodResponse_SubscriberNotFound) isCreatePaymentMethodResponse_Response() {} + +func (*CreatePaymentMethodResponse_SubscriberIdMismatch) isCreatePaymentMethodResponse_Response() {} + +func (*CreatePaymentMethodResponse_SubscriptionProcessorConflict) isCreatePaymentMethodResponse_Response() { +} + +func (*CreatePaymentMethodResponse_PermitRejected) isCreatePaymentMethodResponse_Response() {} + +type CreatePayPalPaymentMethodRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` + // a callback URL (e.g. an in-client URL handler) for when the user approved the payment + ReturnUrl string `protobuf:"bytes,2,opt,name=returnUrl,proto3" json:"returnUrl,omitempty"` + // a callback URL (e.g. an in-client URL handler) for when the user did not approve the payment + CancelUrl string `protobuf:"bytes,3,opt,name=cancelUrl,proto3" json:"cancelUrl,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePayPalPaymentMethodRequest) Reset() { + *x = CreatePayPalPaymentMethodRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePayPalPaymentMethodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePayPalPaymentMethodRequest) ProtoMessage() {} + +func (x *CreatePayPalPaymentMethodRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePayPalPaymentMethodRequest.ProtoReflect.Descriptor instead. +func (*CreatePayPalPaymentMethodRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{6} +} + +func (x *CreatePayPalPaymentMethodRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +func (x *CreatePayPalPaymentMethodRequest) GetReturnUrl() string { + if x != nil { + return x.ReturnUrl + } + return "" +} + +func (x *CreatePayPalPaymentMethodRequest) GetCancelUrl() string { + if x != nil { + return x.CancelUrl + } + return "" +} + +type CreatePayPalPaymentMethodResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *CreatePayPalPaymentMethodResponse_Result + // *CreatePayPalPaymentMethodResponse_SubscriberNotFound + // *CreatePayPalPaymentMethodResponse_SubscriberIdMismatch + // *CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict + Response isCreatePayPalPaymentMethodResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePayPalPaymentMethodResponse) Reset() { + *x = CreatePayPalPaymentMethodResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePayPalPaymentMethodResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePayPalPaymentMethodResponse) ProtoMessage() {} + +func (x *CreatePayPalPaymentMethodResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePayPalPaymentMethodResponse.ProtoReflect.Descriptor instead. +func (*CreatePayPalPaymentMethodResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{7} +} + +func (x *CreatePayPalPaymentMethodResponse) GetResponse() isCreatePayPalPaymentMethodResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *CreatePayPalPaymentMethodResponse) GetResult() *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult { + if x != nil { + if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_Result); ok { + return x.Result + } + } + return nil +} + +func (x *CreatePayPalPaymentMethodResponse) GetSubscriberNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_SubscriberNotFound); ok { + return x.SubscriberNotFound + } + } + return nil +} + +func (x *CreatePayPalPaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch); ok { + return x.SubscriberIdMismatch + } + } + return nil +} + +func (x *CreatePayPalPaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict); ok { + return x.SubscriptionProcessorConflict + } + } + return nil +} + +type isCreatePayPalPaymentMethodResponse_Response interface { + isCreatePayPalPaymentMethodResponse_Response() +} + +type CreatePayPalPaymentMethodResponse_Result struct { + Result *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type CreatePayPalPaymentMethodResponse_SubscriberNotFound struct { + SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` +} + +type CreatePayPalPaymentMethodResponse_SubscriberIdMismatch struct { + // subscriberId authentication failure + SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` +} + +type CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict struct { + // New payment processor does not match existing processor associated with the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` +} + +func (*CreatePayPalPaymentMethodResponse_Result) isCreatePayPalPaymentMethodResponse_Response() {} + +func (*CreatePayPalPaymentMethodResponse_SubscriberNotFound) isCreatePayPalPaymentMethodResponse_Response() { +} + +func (*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch) isCreatePayPalPaymentMethodResponse_Response() { +} + +func (*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict) isCreatePayPalPaymentMethodResponse_Response() { +} + +type SetDefaultPaymentMethodRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` + // Types that are valid to be assigned to Request: + // + // *SetDefaultPaymentMethodRequest_Stripe + // *SetDefaultPaymentMethodRequest_Braintree + // *SetDefaultPaymentMethodRequest_Sepa + Request isSetDefaultPaymentMethodRequest_Request `protobuf_oneof:"request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDefaultPaymentMethodRequest) Reset() { + *x = SetDefaultPaymentMethodRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDefaultPaymentMethodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDefaultPaymentMethodRequest) ProtoMessage() {} + +func (x *SetDefaultPaymentMethodRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDefaultPaymentMethodRequest.ProtoReflect.Descriptor instead. +func (*SetDefaultPaymentMethodRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{8} +} + +func (x *SetDefaultPaymentMethodRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +func (x *SetDefaultPaymentMethodRequest) GetRequest() isSetDefaultPaymentMethodRequest_Request { + if x != nil { + return x.Request + } + return nil +} + +func (x *SetDefaultPaymentMethodRequest) GetStripe() *SetDefaultPaymentMethodRequest_StripePaymentMethod { + if x != nil { + if x, ok := x.Request.(*SetDefaultPaymentMethodRequest_Stripe); ok { + return x.Stripe + } + } + return nil +} + +func (x *SetDefaultPaymentMethodRequest) GetBraintree() *SetDefaultPaymentMethodRequest_BraintreePaymentMethod { + if x != nil { + if x, ok := x.Request.(*SetDefaultPaymentMethodRequest_Braintree); ok { + return x.Braintree + } + } + return nil +} + +func (x *SetDefaultPaymentMethodRequest) GetSepa() *SetDefaultPaymentMethodRequest_SepaPaymentMethod { + if x != nil { + if x, ok := x.Request.(*SetDefaultPaymentMethodRequest_Sepa); ok { + return x.Sepa + } + } + return nil +} + +type isSetDefaultPaymentMethodRequest_Request interface { + isSetDefaultPaymentMethodRequest_Request() +} + +type SetDefaultPaymentMethodRequest_Stripe struct { + Stripe *SetDefaultPaymentMethodRequest_StripePaymentMethod `protobuf:"bytes,2,opt,name=stripe,proto3,oneof"` +} + +type SetDefaultPaymentMethodRequest_Braintree struct { + Braintree *SetDefaultPaymentMethodRequest_BraintreePaymentMethod `protobuf:"bytes,3,opt,name=braintree,proto3,oneof"` +} + +type SetDefaultPaymentMethodRequest_Sepa struct { + Sepa *SetDefaultPaymentMethodRequest_SepaPaymentMethod `protobuf:"bytes,4,opt,name=sepa,proto3,oneof"` +} + +func (*SetDefaultPaymentMethodRequest_Stripe) isSetDefaultPaymentMethodRequest_Request() {} + +func (*SetDefaultPaymentMethodRequest_Braintree) isSetDefaultPaymentMethodRequest_Request() {} + +func (*SetDefaultPaymentMethodRequest_Sepa) isSetDefaultPaymentMethodRequest_Request() {} + +type SetDefaultPaymentMethodResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SetDefaultPaymentMethodResponse_Success + // *SetDefaultPaymentMethodResponse_SubscriberNotFound + // *SetDefaultPaymentMethodResponse_SubscriberIdMismatch + // *SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp + // *SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict + Response isSetDefaultPaymentMethodResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDefaultPaymentMethodResponse) Reset() { + *x = SetDefaultPaymentMethodResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDefaultPaymentMethodResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDefaultPaymentMethodResponse) ProtoMessage() {} + +func (x *SetDefaultPaymentMethodResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDefaultPaymentMethodResponse.ProtoReflect.Descriptor instead. +func (*SetDefaultPaymentMethodResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{9} +} + +func (x *SetDefaultPaymentMethodResponse) GetResponse() isSetDefaultPaymentMethodResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SetDefaultPaymentMethodResponse) GetSuccess() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *SetDefaultPaymentMethodResponse) GetSubscriberNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_SubscriberNotFound); ok { + return x.SubscriberNotFound + } + } + return nil +} + +func (x *SetDefaultPaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_SubscriberIdMismatch); ok { + return x.SubscriberIdMismatch + } + } + return nil +} + +func (x *SetDefaultPaymentMethodResponse) GetPaymentMethodNotSetUp() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp); ok { + return x.PaymentMethodNotSetUp + } + } + return nil +} + +func (x *SetDefaultPaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict); ok { + return x.SubscriptionProcessorConflict + } + } + return nil +} + +type isSetDefaultPaymentMethodResponse_Response interface { + isSetDefaultPaymentMethodResponse_Response() +} + +type SetDefaultPaymentMethodResponse_Success struct { + Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type SetDefaultPaymentMethodResponse_SubscriberNotFound struct { + SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` +} + +type SetDefaultPaymentMethodResponse_SubscriberIdMismatch struct { + // subscriberId authentication failure + SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` +} + +type SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp struct { + PaymentMethodNotSetUp *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=payment_method_not_set_up,json=paymentMethodNotSetUp,proto3,oneof"` +} + +type SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict struct { + // Payment processor does not match existing processor associated with the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` +} + +func (*SetDefaultPaymentMethodResponse_Success) isSetDefaultPaymentMethodResponse_Response() {} + +func (*SetDefaultPaymentMethodResponse_SubscriberNotFound) isSetDefaultPaymentMethodResponse_Response() { +} + +func (*SetDefaultPaymentMethodResponse_SubscriberIdMismatch) isSetDefaultPaymentMethodResponse_Response() { +} + +func (*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp) isSetDefaultPaymentMethodResponse_Response() { +} + +func (*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict) isSetDefaultPaymentMethodResponse_Response() { +} + +type SetSubscriptionLevelRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` + Level uint64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` + Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` + IdempotencyKey string `protobuf:"bytes,4,opt,name=idempotencyKey,proto3" json:"idempotencyKey,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSubscriptionLevelRequest) Reset() { + *x = SetSubscriptionLevelRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSubscriptionLevelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSubscriptionLevelRequest) ProtoMessage() {} + +func (x *SetSubscriptionLevelRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSubscriptionLevelRequest.ProtoReflect.Descriptor instead. +func (*SetSubscriptionLevelRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{10} +} + +func (x *SetSubscriptionLevelRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +func (x *SetSubscriptionLevelRequest) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *SetSubscriptionLevelRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *SetSubscriptionLevelRequest) GetIdempotencyKey() string { + if x != nil { + return x.IdempotencyKey + } + return "" +} + +// Meaningfully interpreting chargeFailure response fields requires inspecting the processor field first. +// +// For Stripe, code will be one of the [codes defined here](https://stripe.com/docs/api/charges/object#charge_object-failure_code), +// while message [may contain a further textual description](https://stripe.com/docs/api/charges/object#charge_object-failure_message). +// The outcome fields are optional, but present values will directly map to Stripe [response properties](https://stripe.com/docs/api/charges/object#charge_object-outcome-network_status) +// +// For Braintree, the outcome fields will be null. The code and message will contain one of +// - a processor decline code (as a string) in code, and associated text in message, as defined this [table](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses) +// - `gateway` in code, with a [reason](https://developer.paypal.com/braintree/articles/control-panel/transactions/gateway-rejections) in message +// - `code` = "unknown", message = "unknown" +// +// IAP payment processors will never include charge failure information, and detailed order information should be +// retrieved from the payment processor directly +type ChargeFailure struct { + state protoimpl.MessageState `protogen:"open.v1"` + Processor PaymentProvider `protobuf:"varint,1,opt,name=processor,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"processor,omitempty"` + // See [Stripe failure codes](https://stripe.com/docs/api/charges/object#charge_object-failure_code) or + // [Braintree decline codes](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses#decline-codes) + // depending on which processor was used + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // See [Stripe failure codes](https://stripe.com/docs/api/charges/object#charge_object-failure_code) or + // [Braintree decline codes](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses#decline-codes) + // depending on which processor was used + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + // See [Outcome Network Status](https://stripe.com/docs/api/charges/object#charge_object-outcome-network_status) + OutcomeNetworkStatus *string `protobuf:"bytes,4,opt,name=outcome_network_status,json=outcomeNetworkStatus,proto3,oneof" json:"outcome_network_status,omitempty"` + // See [Outcome Reason](https://stripe.com/docs/api/charges/object#charge_object-outcome-reason) + OutcomeReason *string `protobuf:"bytes,5,opt,name=outcome_reason,json=outcomeReason,proto3,oneof" json:"outcome_reason,omitempty"` + // See [Outcome Type](https://stripe.com/docs/api/charges/object#charge_object-outcome-type) + OutcomeType *string `protobuf:"bytes,6,opt,name=outcome_type,json=outcomeType,proto3,oneof" json:"outcome_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChargeFailure) Reset() { + *x = ChargeFailure{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChargeFailure) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChargeFailure) ProtoMessage() {} + +func (x *ChargeFailure) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChargeFailure.ProtoReflect.Descriptor instead. +func (*ChargeFailure) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{11} +} + +func (x *ChargeFailure) GetProcessor() PaymentProvider { + if x != nil { + return x.Processor + } + return PaymentProvider_PAYMENT_PROVIDER_UNKNOWN +} + +func (x *ChargeFailure) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *ChargeFailure) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ChargeFailure) GetOutcomeNetworkStatus() string { + if x != nil && x.OutcomeNetworkStatus != nil { + return *x.OutcomeNetworkStatus + } + return "" +} + +func (x *ChargeFailure) GetOutcomeReason() string { + if x != nil && x.OutcomeReason != nil { + return *x.OutcomeReason + } + return "" +} + +func (x *ChargeFailure) GetOutcomeType() string { + if x != nil && x.OutcomeType != nil { + return *x.OutcomeType + } + return "" +} + +type PaymentRequired struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChargeFailure *ChargeFailure `protobuf:"bytes,1,opt,name=charge_failure,json=chargeFailure,proto3,oneof" json:"charge_failure,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentRequired) Reset() { + *x = PaymentRequired{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentRequired) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentRequired) ProtoMessage() {} + +func (x *PaymentRequired) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentRequired.ProtoReflect.Descriptor instead. +func (*PaymentRequired) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{12} +} + +func (x *PaymentRequired) GetChargeFailure() *ChargeFailure { + if x != nil { + return x.ChargeFailure + } + return nil +} + +type SetSubscriptionLevelResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SetSubscriptionLevelResponse_Success + // *SetSubscriptionLevelResponse_SubscriberNotFound + // *SetSubscriptionLevelResponse_SubscriberIdMismatch + // *SetSubscriptionLevelResponse_SubscriptionProcessorConflict + // *SetSubscriptionLevelResponse_PaymentMethodNotSetUp + // *SetSubscriptionLevelResponse_UnsupportedOperation + // *SetSubscriptionLevelResponse_UnsupportedLevel + // *SetSubscriptionLevelResponse_UnsupportedCurrency + // *SetSubscriptionLevelResponse_PaymentRequiresAction + // *SetSubscriptionLevelResponse_InvalidLevelTransition + // *SetSubscriptionLevelResponse_InvalidIdempotencyKey + // *SetSubscriptionLevelResponse_ChargeFailure + Response isSetSubscriptionLevelResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSubscriptionLevelResponse) Reset() { + *x = SetSubscriptionLevelResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSubscriptionLevelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSubscriptionLevelResponse) ProtoMessage() {} + +func (x *SetSubscriptionLevelResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSubscriptionLevelResponse.ProtoReflect.Descriptor instead. +func (*SetSubscriptionLevelResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{13} +} + +func (x *SetSubscriptionLevelResponse) GetResponse() isSetSubscriptionLevelResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetSuccess() *SetSubscriptionLevelResponse_SetSubscriptionLevelResult { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetSubscriberNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_SubscriberNotFound); ok { + return x.SubscriberNotFound + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_SubscriberIdMismatch); ok { + return x.SubscriberIdMismatch + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_SubscriptionProcessorConflict); ok { + return x.SubscriptionProcessorConflict + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetPaymentMethodNotSetUp() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_PaymentMethodNotSetUp); ok { + return x.PaymentMethodNotSetUp + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetUnsupportedOperation() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_UnsupportedOperation); ok { + return x.UnsupportedOperation + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetUnsupportedLevel() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_UnsupportedLevel); ok { + return x.UnsupportedLevel + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetUnsupportedCurrency() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_UnsupportedCurrency); ok { + return x.UnsupportedCurrency + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetPaymentRequiresAction() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_PaymentRequiresAction); ok { + return x.PaymentRequiresAction + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetInvalidLevelTransition() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_InvalidLevelTransition); ok { + return x.InvalidLevelTransition + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetInvalidIdempotencyKey() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_InvalidIdempotencyKey); ok { + return x.InvalidIdempotencyKey + } + } + return nil +} + +func (x *SetSubscriptionLevelResponse) GetChargeFailure() *ChargeFailure { + if x != nil { + if x, ok := x.Response.(*SetSubscriptionLevelResponse_ChargeFailure); ok { + return x.ChargeFailure + } + } + return nil +} + +type isSetSubscriptionLevelResponse_Response interface { + isSetSubscriptionLevelResponse_Response() +} + +type SetSubscriptionLevelResponse_Success struct { + Success *SetSubscriptionLevelResponse_SetSubscriptionLevelResult `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_SubscriberNotFound struct { + SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_SubscriberIdMismatch struct { + // subscriberId authentication failure + SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_SubscriptionProcessorConflict struct { + // New payment processor does not match existing processor associated with the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_PaymentMethodNotSetUp struct { + PaymentMethodNotSetUp *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=payment_method_not_set_up,json=paymentMethodNotSetUp,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_UnsupportedOperation struct { + // The payment processor does not support this operation + UnsupportedOperation *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=unsupported_operation,json=unsupportedOperation,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_UnsupportedLevel struct { + // The requested level was invalid + UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,7,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_UnsupportedCurrency struct { + // The requested currency was invalid + UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,8,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_PaymentRequiresAction struct { + // The card could not be charged + PaymentRequiresAction *errors.FailedPrecondition `protobuf:"bytes,9,opt,name=payment_requires_action,json=paymentRequiresAction,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_InvalidLevelTransition struct { + // Cannot transition from existing level to the requested level + InvalidLevelTransition *errors.FailedPrecondition `protobuf:"bytes,10,opt,name=invalid_level_transition,json=invalidLevelTransition,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_InvalidIdempotencyKey struct { + // The idempotency key was invalid or re-used with a modified request + InvalidIdempotencyKey *errors.FailedPrecondition `protobuf:"bytes,11,opt,name=invalid_idempotency_key,json=invalidIdempotencyKey,proto3,oneof"` +} + +type SetSubscriptionLevelResponse_ChargeFailure struct { + // The payment failed; see charge failure details + ChargeFailure *ChargeFailure `protobuf:"bytes,12,opt,name=charge_failure,json=chargeFailure,proto3,oneof"` +} + +func (*SetSubscriptionLevelResponse_Success) isSetSubscriptionLevelResponse_Response() {} + +func (*SetSubscriptionLevelResponse_SubscriberNotFound) isSetSubscriptionLevelResponse_Response() {} + +func (*SetSubscriptionLevelResponse_SubscriberIdMismatch) isSetSubscriptionLevelResponse_Response() {} + +func (*SetSubscriptionLevelResponse_SubscriptionProcessorConflict) isSetSubscriptionLevelResponse_Response() { +} + +func (*SetSubscriptionLevelResponse_PaymentMethodNotSetUp) isSetSubscriptionLevelResponse_Response() { +} + +func (*SetSubscriptionLevelResponse_UnsupportedOperation) isSetSubscriptionLevelResponse_Response() {} + +func (*SetSubscriptionLevelResponse_UnsupportedLevel) isSetSubscriptionLevelResponse_Response() {} + +func (*SetSubscriptionLevelResponse_UnsupportedCurrency) isSetSubscriptionLevelResponse_Response() {} + +func (*SetSubscriptionLevelResponse_PaymentRequiresAction) isSetSubscriptionLevelResponse_Response() { +} + +func (*SetSubscriptionLevelResponse_InvalidLevelTransition) isSetSubscriptionLevelResponse_Response() { +} + +func (*SetSubscriptionLevelResponse_InvalidIdempotencyKey) isSetSubscriptionLevelResponse_Response() { +} + +func (*SetSubscriptionLevelResponse_ChargeFailure) isSetSubscriptionLevelResponse_Response() {} + +type SetIapSubscriptionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` + // Types that are valid to be assigned to Request: + // + // *SetIapSubscriptionRequest_AppStore + // *SetIapSubscriptionRequest_PlayBilling + Request isSetIapSubscriptionRequest_Request `protobuf_oneof:"request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetIapSubscriptionRequest) Reset() { + *x = SetIapSubscriptionRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetIapSubscriptionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetIapSubscriptionRequest) ProtoMessage() {} + +func (x *SetIapSubscriptionRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetIapSubscriptionRequest.ProtoReflect.Descriptor instead. +func (*SetIapSubscriptionRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{14} +} + +func (x *SetIapSubscriptionRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +func (x *SetIapSubscriptionRequest) GetRequest() isSetIapSubscriptionRequest_Request { + if x != nil { + return x.Request + } + return nil +} + +func (x *SetIapSubscriptionRequest) GetAppStore() *SetIapSubscriptionRequest_AppStorePurchase { + if x != nil { + if x, ok := x.Request.(*SetIapSubscriptionRequest_AppStore); ok { + return x.AppStore + } + } + return nil +} + +func (x *SetIapSubscriptionRequest) GetPlayBilling() *SetIapSubscriptionRequest_PlayBillingPurchase { + if x != nil { + if x, ok := x.Request.(*SetIapSubscriptionRequest_PlayBilling); ok { + return x.PlayBilling + } + } + return nil +} + +type isSetIapSubscriptionRequest_Request interface { + isSetIapSubscriptionRequest_Request() +} + +type SetIapSubscriptionRequest_AppStore struct { + AppStore *SetIapSubscriptionRequest_AppStorePurchase `protobuf:"bytes,2,opt,name=app_store,json=appStore,proto3,oneof"` +} + +type SetIapSubscriptionRequest_PlayBilling struct { + PlayBilling *SetIapSubscriptionRequest_PlayBillingPurchase `protobuf:"bytes,3,opt,name=play_billing,json=playBilling,proto3,oneof"` +} + +func (*SetIapSubscriptionRequest_AppStore) isSetIapSubscriptionRequest_Request() {} + +func (*SetIapSubscriptionRequest_PlayBilling) isSetIapSubscriptionRequest_Request() {} + +type SetIapSubscriptionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SetIapSubscriptionResponse_Success + // *SetIapSubscriptionResponse_SubscriberNotFound + // *SetIapSubscriptionResponse_SubscriberIdMismatch + // *SetIapSubscriptionResponse_SubscriptionProcessorConflict + // *SetIapSubscriptionResponse_PaymentRequired + // *SetIapSubscriptionResponse_InvalidTransaction + Response isSetIapSubscriptionResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetIapSubscriptionResponse) Reset() { + *x = SetIapSubscriptionResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetIapSubscriptionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetIapSubscriptionResponse) ProtoMessage() {} + +func (x *SetIapSubscriptionResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetIapSubscriptionResponse.ProtoReflect.Descriptor instead. +func (*SetIapSubscriptionResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{15} +} + +func (x *SetIapSubscriptionResponse) GetResponse() isSetIapSubscriptionResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SetIapSubscriptionResponse) GetSuccess() *SetIapSubscriptionResponse_SetIapSubscriptionResult { + if x != nil { + if x, ok := x.Response.(*SetIapSubscriptionResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *SetIapSubscriptionResponse) GetSubscriberNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*SetIapSubscriptionResponse_SubscriberNotFound); ok { + return x.SubscriberNotFound + } + } + return nil +} + +func (x *SetIapSubscriptionResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*SetIapSubscriptionResponse_SubscriberIdMismatch); ok { + return x.SubscriberIdMismatch + } + } + return nil +} + +func (x *SetIapSubscriptionResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetIapSubscriptionResponse_SubscriptionProcessorConflict); ok { + return x.SubscriptionProcessorConflict + } + } + return nil +} + +func (x *SetIapSubscriptionResponse) GetPaymentRequired() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetIapSubscriptionResponse_PaymentRequired); ok { + return x.PaymentRequired + } + } + return nil +} + +func (x *SetIapSubscriptionResponse) GetInvalidTransaction() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*SetIapSubscriptionResponse_InvalidTransaction); ok { + return x.InvalidTransaction + } + } + return nil +} + +type isSetIapSubscriptionResponse_Response interface { + isSetIapSubscriptionResponse_Response() +} + +type SetIapSubscriptionResponse_Success struct { + Success *SetIapSubscriptionResponse_SetIapSubscriptionResult `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type SetIapSubscriptionResponse_SubscriberNotFound struct { + SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` +} + +type SetIapSubscriptionResponse_SubscriberIdMismatch struct { + // subscriberId authentication failure + SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` +} + +type SetIapSubscriptionResponse_SubscriptionProcessorConflict struct { + // New payment processor does not match existing processor associated with the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` +} + +type SetIapSubscriptionResponse_PaymentRequired struct { + PaymentRequired *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=payment_required,json=paymentRequired,proto3,oneof"` +} + +type SetIapSubscriptionResponse_InvalidTransaction struct { + InvalidTransaction *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=invalid_transaction,json=invalidTransaction,proto3,oneof"` +} + +func (*SetIapSubscriptionResponse_Success) isSetIapSubscriptionResponse_Response() {} + +func (*SetIapSubscriptionResponse_SubscriberNotFound) isSetIapSubscriptionResponse_Response() {} + +func (*SetIapSubscriptionResponse_SubscriberIdMismatch) isSetIapSubscriptionResponse_Response() {} + +func (*SetIapSubscriptionResponse_SubscriptionProcessorConflict) isSetIapSubscriptionResponse_Response() { +} + +func (*SetIapSubscriptionResponse_PaymentRequired) isSetIapSubscriptionResponse_Response() {} + +func (*SetIapSubscriptionResponse_InvalidTransaction) isSetIapSubscriptionResponse_Response() {} + +type GetReceiptCredentialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` + ReceiptCredentialRequest []byte `protobuf:"bytes,2,opt,name=receiptCredentialRequest,proto3" json:"receiptCredentialRequest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetReceiptCredentialsRequest) Reset() { + *x = GetReceiptCredentialsRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetReceiptCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReceiptCredentialsRequest) ProtoMessage() {} + +func (x *GetReceiptCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReceiptCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetReceiptCredentialsRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{16} +} + +func (x *GetReceiptCredentialsRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +func (x *GetReceiptCredentialsRequest) GetReceiptCredentialRequest() []byte { + if x != nil { + return x.ReceiptCredentialRequest + } + return nil +} + +type GetReceiptCredentialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetReceiptCredentialsResponse_Success + // *GetReceiptCredentialsResponse_SubscriberNotFound + // *GetReceiptCredentialsResponse_SubscriberIdMismatch + // *GetReceiptCredentialsResponse_NoPaidInvoice + // *GetReceiptCredentialsResponse_PaymentRequired + // *GetReceiptCredentialsResponse_AlreadyRedeemed + Response isGetReceiptCredentialsResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetReceiptCredentialsResponse) Reset() { + *x = GetReceiptCredentialsResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetReceiptCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReceiptCredentialsResponse) ProtoMessage() {} + +func (x *GetReceiptCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReceiptCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetReceiptCredentialsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{17} +} + +func (x *GetReceiptCredentialsResponse) GetResponse() isGetReceiptCredentialsResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetReceiptCredentialsResponse) GetSuccess() *GetReceiptCredentialsResponse_GetReceiptCredentialsResult { + if x != nil { + if x, ok := x.Response.(*GetReceiptCredentialsResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *GetReceiptCredentialsResponse) GetSubscriberNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*GetReceiptCredentialsResponse_SubscriberNotFound); ok { + return x.SubscriberNotFound + } + } + return nil +} + +func (x *GetReceiptCredentialsResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*GetReceiptCredentialsResponse_SubscriberIdMismatch); ok { + return x.SubscriberIdMismatch + } + } + return nil +} + +func (x *GetReceiptCredentialsResponse) GetNoPaidInvoice() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*GetReceiptCredentialsResponse_NoPaidInvoice); ok { + return x.NoPaidInvoice + } + } + return nil +} + +func (x *GetReceiptCredentialsResponse) GetPaymentRequired() *PaymentRequired { + if x != nil { + if x, ok := x.Response.(*GetReceiptCredentialsResponse_PaymentRequired); ok { + return x.PaymentRequired + } + } + return nil +} + +func (x *GetReceiptCredentialsResponse) GetAlreadyRedeemed() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*GetReceiptCredentialsResponse_AlreadyRedeemed); ok { + return x.AlreadyRedeemed + } + } + return nil +} + +type isGetReceiptCredentialsResponse_Response interface { + isGetReceiptCredentialsResponse_Response() +} + +type GetReceiptCredentialsResponse_Success struct { + Success *GetReceiptCredentialsResponse_GetReceiptCredentialsResult `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type GetReceiptCredentialsResponse_SubscriberNotFound struct { + SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` +} + +type GetReceiptCredentialsResponse_SubscriberIdMismatch struct { + // subscriberId authentication failure + SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` +} + +type GetReceiptCredentialsResponse_NoPaidInvoice struct { + // No invoice has been issued for this subscription OR invoice is in 'draft' or 'open' state + NoPaidInvoice *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=no_paid_invoice,json=noPaidInvoice,proto3,oneof"` +} + +type GetReceiptCredentialsResponse_PaymentRequired struct { + // Invoice is in any state other than 'draft', 'open', or 'paid'; Charge failure details may be present + PaymentRequired *PaymentRequired `protobuf:"bytes,5,opt,name=payment_required,json=paymentRequired,proto3,oneof"` +} + +type GetReceiptCredentialsResponse_AlreadyRedeemed struct { + // Latest paid receipt on subscription was already redeemed for a receipt credential but with a different GetReceiptCredentialRequest + AlreadyRedeemed *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=already_redeemed,json=alreadyRedeemed,proto3,oneof"` +} + +func (*GetReceiptCredentialsResponse_Success) isGetReceiptCredentialsResponse_Response() {} + +func (*GetReceiptCredentialsResponse_SubscriberNotFound) isGetReceiptCredentialsResponse_Response() {} + +func (*GetReceiptCredentialsResponse_SubscriberIdMismatch) isGetReceiptCredentialsResponse_Response() { +} + +func (*GetReceiptCredentialsResponse_NoPaidInvoice) isGetReceiptCredentialsResponse_Response() {} + +func (*GetReceiptCredentialsResponse_PaymentRequired) isGetReceiptCredentialsResponse_Response() {} + +func (*GetReceiptCredentialsResponse_AlreadyRedeemed) isGetReceiptCredentialsResponse_Response() {} + +type GetSubscriptionInformationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSubscriptionInformationRequest) Reset() { + *x = GetSubscriptionInformationRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSubscriptionInformationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubscriptionInformationRequest) ProtoMessage() {} + +func (x *GetSubscriptionInformationRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubscriptionInformationRequest.ProtoReflect.Descriptor instead. +func (*GetSubscriptionInformationRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{18} +} + +func (x *GetSubscriptionInformationRequest) GetSubscriberId() []byte { + if x != nil { + return x.SubscriberId + } + return nil +} + +type GetSubscriptionInformationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *GetSubscriptionInformationResponse_Success + // *GetSubscriptionInformationResponse_NoSubscription + // *GetSubscriptionInformationResponse_SubscriberNotFound + // *GetSubscriptionInformationResponse_SubscriberIdMismatch + Response isGetSubscriptionInformationResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSubscriptionInformationResponse) Reset() { + *x = GetSubscriptionInformationResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSubscriptionInformationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubscriptionInformationResponse) ProtoMessage() {} + +func (x *GetSubscriptionInformationResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubscriptionInformationResponse.ProtoReflect.Descriptor instead. +func (*GetSubscriptionInformationResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{19} +} + +func (x *GetSubscriptionInformationResponse) GetResponse() isGetSubscriptionInformationResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetSubscriptionInformationResponse) GetSuccess() *GetSubscriptionInformationResponse_Subscription { + if x != nil { + if x, ok := x.Response.(*GetSubscriptionInformationResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *GetSubscriptionInformationResponse) GetNoSubscription() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*GetSubscriptionInformationResponse_NoSubscription); ok { + return x.NoSubscription + } + } + return nil +} + +func (x *GetSubscriptionInformationResponse) GetSubscriberNotFound() *errors.NotFound { + if x != nil { + if x, ok := x.Response.(*GetSubscriptionInformationResponse_SubscriberNotFound); ok { + return x.SubscriberNotFound + } + } + return nil +} + +func (x *GetSubscriptionInformationResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { + if x != nil { + if x, ok := x.Response.(*GetSubscriptionInformationResponse_SubscriberIdMismatch); ok { + return x.SubscriberIdMismatch + } + } + return nil +} + +type isGetSubscriptionInformationResponse_Response interface { + isGetSubscriptionInformationResponse_Response() +} + +type GetSubscriptionInformationResponse_Success struct { + Success *GetSubscriptionInformationResponse_Subscription `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type GetSubscriptionInformationResponse_NoSubscription struct { + NoSubscription *emptypb.Empty `protobuf:"bytes,2,opt,name=no_subscription,json=noSubscription,proto3,oneof"` +} + +type GetSubscriptionInformationResponse_SubscriberNotFound struct { + SubscriberNotFound *errors.NotFound `protobuf:"bytes,3,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` +} + +type GetSubscriptionInformationResponse_SubscriberIdMismatch struct { + // subscriberId authentication failure + SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,4,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` +} + +func (*GetSubscriptionInformationResponse_Success) isGetSubscriptionInformationResponse_Response() {} + +func (*GetSubscriptionInformationResponse_NoSubscription) isGetSubscriptionInformationResponse_Response() { +} + +func (*GetSubscriptionInformationResponse_SubscriberNotFound) isGetSubscriptionInformationResponse_Response() { +} + +func (*GetSubscriptionInformationResponse_SubscriberIdMismatch) isGetSubscriptionInformationResponse_Response() { +} + +type GetBankMandateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BankTransferType BankTransferType `protobuf:"varint,1,opt,name=bank_transfer_type,json=bankTransferType,proto3,enum=org.signal.chat.purchase.BankTransferType" json:"bank_transfer_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBankMandateRequest) Reset() { + *x = GetBankMandateRequest{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBankMandateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBankMandateRequest) ProtoMessage() {} + +func (x *GetBankMandateRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBankMandateRequest.ProtoReflect.Descriptor instead. +func (*GetBankMandateRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{20} +} + +func (x *GetBankMandateRequest) GetBankTransferType() BankTransferType { + if x != nil { + return x.BankTransferType + } + return BankTransferType_BANK_TRANSFER_TYPE_UNKNOWN +} + +type GetBankMandateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Mandate string `protobuf:"bytes,1,opt,name=mandate,proto3" json:"mandate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBankMandateResponse) Reset() { + *x = GetBankMandateResponse{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBankMandateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBankMandateResponse) ProtoMessage() {} + +func (x *GetBankMandateResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBankMandateResponse.ProtoReflect.Descriptor instead. +func (*GetBankMandateResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{21} +} + +func (x *GetBankMandateResponse) GetMandate() string { + if x != nil { + return x.Mandate + } + return "" +} + +type CreatePaymentMethodResponse_CreatePaymentMethodResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + ClientSecret string `protobuf:"bytes,1,opt,name=clientSecret,proto3" json:"clientSecret,omitempty"` + PaymentProvider PaymentProvider `protobuf:"varint,2,opt,name=paymentProvider,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"paymentProvider,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) Reset() { + *x = CreatePaymentMethodResponse_CreatePaymentMethodResult{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePaymentMethodResponse_CreatePaymentMethodResult) ProtoMessage() {} + +func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePaymentMethodResponse_CreatePaymentMethodResult.ProtoReflect.Descriptor instead. +func (*CreatePaymentMethodResponse_CreatePaymentMethodResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) GetClientSecret() string { + if x != nil { + return x.ClientSecret + } + return "" +} + +func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) GetPaymentProvider() PaymentProvider { + if x != nil { + return x.PaymentProvider + } + return PaymentProvider_PAYMENT_PROVIDER_UNKNOWN +} + +type CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + // a URL to open where the user may approve the payment + ApprovalUrl string `protobuf:"bytes,1,opt,name=approvalUrl,proto3" json:"approvalUrl,omitempty"` + // an opaque PayPal payment identifier to use with SetDefaultPaymentMethodRequest + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) Reset() { + *x = CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) ProtoMessage() {} + +func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult.ProtoReflect.Descriptor instead. +func (*CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) GetApprovalUrl() string { + if x != nil { + return x.ApprovalUrl + } + return "" +} + +func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type SetDefaultPaymentMethodRequest_StripePaymentMethod struct { + state protoimpl.MessageState `protogen:"open.v1"` + PaymentMethodToken string `protobuf:"bytes,1,opt,name=paymentMethodToken,proto3" json:"paymentMethodToken,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDefaultPaymentMethodRequest_StripePaymentMethod) Reset() { + *x = SetDefaultPaymentMethodRequest_StripePaymentMethod{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDefaultPaymentMethodRequest_StripePaymentMethod) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDefaultPaymentMethodRequest_StripePaymentMethod) ProtoMessage() {} + +func (x *SetDefaultPaymentMethodRequest_StripePaymentMethod) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDefaultPaymentMethodRequest_StripePaymentMethod.ProtoReflect.Descriptor instead. +func (*SetDefaultPaymentMethodRequest_StripePaymentMethod) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *SetDefaultPaymentMethodRequest_StripePaymentMethod) GetPaymentMethodToken() string { + if x != nil { + return x.PaymentMethodToken + } + return "" +} + +type SetDefaultPaymentMethodRequest_BraintreePaymentMethod struct { + state protoimpl.MessageState `protogen:"open.v1"` + PaymentMethodToken string `protobuf:"bytes,1,opt,name=paymentMethodToken,proto3" json:"paymentMethodToken,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDefaultPaymentMethodRequest_BraintreePaymentMethod) Reset() { + *x = SetDefaultPaymentMethodRequest_BraintreePaymentMethod{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDefaultPaymentMethodRequest_BraintreePaymentMethod) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDefaultPaymentMethodRequest_BraintreePaymentMethod) ProtoMessage() {} + +func (x *SetDefaultPaymentMethodRequest_BraintreePaymentMethod) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDefaultPaymentMethodRequest_BraintreePaymentMethod.ProtoReflect.Descriptor instead. +func (*SetDefaultPaymentMethodRequest_BraintreePaymentMethod) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{8, 1} +} + +func (x *SetDefaultPaymentMethodRequest_BraintreePaymentMethod) GetPaymentMethodToken() string { + if x != nil { + return x.PaymentMethodToken + } + return "" +} + +type SetDefaultPaymentMethodRequest_SepaPaymentMethod struct { + state protoimpl.MessageState `protogen:"open.v1"` + SetupIntentId string `protobuf:"bytes,1,opt,name=setupIntentId,proto3" json:"setupIntentId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetDefaultPaymentMethodRequest_SepaPaymentMethod) Reset() { + *x = SetDefaultPaymentMethodRequest_SepaPaymentMethod{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetDefaultPaymentMethodRequest_SepaPaymentMethod) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDefaultPaymentMethodRequest_SepaPaymentMethod) ProtoMessage() {} + +func (x *SetDefaultPaymentMethodRequest_SepaPaymentMethod) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDefaultPaymentMethodRequest_SepaPaymentMethod.ProtoReflect.Descriptor instead. +func (*SetDefaultPaymentMethodRequest_SepaPaymentMethod) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{8, 2} +} + +func (x *SetDefaultPaymentMethodRequest_SepaPaymentMethod) GetSetupIntentId() string { + if x != nil { + return x.SetupIntentId + } + return "" +} + +type SetSubscriptionLevelResponse_SetSubscriptionLevelResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSubscriptionLevelResponse_SetSubscriptionLevelResult) Reset() { + *x = SetSubscriptionLevelResponse_SetSubscriptionLevelResult{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSubscriptionLevelResponse_SetSubscriptionLevelResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSubscriptionLevelResponse_SetSubscriptionLevelResult) ProtoMessage() {} + +func (x *SetSubscriptionLevelResponse_SetSubscriptionLevelResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSubscriptionLevelResponse_SetSubscriptionLevelResult.ProtoReflect.Descriptor instead. +func (*SetSubscriptionLevelResponse_SetSubscriptionLevelResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{13, 0} +} + +func (x *SetSubscriptionLevelResponse_SetSubscriptionLevelResult) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +type SetIapSubscriptionRequest_AppStorePurchase struct { + state protoimpl.MessageState `protogen:"open.v1"` + OriginalTransactionId string `protobuf:"bytes,1,opt,name=original_transaction_id,json=originalTransactionId,proto3" json:"original_transaction_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetIapSubscriptionRequest_AppStorePurchase) Reset() { + *x = SetIapSubscriptionRequest_AppStorePurchase{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetIapSubscriptionRequest_AppStorePurchase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetIapSubscriptionRequest_AppStorePurchase) ProtoMessage() {} + +func (x *SetIapSubscriptionRequest_AppStorePurchase) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetIapSubscriptionRequest_AppStorePurchase.ProtoReflect.Descriptor instead. +func (*SetIapSubscriptionRequest_AppStorePurchase) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{14, 0} +} + +func (x *SetIapSubscriptionRequest_AppStorePurchase) GetOriginalTransactionId() string { + if x != nil { + return x.OriginalTransactionId + } + return "" +} + +type SetIapSubscriptionRequest_PlayBillingPurchase struct { + state protoimpl.MessageState `protogen:"open.v1"` + PurchaseToken string `protobuf:"bytes,1,opt,name=purchase_token,json=purchaseToken,proto3" json:"purchase_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetIapSubscriptionRequest_PlayBillingPurchase) Reset() { + *x = SetIapSubscriptionRequest_PlayBillingPurchase{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetIapSubscriptionRequest_PlayBillingPurchase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetIapSubscriptionRequest_PlayBillingPurchase) ProtoMessage() {} + +func (x *SetIapSubscriptionRequest_PlayBillingPurchase) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetIapSubscriptionRequest_PlayBillingPurchase.ProtoReflect.Descriptor instead. +func (*SetIapSubscriptionRequest_PlayBillingPurchase) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{14, 1} +} + +func (x *SetIapSubscriptionRequest_PlayBillingPurchase) GetPurchaseToken() string { + if x != nil { + return x.PurchaseToken + } + return "" +} + +type SetIapSubscriptionResponse_SetIapSubscriptionResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) Reset() { + *x = SetIapSubscriptionResponse_SetIapSubscriptionResult{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetIapSubscriptionResponse_SetIapSubscriptionResult) ProtoMessage() {} + +func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetIapSubscriptionResponse_SetIapSubscriptionResult.ProtoReflect.Descriptor instead. +func (*SetIapSubscriptionResponse_SetIapSubscriptionResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{15, 0} +} + +func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +type GetReceiptCredentialsResponse_GetReceiptCredentialsResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReceiptCredentialResponse []byte `protobuf:"bytes,1,opt,name=receiptCredentialResponse,proto3" json:"receiptCredentialResponse,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) Reset() { + *x = GetReceiptCredentialsResponse_GetReceiptCredentialsResult{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult) ProtoMessage() {} + +func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReceiptCredentialsResponse_GetReceiptCredentialsResult.ProtoReflect.Descriptor instead. +func (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{17, 0} +} + +func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) GetReceiptCredentialResponse() []byte { + if x != nil { + return x.ReceiptCredentialResponse + } + return nil +} + +type GetSubscriptionInformationResponse_Subscription struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The subscription level + Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + // If present, UNIX Epoch Timestamp in seconds, can be used to calculate next billing date. + BillingCycleAnchor *uint64 `protobuf:"varint,2,opt,name=billing_cycle_anchor,json=billingCycleAnchor,proto3,oneof" json:"billing_cycle_anchor,omitempty"` + // UNIX Epoch Timestamp in seconds, when the current subscription period ends + EndOfCurrentPeriod uint64 `protobuf:"varint,3,opt,name=end_of_current_period,json=endOfCurrentPeriod,proto3" json:"end_of_current_period,omitempty"` + // Whether there is a currently active subscription + Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` + // If true, an active subscription will not auto-renew at the end of the current period + CancelAtPeriodEnd bool `protobuf:"varint,5,opt,name=cancel_at_period_end,json=cancelAtPeriodEnd,proto3" json:"cancel_at_period_end,omitempty"` + // A three-letter ISO 4217 currency code for currency used in the subscription + Currency string `protobuf:"bytes,6,opt,name=currency,proto3" json:"currency,omitempty"` + // The amount paid for the subscription in the currency's smallest unit + Amount uint64 `protobuf:"varint,7,opt,name=amount,proto3" json:"amount,omitempty"` + // The subscription's status, mapped to Stripe's statuses. trialing will never be returned + Status SubscriptionStatus `protobuf:"varint,8,opt,name=status,proto3,enum=org.signal.chat.purchase.SubscriptionStatus" json:"status,omitempty"` + // The payment provider associated with the subscription + Processor PaymentProvider `protobuf:"varint,9,opt,name=processor,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"processor,omitempty"` + // The payment method associated with the subscription + PaymentMethod PaymentMethod `protobuf:"varint,10,opt,name=payment_method,json=paymentMethod,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"payment_method,omitempty"` + // Whether the latest charge for the subscription is in a non-terminal state + PaymentProcessing bool `protobuf:"varint,11,opt,name=payment_processing,json=paymentProcessing,proto3" json:"payment_processing,omitempty"` + // if present, contains information that may be interpreted to help the user fix a failure + ChargeFailure *ChargeFailure `protobuf:"bytes,12,opt,name=charge_failure,json=chargeFailure,proto3,oneof" json:"charge_failure,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSubscriptionInformationResponse_Subscription) Reset() { + *x = GetSubscriptionInformationResponse_Subscription{} + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSubscriptionInformationResponse_Subscription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubscriptionInformationResponse_Subscription) ProtoMessage() {} + +func (x *GetSubscriptionInformationResponse_Subscription) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_subscriptions_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubscriptionInformationResponse_Subscription.ProtoReflect.Descriptor instead. +func (*GetSubscriptionInformationResponse_Subscription) Descriptor() ([]byte, []int) { + return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{19, 0} +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetLevel() uint64 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetBillingCycleAnchor() uint64 { + if x != nil && x.BillingCycleAnchor != nil { + return *x.BillingCycleAnchor + } + return 0 +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetEndOfCurrentPeriod() uint64 { + if x != nil { + return x.EndOfCurrentPeriod + } + return 0 +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetCancelAtPeriodEnd() bool { + if x != nil { + return x.CancelAtPeriodEnd + } + return false +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetStatus() SubscriptionStatus { + if x != nil { + return x.Status + } + return SubscriptionStatus_SUBSCRIPTION_STATUS_UNKNOWN +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetProcessor() PaymentProvider { + if x != nil { + return x.Processor + } + return PaymentProvider_PAYMENT_PROVIDER_UNKNOWN +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetPaymentMethod() PaymentMethod { + if x != nil { + return x.PaymentMethod + } + return PaymentMethod_PAYMENT_METHOD_UNKNOWN +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetPaymentProcessing() bool { + if x != nil { + return x.PaymentProcessing + } + return false +} + +func (x *GetSubscriptionInformationResponse_Subscription) GetChargeFailure() *ChargeFailure { + if x != nil { + return x.ChargeFailure + } + return nil +} + +var File_org_signal_chat_subscriptions_proto protoreflect.FileDescriptor + +const file_org_signal_chat_subscriptions_proto_rawDesc = "" + + "\n" + + "#org/signal/chat/subscriptions.proto\x12\x18org.signal.chat.purchase\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"n\n" + + "\x17UpdateSubscriberRequest\x12*\n" + + "\rsubscriber_id\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12'\n" + + "\x0fdonation_permit\x18\x02 \x01(\fR\x0edonationPermit\"\xd8\x02\n" + + "\x18UpdateSubscriberResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x8b\x01\n" + + "\x16subscriber_id_mismatch\x18\x02 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12n\n" + + "\x0fpermit_rejected\x18\x03 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejectedB\n" + + "\n" + + "\bresponse\"D\n" + + "\x17DeleteSubscriberRequest\x12)\n" + + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\"\xd7\x02\n" + + "\x18DeleteSubscriberResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12n\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8a\x01\n" + + "\x1acannot_cancel_subscription\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1e\xc2\xd5\"\x1acannot_cancel_subscriptionH\x00R\x18cannotCancelSubscriptionB\n" + + "\n" + + "\bresponse\"\xcd\x01\n" + + "\x1aCreatePaymentMethodRequest\x12*\n" + + "\rsubscriber_id\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12T\n" + + "\x0epayment_method\x18\x02 \x01(\x0e2'.org.signal.chat.purchase.PaymentMethodB\x04\x90\x97\"\x01R\rpaymentMethod\x12-\n" + + "\x0fdonation_permit\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\x0edonationPermit\"\xb5\x06\n" + + "\x1bCreatePaymentMethodResponse\x12i\n" + + "\x06result\x18\x01 \x01(\v2O.org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResultH\x00R\x06result\x12n\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + + "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12n\n" + + "\x0fpermit_rejected\x18\x05 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejected\x1a\x94\x01\n" + + "\x19CreatePaymentMethodResult\x12\"\n" + + "\fclientSecret\x18\x01 \x01(\tR\fclientSecret\x12S\n" + + "\x0fpaymentProvider\x18\x02 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderR\x0fpaymentProviderB\n" + + "\n" + + "\bresponse\"\x89\x01\n" + + " CreatePayPalPaymentMethodRequest\x12)\n" + + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12\x1c\n" + + "\treturnUrl\x18\x02 \x01(\tR\treturnUrl\x12\x1c\n" + + "\tcancelUrl\x18\x03 \x01(\tR\tcancelUrl\"\x9b\x05\n" + + "!CreatePayPalPaymentMethodResponse\x12u\n" + + "\x06result\x18\x01 \x01(\v2[.org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResultH\x00R\x06result\x12n\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + + "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x1aY\n" + + "\x1fCreatePayPalPaymentMethodResult\x12 \n" + + "\vapprovalUrl\x18\x01 \x01(\tR\vapprovalUrl\x12\x14\n" + + "\x05token\x18\x02 \x01(\tR\x05tokenB\n" + + "\n" + + "\bresponse\"\xef\x04\n" + + "\x1eSetDefaultPaymentMethodRequest\x12)\n" + + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12f\n" + + "\x06stripe\x18\x02 \x01(\v2L.org.signal.chat.purchase.SetDefaultPaymentMethodRequest.StripePaymentMethodH\x00R\x06stripe\x12o\n" + + "\tbraintree\x18\x03 \x01(\v2O.org.signal.chat.purchase.SetDefaultPaymentMethodRequest.BraintreePaymentMethodH\x00R\tbraintree\x12`\n" + + "\x04sepa\x18\x04 \x01(\v2J.org.signal.chat.purchase.SetDefaultPaymentMethodRequest.SepaPaymentMethodH\x00R\x04sepa\x1aK\n" + + "\x13StripePaymentMethod\x124\n" + + "\x12paymentMethodToken\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x12paymentMethodToken\x1aN\n" + + "\x16BraintreePaymentMethod\x124\n" + + "\x12paymentMethodToken\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x12paymentMethodToken\x1a?\n" + + "\x11SepaPaymentMethod\x12*\n" + + "\rsetupIntentId\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\rsetupIntentIdB\t\n" + + "\arequest\"\x83\x05\n" + + "\x1fSetDefaultPaymentMethodResponse\x122\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12n\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + + "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x85\x01\n" + + "\x19payment_method_not_set_up\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19payment_method_not_set_upH\x00R\x15paymentMethodNotSetUp\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflictB\n" + + "\n" + + "\bresponse\"\xa2\x01\n" + + "\x1bSetSubscriptionLevelRequest\x12)\n" + + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12\x14\n" + + "\x05level\x18\x02 \x01(\x04R\x05level\x12\x1a\n" + + "\bcurrency\x18\x03 \x01(\tR\bcurrency\x12&\n" + + "\x0eidempotencyKey\x18\x04 \x01(\tR\x0eidempotencyKey\"\xd4\x02\n" + + "\rChargeFailure\x12G\n" + + "\tprocessor\x18\x01 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderR\tprocessor\x12\x12\n" + + "\x04code\x18\x02 \x01(\tR\x04code\x12\x18\n" + + "\amessage\x18\x03 \x01(\tR\amessage\x129\n" + + "\x16outcome_network_status\x18\x04 \x01(\tH\x00R\x14outcomeNetworkStatus\x88\x01\x01\x12*\n" + + "\x0eoutcome_reason\x18\x05 \x01(\tH\x01R\routcomeReason\x88\x01\x01\x12&\n" + + "\foutcome_type\x18\x06 \x01(\tH\x02R\voutcomeType\x88\x01\x01B\x19\n" + + "\x17_outcome_network_statusB\x11\n" + + "\x0f_outcome_reasonB\x0f\n" + + "\r_outcome_type\"y\n" + + "\x0fPaymentRequired\x12S\n" + + "\x0echarge_failure\x18\x01 \x01(\v2'.org.signal.chat.purchase.ChargeFailureH\x00R\rchargeFailure\x88\x01\x01B\x11\n" + + "\x0f_charge_failure\"\xcf\f\n" + + "\x1cSetSubscriptionLevelResponse\x12m\n" + + "\asuccess\x18\x01 \x01(\v2Q.org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResultH\x00R\asuccess\x12n\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + + "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12\x85\x01\n" + + "\x19payment_method_not_set_up\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19payment_method_not_set_upH\x00R\x15paymentMethodNotSetUp\x12|\n" + + "\x15unsupported_operation\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x19\xc2\xd5\"\x15unsupported_operationH\x00R\x14unsupportedOperation\x12p\n" + + "\x11unsupported_level\x18\a \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x12y\n" + + "\x14unsupported_currency\x18\b \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12\x81\x01\n" + + "\x17payment_requires_action\x18\t \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1b\xc2\xd5\"\x17payment_requires_actionH\x00R\x15paymentRequiresAction\x12\x84\x01\n" + + "\x18invalid_level_transition\x18\n" + + " \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18invalid_level_transitionH\x00R\x16invalidLevelTransition\x12\x81\x01\n" + + "\x17invalid_idempotency_key\x18\v \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1b\xc2\xd5\"\x17invalid_idempotency_keyH\x00R\x15invalidIdempotencyKey\x12d\n" + + "\x0echarge_failure\x18\f \x01(\v2'.org.signal.chat.purchase.ChargeFailureB\x12\xc2\xd5\"\x0echarge_failureH\x00R\rchargeFailure\x1a2\n" + + "\x1aSetSubscriptionLevelResult\x12\x14\n" + + "\x05level\x18\x01 \x01(\x04R\x05levelB\n" + + "\n" + + "\bresponse\"\xba\x03\n" + + "\x19SetIapSubscriptionRequest\x12)\n" + + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12c\n" + + "\tapp_store\x18\x02 \x01(\v2D.org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchaseH\x00R\bappStore\x12l\n" + + "\fplay_billing\x18\x03 \x01(\v2G.org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchaseH\x00R\vplayBilling\x1aP\n" + + "\x10AppStorePurchase\x12<\n" + + "\x17original_transaction_id\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x15originalTransactionId\x1aB\n" + + "\x13PlayBillingPurchase\x12+\n" + + "\x0epurchase_token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\rpurchaseTokenB\t\n" + + "\arequest\"\xc6\x06\n" + + "\x1aSetIapSubscriptionResponse\x12i\n" + + "\asuccess\x18\x01 \x01(\v2M.org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResultH\x00R\asuccess\x12n\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + + "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12m\n" + + "\x10payment_required\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12v\n" + + "\x13invalid_transaction\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x17\xc2\xd5\"\x13invalid_transactionH\x00R\x12invalidTransaction\x1a0\n" + + "\x18SetIapSubscriptionResult\x12\x14\n" + + "\x05level\x18\x01 \x01(\x04R\x05levelB\n" + + "\n" + + "\bresponse\"\x8c\x01\n" + + "\x1cGetReceiptCredentialsRequest\x12)\n" + + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12A\n" + + "\x18receiptCredentialRequest\x18\x02 \x01(\fB\x05\xa2\x97\"\x01aR\x18receiptCredentialRequest\"\xbf\x06\n" + + "\x1dGetReceiptCredentialsResponse\x12o\n" + + "\asuccess\x18\x01 \x01(\v2S.org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResultH\x00R\asuccess\x12n\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + + "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12i\n" + + "\x0fno_paid_invoice\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0fno_paid_invoiceH\x00R\rnoPaidInvoice\x12l\n" + + "\x10payment_required\x18\x05 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12m\n" + + "\x10already_redeemed\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemed\x1a[\n" + + "\x1bGetReceiptCredentialsResult\x12<\n" + + "\x19receiptCredentialResponse\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + + "\n" + + "\bresponse\"N\n" + + "!GetSubscriptionInformationRequest\x12)\n" + + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\"\xf5\b\n" + + "\"GetSubscriptionInformationResponse\x12e\n" + + "\asuccess\x18\x01 \x01(\v2I.org.signal.chat.purchase.GetSubscriptionInformationResponse.SubscriptionH\x00R\asuccess\x12A\n" + + "\x0fno_subscription\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x0enoSubscription\x12n\n" + + "\x14subscriber_not_found\x18\x03 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + + "\x16subscriber_id_mismatch\x18\x04 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x1a\x9a\x05\n" + + "\fSubscription\x12\x14\n" + + "\x05level\x18\x01 \x01(\x04R\x05level\x125\n" + + "\x14billing_cycle_anchor\x18\x02 \x01(\x04H\x00R\x12billingCycleAnchor\x88\x01\x01\x121\n" + + "\x15end_of_current_period\x18\x03 \x01(\x04R\x12endOfCurrentPeriod\x12\x16\n" + + "\x06active\x18\x04 \x01(\bR\x06active\x12/\n" + + "\x14cancel_at_period_end\x18\x05 \x01(\bR\x11cancelAtPeriodEnd\x12\x1a\n" + + "\bcurrency\x18\x06 \x01(\tR\bcurrency\x12\x16\n" + + "\x06amount\x18\a \x01(\x04R\x06amount\x12D\n" + + "\x06status\x18\b \x01(\x0e2,.org.signal.chat.purchase.SubscriptionStatusR\x06status\x12G\n" + + "\tprocessor\x18\t \x01(\x0e2).org.signal.chat.purchase.PaymentProviderR\tprocessor\x12N\n" + + "\x0epayment_method\x18\n" + + " \x01(\x0e2'.org.signal.chat.purchase.PaymentMethodR\rpaymentMethod\x12-\n" + + "\x12payment_processing\x18\v \x01(\bR\x11paymentProcessing\x12S\n" + + "\x0echarge_failure\x18\f \x01(\v2'.org.signal.chat.purchase.ChargeFailureH\x01R\rchargeFailure\x88\x01\x01B\x17\n" + + "\x15_billing_cycle_anchorB\x11\n" + + "\x0f_charge_failureB\n" + + "\n" + + "\bresponse\"w\n" + + "\x15GetBankMandateRequest\x12^\n" + + "\x12bank_transfer_type\x18\x01 \x01(\x0e2*.org.signal.chat.purchase.BankTransferTypeB\x04\x90\x97\"\x01R\x10bankTransferType\"2\n" + + "\x16GetBankMandateResponse\x12\x18\n" + + "\amandate\x18\x01 \x01(\tR\amandate*\xbc\x01\n" + + "\x0fPaymentProvider\x12\x1c\n" + + "\x18PAYMENT_PROVIDER_UNKNOWN\x10\x00\x12\x1b\n" + + "\x17PAYMENT_PROVIDER_STRIPE\x10\x01\x12\x1e\n" + + "\x1aPAYMENT_PROVIDER_BRAINTREE\x10\x02\x12(\n" + + "$PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING\x10\x03\x12$\n" + + " PAYMENT_PROVIDER_APPLE_APP_STORE\x10\x04*\xe4\x01\n" + + "\rPaymentMethod\x12\x1a\n" + + "\x16PAYMENT_METHOD_UNKNOWN\x10\x00\x12\x17\n" + + "\x13PAYMENT_METHOD_CARD\x10\x01\x12\x1d\n" + + "\x19PAYMENT_METHOD_SEPA_DEBIT\x10\x02\x12\x18\n" + + "\x14PAYMENT_METHOD_IDEAL\x10\x03\x12\x19\n" + + "\x15PAYMENT_METHOD_PAYPAL\x10\x04\x12&\n" + + "\"PAYMENT_METHOD_GOOGLE_PLAY_BILLING\x10\x05\x12\"\n" + + "\x1ePAYMENT_METHOD_APPLE_APP_STORE\x10\x06*\xdd\x01\n" + + "\x12SubscriptionStatus\x12\x1f\n" + + "\x1bSUBSCRIPTION_STATUS_UNKNOWN\x10\x00\x12\x1e\n" + + "\x1aSUBSCRIPTION_STATUS_ACTIVE\x10\x01\x12\"\n" + + "\x1eSUBSCRIPTION_STATUS_INCOMPLETE\x10\x02\x12 \n" + + "\x1cSUBSCRIPTION_STATUS_PAST_DUE\x10\x03\x12 \n" + + "\x1cSUBSCRIPTION_STATUS_CANCELED\x10\x04\x12\x1e\n" + + "\x1aSUBSCRIPTION_STATUS_UNPAID\x10\x05*U\n" + + "\x10BankTransferType\x12\x1e\n" + + "\x1aBANK_TRANSFER_TYPE_UNKNOWN\x10\x00\x12!\n" + + "\x1dBANK_TRANSFER_TYPE_SEPA_DEBIT\x10\x012\xf0\n" + + "\n" + + "\rSubscriptions\x12{\n" + + "\x10UpdateSubscriber\x121.org.signal.chat.purchase.UpdateSubscriberRequest\x1a2.org.signal.chat.purchase.UpdateSubscriberResponse\"\x00\x12{\n" + + "\x10DeleteSubscriber\x121.org.signal.chat.purchase.DeleteSubscriberRequest\x1a2.org.signal.chat.purchase.DeleteSubscriberResponse\"\x00\x12\x84\x01\n" + + "\x13CreatePaymentMethod\x124.org.signal.chat.purchase.CreatePaymentMethodRequest\x1a5.org.signal.chat.purchase.CreatePaymentMethodResponse\"\x00\x12\x96\x01\n" + + "\x19CreatePayPalPaymentMethod\x12:.org.signal.chat.purchase.CreatePayPalPaymentMethodRequest\x1a;.org.signal.chat.purchase.CreatePayPalPaymentMethodResponse\"\x00\x12\x90\x01\n" + + "\x17SetDefaultPaymentMethod\x128.org.signal.chat.purchase.SetDefaultPaymentMethodRequest\x1a9.org.signal.chat.purchase.SetDefaultPaymentMethodResponse\"\x00\x12\x87\x01\n" + + "\x14SetSubscriptionLevel\x125.org.signal.chat.purchase.SetSubscriptionLevelRequest\x1a6.org.signal.chat.purchase.SetSubscriptionLevelResponse\"\x00\x12\x99\x01\n" + + "\x1aGetSubscriptionInformation\x12;.org.signal.chat.purchase.GetSubscriptionInformationRequest\x1a<.org.signal.chat.purchase.GetSubscriptionInformationResponse\"\x00\x12\x8a\x01\n" + + "\x15GetReceiptCredentials\x126.org.signal.chat.purchase.GetReceiptCredentialsRequest\x1a7.org.signal.chat.purchase.GetReceiptCredentialsResponse\"\x00\x12\x81\x01\n" + + "\x12SetIapSubscription\x123.org.signal.chat.purchase.SetIapSubscriptionRequest\x1a4.org.signal.chat.purchase.SetIapSubscriptionResponse\"\x00\x12u\n" + + "\x0eGetBankMandate\x12/.org.signal.chat.purchase.GetBankMandateRequest\x1a0.org.signal.chat.purchase.GetBankMandateResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + +var ( + file_org_signal_chat_subscriptions_proto_rawDescOnce sync.Once + file_org_signal_chat_subscriptions_proto_rawDescData []byte +) + +func file_org_signal_chat_subscriptions_proto_rawDescGZIP() []byte { + file_org_signal_chat_subscriptions_proto_rawDescOnce.Do(func() { + file_org_signal_chat_subscriptions_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_subscriptions_proto_rawDesc), len(file_org_signal_chat_subscriptions_proto_rawDesc))) + }) + return file_org_signal_chat_subscriptions_proto_rawDescData +} + +var file_org_signal_chat_subscriptions_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_org_signal_chat_subscriptions_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_org_signal_chat_subscriptions_proto_goTypes = []any{ + (PaymentProvider)(0), // 0: org.signal.chat.purchase.PaymentProvider + (PaymentMethod)(0), // 1: org.signal.chat.purchase.PaymentMethod + (SubscriptionStatus)(0), // 2: org.signal.chat.purchase.SubscriptionStatus + (BankTransferType)(0), // 3: org.signal.chat.purchase.BankTransferType + (*UpdateSubscriberRequest)(nil), // 4: org.signal.chat.purchase.UpdateSubscriberRequest + (*UpdateSubscriberResponse)(nil), // 5: org.signal.chat.purchase.UpdateSubscriberResponse + (*DeleteSubscriberRequest)(nil), // 6: org.signal.chat.purchase.DeleteSubscriberRequest + (*DeleteSubscriberResponse)(nil), // 7: org.signal.chat.purchase.DeleteSubscriberResponse + (*CreatePaymentMethodRequest)(nil), // 8: org.signal.chat.purchase.CreatePaymentMethodRequest + (*CreatePaymentMethodResponse)(nil), // 9: org.signal.chat.purchase.CreatePaymentMethodResponse + (*CreatePayPalPaymentMethodRequest)(nil), // 10: org.signal.chat.purchase.CreatePayPalPaymentMethodRequest + (*CreatePayPalPaymentMethodResponse)(nil), // 11: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse + (*SetDefaultPaymentMethodRequest)(nil), // 12: org.signal.chat.purchase.SetDefaultPaymentMethodRequest + (*SetDefaultPaymentMethodResponse)(nil), // 13: org.signal.chat.purchase.SetDefaultPaymentMethodResponse + (*SetSubscriptionLevelRequest)(nil), // 14: org.signal.chat.purchase.SetSubscriptionLevelRequest + (*ChargeFailure)(nil), // 15: org.signal.chat.purchase.ChargeFailure + (*PaymentRequired)(nil), // 16: org.signal.chat.purchase.PaymentRequired + (*SetSubscriptionLevelResponse)(nil), // 17: org.signal.chat.purchase.SetSubscriptionLevelResponse + (*SetIapSubscriptionRequest)(nil), // 18: org.signal.chat.purchase.SetIapSubscriptionRequest + (*SetIapSubscriptionResponse)(nil), // 19: org.signal.chat.purchase.SetIapSubscriptionResponse + (*GetReceiptCredentialsRequest)(nil), // 20: org.signal.chat.purchase.GetReceiptCredentialsRequest + (*GetReceiptCredentialsResponse)(nil), // 21: org.signal.chat.purchase.GetReceiptCredentialsResponse + (*GetSubscriptionInformationRequest)(nil), // 22: org.signal.chat.purchase.GetSubscriptionInformationRequest + (*GetSubscriptionInformationResponse)(nil), // 23: org.signal.chat.purchase.GetSubscriptionInformationResponse + (*GetBankMandateRequest)(nil), // 24: org.signal.chat.purchase.GetBankMandateRequest + (*GetBankMandateResponse)(nil), // 25: org.signal.chat.purchase.GetBankMandateResponse + (*CreatePaymentMethodResponse_CreatePaymentMethodResult)(nil), // 26: org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult + (*CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult)(nil), // 27: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResult + (*SetDefaultPaymentMethodRequest_StripePaymentMethod)(nil), // 28: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.StripePaymentMethod + (*SetDefaultPaymentMethodRequest_BraintreePaymentMethod)(nil), // 29: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.BraintreePaymentMethod + (*SetDefaultPaymentMethodRequest_SepaPaymentMethod)(nil), // 30: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.SepaPaymentMethod + (*SetSubscriptionLevelResponse_SetSubscriptionLevelResult)(nil), // 31: org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResult + (*SetIapSubscriptionRequest_AppStorePurchase)(nil), // 32: org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchase + (*SetIapSubscriptionRequest_PlayBillingPurchase)(nil), // 33: org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchase + (*SetIapSubscriptionResponse_SetIapSubscriptionResult)(nil), // 34: org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResult + (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult)(nil), // 35: org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult + (*GetSubscriptionInformationResponse_Subscription)(nil), // 36: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription + (*emptypb.Empty)(nil), // 37: google.protobuf.Empty + (*errors.FailedUnidentifiedAuthorization)(nil), // 38: org.signal.chat.errors.FailedUnidentifiedAuthorization + (*errors.FailedZkAuthentication)(nil), // 39: org.signal.chat.errors.FailedZkAuthentication + (*errors.NotFound)(nil), // 40: org.signal.chat.errors.NotFound + (*errors.FailedPrecondition)(nil), // 41: org.signal.chat.errors.FailedPrecondition +} +var file_org_signal_chat_subscriptions_proto_depIdxs = []int32{ + 37, // 0: org.signal.chat.purchase.UpdateSubscriberResponse.success:type_name -> google.protobuf.Empty + 38, // 1: org.signal.chat.purchase.UpdateSubscriberResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 39, // 2: org.signal.chat.purchase.UpdateSubscriberResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication + 37, // 3: org.signal.chat.purchase.DeleteSubscriberResponse.success:type_name -> google.protobuf.Empty + 40, // 4: org.signal.chat.purchase.DeleteSubscriberResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 41, // 5: org.signal.chat.purchase.DeleteSubscriberResponse.cannot_cancel_subscription:type_name -> org.signal.chat.errors.FailedPrecondition + 1, // 6: org.signal.chat.purchase.CreatePaymentMethodRequest.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod + 26, // 7: org.signal.chat.purchase.CreatePaymentMethodResponse.result:type_name -> org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult + 40, // 8: org.signal.chat.purchase.CreatePaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 38, // 9: org.signal.chat.purchase.CreatePaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 41, // 10: org.signal.chat.purchase.CreatePaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 39, // 11: org.signal.chat.purchase.CreatePaymentMethodResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication + 27, // 12: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.result:type_name -> org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResult + 40, // 13: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 38, // 14: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 41, // 15: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 28, // 16: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.stripe:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.StripePaymentMethod + 29, // 17: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.braintree:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.BraintreePaymentMethod + 30, // 18: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.sepa:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.SepaPaymentMethod + 37, // 19: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.success:type_name -> google.protobuf.Empty + 40, // 20: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 38, // 21: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 41, // 22: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.payment_method_not_set_up:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 23: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 0, // 24: org.signal.chat.purchase.ChargeFailure.processor:type_name -> org.signal.chat.purchase.PaymentProvider + 15, // 25: org.signal.chat.purchase.PaymentRequired.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure + 31, // 26: org.signal.chat.purchase.SetSubscriptionLevelResponse.success:type_name -> org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResult + 40, // 27: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 38, // 28: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 41, // 29: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 30: org.signal.chat.purchase.SetSubscriptionLevelResponse.payment_method_not_set_up:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 31: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_operation:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 32: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 33: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 34: org.signal.chat.purchase.SetSubscriptionLevelResponse.payment_requires_action:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 35: org.signal.chat.purchase.SetSubscriptionLevelResponse.invalid_level_transition:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 36: org.signal.chat.purchase.SetSubscriptionLevelResponse.invalid_idempotency_key:type_name -> org.signal.chat.errors.FailedPrecondition + 15, // 37: org.signal.chat.purchase.SetSubscriptionLevelResponse.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure + 32, // 38: org.signal.chat.purchase.SetIapSubscriptionRequest.app_store:type_name -> org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchase + 33, // 39: org.signal.chat.purchase.SetIapSubscriptionRequest.play_billing:type_name -> org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchase + 34, // 40: org.signal.chat.purchase.SetIapSubscriptionResponse.success:type_name -> org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResult + 40, // 41: org.signal.chat.purchase.SetIapSubscriptionResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 38, // 42: org.signal.chat.purchase.SetIapSubscriptionResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 41, // 43: org.signal.chat.purchase.SetIapSubscriptionResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 44: org.signal.chat.purchase.SetIapSubscriptionResponse.payment_required:type_name -> org.signal.chat.errors.FailedPrecondition + 41, // 45: org.signal.chat.purchase.SetIapSubscriptionResponse.invalid_transaction:type_name -> org.signal.chat.errors.FailedPrecondition + 35, // 46: org.signal.chat.purchase.GetReceiptCredentialsResponse.success:type_name -> org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult + 40, // 47: org.signal.chat.purchase.GetReceiptCredentialsResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 38, // 48: org.signal.chat.purchase.GetReceiptCredentialsResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 41, // 49: org.signal.chat.purchase.GetReceiptCredentialsResponse.no_paid_invoice:type_name -> org.signal.chat.errors.FailedPrecondition + 16, // 50: org.signal.chat.purchase.GetReceiptCredentialsResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired + 41, // 51: org.signal.chat.purchase.GetReceiptCredentialsResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition + 36, // 52: org.signal.chat.purchase.GetSubscriptionInformationResponse.success:type_name -> org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription + 37, // 53: org.signal.chat.purchase.GetSubscriptionInformationResponse.no_subscription:type_name -> google.protobuf.Empty + 40, // 54: org.signal.chat.purchase.GetSubscriptionInformationResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 38, // 55: org.signal.chat.purchase.GetSubscriptionInformationResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 3, // 56: org.signal.chat.purchase.GetBankMandateRequest.bank_transfer_type:type_name -> org.signal.chat.purchase.BankTransferType + 0, // 57: org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult.paymentProvider:type_name -> org.signal.chat.purchase.PaymentProvider + 2, // 58: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.status:type_name -> org.signal.chat.purchase.SubscriptionStatus + 0, // 59: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.processor:type_name -> org.signal.chat.purchase.PaymentProvider + 1, // 60: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod + 15, // 61: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure + 4, // 62: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:input_type -> org.signal.chat.purchase.UpdateSubscriberRequest + 6, // 63: org.signal.chat.purchase.Subscriptions.DeleteSubscriber:input_type -> org.signal.chat.purchase.DeleteSubscriberRequest + 8, // 64: org.signal.chat.purchase.Subscriptions.CreatePaymentMethod:input_type -> org.signal.chat.purchase.CreatePaymentMethodRequest + 10, // 65: org.signal.chat.purchase.Subscriptions.CreatePayPalPaymentMethod:input_type -> org.signal.chat.purchase.CreatePayPalPaymentMethodRequest + 12, // 66: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:input_type -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest + 14, // 67: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:input_type -> org.signal.chat.purchase.SetSubscriptionLevelRequest + 22, // 68: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:input_type -> org.signal.chat.purchase.GetSubscriptionInformationRequest + 20, // 69: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:input_type -> org.signal.chat.purchase.GetReceiptCredentialsRequest + 18, // 70: org.signal.chat.purchase.Subscriptions.SetIapSubscription:input_type -> org.signal.chat.purchase.SetIapSubscriptionRequest + 24, // 71: org.signal.chat.purchase.Subscriptions.GetBankMandate:input_type -> org.signal.chat.purchase.GetBankMandateRequest + 5, // 72: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:output_type -> org.signal.chat.purchase.UpdateSubscriberResponse + 7, // 73: org.signal.chat.purchase.Subscriptions.DeleteSubscriber:output_type -> org.signal.chat.purchase.DeleteSubscriberResponse + 9, // 74: org.signal.chat.purchase.Subscriptions.CreatePaymentMethod:output_type -> org.signal.chat.purchase.CreatePaymentMethodResponse + 11, // 75: org.signal.chat.purchase.Subscriptions.CreatePayPalPaymentMethod:output_type -> org.signal.chat.purchase.CreatePayPalPaymentMethodResponse + 13, // 76: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:output_type -> org.signal.chat.purchase.SetDefaultPaymentMethodResponse + 17, // 77: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:output_type -> org.signal.chat.purchase.SetSubscriptionLevelResponse + 23, // 78: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:output_type -> org.signal.chat.purchase.GetSubscriptionInformationResponse + 21, // 79: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:output_type -> org.signal.chat.purchase.GetReceiptCredentialsResponse + 19, // 80: org.signal.chat.purchase.Subscriptions.SetIapSubscription:output_type -> org.signal.chat.purchase.SetIapSubscriptionResponse + 25, // 81: org.signal.chat.purchase.Subscriptions.GetBankMandate:output_type -> org.signal.chat.purchase.GetBankMandateResponse + 72, // [72:82] is the sub-list for method output_type + 62, // [62:72] is the sub-list for method input_type + 62, // [62:62] is the sub-list for extension type_name + 62, // [62:62] is the sub-list for extension extendee + 0, // [0:62] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_subscriptions_proto_init() } +func file_org_signal_chat_subscriptions_proto_init() { + if File_org_signal_chat_subscriptions_proto != nil { + return + } + file_org_signal_chat_subscriptions_proto_msgTypes[1].OneofWrappers = []any{ + (*UpdateSubscriberResponse_Success)(nil), + (*UpdateSubscriberResponse_SubscriberIdMismatch)(nil), + (*UpdateSubscriberResponse_PermitRejected)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[3].OneofWrappers = []any{ + (*DeleteSubscriberResponse_Success)(nil), + (*DeleteSubscriberResponse_SubscriberNotFound)(nil), + (*DeleteSubscriberResponse_CannotCancelSubscription)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[5].OneofWrappers = []any{ + (*CreatePaymentMethodResponse_Result)(nil), + (*CreatePaymentMethodResponse_SubscriberNotFound)(nil), + (*CreatePaymentMethodResponse_SubscriberIdMismatch)(nil), + (*CreatePaymentMethodResponse_SubscriptionProcessorConflict)(nil), + (*CreatePaymentMethodResponse_PermitRejected)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[7].OneofWrappers = []any{ + (*CreatePayPalPaymentMethodResponse_Result)(nil), + (*CreatePayPalPaymentMethodResponse_SubscriberNotFound)(nil), + (*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch)(nil), + (*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[8].OneofWrappers = []any{ + (*SetDefaultPaymentMethodRequest_Stripe)(nil), + (*SetDefaultPaymentMethodRequest_Braintree)(nil), + (*SetDefaultPaymentMethodRequest_Sepa)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[9].OneofWrappers = []any{ + (*SetDefaultPaymentMethodResponse_Success)(nil), + (*SetDefaultPaymentMethodResponse_SubscriberNotFound)(nil), + (*SetDefaultPaymentMethodResponse_SubscriberIdMismatch)(nil), + (*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp)(nil), + (*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[11].OneofWrappers = []any{} + file_org_signal_chat_subscriptions_proto_msgTypes[12].OneofWrappers = []any{} + file_org_signal_chat_subscriptions_proto_msgTypes[13].OneofWrappers = []any{ + (*SetSubscriptionLevelResponse_Success)(nil), + (*SetSubscriptionLevelResponse_SubscriberNotFound)(nil), + (*SetSubscriptionLevelResponse_SubscriberIdMismatch)(nil), + (*SetSubscriptionLevelResponse_SubscriptionProcessorConflict)(nil), + (*SetSubscriptionLevelResponse_PaymentMethodNotSetUp)(nil), + (*SetSubscriptionLevelResponse_UnsupportedOperation)(nil), + (*SetSubscriptionLevelResponse_UnsupportedLevel)(nil), + (*SetSubscriptionLevelResponse_UnsupportedCurrency)(nil), + (*SetSubscriptionLevelResponse_PaymentRequiresAction)(nil), + (*SetSubscriptionLevelResponse_InvalidLevelTransition)(nil), + (*SetSubscriptionLevelResponse_InvalidIdempotencyKey)(nil), + (*SetSubscriptionLevelResponse_ChargeFailure)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[14].OneofWrappers = []any{ + (*SetIapSubscriptionRequest_AppStore)(nil), + (*SetIapSubscriptionRequest_PlayBilling)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[15].OneofWrappers = []any{ + (*SetIapSubscriptionResponse_Success)(nil), + (*SetIapSubscriptionResponse_SubscriberNotFound)(nil), + (*SetIapSubscriptionResponse_SubscriberIdMismatch)(nil), + (*SetIapSubscriptionResponse_SubscriptionProcessorConflict)(nil), + (*SetIapSubscriptionResponse_PaymentRequired)(nil), + (*SetIapSubscriptionResponse_InvalidTransaction)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[17].OneofWrappers = []any{ + (*GetReceiptCredentialsResponse_Success)(nil), + (*GetReceiptCredentialsResponse_SubscriberNotFound)(nil), + (*GetReceiptCredentialsResponse_SubscriberIdMismatch)(nil), + (*GetReceiptCredentialsResponse_NoPaidInvoice)(nil), + (*GetReceiptCredentialsResponse_PaymentRequired)(nil), + (*GetReceiptCredentialsResponse_AlreadyRedeemed)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[19].OneofWrappers = []any{ + (*GetSubscriptionInformationResponse_Success)(nil), + (*GetSubscriptionInformationResponse_NoSubscription)(nil), + (*GetSubscriptionInformationResponse_SubscriberNotFound)(nil), + (*GetSubscriptionInformationResponse_SubscriberIdMismatch)(nil), + } + file_org_signal_chat_subscriptions_proto_msgTypes[32].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_subscriptions_proto_rawDesc), len(file_org_signal_chat_subscriptions_proto_rawDesc)), + NumEnums: 4, + NumMessages: 33, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_org_signal_chat_subscriptions_proto_goTypes, + DependencyIndexes: file_org_signal_chat_subscriptions_proto_depIdxs, + EnumInfos: file_org_signal_chat_subscriptions_proto_enumTypes, + MessageInfos: file_org_signal_chat_subscriptions_proto_msgTypes, + }.Build() + File_org_signal_chat_subscriptions_proto = out.File + file_org_signal_chat_subscriptions_proto_goTypes = nil + file_org_signal_chat_subscriptions_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go new file mode 100644 index 0000000..5153be8 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go @@ -0,0 +1,601 @@ +// +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.34.1 +// source: org/signal/chat/subscriptions.proto + +package subscriptions + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Subscriptions_UpdateSubscriber_FullMethodName = "/org.signal.chat.purchase.Subscriptions/UpdateSubscriber" + Subscriptions_DeleteSubscriber_FullMethodName = "/org.signal.chat.purchase.Subscriptions/DeleteSubscriber" + Subscriptions_CreatePaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/CreatePaymentMethod" + Subscriptions_CreatePayPalPaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/CreatePayPalPaymentMethod" + Subscriptions_SetDefaultPaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetDefaultPaymentMethod" + Subscriptions_SetSubscriptionLevel_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetSubscriptionLevel" + Subscriptions_GetSubscriptionInformation_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetSubscriptionInformation" + Subscriptions_GetReceiptCredentials_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetReceiptCredentials" + Subscriptions_SetIapSubscription_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetIapSubscription" + Subscriptions_GetBankMandate_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetBankMandate" +) + +// SubscriptionsClient is the client API for Subscriptions service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// # Service for creating donation subscriptions +// +// Configuration for subscription levels can be found in ProductConfiguration. +type SubscriptionsClient interface { + // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers + // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended + // period of time will result in the subscription being canceled. + UpdateSubscriber(ctx context.Context, in *UpdateSubscriberRequest, opts ...grpc.CallOption) (*UpdateSubscriberResponse, error) + // Cancels any current subscription at the end of the current subscription period. + // + // Note: Apple IAP subscriptions do not support server-side cancellation, so this method should only be called after + // cancelling a subscription from storekit to keep server data up to date. + DeleteSubscriber(ctx context.Context, in *DeleteSubscriberRequest, opts ...grpc.CallOption) (*DeleteSubscriberResponse, error) + // Returns a client secret that can be used to set up a new payment method with the payment processor. + CreatePaymentMethod(ctx context.Context, in *CreatePaymentMethodRequest, opts ...grpc.CallOption) (*CreatePaymentMethodResponse, error) + // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. + CreatePayPalPaymentMethod(ctx context.Context, in *CreatePayPalPaymentMethodRequest, opts ...grpc.CallOption) (*CreatePayPalPaymentMethodResponse, error) + // Sets the default payment method for a subscriber. + SetDefaultPaymentMethod(ctx context.Context, in *SetDefaultPaymentMethodRequest, opts ...grpc.CallOption) (*SetDefaultPaymentMethodResponse, error) + // Sets the subscription level and currency for a subscriber. + SetSubscriptionLevel(ctx context.Context, in *SetSubscriptionLevelRequest, opts ...grpc.CallOption) (*SetSubscriptionLevelResponse, error) + // Returns information about the current subscription associated with the provided subscriberId if one exists. + // + // Although it uses [Stripe's values](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses), + // the status field in the response is generic, with [Braintree-specific values](https://developer.paypal.com/braintree/docs/guides/recurring-billing/overview#subscription-statuses) mapped + // to Stripe's. Since we don't support trials or unpaid subscriptions, the associated statuses will never be returned + // by the API. + GetSubscriptionInformation(ctx context.Context, in *GetSubscriptionInformationRequest, opts ...grpc.CallOption) (*GetSubscriptionInformationResponse, error) + // Create a receipt from a valid payment invoice that can be used to obtain an entitlement + // + // This request is repeatable so long as the ReceiptCredentialRequest remains the same. Clients should use the same + // ReceiptCredentialRequest value until they attempt to redeem the resulting ReceiptCredentialPresentation. After + // this point, the ReceiptCredentialRequest MUST NOT be reused or you may not be able to redeem a valid payment + // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until + // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation + // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same + // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. + // + // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this + // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the + // latest invoice, so it will have the latest expiration possible and no entitlement time will be lost. The important + // thing is not to reuse ReceiptCredentialRequest after you have started attempting to redeem the associated + // ReceiptCredentialPresentation. Then you may produce a ReceiptCredentialPresentation for a later invoice that + // cannot be redeemed. + // + // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. + GetReceiptCredentials(ctx context.Context, in *GetReceiptCredentialsRequest, opts ...grpc.CallOption) (*GetReceiptCredentialsResponse, error) + // Set a token that represents an IAP subscription made with App Store/Google Play Billing. + // + // To set up an App Store subscription: + // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) + // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store + // directly via StoreKit and obtain a originalTransactionId. + // 3. Call this RPC with the originalTransactionId + // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // entitlement + // + // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. + // + // To set up a subscription with Google Play Billing: + // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) + // 2. [Create a subscription](https://developer.android.com/google/play/billing/integrate) with Google Play Billing + // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) + // the purchaseToken. + // 3. Call this RPC with the purchaseToken + // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // entitlement + // + // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling + // this method to ensure their payment is tracked. + // + // Once a purchaseToken to is posted to a subscriberId, the same subscriberId must not be used with another payment + // method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription + // associated with the old purchaseToken will be cancelled. + SetIapSubscription(ctx context.Context, in *SetIapSubscriptionRequest, opts ...grpc.CallOption) (*SetIapSubscriptionResponse, error) + // Returns a localized bank mandate for the specified bank transfer type + GetBankMandate(ctx context.Context, in *GetBankMandateRequest, opts ...grpc.CallOption) (*GetBankMandateResponse, error) +} + +type subscriptionsClient struct { + cc grpc.ClientConnInterface +} + +func NewSubscriptionsClient(cc grpc.ClientConnInterface) SubscriptionsClient { + return &subscriptionsClient{cc} +} + +func (c *subscriptionsClient) UpdateSubscriber(ctx context.Context, in *UpdateSubscriberRequest, opts ...grpc.CallOption) (*UpdateSubscriberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateSubscriberResponse) + err := c.cc.Invoke(ctx, Subscriptions_UpdateSubscriber_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) DeleteSubscriber(ctx context.Context, in *DeleteSubscriberRequest, opts ...grpc.CallOption) (*DeleteSubscriberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteSubscriberResponse) + err := c.cc.Invoke(ctx, Subscriptions_DeleteSubscriber_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) CreatePaymentMethod(ctx context.Context, in *CreatePaymentMethodRequest, opts ...grpc.CallOption) (*CreatePaymentMethodResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreatePaymentMethodResponse) + err := c.cc.Invoke(ctx, Subscriptions_CreatePaymentMethod_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) CreatePayPalPaymentMethod(ctx context.Context, in *CreatePayPalPaymentMethodRequest, opts ...grpc.CallOption) (*CreatePayPalPaymentMethodResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreatePayPalPaymentMethodResponse) + err := c.cc.Invoke(ctx, Subscriptions_CreatePayPalPaymentMethod_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) SetDefaultPaymentMethod(ctx context.Context, in *SetDefaultPaymentMethodRequest, opts ...grpc.CallOption) (*SetDefaultPaymentMethodResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetDefaultPaymentMethodResponse) + err := c.cc.Invoke(ctx, Subscriptions_SetDefaultPaymentMethod_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) SetSubscriptionLevel(ctx context.Context, in *SetSubscriptionLevelRequest, opts ...grpc.CallOption) (*SetSubscriptionLevelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetSubscriptionLevelResponse) + err := c.cc.Invoke(ctx, Subscriptions_SetSubscriptionLevel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) GetSubscriptionInformation(ctx context.Context, in *GetSubscriptionInformationRequest, opts ...grpc.CallOption) (*GetSubscriptionInformationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetSubscriptionInformationResponse) + err := c.cc.Invoke(ctx, Subscriptions_GetSubscriptionInformation_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) GetReceiptCredentials(ctx context.Context, in *GetReceiptCredentialsRequest, opts ...grpc.CallOption) (*GetReceiptCredentialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetReceiptCredentialsResponse) + err := c.cc.Invoke(ctx, Subscriptions_GetReceiptCredentials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) SetIapSubscription(ctx context.Context, in *SetIapSubscriptionRequest, opts ...grpc.CallOption) (*SetIapSubscriptionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetIapSubscriptionResponse) + err := c.cc.Invoke(ctx, Subscriptions_SetIapSubscription_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subscriptionsClient) GetBankMandate(ctx context.Context, in *GetBankMandateRequest, opts ...grpc.CallOption) (*GetBankMandateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBankMandateResponse) + err := c.cc.Invoke(ctx, Subscriptions_GetBankMandate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SubscriptionsServer is the server API for Subscriptions service. +// All implementations must embed UnimplementedSubscriptionsServer +// for forward compatibility. +// +// # Service for creating donation subscriptions +// +// Configuration for subscription levels can be found in ProductConfiguration. +type SubscriptionsServer interface { + // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers + // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended + // period of time will result in the subscription being canceled. + UpdateSubscriber(context.Context, *UpdateSubscriberRequest) (*UpdateSubscriberResponse, error) + // Cancels any current subscription at the end of the current subscription period. + // + // Note: Apple IAP subscriptions do not support server-side cancellation, so this method should only be called after + // cancelling a subscription from storekit to keep server data up to date. + DeleteSubscriber(context.Context, *DeleteSubscriberRequest) (*DeleteSubscriberResponse, error) + // Returns a client secret that can be used to set up a new payment method with the payment processor. + CreatePaymentMethod(context.Context, *CreatePaymentMethodRequest) (*CreatePaymentMethodResponse, error) + // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. + CreatePayPalPaymentMethod(context.Context, *CreatePayPalPaymentMethodRequest) (*CreatePayPalPaymentMethodResponse, error) + // Sets the default payment method for a subscriber. + SetDefaultPaymentMethod(context.Context, *SetDefaultPaymentMethodRequest) (*SetDefaultPaymentMethodResponse, error) + // Sets the subscription level and currency for a subscriber. + SetSubscriptionLevel(context.Context, *SetSubscriptionLevelRequest) (*SetSubscriptionLevelResponse, error) + // Returns information about the current subscription associated with the provided subscriberId if one exists. + // + // Although it uses [Stripe's values](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses), + // the status field in the response is generic, with [Braintree-specific values](https://developer.paypal.com/braintree/docs/guides/recurring-billing/overview#subscription-statuses) mapped + // to Stripe's. Since we don't support trials or unpaid subscriptions, the associated statuses will never be returned + // by the API. + GetSubscriptionInformation(context.Context, *GetSubscriptionInformationRequest) (*GetSubscriptionInformationResponse, error) + // Create a receipt from a valid payment invoice that can be used to obtain an entitlement + // + // This request is repeatable so long as the ReceiptCredentialRequest remains the same. Clients should use the same + // ReceiptCredentialRequest value until they attempt to redeem the resulting ReceiptCredentialPresentation. After + // this point, the ReceiptCredentialRequest MUST NOT be reused or you may not be able to redeem a valid payment + // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until + // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation + // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same + // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. + // + // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this + // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the + // latest invoice, so it will have the latest expiration possible and no entitlement time will be lost. The important + // thing is not to reuse ReceiptCredentialRequest after you have started attempting to redeem the associated + // ReceiptCredentialPresentation. Then you may produce a ReceiptCredentialPresentation for a later invoice that + // cannot be redeemed. + // + // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. + GetReceiptCredentials(context.Context, *GetReceiptCredentialsRequest) (*GetReceiptCredentialsResponse, error) + // Set a token that represents an IAP subscription made with App Store/Google Play Billing. + // + // To set up an App Store subscription: + // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) + // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store + // directly via StoreKit and obtain a originalTransactionId. + // 3. Call this RPC with the originalTransactionId + // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // entitlement + // + // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. + // + // To set up a subscription with Google Play Billing: + // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) + // 2. [Create a subscription](https://developer.android.com/google/play/billing/integrate) with Google Play Billing + // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) + // the purchaseToken. + // 3. Call this RPC with the purchaseToken + // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // entitlement + // + // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling + // this method to ensure their payment is tracked. + // + // Once a purchaseToken to is posted to a subscriberId, the same subscriberId must not be used with another payment + // method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription + // associated with the old purchaseToken will be cancelled. + SetIapSubscription(context.Context, *SetIapSubscriptionRequest) (*SetIapSubscriptionResponse, error) + // Returns a localized bank mandate for the specified bank transfer type + GetBankMandate(context.Context, *GetBankMandateRequest) (*GetBankMandateResponse, error) + mustEmbedUnimplementedSubscriptionsServer() +} + +// UnimplementedSubscriptionsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedSubscriptionsServer struct{} + +func (UnimplementedSubscriptionsServer) UpdateSubscriber(context.Context, *UpdateSubscriberRequest) (*UpdateSubscriberResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateSubscriber not implemented") +} +func (UnimplementedSubscriptionsServer) DeleteSubscriber(context.Context, *DeleteSubscriberRequest) (*DeleteSubscriberResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteSubscriber not implemented") +} +func (UnimplementedSubscriptionsServer) CreatePaymentMethod(context.Context, *CreatePaymentMethodRequest) (*CreatePaymentMethodResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreatePaymentMethod not implemented") +} +func (UnimplementedSubscriptionsServer) CreatePayPalPaymentMethod(context.Context, *CreatePayPalPaymentMethodRequest) (*CreatePayPalPaymentMethodResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreatePayPalPaymentMethod not implemented") +} +func (UnimplementedSubscriptionsServer) SetDefaultPaymentMethod(context.Context, *SetDefaultPaymentMethodRequest) (*SetDefaultPaymentMethodResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetDefaultPaymentMethod not implemented") +} +func (UnimplementedSubscriptionsServer) SetSubscriptionLevel(context.Context, *SetSubscriptionLevelRequest) (*SetSubscriptionLevelResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetSubscriptionLevel not implemented") +} +func (UnimplementedSubscriptionsServer) GetSubscriptionInformation(context.Context, *GetSubscriptionInformationRequest) (*GetSubscriptionInformationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetSubscriptionInformation not implemented") +} +func (UnimplementedSubscriptionsServer) GetReceiptCredentials(context.Context, *GetReceiptCredentialsRequest) (*GetReceiptCredentialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetReceiptCredentials not implemented") +} +func (UnimplementedSubscriptionsServer) SetIapSubscription(context.Context, *SetIapSubscriptionRequest) (*SetIapSubscriptionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetIapSubscription not implemented") +} +func (UnimplementedSubscriptionsServer) GetBankMandate(context.Context, *GetBankMandateRequest) (*GetBankMandateResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetBankMandate not implemented") +} +func (UnimplementedSubscriptionsServer) mustEmbedUnimplementedSubscriptionsServer() {} +func (UnimplementedSubscriptionsServer) testEmbeddedByValue() {} + +// UnsafeSubscriptionsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SubscriptionsServer will +// result in compilation errors. +type UnsafeSubscriptionsServer interface { + mustEmbedUnimplementedSubscriptionsServer() +} + +func RegisterSubscriptionsServer(s grpc.ServiceRegistrar, srv SubscriptionsServer) { + // If the following call panics, it indicates UnimplementedSubscriptionsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Subscriptions_ServiceDesc, srv) +} + +func _Subscriptions_UpdateSubscriber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSubscriberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).UpdateSubscriber(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_UpdateSubscriber_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).UpdateSubscriber(ctx, req.(*UpdateSubscriberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_DeleteSubscriber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSubscriberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).DeleteSubscriber(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_DeleteSubscriber_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).DeleteSubscriber(ctx, req.(*DeleteSubscriberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_CreatePaymentMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePaymentMethodRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).CreatePaymentMethod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_CreatePaymentMethod_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).CreatePaymentMethod(ctx, req.(*CreatePaymentMethodRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_CreatePayPalPaymentMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePayPalPaymentMethodRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).CreatePayPalPaymentMethod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_CreatePayPalPaymentMethod_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).CreatePayPalPaymentMethod(ctx, req.(*CreatePayPalPaymentMethodRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_SetDefaultPaymentMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetDefaultPaymentMethodRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).SetDefaultPaymentMethod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_SetDefaultPaymentMethod_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).SetDefaultPaymentMethod(ctx, req.(*SetDefaultPaymentMethodRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_SetSubscriptionLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetSubscriptionLevelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).SetSubscriptionLevel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_SetSubscriptionLevel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).SetSubscriptionLevel(ctx, req.(*SetSubscriptionLevelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_GetSubscriptionInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubscriptionInformationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).GetSubscriptionInformation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_GetSubscriptionInformation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).GetSubscriptionInformation(ctx, req.(*GetSubscriptionInformationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_GetReceiptCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReceiptCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).GetReceiptCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_GetReceiptCredentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).GetReceiptCredentials(ctx, req.(*GetReceiptCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_SetIapSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetIapSubscriptionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).SetIapSubscription(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_SetIapSubscription_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).SetIapSubscription(ctx, req.(*SetIapSubscriptionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Subscriptions_GetBankMandate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBankMandateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubscriptionsServer).GetBankMandate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Subscriptions_GetBankMandate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubscriptionsServer).GetBankMandate(ctx, req.(*GetBankMandateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Subscriptions_ServiceDesc is the grpc.ServiceDesc for Subscriptions service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Subscriptions_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "org.signal.chat.purchase.Subscriptions", + HandlerType: (*SubscriptionsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateSubscriber", + Handler: _Subscriptions_UpdateSubscriber_Handler, + }, + { + MethodName: "DeleteSubscriber", + Handler: _Subscriptions_DeleteSubscriber_Handler, + }, + { + MethodName: "CreatePaymentMethod", + Handler: _Subscriptions_CreatePaymentMethod_Handler, + }, + { + MethodName: "CreatePayPalPaymentMethod", + Handler: _Subscriptions_CreatePayPalPaymentMethod_Handler, + }, + { + MethodName: "SetDefaultPaymentMethod", + Handler: _Subscriptions_SetDefaultPaymentMethod_Handler, + }, + { + MethodName: "SetSubscriptionLevel", + Handler: _Subscriptions_SetSubscriptionLevel_Handler, + }, + { + MethodName: "GetSubscriptionInformation", + Handler: _Subscriptions_GetSubscriptionInformation_Handler, + }, + { + MethodName: "GetReceiptCredentials", + Handler: _Subscriptions_GetReceiptCredentials_Handler, + }, + { + MethodName: "SetIapSubscription", + Handler: _Subscriptions_SetIapSubscription_Handler, + }, + { + MethodName: "GetBankMandate", + Handler: _Subscriptions_GetBankMandate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "org/signal/chat/subscriptions.proto", +} diff --git a/pkg/signalmeow/protobuf/rpc/tag/tag.pb.go b/pkg/signalmeow/protobuf/rpc/tag/tag.pb.go new file mode 100644 index 0000000..bd79729 --- /dev/null +++ b/pkg/signalmeow/protobuf/rpc/tag/tag.pb.go @@ -0,0 +1,110 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: org/signal/chat/tag.proto + +package tag + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var file_org_signal_chat_tag_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 71000, + Name: "org.signal.chat.tag.reason", + Tag: "bytes,71000,opt,name=reason", + Filename: "org/signal/chat/tag.proto", + }, +} + +// Extension fields to descriptorpb.FieldOptions. +var ( + // Indicate that a message which includes this field (directly or indirectly) + // was generated for a particular reason. + // + // ``` + // import "org/signal/chat/tag.proto" + // + // message LookupThingResponse { + // oneof response { + // string thing = 1; + // Error not_found = 2 [(tag.reason) = "not_found"]; + // Error forbidden = 3 [(tag.reason) = "forbidden"]; + // } + // } + // + // ``` + // + // Metrics middleware may then inspect `LookupThingResponse` and tag responses + // with the provided reason. This is useful when multiple outcomes are + // potentially represented with a status = "OK" RPC response. + // + // Valid messages should only have a single reason set. If a message has + // multiple fields present that have a reason option set, no guarantees are + // made about the reason that is selected. + // + // optional string reason = 71000; + E_Reason = &file_org_signal_chat_tag_proto_extTypes[0] +) + +var File_org_signal_chat_tag_proto protoreflect.FileDescriptor + +const file_org_signal_chat_tag_proto_rawDesc = "" + + "\n" + + "\x19org/signal/chat/tag.proto\x12\x13org.signal.chat.tag\x1a google/protobuf/descriptor.proto::\n" + + "\x06reason\x12\x1d.google.protobuf.FieldOptions\x18ت\x04 \x01(\tR\x06reason\x88\x01\x01B\x02P\x01b\x06proto3" + +var file_org_signal_chat_tag_proto_goTypes = []any{ + (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions +} +var file_org_signal_chat_tag_proto_depIdxs = []int32{ + 0, // 0: org.signal.chat.tag.reason:extendee -> google.protobuf.FieldOptions + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_org_signal_chat_tag_proto_init() } +func file_org_signal_chat_tag_proto_init() { + if File_org_signal_chat_tag_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_tag_proto_rawDesc), len(file_org_signal_chat_tag_proto_rawDesc)), + NumEnums: 0, + NumMessages: 0, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_org_signal_chat_tag_proto_goTypes, + DependencyIndexes: file_org_signal_chat_tag_proto_depIdxs, + ExtensionInfos: file_org_signal_chat_tag_proto_extTypes, + }.Build() + File_org_signal_chat_tag_proto = out.File + file_org_signal_chat_tag_proto_goTypes = nil + file_org_signal_chat_tag_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/DeviceName.pb.go b/pkg/signalmeow/protobuf/signalpb/DeviceName.pb.go similarity index 60% rename from pkg/signalmeow/protobuf/DeviceName.pb.go rename to pkg/signalmeow/protobuf/signalpb/DeviceName.pb.go index 31b5704..3e88778 100644 --- a/pkg/signalmeow/protobuf/DeviceName.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/DeviceName.pb.go @@ -1,11 +1,13 @@ +//* +// Copyright (C) 2014-2016 Open Whisper Systems +// +// Licensed according to the LICENSE file in this repository. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 // protoc v7.34.1 -// source: DeviceName.proto - -// Copyright 2018 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only +// source: signalpb/DeviceName.proto package signalpb @@ -35,7 +37,7 @@ type DeviceName struct { func (x *DeviceName) Reset() { *x = DeviceName{} - mi := &file_DeviceName_proto_msgTypes[0] + mi := &file_signalpb_DeviceName_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +49,7 @@ func (x *DeviceName) String() string { func (*DeviceName) ProtoMessage() {} func (x *DeviceName) ProtoReflect() protoreflect.Message { - mi := &file_DeviceName_proto_msgTypes[0] + mi := &file_signalpb_DeviceName_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +62,7 @@ func (x *DeviceName) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceName.ProtoReflect.Descriptor instead. func (*DeviceName) Descriptor() ([]byte, []int) { - return file_DeviceName_proto_rawDescGZIP(), []int{0} + return file_signalpb_DeviceName_proto_rawDescGZIP(), []int{0} } func (x *DeviceName) GetEphemeralPublic() []byte { @@ -84,36 +86,37 @@ func (x *DeviceName) GetCiphertext() []byte { return nil } -var File_DeviceName_proto protoreflect.FileDescriptor +var File_signalpb_DeviceName_proto protoreflect.FileDescriptor -const file_DeviceName_proto_rawDesc = "" + +const file_signalpb_DeviceName_proto_rawDesc = "" + "\n" + - "\x10DeviceName.proto\x12\rsignalservice\"x\n" + + "\x19signalpb/DeviceName.proto\x12\rsignalservice\"x\n" + "\n" + "DeviceName\x12(\n" + "\x0fephemeralPublic\x18\x01 \x01(\fR\x0fephemeralPublic\x12 \n" + "\vsyntheticIv\x18\x02 \x01(\fR\vsyntheticIv\x12\x1e\n" + "\n" + "ciphertext\x18\x03 \x01(\fR\n" + - "ciphertext" + "ciphertextB\x1d\n" + + "\x1borg.signal.core.util.crypto" var ( - file_DeviceName_proto_rawDescOnce sync.Once - file_DeviceName_proto_rawDescData []byte + file_signalpb_DeviceName_proto_rawDescOnce sync.Once + file_signalpb_DeviceName_proto_rawDescData []byte ) -func file_DeviceName_proto_rawDescGZIP() []byte { - file_DeviceName_proto_rawDescOnce.Do(func() { - file_DeviceName_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_DeviceName_proto_rawDesc), len(file_DeviceName_proto_rawDesc))) +func file_signalpb_DeviceName_proto_rawDescGZIP() []byte { + file_signalpb_DeviceName_proto_rawDescOnce.Do(func() { + file_signalpb_DeviceName_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_DeviceName_proto_rawDesc), len(file_signalpb_DeviceName_proto_rawDesc))) }) - return file_DeviceName_proto_rawDescData + return file_signalpb_DeviceName_proto_rawDescData } -var file_DeviceName_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_DeviceName_proto_goTypes = []any{ +var file_signalpb_DeviceName_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_signalpb_DeviceName_proto_goTypes = []any{ (*DeviceName)(nil), // 0: signalservice.DeviceName } -var file_DeviceName_proto_depIdxs = []int32{ +var file_signalpb_DeviceName_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -121,26 +124,26 @@ var file_DeviceName_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_DeviceName_proto_init() } -func file_DeviceName_proto_init() { - if File_DeviceName_proto != nil { +func init() { file_signalpb_DeviceName_proto_init() } +func file_signalpb_DeviceName_proto_init() { + if File_signalpb_DeviceName_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_DeviceName_proto_rawDesc), len(file_DeviceName_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_DeviceName_proto_rawDesc), len(file_signalpb_DeviceName_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_DeviceName_proto_goTypes, - DependencyIndexes: file_DeviceName_proto_depIdxs, - MessageInfos: file_DeviceName_proto_msgTypes, + GoTypes: file_signalpb_DeviceName_proto_goTypes, + DependencyIndexes: file_signalpb_DeviceName_proto_depIdxs, + MessageInfos: file_signalpb_DeviceName_proto_msgTypes, }.Build() - File_DeviceName_proto = out.File - file_DeviceName_proto_goTypes = nil - file_DeviceName_proto_depIdxs = nil + File_signalpb_DeviceName_proto = out.File + file_signalpb_DeviceName_proto_goTypes = nil + file_signalpb_DeviceName_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/signalpb/DeviceName.proto b/pkg/signalmeow/protobuf/signalpb/DeviceName.proto new file mode 100644 index 0000000..7db04ed --- /dev/null +++ b/pkg/signalmeow/protobuf/signalpb/DeviceName.proto @@ -0,0 +1,17 @@ +/** + * Copyright (C) 2014-2016 Open Whisper Systems + * + * Licensed according to the LICENSE file in this repository. + */ + +syntax = "proto2"; + +package signalservice; + +option java_package = "org.signal.core.util.crypto"; + +message DeviceName { + optional bytes ephemeralPublic = 1; + optional bytes syntheticIv = 2; + optional bytes ciphertext = 3; +} diff --git a/pkg/signalmeow/protobuf/Groups.pb.go b/pkg/signalmeow/protobuf/signalpb/Groups.pb.go similarity index 92% rename from pkg/signalmeow/protobuf/Groups.pb.go rename to pkg/signalmeow/protobuf/signalpb/Groups.pb.go index 8d4e2e3..4b37c4a 100644 --- a/pkg/signalmeow/protobuf/Groups.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/Groups.pb.go @@ -6,7 +6,7 @@ // versions: // protoc-gen-go v1.36.11 // protoc v7.34.1 -// source: Groups.proto +// source: signalpb/Groups.proto package signalpb @@ -58,11 +58,11 @@ func (x Member_Role) String() string { } func (Member_Role) Descriptor() protoreflect.EnumDescriptor { - return file_Groups_proto_enumTypes[0].Descriptor() + return file_signalpb_Groups_proto_enumTypes[0].Descriptor() } func (Member_Role) Type() protoreflect.EnumType { - return &file_Groups_proto_enumTypes[0] + return &file_signalpb_Groups_proto_enumTypes[0] } func (x Member_Role) Number() protoreflect.EnumNumber { @@ -71,7 +71,7 @@ func (x Member_Role) Number() protoreflect.EnumNumber { // Deprecated: Use Member_Role.Descriptor instead. func (Member_Role) EnumDescriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{1, 0} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{1, 0} } type AccessControl_AccessRequired int32 @@ -113,11 +113,11 @@ func (x AccessControl_AccessRequired) String() string { } func (AccessControl_AccessRequired) Descriptor() protoreflect.EnumDescriptor { - return file_Groups_proto_enumTypes[1].Descriptor() + return file_signalpb_Groups_proto_enumTypes[1].Descriptor() } func (AccessControl_AccessRequired) Type() protoreflect.EnumType { - return &file_Groups_proto_enumTypes[1] + return &file_signalpb_Groups_proto_enumTypes[1] } func (x AccessControl_AccessRequired) Number() protoreflect.EnumNumber { @@ -126,7 +126,7 @@ func (x AccessControl_AccessRequired) Number() protoreflect.EnumNumber { // Deprecated: Use AccessControl_AccessRequired.Descriptor instead. func (AccessControl_AccessRequired) EnumDescriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{5, 0} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{5, 0} } type AvatarUploadAttributes struct { @@ -144,7 +144,7 @@ type AvatarUploadAttributes struct { func (x *AvatarUploadAttributes) Reset() { *x = AvatarUploadAttributes{} - mi := &file_Groups_proto_msgTypes[0] + mi := &file_signalpb_Groups_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -156,7 +156,7 @@ func (x *AvatarUploadAttributes) String() string { func (*AvatarUploadAttributes) ProtoMessage() {} func (x *AvatarUploadAttributes) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[0] + mi := &file_signalpb_Groups_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -169,7 +169,7 @@ func (x *AvatarUploadAttributes) ProtoReflect() protoreflect.Message { // Deprecated: Use AvatarUploadAttributes.ProtoReflect.Descriptor instead. func (*AvatarUploadAttributes) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{0} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{0} } func (x *AvatarUploadAttributes) GetKey() string { @@ -236,7 +236,7 @@ type Member struct { func (x *Member) Reset() { *x = Member{} - mi := &file_Groups_proto_msgTypes[1] + mi := &file_signalpb_Groups_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -248,7 +248,7 @@ func (x *Member) String() string { func (*Member) ProtoMessage() {} func (x *Member) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[1] + mi := &file_signalpb_Groups_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -261,7 +261,7 @@ func (x *Member) ProtoReflect() protoreflect.Message { // Deprecated: Use Member.ProtoReflect.Descriptor instead. func (*Member) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{1} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{1} } func (x *Member) GetUserId() []byte { @@ -324,7 +324,7 @@ type MemberPendingProfileKey struct { func (x *MemberPendingProfileKey) Reset() { *x = MemberPendingProfileKey{} - mi := &file_Groups_proto_msgTypes[2] + mi := &file_signalpb_Groups_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -336,7 +336,7 @@ func (x *MemberPendingProfileKey) String() string { func (*MemberPendingProfileKey) ProtoMessage() {} func (x *MemberPendingProfileKey) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[2] + mi := &file_signalpb_Groups_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -349,7 +349,7 @@ func (x *MemberPendingProfileKey) ProtoReflect() protoreflect.Message { // Deprecated: Use MemberPendingProfileKey.ProtoReflect.Descriptor instead. func (*MemberPendingProfileKey) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{2} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{2} } func (x *MemberPendingProfileKey) GetMember() *Member { @@ -385,7 +385,7 @@ type MemberPendingAdminApproval struct { func (x *MemberPendingAdminApproval) Reset() { *x = MemberPendingAdminApproval{} - mi := &file_Groups_proto_msgTypes[3] + mi := &file_signalpb_Groups_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -397,7 +397,7 @@ func (x *MemberPendingAdminApproval) String() string { func (*MemberPendingAdminApproval) ProtoMessage() {} func (x *MemberPendingAdminApproval) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[3] + mi := &file_signalpb_Groups_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -410,7 +410,7 @@ func (x *MemberPendingAdminApproval) ProtoReflect() protoreflect.Message { // Deprecated: Use MemberPendingAdminApproval.ProtoReflect.Descriptor instead. func (*MemberPendingAdminApproval) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{3} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{3} } func (x *MemberPendingAdminApproval) GetUserId() []byte { @@ -451,7 +451,7 @@ type MemberBanned struct { func (x *MemberBanned) Reset() { *x = MemberBanned{} - mi := &file_Groups_proto_msgTypes[4] + mi := &file_signalpb_Groups_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -463,7 +463,7 @@ func (x *MemberBanned) String() string { func (*MemberBanned) ProtoMessage() {} func (x *MemberBanned) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[4] + mi := &file_signalpb_Groups_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -476,7 +476,7 @@ func (x *MemberBanned) ProtoReflect() protoreflect.Message { // Deprecated: Use MemberBanned.ProtoReflect.Descriptor instead. func (*MemberBanned) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{4} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{4} } func (x *MemberBanned) GetUserId() []byte { @@ -505,7 +505,7 @@ type AccessControl struct { func (x *AccessControl) Reset() { *x = AccessControl{} - mi := &file_Groups_proto_msgTypes[5] + mi := &file_signalpb_Groups_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -517,7 +517,7 @@ func (x *AccessControl) String() string { func (*AccessControl) ProtoMessage() {} func (x *AccessControl) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[5] + mi := &file_signalpb_Groups_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -530,7 +530,7 @@ func (x *AccessControl) ProtoReflect() protoreflect.Message { // Deprecated: Use AccessControl.ProtoReflect.Descriptor instead. func (*AccessControl) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{5} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{5} } func (x *AccessControl) GetAttributes() AccessControl_AccessRequired { @@ -585,7 +585,7 @@ type Group struct { func (x *Group) Reset() { *x = Group{} - mi := &file_Groups_proto_msgTypes[6] + mi := &file_signalpb_Groups_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -597,7 +597,7 @@ func (x *Group) String() string { func (*Group) ProtoMessage() {} func (x *Group) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[6] + mi := &file_signalpb_Groups_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -610,7 +610,7 @@ func (x *Group) ProtoReflect() protoreflect.Message { // Deprecated: Use Group.ProtoReflect.Descriptor instead. func (*Group) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{6} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{6} } func (x *Group) GetPublicKey() []byte { @@ -726,7 +726,7 @@ type GroupAttributeBlob struct { func (x *GroupAttributeBlob) Reset() { *x = GroupAttributeBlob{} - mi := &file_Groups_proto_msgTypes[7] + mi := &file_signalpb_Groups_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -738,7 +738,7 @@ func (x *GroupAttributeBlob) String() string { func (*GroupAttributeBlob) ProtoMessage() {} func (x *GroupAttributeBlob) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[7] + mi := &file_signalpb_Groups_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -751,7 +751,7 @@ func (x *GroupAttributeBlob) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupAttributeBlob.ProtoReflect.Descriptor instead. func (*GroupAttributeBlob) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{7} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{7} } func (x *GroupAttributeBlob) GetContent() isGroupAttributeBlob_Content { @@ -837,7 +837,7 @@ type GroupInviteLink struct { func (x *GroupInviteLink) Reset() { *x = GroupInviteLink{} - mi := &file_Groups_proto_msgTypes[8] + mi := &file_signalpb_Groups_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -849,7 +849,7 @@ func (x *GroupInviteLink) String() string { func (*GroupInviteLink) ProtoMessage() {} func (x *GroupInviteLink) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[8] + mi := &file_signalpb_Groups_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -862,7 +862,7 @@ func (x *GroupInviteLink) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteLink.ProtoReflect.Descriptor instead. func (*GroupInviteLink) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{8} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{8} } func (x *GroupInviteLink) GetContents() isGroupInviteLink_Contents { @@ -907,7 +907,7 @@ type GroupJoinInfo struct { func (x *GroupJoinInfo) Reset() { *x = GroupJoinInfo{} - mi := &file_Groups_proto_msgTypes[9] + mi := &file_signalpb_Groups_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -919,7 +919,7 @@ func (x *GroupJoinInfo) String() string { func (*GroupJoinInfo) ProtoMessage() {} func (x *GroupJoinInfo) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[9] + mi := &file_signalpb_Groups_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -932,7 +932,7 @@ func (x *GroupJoinInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupJoinInfo.ProtoReflect.Descriptor instead. func (*GroupJoinInfo) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{9} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{9} } func (x *GroupJoinInfo) GetPublicKey() []byte { @@ -1002,7 +1002,7 @@ type GroupChange struct { func (x *GroupChange) Reset() { *x = GroupChange{} - mi := &file_Groups_proto_msgTypes[10] + mi := &file_signalpb_Groups_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1014,7 +1014,7 @@ func (x *GroupChange) String() string { func (*GroupChange) ProtoMessage() {} func (x *GroupChange) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[10] + mi := &file_signalpb_Groups_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1027,7 +1027,7 @@ func (x *GroupChange) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChange.ProtoReflect.Descriptor instead. func (*GroupChange) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10} } func (x *GroupChange) GetActions() []byte { @@ -1060,7 +1060,7 @@ type ExternalGroupCredential struct { func (x *ExternalGroupCredential) Reset() { *x = ExternalGroupCredential{} - mi := &file_Groups_proto_msgTypes[11] + mi := &file_signalpb_Groups_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1072,7 +1072,7 @@ func (x *ExternalGroupCredential) String() string { func (*ExternalGroupCredential) ProtoMessage() {} func (x *ExternalGroupCredential) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[11] + mi := &file_signalpb_Groups_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1085,7 +1085,7 @@ func (x *ExternalGroupCredential) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalGroupCredential.ProtoReflect.Descriptor instead. func (*ExternalGroupCredential) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{11} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{11} } func (x *ExternalGroupCredential) GetToken() string { @@ -1105,7 +1105,7 @@ type GroupResponse struct { func (x *GroupResponse) Reset() { *x = GroupResponse{} - mi := &file_Groups_proto_msgTypes[12] + mi := &file_signalpb_Groups_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1117,7 +1117,7 @@ func (x *GroupResponse) String() string { func (*GroupResponse) ProtoMessage() {} func (x *GroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[12] + mi := &file_signalpb_Groups_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1130,7 +1130,7 @@ func (x *GroupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupResponse.ProtoReflect.Descriptor instead. func (*GroupResponse) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{12} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{12} } func (x *GroupResponse) GetGroup() *Group { @@ -1157,7 +1157,7 @@ type GroupChanges struct { func (x *GroupChanges) Reset() { *x = GroupChanges{} - mi := &file_Groups_proto_msgTypes[13] + mi := &file_signalpb_Groups_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1169,7 +1169,7 @@ func (x *GroupChanges) String() string { func (*GroupChanges) ProtoMessage() {} func (x *GroupChanges) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[13] + mi := &file_signalpb_Groups_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1182,7 +1182,7 @@ func (x *GroupChanges) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChanges.ProtoReflect.Descriptor instead. func (*GroupChanges) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{13} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{13} } func (x *GroupChanges) GetGroupChanges() []*GroupChanges_GroupChangeState { @@ -1209,7 +1209,7 @@ type GroupChangeResponse struct { func (x *GroupChangeResponse) Reset() { *x = GroupChangeResponse{} - mi := &file_Groups_proto_msgTypes[14] + mi := &file_signalpb_Groups_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1221,7 +1221,7 @@ func (x *GroupChangeResponse) String() string { func (*GroupChangeResponse) ProtoMessage() {} func (x *GroupChangeResponse) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[14] + mi := &file_signalpb_Groups_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1234,7 +1234,7 @@ func (x *GroupChangeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChangeResponse.ProtoReflect.Descriptor instead. func (*GroupChangeResponse) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{14} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{14} } func (x *GroupChangeResponse) GetGroupChange() *GroupChange { @@ -1261,7 +1261,7 @@ type GroupInviteLink_GroupInviteLinkContentsV1 struct { func (x *GroupInviteLink_GroupInviteLinkContentsV1) Reset() { *x = GroupInviteLink_GroupInviteLinkContentsV1{} - mi := &file_Groups_proto_msgTypes[15] + mi := &file_signalpb_Groups_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1273,7 +1273,7 @@ func (x *GroupInviteLink_GroupInviteLinkContentsV1) String() string { func (*GroupInviteLink_GroupInviteLinkContentsV1) ProtoMessage() {} func (x *GroupInviteLink_GroupInviteLinkContentsV1) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[15] + mi := &file_signalpb_Groups_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1286,7 +1286,7 @@ func (x *GroupInviteLink_GroupInviteLinkContentsV1) ProtoReflect() protoreflect. // Deprecated: Use GroupInviteLink_GroupInviteLinkContentsV1.ProtoReflect.Descriptor instead. func (*GroupInviteLink_GroupInviteLinkContentsV1) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{8, 0} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{8, 0} } func (x *GroupInviteLink_GroupInviteLinkContentsV1) GetGroupMasterKey() []byte { @@ -1341,7 +1341,7 @@ type GroupChange_Actions struct { func (x *GroupChange_Actions) Reset() { *x = GroupChange_Actions{} - mi := &file_Groups_proto_msgTypes[16] + mi := &file_signalpb_Groups_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1353,7 +1353,7 @@ func (x *GroupChange_Actions) String() string { func (*GroupChange_Actions) ProtoMessage() {} func (x *GroupChange_Actions) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[16] + mi := &file_signalpb_Groups_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1366,7 +1366,7 @@ func (x *GroupChange_Actions) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChange_Actions.ProtoReflect.Descriptor instead. func (*GroupChange_Actions) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0} } func (x *GroupChange_Actions) GetSourceUserId() []byte { @@ -1575,7 +1575,7 @@ type GroupChange_Actions_AddMemberAction struct { func (x *GroupChange_Actions_AddMemberAction) Reset() { *x = GroupChange_Actions_AddMemberAction{} - mi := &file_Groups_proto_msgTypes[17] + mi := &file_signalpb_Groups_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1587,7 +1587,7 @@ func (x *GroupChange_Actions_AddMemberAction) String() string { func (*GroupChange_Actions_AddMemberAction) ProtoMessage() {} func (x *GroupChange_Actions_AddMemberAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[17] + mi := &file_signalpb_Groups_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1600,7 +1600,7 @@ func (x *GroupChange_Actions_AddMemberAction) ProtoReflect() protoreflect.Messag // Deprecated: Use GroupChange_Actions_AddMemberAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_AddMemberAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 0} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 0} } func (x *GroupChange_Actions_AddMemberAction) GetAdded() *Member { @@ -1626,7 +1626,7 @@ type GroupChange_Actions_DeleteMemberAction struct { func (x *GroupChange_Actions_DeleteMemberAction) Reset() { *x = GroupChange_Actions_DeleteMemberAction{} - mi := &file_Groups_proto_msgTypes[18] + mi := &file_signalpb_Groups_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1638,7 +1638,7 @@ func (x *GroupChange_Actions_DeleteMemberAction) String() string { func (*GroupChange_Actions_DeleteMemberAction) ProtoMessage() {} func (x *GroupChange_Actions_DeleteMemberAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[18] + mi := &file_signalpb_Groups_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1651,7 +1651,7 @@ func (x *GroupChange_Actions_DeleteMemberAction) ProtoReflect() protoreflect.Mes // Deprecated: Use GroupChange_Actions_DeleteMemberAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_DeleteMemberAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 1} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 1} } func (x *GroupChange_Actions_DeleteMemberAction) GetDeletedUserId() []byte { @@ -1671,7 +1671,7 @@ type GroupChange_Actions_ModifyMemberRoleAction struct { func (x *GroupChange_Actions_ModifyMemberRoleAction) Reset() { *x = GroupChange_Actions_ModifyMemberRoleAction{} - mi := &file_Groups_proto_msgTypes[19] + mi := &file_signalpb_Groups_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1683,7 +1683,7 @@ func (x *GroupChange_Actions_ModifyMemberRoleAction) String() string { func (*GroupChange_Actions_ModifyMemberRoleAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMemberRoleAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[19] + mi := &file_signalpb_Groups_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1696,7 +1696,7 @@ func (x *GroupChange_Actions_ModifyMemberRoleAction) ProtoReflect() protoreflect // Deprecated: Use GroupChange_Actions_ModifyMemberRoleAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMemberRoleAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 2} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 2} } func (x *GroupChange_Actions_ModifyMemberRoleAction) GetUserId() []byte { @@ -1724,7 +1724,7 @@ type GroupChange_Actions_ModifyMemberLabelAction struct { func (x *GroupChange_Actions_ModifyMemberLabelAction) Reset() { *x = GroupChange_Actions_ModifyMemberLabelAction{} - mi := &file_Groups_proto_msgTypes[20] + mi := &file_signalpb_Groups_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1736,7 +1736,7 @@ func (x *GroupChange_Actions_ModifyMemberLabelAction) String() string { func (*GroupChange_Actions_ModifyMemberLabelAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMemberLabelAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[20] + mi := &file_signalpb_Groups_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1749,7 +1749,7 @@ func (x *GroupChange_Actions_ModifyMemberLabelAction) ProtoReflect() protoreflec // Deprecated: Use GroupChange_Actions_ModifyMemberLabelAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMemberLabelAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 3} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 3} } func (x *GroupChange_Actions_ModifyMemberLabelAction) GetUserId() []byte { @@ -1784,7 +1784,7 @@ type GroupChange_Actions_ModifyMemberProfileKeyAction struct { func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) Reset() { *x = GroupChange_Actions_ModifyMemberProfileKeyAction{} - mi := &file_Groups_proto_msgTypes[21] + mi := &file_signalpb_Groups_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1796,7 +1796,7 @@ func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) String() string { func (*GroupChange_Actions_ModifyMemberProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[21] + mi := &file_signalpb_Groups_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1809,7 +1809,7 @@ func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) ProtoReflect() protor // Deprecated: Use GroupChange_Actions_ModifyMemberProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMemberProfileKeyAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 4} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 4} } func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) GetPresentation() []byte { @@ -1842,7 +1842,7 @@ type GroupChange_Actions_AddMemberPendingProfileKeyAction struct { func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) Reset() { *x = GroupChange_Actions_AddMemberPendingProfileKeyAction{} - mi := &file_Groups_proto_msgTypes[22] + mi := &file_signalpb_Groups_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1854,7 +1854,7 @@ func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) String() string { func (*GroupChange_Actions_AddMemberPendingProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[22] + mi := &file_signalpb_Groups_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1867,7 +1867,7 @@ func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) ProtoReflect() pr // Deprecated: Use GroupChange_Actions_AddMemberPendingProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_AddMemberPendingProfileKeyAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 5} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 5} } func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) GetAdded() *MemberPendingProfileKey { @@ -1886,7 +1886,7 @@ type GroupChange_Actions_DeleteMemberPendingProfileKeyAction struct { func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) Reset() { *x = GroupChange_Actions_DeleteMemberPendingProfileKeyAction{} - mi := &file_Groups_proto_msgTypes[23] + mi := &file_signalpb_Groups_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1898,7 +1898,7 @@ func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) String() strin func (*GroupChange_Actions_DeleteMemberPendingProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[23] + mi := &file_signalpb_Groups_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1911,7 +1911,7 @@ func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) ProtoReflect() // Deprecated: Use GroupChange_Actions_DeleteMemberPendingProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_DeleteMemberPendingProfileKeyAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 6} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 6} } func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) GetDeletedUserId() []byte { @@ -1932,7 +1932,7 @@ type GroupChange_Actions_PromoteMemberPendingProfileKeyAction struct { func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) Reset() { *x = GroupChange_Actions_PromoteMemberPendingProfileKeyAction{} - mi := &file_Groups_proto_msgTypes[24] + mi := &file_signalpb_Groups_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1944,7 +1944,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) String() stri func (*GroupChange_Actions_PromoteMemberPendingProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[24] + mi := &file_signalpb_Groups_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1957,7 +1957,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) ProtoReflect( // Deprecated: Use GroupChange_Actions_PromoteMemberPendingProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_PromoteMemberPendingProfileKeyAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 7} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 7} } func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) GetPresentation() []byte { @@ -1993,7 +1993,7 @@ type GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction struct { func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) Reset() { *x = GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction{} - mi := &file_Groups_proto_msgTypes[25] + mi := &file_signalpb_Groups_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2005,7 +2005,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) String( func (*GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[25] + mi := &file_signalpb_Groups_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2018,7 +2018,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) ProtoRe // Deprecated: Use GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 8} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 8} } func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) GetPresentation() []byte { @@ -2058,7 +2058,7 @@ type GroupChange_Actions_AddMemberPendingAdminApprovalAction struct { func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) Reset() { *x = GroupChange_Actions_AddMemberPendingAdminApprovalAction{} - mi := &file_Groups_proto_msgTypes[26] + mi := &file_signalpb_Groups_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2070,7 +2070,7 @@ func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) String() strin func (*GroupChange_Actions_AddMemberPendingAdminApprovalAction) ProtoMessage() {} func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[26] + mi := &file_signalpb_Groups_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2083,7 +2083,7 @@ func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) ProtoReflect() // Deprecated: Use GroupChange_Actions_AddMemberPendingAdminApprovalAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_AddMemberPendingAdminApprovalAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 9} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 9} } func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) GetAdded() *MemberPendingAdminApproval { @@ -2102,7 +2102,7 @@ type GroupChange_Actions_DeleteMemberPendingAdminApprovalAction struct { func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) Reset() { *x = GroupChange_Actions_DeleteMemberPendingAdminApprovalAction{} - mi := &file_Groups_proto_msgTypes[27] + mi := &file_signalpb_Groups_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2114,7 +2114,7 @@ func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) String() st func (*GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) ProtoMessage() {} func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[27] + mi := &file_signalpb_Groups_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2127,7 +2127,7 @@ func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) ProtoReflec // Deprecated: Use GroupChange_Actions_DeleteMemberPendingAdminApprovalAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 10} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 10} } func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) GetDeletedUserId() []byte { @@ -2147,7 +2147,7 @@ type GroupChange_Actions_PromoteMemberPendingAdminApprovalAction struct { func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) Reset() { *x = GroupChange_Actions_PromoteMemberPendingAdminApprovalAction{} - mi := &file_Groups_proto_msgTypes[28] + mi := &file_signalpb_Groups_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2159,7 +2159,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) String() s func (*GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) ProtoMessage() {} func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[28] + mi := &file_signalpb_Groups_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2172,7 +2172,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) ProtoRefle // Deprecated: Use GroupChange_Actions_PromoteMemberPendingAdminApprovalAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 11} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 11} } func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) GetUserId() []byte { @@ -2198,7 +2198,7 @@ type GroupChange_Actions_AddMemberBannedAction struct { func (x *GroupChange_Actions_AddMemberBannedAction) Reset() { *x = GroupChange_Actions_AddMemberBannedAction{} - mi := &file_Groups_proto_msgTypes[29] + mi := &file_signalpb_Groups_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2210,7 +2210,7 @@ func (x *GroupChange_Actions_AddMemberBannedAction) String() string { func (*GroupChange_Actions_AddMemberBannedAction) ProtoMessage() {} func (x *GroupChange_Actions_AddMemberBannedAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[29] + mi := &file_signalpb_Groups_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2223,7 +2223,7 @@ func (x *GroupChange_Actions_AddMemberBannedAction) ProtoReflect() protoreflect. // Deprecated: Use GroupChange_Actions_AddMemberBannedAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_AddMemberBannedAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 12} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 12} } func (x *GroupChange_Actions_AddMemberBannedAction) GetAdded() *MemberBanned { @@ -2242,7 +2242,7 @@ type GroupChange_Actions_DeleteMemberBannedAction struct { func (x *GroupChange_Actions_DeleteMemberBannedAction) Reset() { *x = GroupChange_Actions_DeleteMemberBannedAction{} - mi := &file_Groups_proto_msgTypes[30] + mi := &file_signalpb_Groups_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2254,7 +2254,7 @@ func (x *GroupChange_Actions_DeleteMemberBannedAction) String() string { func (*GroupChange_Actions_DeleteMemberBannedAction) ProtoMessage() {} func (x *GroupChange_Actions_DeleteMemberBannedAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[30] + mi := &file_signalpb_Groups_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2267,7 +2267,7 @@ func (x *GroupChange_Actions_DeleteMemberBannedAction) ProtoReflect() protorefle // Deprecated: Use GroupChange_Actions_DeleteMemberBannedAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_DeleteMemberBannedAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 13} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 13} } func (x *GroupChange_Actions_DeleteMemberBannedAction) GetDeletedUserId() []byte { @@ -2286,7 +2286,7 @@ type GroupChange_Actions_ModifyTitleAction struct { func (x *GroupChange_Actions_ModifyTitleAction) Reset() { *x = GroupChange_Actions_ModifyTitleAction{} - mi := &file_Groups_proto_msgTypes[31] + mi := &file_signalpb_Groups_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2298,7 +2298,7 @@ func (x *GroupChange_Actions_ModifyTitleAction) String() string { func (*GroupChange_Actions_ModifyTitleAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyTitleAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[31] + mi := &file_signalpb_Groups_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2311,7 +2311,7 @@ func (x *GroupChange_Actions_ModifyTitleAction) ProtoReflect() protoreflect.Mess // Deprecated: Use GroupChange_Actions_ModifyTitleAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyTitleAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 14} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 14} } func (x *GroupChange_Actions_ModifyTitleAction) GetTitle() []byte { @@ -2330,7 +2330,7 @@ type GroupChange_Actions_ModifyDescriptionAction struct { func (x *GroupChange_Actions_ModifyDescriptionAction) Reset() { *x = GroupChange_Actions_ModifyDescriptionAction{} - mi := &file_Groups_proto_msgTypes[32] + mi := &file_signalpb_Groups_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2342,7 +2342,7 @@ func (x *GroupChange_Actions_ModifyDescriptionAction) String() string { func (*GroupChange_Actions_ModifyDescriptionAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyDescriptionAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[32] + mi := &file_signalpb_Groups_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2355,7 +2355,7 @@ func (x *GroupChange_Actions_ModifyDescriptionAction) ProtoReflect() protoreflec // Deprecated: Use GroupChange_Actions_ModifyDescriptionAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyDescriptionAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 15} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 15} } func (x *GroupChange_Actions_ModifyDescriptionAction) GetDescription() []byte { @@ -2374,7 +2374,7 @@ type GroupChange_Actions_ModifyAvatarAction struct { func (x *GroupChange_Actions_ModifyAvatarAction) Reset() { *x = GroupChange_Actions_ModifyAvatarAction{} - mi := &file_Groups_proto_msgTypes[33] + mi := &file_signalpb_Groups_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2386,7 +2386,7 @@ func (x *GroupChange_Actions_ModifyAvatarAction) String() string { func (*GroupChange_Actions_ModifyAvatarAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyAvatarAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[33] + mi := &file_signalpb_Groups_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2399,7 +2399,7 @@ func (x *GroupChange_Actions_ModifyAvatarAction) ProtoReflect() protoreflect.Mes // Deprecated: Use GroupChange_Actions_ModifyAvatarAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyAvatarAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 16} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 16} } func (x *GroupChange_Actions_ModifyAvatarAction) GetAvatar() string { @@ -2418,7 +2418,7 @@ type GroupChange_Actions_ModifyDisappearingMessageTimerAction struct { func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) Reset() { *x = GroupChange_Actions_ModifyDisappearingMessageTimerAction{} - mi := &file_Groups_proto_msgTypes[34] + mi := &file_signalpb_Groups_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2430,7 +2430,7 @@ func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) String() stri func (*GroupChange_Actions_ModifyDisappearingMessageTimerAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[34] + mi := &file_signalpb_Groups_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2443,7 +2443,7 @@ func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) ProtoReflect( // Deprecated: Use GroupChange_Actions_ModifyDisappearingMessageTimerAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyDisappearingMessageTimerAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 17} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 17} } func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) GetTimer() []byte { @@ -2462,7 +2462,7 @@ type GroupChange_Actions_ModifyAttributesAccessControlAction struct { func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) Reset() { *x = GroupChange_Actions_ModifyAttributesAccessControlAction{} - mi := &file_Groups_proto_msgTypes[35] + mi := &file_signalpb_Groups_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2474,7 +2474,7 @@ func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) String() strin func (*GroupChange_Actions_ModifyAttributesAccessControlAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[35] + mi := &file_signalpb_Groups_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2487,7 +2487,7 @@ func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) ProtoReflect() // Deprecated: Use GroupChange_Actions_ModifyAttributesAccessControlAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyAttributesAccessControlAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 18} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 18} } func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) GetAttributesAccess() AccessControl_AccessRequired { @@ -2506,7 +2506,7 @@ type GroupChange_Actions_ModifyMembersAccessControlAction struct { func (x *GroupChange_Actions_ModifyMembersAccessControlAction) Reset() { *x = GroupChange_Actions_ModifyMembersAccessControlAction{} - mi := &file_Groups_proto_msgTypes[36] + mi := &file_signalpb_Groups_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2518,7 +2518,7 @@ func (x *GroupChange_Actions_ModifyMembersAccessControlAction) String() string { func (*GroupChange_Actions_ModifyMembersAccessControlAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMembersAccessControlAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[36] + mi := &file_signalpb_Groups_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2531,7 +2531,7 @@ func (x *GroupChange_Actions_ModifyMembersAccessControlAction) ProtoReflect() pr // Deprecated: Use GroupChange_Actions_ModifyMembersAccessControlAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMembersAccessControlAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 19} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 19} } func (x *GroupChange_Actions_ModifyMembersAccessControlAction) GetMembersAccess() AccessControl_AccessRequired { @@ -2550,7 +2550,7 @@ type GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction struct { func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) Reset() { *x = GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction{} - mi := &file_Groups_proto_msgTypes[37] + mi := &file_signalpb_Groups_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2562,7 +2562,7 @@ func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) String( func (*GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[37] + mi := &file_signalpb_Groups_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2575,7 +2575,7 @@ func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) ProtoRe // Deprecated: Use GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 20} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 20} } func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) GetAddFromInviteLinkAccess() AccessControl_AccessRequired { @@ -2594,7 +2594,7 @@ type GroupChange_Actions_ModifyMemberLabelAccessControlAction struct { func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) Reset() { *x = GroupChange_Actions_ModifyMemberLabelAccessControlAction{} - mi := &file_Groups_proto_msgTypes[38] + mi := &file_signalpb_Groups_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2606,7 +2606,7 @@ func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) String() stri func (*GroupChange_Actions_ModifyMemberLabelAccessControlAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[38] + mi := &file_signalpb_Groups_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2619,7 +2619,7 @@ func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) ProtoReflect( // Deprecated: Use GroupChange_Actions_ModifyMemberLabelAccessControlAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMemberLabelAccessControlAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 21} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 21} } func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) GetMemberLabelAccess() AccessControl_AccessRequired { @@ -2638,7 +2638,7 @@ type GroupChange_Actions_ModifyInviteLinkPasswordAction struct { func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) Reset() { *x = GroupChange_Actions_ModifyInviteLinkPasswordAction{} - mi := &file_Groups_proto_msgTypes[39] + mi := &file_signalpb_Groups_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2650,7 +2650,7 @@ func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) String() string { func (*GroupChange_Actions_ModifyInviteLinkPasswordAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[39] + mi := &file_signalpb_Groups_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2663,7 +2663,7 @@ func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) ProtoReflect() prot // Deprecated: Use GroupChange_Actions_ModifyInviteLinkPasswordAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyInviteLinkPasswordAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 22} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 22} } func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) GetInviteLinkPassword() []byte { @@ -2682,7 +2682,7 @@ type GroupChange_Actions_ModifyAnnouncementsOnlyAction struct { func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) Reset() { *x = GroupChange_Actions_ModifyAnnouncementsOnlyAction{} - mi := &file_Groups_proto_msgTypes[40] + mi := &file_signalpb_Groups_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2694,7 +2694,7 @@ func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) String() string { func (*GroupChange_Actions_ModifyAnnouncementsOnlyAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[40] + mi := &file_signalpb_Groups_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2707,7 +2707,7 @@ func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) ProtoReflect() proto // Deprecated: Use GroupChange_Actions_ModifyAnnouncementsOnlyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyAnnouncementsOnlyAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 23} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 23} } func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) GetAnnouncementsOnly() bool { @@ -2725,7 +2725,7 @@ type GroupChange_Actions_TerminateGroupAction struct { func (x *GroupChange_Actions_TerminateGroupAction) Reset() { *x = GroupChange_Actions_TerminateGroupAction{} - mi := &file_Groups_proto_msgTypes[41] + mi := &file_signalpb_Groups_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2737,7 +2737,7 @@ func (x *GroupChange_Actions_TerminateGroupAction) String() string { func (*GroupChange_Actions_TerminateGroupAction) ProtoMessage() {} func (x *GroupChange_Actions_TerminateGroupAction) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[41] + mi := &file_signalpb_Groups_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2750,7 +2750,7 @@ func (x *GroupChange_Actions_TerminateGroupAction) ProtoReflect() protoreflect.M // Deprecated: Use GroupChange_Actions_TerminateGroupAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_TerminateGroupAction) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{10, 0, 24} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 24} } type GroupChanges_GroupChangeState struct { @@ -2763,7 +2763,7 @@ type GroupChanges_GroupChangeState struct { func (x *GroupChanges_GroupChangeState) Reset() { *x = GroupChanges_GroupChangeState{} - mi := &file_Groups_proto_msgTypes[42] + mi := &file_signalpb_Groups_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2775,7 +2775,7 @@ func (x *GroupChanges_GroupChangeState) String() string { func (*GroupChanges_GroupChangeState) ProtoMessage() {} func (x *GroupChanges_GroupChangeState) ProtoReflect() protoreflect.Message { - mi := &file_Groups_proto_msgTypes[42] + mi := &file_signalpb_Groups_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2788,7 +2788,7 @@ func (x *GroupChanges_GroupChangeState) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChanges_GroupChangeState.ProtoReflect.Descriptor instead. func (*GroupChanges_GroupChangeState) Descriptor() ([]byte, []int) { - return file_Groups_proto_rawDescGZIP(), []int{13, 0} + return file_signalpb_Groups_proto_rawDescGZIP(), []int{13, 0} } func (x *GroupChanges_GroupChangeState) GetGroupChange() *GroupChange { @@ -2805,11 +2805,11 @@ func (x *GroupChanges_GroupChangeState) GetGroupState() *Group { return nil } -var File_Groups_proto protoreflect.FileDescriptor +var File_signalpb_Groups_proto protoreflect.FileDescriptor -const file_Groups_proto_rawDesc = "" + +const file_signalpb_Groups_proto_rawDesc = "" + "\n" + - "\fGroups.proto\x12\x06signal\"\xc4\x01\n" + + "\x15signalpb/Groups.proto\x12\x06signal\"\xc4\x01\n" + "\x16AvatarUploadAttributes\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x1e\n" + "\n" + @@ -3027,20 +3027,20 @@ const file_Groups_proto_rawDesc = "" + "/org.signal.storageservice.storage.protos.groupsB\vGroupProtosP\x01b\x06proto3" var ( - file_Groups_proto_rawDescOnce sync.Once - file_Groups_proto_rawDescData []byte + file_signalpb_Groups_proto_rawDescOnce sync.Once + file_signalpb_Groups_proto_rawDescData []byte ) -func file_Groups_proto_rawDescGZIP() []byte { - file_Groups_proto_rawDescOnce.Do(func() { - file_Groups_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Groups_proto_rawDesc), len(file_Groups_proto_rawDesc))) +func file_signalpb_Groups_proto_rawDescGZIP() []byte { + file_signalpb_Groups_proto_rawDescOnce.Do(func() { + file_signalpb_Groups_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_Groups_proto_rawDesc), len(file_signalpb_Groups_proto_rawDesc))) }) - return file_Groups_proto_rawDescData + return file_signalpb_Groups_proto_rawDescData } -var file_Groups_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_Groups_proto_msgTypes = make([]protoimpl.MessageInfo, 43) -var file_Groups_proto_goTypes = []any{ +var file_signalpb_Groups_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_signalpb_Groups_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_signalpb_Groups_proto_goTypes = []any{ (Member_Role)(0), // 0: signal.Member.Role (AccessControl_AccessRequired)(0), // 1: signal.AccessControl.AccessRequired (*AvatarUploadAttributes)(nil), // 2: signal.AvatarUploadAttributes @@ -3087,7 +3087,7 @@ var file_Groups_proto_goTypes = []any{ (*GroupChange_Actions_TerminateGroupAction)(nil), // 43: signal.GroupChange.Actions.TerminateGroupAction (*GroupChanges_GroupChangeState)(nil), // 44: signal.GroupChanges.GroupChangeState } -var file_Groups_proto_depIdxs = []int32{ +var file_signalpb_Groups_proto_depIdxs = []int32{ 0, // 0: signal.Member.role:type_name -> signal.Member.Role 3, // 1: signal.MemberPendingProfileKey.member:type_name -> signal.Member 1, // 2: signal.AccessControl.attributes:type_name -> signal.AccessControl.AccessRequired @@ -3148,36 +3148,36 @@ var file_Groups_proto_depIdxs = []int32{ 0, // [0:53] is the sub-list for field type_name } -func init() { file_Groups_proto_init() } -func file_Groups_proto_init() { - if File_Groups_proto != nil { +func init() { file_signalpb_Groups_proto_init() } +func file_signalpb_Groups_proto_init() { + if File_signalpb_Groups_proto != nil { return } - file_Groups_proto_msgTypes[7].OneofWrappers = []any{ + file_signalpb_Groups_proto_msgTypes[7].OneofWrappers = []any{ (*GroupAttributeBlob_Title)(nil), (*GroupAttributeBlob_Avatar)(nil), (*GroupAttributeBlob_DisappearingMessagesDuration)(nil), (*GroupAttributeBlob_DescriptionText)(nil), } - file_Groups_proto_msgTypes[8].OneofWrappers = []any{ + file_signalpb_Groups_proto_msgTypes[8].OneofWrappers = []any{ (*GroupInviteLink_ContentsV1)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_Groups_proto_rawDesc), len(file_Groups_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_Groups_proto_rawDesc), len(file_signalpb_Groups_proto_rawDesc)), NumEnums: 2, NumMessages: 43, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_Groups_proto_goTypes, - DependencyIndexes: file_Groups_proto_depIdxs, - EnumInfos: file_Groups_proto_enumTypes, - MessageInfos: file_Groups_proto_msgTypes, + GoTypes: file_signalpb_Groups_proto_goTypes, + DependencyIndexes: file_signalpb_Groups_proto_depIdxs, + EnumInfos: file_signalpb_Groups_proto_enumTypes, + MessageInfos: file_signalpb_Groups_proto_msgTypes, }.Build() - File_Groups_proto = out.File - file_Groups_proto_goTypes = nil - file_Groups_proto_depIdxs = nil + File_signalpb_Groups_proto = out.File + file_signalpb_Groups_proto_goTypes = nil + file_signalpb_Groups_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/Groups.proto b/pkg/signalmeow/protobuf/signalpb/Groups.proto similarity index 100% rename from pkg/signalmeow/protobuf/Groups.proto rename to pkg/signalmeow/protobuf/signalpb/Groups.proto diff --git a/pkg/signalmeow/protobuf/Provisioning.pb.go b/pkg/signalmeow/protobuf/signalpb/Provisioning.pb.go similarity index 81% rename from pkg/signalmeow/protobuf/Provisioning.pb.go rename to pkg/signalmeow/protobuf/signalpb/Provisioning.pb.go index 88ebe90..2d8ee38 100644 --- a/pkg/signalmeow/protobuf/Provisioning.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/Provisioning.pb.go @@ -6,7 +6,7 @@ // versions: // protoc-gen-go v1.36.11 // protoc v7.34.1 -// source: Provisioning.proto +// source: signalpb/Provisioning.proto package signalpb @@ -58,11 +58,11 @@ func (x ProvisioningVersion) String() string { } func (ProvisioningVersion) Descriptor() protoreflect.EnumDescriptor { - return file_Provisioning_proto_enumTypes[0].Descriptor() + return file_signalpb_Provisioning_proto_enumTypes[0].Descriptor() } func (ProvisioningVersion) Type() protoreflect.EnumType { - return &file_Provisioning_proto_enumTypes[0] + return &file_signalpb_Provisioning_proto_enumTypes[0] } func (x ProvisioningVersion) Number() protoreflect.EnumNumber { @@ -81,7 +81,7 @@ func (x *ProvisioningVersion) UnmarshalJSON(b []byte) error { // Deprecated: Use ProvisioningVersion.Descriptor instead. func (ProvisioningVersion) EnumDescriptor() ([]byte, []int) { - return file_Provisioning_proto_rawDescGZIP(), []int{0} + return file_signalpb_Provisioning_proto_rawDescGZIP(), []int{0} } // An opaque address sent by the server when clients first open a provisioning @@ -98,7 +98,7 @@ type ProvisioningAddress struct { func (x *ProvisioningAddress) Reset() { *x = ProvisioningAddress{} - mi := &file_Provisioning_proto_msgTypes[0] + mi := &file_signalpb_Provisioning_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -110,7 +110,7 @@ func (x *ProvisioningAddress) String() string { func (*ProvisioningAddress) ProtoMessage() {} func (x *ProvisioningAddress) ProtoReflect() protoreflect.Message { - mi := &file_Provisioning_proto_msgTypes[0] + mi := &file_signalpb_Provisioning_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -123,7 +123,7 @@ func (x *ProvisioningAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use ProvisioningAddress.ProtoReflect.Descriptor instead. func (*ProvisioningAddress) Descriptor() ([]byte, []int) { - return file_Provisioning_proto_rawDescGZIP(), []int{0} + return file_signalpb_Provisioning_proto_rawDescGZIP(), []int{0} } func (x *ProvisioningAddress) GetAddress() string { @@ -143,7 +143,7 @@ type ProvisionEnvelope struct { func (x *ProvisionEnvelope) Reset() { *x = ProvisionEnvelope{} - mi := &file_Provisioning_proto_msgTypes[1] + mi := &file_signalpb_Provisioning_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -155,7 +155,7 @@ func (x *ProvisionEnvelope) String() string { func (*ProvisionEnvelope) ProtoMessage() {} func (x *ProvisionEnvelope) ProtoReflect() protoreflect.Message { - mi := &file_Provisioning_proto_msgTypes[1] + mi := &file_signalpb_Provisioning_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -168,7 +168,7 @@ func (x *ProvisionEnvelope) ProtoReflect() protoreflect.Message { // Deprecated: Use ProvisionEnvelope.ProtoReflect.Descriptor instead. func (*ProvisionEnvelope) Descriptor() ([]byte, []int) { - return file_Provisioning_proto_rawDescGZIP(), []int{1} + return file_signalpb_Provisioning_proto_rawDescGZIP(), []int{1} } func (x *ProvisionEnvelope) GetPublicKey() []byte { @@ -204,13 +204,14 @@ type ProvisionMessage struct { MediaRootBackupKey []byte `protobuf:"bytes,16,opt,name=mediaRootBackupKey" json:"mediaRootBackupKey,omitempty"` // 32-bytes AciBinary []byte `protobuf:"bytes,17,opt,name=aciBinary" json:"aciBinary,omitempty"` // 16-byte UUID PniBinary []byte `protobuf:"bytes,18,opt,name=pniBinary" json:"pniBinary,omitempty"` // 16-byte UUID + AuthCredentialSalt []byte `protobuf:"bytes,19,opt,name=authCredentialSalt" json:"authCredentialSalt,omitempty"` // 16-bytes unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ProvisionMessage) Reset() { *x = ProvisionMessage{} - mi := &file_Provisioning_proto_msgTypes[2] + mi := &file_signalpb_Provisioning_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -222,7 +223,7 @@ func (x *ProvisionMessage) String() string { func (*ProvisionMessage) ProtoMessage() {} func (x *ProvisionMessage) ProtoReflect() protoreflect.Message { - mi := &file_Provisioning_proto_msgTypes[2] + mi := &file_signalpb_Provisioning_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -235,7 +236,7 @@ func (x *ProvisionMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProvisionMessage.ProtoReflect.Descriptor instead. func (*ProvisionMessage) Descriptor() ([]byte, []int) { - return file_Provisioning_proto_rawDescGZIP(), []int{2} + return file_signalpb_Provisioning_proto_rawDescGZIP(), []int{2} } func (x *ProvisionMessage) GetAciIdentityKeyPublic() []byte { @@ -357,16 +358,23 @@ func (x *ProvisionMessage) GetPniBinary() []byte { return nil } -var File_Provisioning_proto protoreflect.FileDescriptor +func (x *ProvisionMessage) GetAuthCredentialSalt() []byte { + if x != nil { + return x.AuthCredentialSalt + } + return nil +} -const file_Provisioning_proto_rawDesc = "" + +var File_signalpb_Provisioning_proto protoreflect.FileDescriptor + +const file_signalpb_Provisioning_proto_rawDesc = "" + "\n" + - "\x12Provisioning.proto\x12\rsignalservice\"/\n" + + "\x1bsignalpb/Provisioning.proto\x12\rsignalservice\"/\n" + "\x13ProvisioningAddress\x12\x18\n" + "\aaddress\x18\x01 \x01(\tR\aaddress\"E\n" + "\x11ProvisionEnvelope\x12\x1c\n" + "\tpublicKey\x18\x01 \x01(\fR\tpublicKey\x12\x12\n" + - "\x04body\x18\x02 \x01(\fR\x04body\"\xb4\x05\n" + + "\x04body\x18\x02 \x01(\fR\x04body\"\xe4\x05\n" + "\x10ProvisionMessage\x122\n" + "\x14aciIdentityKeyPublic\x18\x01 \x01(\fR\x14aciIdentityKeyPublic\x124\n" + "\x15aciIdentityKeyPrivate\x18\x02 \x01(\fR\x15aciIdentityKeyPrivate\x122\n" + @@ -387,7 +395,8 @@ const file_Provisioning_proto_rawDesc = "" + "\x12accountEntropyPool\x18\x0f \x01(\tR\x12accountEntropyPool\x12.\n" + "\x12mediaRootBackupKey\x18\x10 \x01(\fR\x12mediaRootBackupKey\x12\x1c\n" + "\taciBinary\x18\x11 \x01(\fR\taciBinary\x12\x1c\n" + - "\tpniBinary\x18\x12 \x01(\fR\tpniBinaryJ\x04\b\r\x10\x0e*G\n" + + "\tpniBinary\x18\x12 \x01(\fR\tpniBinary\x12.\n" + + "\x12authCredentialSalt\x18\x13 \x01(\fR\x12authCredentialSaltJ\x04\b\r\x10\x0e*G\n" + "\x13ProvisioningVersion\x12\v\n" + "\aINITIAL\x10\x00\x12\x12\n" + "\x0eTABLET_SUPPORT\x10\x01\x12\v\n" + @@ -395,26 +404,26 @@ const file_Provisioning_proto_rawDesc = "" + ".org.whispersystems.signalservice.internal.pushB\x12ProvisioningProtos" var ( - file_Provisioning_proto_rawDescOnce sync.Once - file_Provisioning_proto_rawDescData []byte + file_signalpb_Provisioning_proto_rawDescOnce sync.Once + file_signalpb_Provisioning_proto_rawDescData []byte ) -func file_Provisioning_proto_rawDescGZIP() []byte { - file_Provisioning_proto_rawDescOnce.Do(func() { - file_Provisioning_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Provisioning_proto_rawDesc), len(file_Provisioning_proto_rawDesc))) +func file_signalpb_Provisioning_proto_rawDescGZIP() []byte { + file_signalpb_Provisioning_proto_rawDescOnce.Do(func() { + file_signalpb_Provisioning_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_Provisioning_proto_rawDesc), len(file_signalpb_Provisioning_proto_rawDesc))) }) - return file_Provisioning_proto_rawDescData + return file_signalpb_Provisioning_proto_rawDescData } -var file_Provisioning_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_Provisioning_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_Provisioning_proto_goTypes = []any{ +var file_signalpb_Provisioning_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_signalpb_Provisioning_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_signalpb_Provisioning_proto_goTypes = []any{ (ProvisioningVersion)(0), // 0: signalservice.ProvisioningVersion (*ProvisioningAddress)(nil), // 1: signalservice.ProvisioningAddress (*ProvisionEnvelope)(nil), // 2: signalservice.ProvisionEnvelope (*ProvisionMessage)(nil), // 3: signalservice.ProvisionMessage } -var file_Provisioning_proto_depIdxs = []int32{ +var file_signalpb_Provisioning_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -422,27 +431,27 @@ var file_Provisioning_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_Provisioning_proto_init() } -func file_Provisioning_proto_init() { - if File_Provisioning_proto != nil { +func init() { file_signalpb_Provisioning_proto_init() } +func file_signalpb_Provisioning_proto_init() { + if File_signalpb_Provisioning_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_Provisioning_proto_rawDesc), len(file_Provisioning_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_Provisioning_proto_rawDesc), len(file_signalpb_Provisioning_proto_rawDesc)), NumEnums: 1, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_Provisioning_proto_goTypes, - DependencyIndexes: file_Provisioning_proto_depIdxs, - EnumInfos: file_Provisioning_proto_enumTypes, - MessageInfos: file_Provisioning_proto_msgTypes, + GoTypes: file_signalpb_Provisioning_proto_goTypes, + DependencyIndexes: file_signalpb_Provisioning_proto_depIdxs, + EnumInfos: file_signalpb_Provisioning_proto_enumTypes, + MessageInfos: file_signalpb_Provisioning_proto_msgTypes, }.Build() - File_Provisioning_proto = out.File - file_Provisioning_proto_goTypes = nil - file_Provisioning_proto_depIdxs = nil + File_signalpb_Provisioning_proto = out.File + file_signalpb_Provisioning_proto_goTypes = nil + file_signalpb_Provisioning_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/Provisioning.proto b/pkg/signalmeow/protobuf/signalpb/Provisioning.proto similarity index 95% rename from pkg/signalmeow/protobuf/Provisioning.proto rename to pkg/signalmeow/protobuf/signalpb/Provisioning.proto index b5eeaf6..cd8daa0 100644 --- a/pkg/signalmeow/protobuf/Provisioning.proto +++ b/pkg/signalmeow/protobuf/signalpb/Provisioning.proto @@ -44,7 +44,8 @@ message ProvisionMessage { optional bytes mediaRootBackupKey = 16; // 32-bytes optional bytes aciBinary = 17; // 16-byte UUID optional bytes pniBinary = 18; // 16-byte UUID - // NEXT ID: 19 + optional bytes authCredentialSalt = 19; // 16-bytes + // NEXT ID: 20 } enum ProvisioningVersion { diff --git a/pkg/signalmeow/protobuf/SignalService.pb.go b/pkg/signalmeow/protobuf/signalpb/SignalService.pb.go similarity index 89% rename from pkg/signalmeow/protobuf/SignalService.pb.go rename to pkg/signalmeow/protobuf/signalpb/SignalService.pb.go index 1544d05..b8ee02f 100644 --- a/pkg/signalmeow/protobuf/SignalService.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/SignalService.pb.go @@ -6,7 +6,7 @@ // versions: // protoc-gen-go v1.36.11 // protoc v7.34.1 -// source: SignalService.proto +// source: signalpb/SignalService.proto package signalpb @@ -108,11 +108,11 @@ func (x Envelope_Type) String() string { } func (Envelope_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[0].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[0].Descriptor() } func (Envelope_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[0] + return &file_signalpb_SignalService_proto_enumTypes[0] } func (x Envelope_Type) Number() protoreflect.EnumNumber { @@ -131,7 +131,7 @@ func (x *Envelope_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use Envelope_Type.Descriptor instead. func (Envelope_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{0, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{0, 0} } type CallMessage_Offer_Type int32 @@ -164,11 +164,11 @@ func (x CallMessage_Offer_Type) String() string { } func (CallMessage_Offer_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[1].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[1].Descriptor() } func (CallMessage_Offer_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[1] + return &file_signalpb_SignalService_proto_enumTypes[1] } func (x CallMessage_Offer_Type) Number() protoreflect.EnumNumber { @@ -187,7 +187,7 @@ func (x *CallMessage_Offer_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use CallMessage_Offer_Type.Descriptor instead. func (CallMessage_Offer_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 0, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 0, 0} } type CallMessage_Hangup_Type int32 @@ -229,11 +229,11 @@ func (x CallMessage_Hangup_Type) String() string { } func (CallMessage_Hangup_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[2].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[2].Descriptor() } func (CallMessage_Hangup_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[2] + return &file_signalpb_SignalService_proto_enumTypes[2] } func (x CallMessage_Hangup_Type) Number() protoreflect.EnumNumber { @@ -252,7 +252,7 @@ func (x *CallMessage_Hangup_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use CallMessage_Hangup_Type.Descriptor instead. func (CallMessage_Hangup_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 4, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 4, 0} } type CallMessage_Opaque_Urgency int32 @@ -285,11 +285,11 @@ func (x CallMessage_Opaque_Urgency) String() string { } func (CallMessage_Opaque_Urgency) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[3].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[3].Descriptor() } func (CallMessage_Opaque_Urgency) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[3] + return &file_signalpb_SignalService_proto_enumTypes[3] } func (x CallMessage_Opaque_Urgency) Number() protoreflect.EnumNumber { @@ -308,7 +308,7 @@ func (x *CallMessage_Opaque_Urgency) UnmarshalJSON(b []byte) error { // Deprecated: Use CallMessage_Opaque_Urgency.Descriptor instead. func (CallMessage_Opaque_Urgency) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 5, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 5, 0} } type DataMessage_Flags int32 @@ -344,11 +344,11 @@ func (x DataMessage_Flags) String() string { } func (DataMessage_Flags) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[4].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[4].Descriptor() } func (DataMessage_Flags) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[4] + return &file_signalpb_SignalService_proto_enumTypes[4] } func (x DataMessage_Flags) Number() protoreflect.EnumNumber { @@ -367,7 +367,7 @@ func (x *DataMessage_Flags) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Flags.Descriptor instead. func (DataMessage_Flags) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0} } type DataMessage_ProtocolVersion int32 @@ -424,11 +424,11 @@ func (x DataMessage_ProtocolVersion) String() string { } func (DataMessage_ProtocolVersion) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[5].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[5].Descriptor() } func (DataMessage_ProtocolVersion) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[5] + return &file_signalpb_SignalService_proto_enumTypes[5] } func (x DataMessage_ProtocolVersion) Number() protoreflect.EnumNumber { @@ -447,7 +447,7 @@ func (x *DataMessage_ProtocolVersion) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_ProtocolVersion.Descriptor instead. func (DataMessage_ProtocolVersion) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 1} } type DataMessage_Payment_Activation_Type int32 @@ -480,11 +480,11 @@ func (x DataMessage_Payment_Activation_Type) String() string { } func (DataMessage_Payment_Activation_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[6].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[6].Descriptor() } func (DataMessage_Payment_Activation_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[6] + return &file_signalpb_SignalService_proto_enumTypes[6] } func (x DataMessage_Payment_Activation_Type) Number() protoreflect.EnumNumber { @@ -503,7 +503,7 @@ func (x *DataMessage_Payment_Activation_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Payment_Activation_Type.Descriptor instead. func (DataMessage_Payment_Activation_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 2, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 2, 0} } type DataMessage_Quote_Type int32 @@ -539,11 +539,11 @@ func (x DataMessage_Quote_Type) String() string { } func (DataMessage_Quote_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[7].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[7].Descriptor() } func (DataMessage_Quote_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[7] + return &file_signalpb_SignalService_proto_enumTypes[7] } func (x DataMessage_Quote_Type) Number() protoreflect.EnumNumber { @@ -562,7 +562,7 @@ func (x *DataMessage_Quote_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Quote_Type.Descriptor instead. func (DataMessage_Quote_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 1, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 1, 0} } type DataMessage_Contact_Phone_Type int32 @@ -601,11 +601,11 @@ func (x DataMessage_Contact_Phone_Type) String() string { } func (DataMessage_Contact_Phone_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[8].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[8].Descriptor() } func (DataMessage_Contact_Phone_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[8] + return &file_signalpb_SignalService_proto_enumTypes[8] } func (x DataMessage_Contact_Phone_Type) Number() protoreflect.EnumNumber { @@ -624,7 +624,7 @@ func (x *DataMessage_Contact_Phone_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Contact_Phone_Type.Descriptor instead. func (DataMessage_Contact_Phone_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 1, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 1, 0} } type DataMessage_Contact_Email_Type int32 @@ -663,11 +663,11 @@ func (x DataMessage_Contact_Email_Type) String() string { } func (DataMessage_Contact_Email_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[9].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[9].Descriptor() } func (DataMessage_Contact_Email_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[9] + return &file_signalpb_SignalService_proto_enumTypes[9] } func (x DataMessage_Contact_Email_Type) Number() protoreflect.EnumNumber { @@ -686,7 +686,7 @@ func (x *DataMessage_Contact_Email_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Contact_Email_Type.Descriptor instead. func (DataMessage_Contact_Email_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 2, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 2, 0} } type DataMessage_Contact_PostalAddress_Type int32 @@ -722,11 +722,11 @@ func (x DataMessage_Contact_PostalAddress_Type) String() string { } func (DataMessage_Contact_PostalAddress_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[10].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[10].Descriptor() } func (DataMessage_Contact_PostalAddress_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[10] + return &file_signalpb_SignalService_proto_enumTypes[10] } func (x DataMessage_Contact_PostalAddress_Type) Number() protoreflect.EnumNumber { @@ -745,7 +745,7 @@ func (x *DataMessage_Contact_PostalAddress_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Contact_PostalAddress_Type.Descriptor instead. func (DataMessage_Contact_PostalAddress_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 3, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 3, 0} } type ReceiptMessage_Type int32 @@ -781,11 +781,11 @@ func (x ReceiptMessage_Type) String() string { } func (ReceiptMessage_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[11].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[11].Descriptor() } func (ReceiptMessage_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[11] + return &file_signalpb_SignalService_proto_enumTypes[11] } func (x ReceiptMessage_Type) Number() protoreflect.EnumNumber { @@ -804,7 +804,7 @@ func (x *ReceiptMessage_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use ReceiptMessage_Type.Descriptor instead. func (ReceiptMessage_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{5, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{5, 0} } type TypingMessage_Action int32 @@ -837,11 +837,11 @@ func (x TypingMessage_Action) String() string { } func (TypingMessage_Action) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[12].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[12].Descriptor() } func (TypingMessage_Action) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[12] + return &file_signalpb_SignalService_proto_enumTypes[12] } func (x TypingMessage_Action) Number() protoreflect.EnumNumber { @@ -860,7 +860,7 @@ func (x *TypingMessage_Action) UnmarshalJSON(b []byte) error { // Deprecated: Use TypingMessage_Action.Descriptor instead. func (TypingMessage_Action) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{6, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{6, 0} } type TextAttachment_Style int32 @@ -905,11 +905,11 @@ func (x TextAttachment_Style) String() string { } func (TextAttachment_Style) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[13].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[13].Descriptor() } func (TextAttachment_Style) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[13] + return &file_signalpb_SignalService_proto_enumTypes[13] } func (x TextAttachment_Style) Number() protoreflect.EnumNumber { @@ -928,7 +928,7 @@ func (x *TextAttachment_Style) UnmarshalJSON(b []byte) error { // Deprecated: Use TextAttachment_Style.Descriptor instead. func (TextAttachment_Style) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{9, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{9, 0} } type Verified_State int32 @@ -964,11 +964,11 @@ func (x Verified_State) String() string { } func (Verified_State) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[14].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[14].Descriptor() } func (Verified_State) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[14] + return &file_signalpb_SignalService_proto_enumTypes[14] } func (x Verified_State) Number() protoreflect.EnumNumber { @@ -987,7 +987,7 @@ func (x *Verified_State) UnmarshalJSON(b []byte) error { // Deprecated: Use Verified_State.Descriptor instead. func (Verified_State) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{10, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{10, 0} } type SyncMessage_Request_Type int32 @@ -1029,11 +1029,11 @@ func (x SyncMessage_Request_Type) String() string { } func (SyncMessage_Request_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[15].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[15].Descriptor() } func (SyncMessage_Request_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[15] + return &file_signalpb_SignalService_proto_enumTypes[15] } func (x SyncMessage_Request_Type) Number() protoreflect.EnumNumber { @@ -1052,7 +1052,7 @@ func (x *SyncMessage_Request_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_Request_Type.Descriptor instead. func (SyncMessage_Request_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 3, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 3, 0} } type SyncMessage_StickerPackOperation_Type int32 @@ -1085,11 +1085,11 @@ func (x SyncMessage_StickerPackOperation_Type) String() string { } func (SyncMessage_StickerPackOperation_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[16].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[16].Descriptor() } func (SyncMessage_StickerPackOperation_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[16] + return &file_signalpb_SignalService_proto_enumTypes[16] } func (x SyncMessage_StickerPackOperation_Type) Number() protoreflect.EnumNumber { @@ -1108,7 +1108,7 @@ func (x *SyncMessage_StickerPackOperation_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_StickerPackOperation_Type.Descriptor instead. func (SyncMessage_StickerPackOperation_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 7, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 7, 0} } type SyncMessage_FetchLatest_Type int32 @@ -1147,11 +1147,11 @@ func (x SyncMessage_FetchLatest_Type) String() string { } func (SyncMessage_FetchLatest_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[17].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[17].Descriptor() } func (SyncMessage_FetchLatest_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[17] + return &file_signalpb_SignalService_proto_enumTypes[17] } func (x SyncMessage_FetchLatest_Type) Number() protoreflect.EnumNumber { @@ -1170,7 +1170,7 @@ func (x *SyncMessage_FetchLatest_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_FetchLatest_Type.Descriptor instead. func (SyncMessage_FetchLatest_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 9, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 9, 0} } type SyncMessage_MessageRequestResponse_Type int32 @@ -1218,11 +1218,11 @@ func (x SyncMessage_MessageRequestResponse_Type) String() string { } func (SyncMessage_MessageRequestResponse_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[18].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[18].Descriptor() } func (SyncMessage_MessageRequestResponse_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[18] + return &file_signalpb_SignalService_proto_enumTypes[18] } func (x SyncMessage_MessageRequestResponse_Type) Number() protoreflect.EnumNumber { @@ -1241,7 +1241,7 @@ func (x *SyncMessage_MessageRequestResponse_Type) UnmarshalJSON(b []byte) error // Deprecated: Use SyncMessage_MessageRequestResponse_Type.Descriptor instead. func (SyncMessage_MessageRequestResponse_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 12, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 12, 0} } type SyncMessage_CallEvent_Type int32 @@ -1283,11 +1283,11 @@ func (x SyncMessage_CallEvent_Type) String() string { } func (SyncMessage_CallEvent_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[19].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[19].Descriptor() } func (SyncMessage_CallEvent_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[19] + return &file_signalpb_SignalService_proto_enumTypes[19] } func (x SyncMessage_CallEvent_Type) Number() protoreflect.EnumNumber { @@ -1306,7 +1306,7 @@ func (x *SyncMessage_CallEvent_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallEvent_Type.Descriptor instead. func (SyncMessage_CallEvent_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 15, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 15, 0} } type SyncMessage_CallEvent_Direction int32 @@ -1342,11 +1342,11 @@ func (x SyncMessage_CallEvent_Direction) String() string { } func (SyncMessage_CallEvent_Direction) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[20].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[20].Descriptor() } func (SyncMessage_CallEvent_Direction) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[20] + return &file_signalpb_SignalService_proto_enumTypes[20] } func (x SyncMessage_CallEvent_Direction) Number() protoreflect.EnumNumber { @@ -1365,7 +1365,7 @@ func (x *SyncMessage_CallEvent_Direction) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallEvent_Direction.Descriptor instead. func (SyncMessage_CallEvent_Direction) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 15, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 15, 1} } type SyncMessage_CallEvent_Event int32 @@ -1407,11 +1407,11 @@ func (x SyncMessage_CallEvent_Event) String() string { } func (SyncMessage_CallEvent_Event) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[21].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[21].Descriptor() } func (SyncMessage_CallEvent_Event) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[21] + return &file_signalpb_SignalService_proto_enumTypes[21] } func (x SyncMessage_CallEvent_Event) Number() protoreflect.EnumNumber { @@ -1430,7 +1430,7 @@ func (x *SyncMessage_CallEvent_Event) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallEvent_Event.Descriptor instead. func (SyncMessage_CallEvent_Event) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 15, 2} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 15, 2} } type SyncMessage_CallLinkUpdate_Type int32 @@ -1460,11 +1460,11 @@ func (x SyncMessage_CallLinkUpdate_Type) String() string { } func (SyncMessage_CallLinkUpdate_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[22].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[22].Descriptor() } func (SyncMessage_CallLinkUpdate_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[22] + return &file_signalpb_SignalService_proto_enumTypes[22] } func (x SyncMessage_CallLinkUpdate_Type) Number() protoreflect.EnumNumber { @@ -1483,7 +1483,7 @@ func (x *SyncMessage_CallLinkUpdate_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallLinkUpdate_Type.Descriptor instead. func (SyncMessage_CallLinkUpdate_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 16, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 16, 0} } type SyncMessage_CallLogEvent_Type int32 @@ -1522,11 +1522,11 @@ func (x SyncMessage_CallLogEvent_Type) String() string { } func (SyncMessage_CallLogEvent_Type) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[23].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[23].Descriptor() } func (SyncMessage_CallLogEvent_Type) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[23] + return &file_signalpb_SignalService_proto_enumTypes[23] } func (x SyncMessage_CallLogEvent_Type) Number() protoreflect.EnumNumber { @@ -1545,7 +1545,7 @@ func (x *SyncMessage_CallLogEvent_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallLogEvent_Type.Descriptor instead. func (SyncMessage_CallLogEvent_Type) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 17, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 17, 0} } type SyncMessage_AttachmentBackfillResponse_Error int32 @@ -1575,11 +1575,11 @@ func (x SyncMessage_AttachmentBackfillResponse_Error) String() string { } func (SyncMessage_AttachmentBackfillResponse_Error) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[24].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[24].Descriptor() } func (SyncMessage_AttachmentBackfillResponse_Error) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[24] + return &file_signalpb_SignalService_proto_enumTypes[24] } func (x SyncMessage_AttachmentBackfillResponse_Error) Number() protoreflect.EnumNumber { @@ -1598,7 +1598,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_Error) UnmarshalJSON(b []byte) e // Deprecated: Use SyncMessage_AttachmentBackfillResponse_Error.Descriptor instead. func (SyncMessage_AttachmentBackfillResponse_Error) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 21, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21, 0} } type SyncMessage_AttachmentBackfillResponse_AttachmentData_Status int32 @@ -1631,11 +1631,11 @@ func (x SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) String() s } func (SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[25].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[25].Descriptor() } func (SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[25] + return &file_signalpb_SignalService_proto_enumTypes[25] } func (x SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) Number() protoreflect.EnumNumber { @@ -1654,7 +1654,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) Unmarshal // Deprecated: Use SyncMessage_AttachmentBackfillResponse_AttachmentData_Status.Descriptor instead. func (SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 21, 0, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21, 0, 0} } type AttachmentPointer_Flags int32 @@ -1690,11 +1690,11 @@ func (x AttachmentPointer_Flags) String() string { } func (AttachmentPointer_Flags) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[26].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[26].Descriptor() } func (AttachmentPointer_Flags) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[26] + return &file_signalpb_SignalService_proto_enumTypes[26] } func (x AttachmentPointer_Flags) Number() protoreflect.EnumNumber { @@ -1713,7 +1713,7 @@ func (x *AttachmentPointer_Flags) UnmarshalJSON(b []byte) error { // Deprecated: Use AttachmentPointer_Flags.Descriptor instead. func (AttachmentPointer_Flags) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{12, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{12, 0} } type BodyRange_Style int32 @@ -1758,11 +1758,11 @@ func (x BodyRange_Style) String() string { } func (BodyRange_Style) Descriptor() protoreflect.EnumDescriptor { - return file_SignalService_proto_enumTypes[27].Descriptor() + return file_signalpb_SignalService_proto_enumTypes[27].Descriptor() } func (BodyRange_Style) Type() protoreflect.EnumType { - return &file_SignalService_proto_enumTypes[27] + return &file_signalpb_SignalService_proto_enumTypes[27] } func (x BodyRange_Style) Number() protoreflect.EnumNumber { @@ -1781,7 +1781,7 @@ func (x *BodyRange_Style) UnmarshalJSON(b []byte) error { // Deprecated: Use BodyRange_Style.Descriptor instead. func (BodyRange_Style) EnumDescriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{19, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{19, 0} } type Envelope struct { @@ -1814,7 +1814,7 @@ const ( func (x *Envelope) Reset() { *x = Envelope{} - mi := &file_SignalService_proto_msgTypes[0] + mi := &file_signalpb_SignalService_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1826,7 +1826,7 @@ func (x *Envelope) String() string { func (*Envelope) ProtoMessage() {} func (x *Envelope) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[0] + mi := &file_signalpb_SignalService_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1839,7 +1839,7 @@ func (x *Envelope) ProtoReflect() protoreflect.Message { // Deprecated: Use Envelope.ProtoReflect.Descriptor instead. func (*Envelope) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{0} } func (x *Envelope) GetType() Envelope_Type { @@ -1983,7 +1983,7 @@ type Content struct { func (x *Content) Reset() { *x = Content{} - mi := &file_SignalService_proto_msgTypes[1] + mi := &file_signalpb_SignalService_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1995,7 +1995,7 @@ func (x *Content) String() string { func (*Content) ProtoMessage() {} func (x *Content) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[1] + mi := &file_signalpb_SignalService_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2008,7 +2008,7 @@ func (x *Content) ProtoReflect() protoreflect.Message { // Deprecated: Use Content.ProtoReflect.Descriptor instead. func (*Content) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{1} } func (x *Content) GetContent() isContent_Content { @@ -2186,7 +2186,7 @@ type CallMessage struct { func (x *CallMessage) Reset() { *x = CallMessage{} - mi := &file_SignalService_proto_msgTypes[2] + mi := &file_signalpb_SignalService_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2198,7 +2198,7 @@ func (x *CallMessage) String() string { func (*CallMessage) ProtoMessage() {} func (x *CallMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[2] + mi := &file_signalpb_SignalService_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2211,7 +2211,7 @@ func (x *CallMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage.ProtoReflect.Descriptor instead. func (*CallMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2} } func (x *CallMessage) GetOffer() *CallMessage_Offer { @@ -2298,7 +2298,7 @@ type DataMessage struct { func (x *DataMessage) Reset() { *x = DataMessage{} - mi := &file_SignalService_proto_msgTypes[3] + mi := &file_signalpb_SignalService_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2310,7 +2310,7 @@ func (x *DataMessage) String() string { func (*DataMessage) ProtoMessage() {} func (x *DataMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[3] + mi := &file_signalpb_SignalService_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2323,7 +2323,7 @@ func (x *DataMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage.ProtoReflect.Descriptor instead. func (*DataMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3} } func (x *DataMessage) GetBody() string { @@ -2524,7 +2524,7 @@ type NullMessage struct { func (x *NullMessage) Reset() { *x = NullMessage{} - mi := &file_SignalService_proto_msgTypes[4] + mi := &file_signalpb_SignalService_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2536,7 +2536,7 @@ func (x *NullMessage) String() string { func (*NullMessage) ProtoMessage() {} func (x *NullMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[4] + mi := &file_signalpb_SignalService_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2549,7 +2549,7 @@ func (x *NullMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use NullMessage.ProtoReflect.Descriptor instead. func (*NullMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{4} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{4} } func (x *NullMessage) GetPadding() []byte { @@ -2569,7 +2569,7 @@ type ReceiptMessage struct { func (x *ReceiptMessage) Reset() { *x = ReceiptMessage{} - mi := &file_SignalService_proto_msgTypes[5] + mi := &file_signalpb_SignalService_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2581,7 +2581,7 @@ func (x *ReceiptMessage) String() string { func (*ReceiptMessage) ProtoMessage() {} func (x *ReceiptMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[5] + mi := &file_signalpb_SignalService_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2594,7 +2594,7 @@ func (x *ReceiptMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ReceiptMessage.ProtoReflect.Descriptor instead. func (*ReceiptMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{5} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{5} } func (x *ReceiptMessage) GetType() ReceiptMessage_Type { @@ -2622,7 +2622,7 @@ type TypingMessage struct { func (x *TypingMessage) Reset() { *x = TypingMessage{} - mi := &file_SignalService_proto_msgTypes[6] + mi := &file_signalpb_SignalService_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2634,7 +2634,7 @@ func (x *TypingMessage) String() string { func (*TypingMessage) ProtoMessage() {} func (x *TypingMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[6] + mi := &file_signalpb_SignalService_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2647,7 +2647,7 @@ func (x *TypingMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use TypingMessage.ProtoReflect.Descriptor instead. func (*TypingMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{6} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{6} } func (x *TypingMessage) GetTimestamp() uint64 { @@ -2688,7 +2688,7 @@ type StoryMessage struct { func (x *StoryMessage) Reset() { *x = StoryMessage{} - mi := &file_SignalService_proto_msgTypes[7] + mi := &file_signalpb_SignalService_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2700,7 +2700,7 @@ func (x *StoryMessage) String() string { func (*StoryMessage) ProtoMessage() {} func (x *StoryMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[7] + mi := &file_signalpb_SignalService_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2713,7 +2713,7 @@ func (x *StoryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use StoryMessage.ProtoReflect.Descriptor instead. func (*StoryMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{7} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{7} } func (x *StoryMessage) GetProfileKey() []byte { @@ -2798,7 +2798,7 @@ type Preview struct { func (x *Preview) Reset() { *x = Preview{} - mi := &file_SignalService_proto_msgTypes[8] + mi := &file_signalpb_SignalService_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2810,7 +2810,7 @@ func (x *Preview) String() string { func (*Preview) ProtoMessage() {} func (x *Preview) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[8] + mi := &file_signalpb_SignalService_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2823,7 +2823,7 @@ func (x *Preview) ProtoReflect() protoreflect.Message { // Deprecated: Use Preview.ProtoReflect.Descriptor instead. func (*Preview) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{8} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{8} } func (x *Preview) GetUrl() string { @@ -2879,7 +2879,7 @@ type TextAttachment struct { func (x *TextAttachment) Reset() { *x = TextAttachment{} - mi := &file_SignalService_proto_msgTypes[9] + mi := &file_signalpb_SignalService_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2891,7 +2891,7 @@ func (x *TextAttachment) String() string { func (*TextAttachment) ProtoMessage() {} func (x *TextAttachment) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[9] + mi := &file_signalpb_SignalService_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2904,7 +2904,7 @@ func (x *TextAttachment) ProtoReflect() protoreflect.Message { // Deprecated: Use TextAttachment.ProtoReflect.Descriptor instead. func (*TextAttachment) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{9} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{9} } func (x *TextAttachment) GetText() string { @@ -2996,7 +2996,7 @@ type Verified struct { func (x *Verified) Reset() { *x = Verified{} - mi := &file_SignalService_proto_msgTypes[10] + mi := &file_signalpb_SignalService_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3008,7 +3008,7 @@ func (x *Verified) String() string { func (*Verified) ProtoMessage() {} func (x *Verified) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[10] + mi := &file_signalpb_SignalService_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3021,7 +3021,7 @@ func (x *Verified) ProtoReflect() protoreflect.Message { // Deprecated: Use Verified.ProtoReflect.Descriptor instead. func (*Verified) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{10} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{10} } func (x *Verified) GetDestinationAci() string { @@ -3097,7 +3097,7 @@ type SyncMessage struct { func (x *SyncMessage) Reset() { *x = SyncMessage{} - mi := &file_SignalService_proto_msgTypes[11] + mi := &file_signalpb_SignalService_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3109,7 +3109,7 @@ func (x *SyncMessage) String() string { func (*SyncMessage) ProtoMessage() {} func (x *SyncMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[11] + mi := &file_signalpb_SignalService_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3122,7 +3122,7 @@ func (x *SyncMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage.ProtoReflect.Descriptor instead. func (*SyncMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11} } func (x *SyncMessage) GetContent() isSyncMessage_Content { @@ -3495,7 +3495,7 @@ type AttachmentPointer struct { func (x *AttachmentPointer) Reset() { *x = AttachmentPointer{} - mi := &file_SignalService_proto_msgTypes[12] + mi := &file_signalpb_SignalService_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3507,7 +3507,7 @@ func (x *AttachmentPointer) String() string { func (*AttachmentPointer) ProtoMessage() {} func (x *AttachmentPointer) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[12] + mi := &file_signalpb_SignalService_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3520,7 +3520,7 @@ func (x *AttachmentPointer) ProtoReflect() protoreflect.Message { // Deprecated: Use AttachmentPointer.ProtoReflect.Descriptor instead. func (*AttachmentPointer) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{12} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{12} } func (x *AttachmentPointer) GetAttachmentIdentifier() isAttachmentPointer_AttachmentIdentifier { @@ -3687,7 +3687,7 @@ type GroupContextV2 struct { func (x *GroupContextV2) Reset() { *x = GroupContextV2{} - mi := &file_SignalService_proto_msgTypes[13] + mi := &file_signalpb_SignalService_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3699,7 +3699,7 @@ func (x *GroupContextV2) String() string { func (*GroupContextV2) ProtoMessage() {} func (x *GroupContextV2) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[13] + mi := &file_signalpb_SignalService_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3712,7 +3712,7 @@ func (x *GroupContextV2) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupContextV2.ProtoReflect.Descriptor instead. func (*GroupContextV2) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{13} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{13} } func (x *GroupContextV2) GetMasterKey() []byte { @@ -3752,7 +3752,7 @@ type ContactDetails struct { func (x *ContactDetails) Reset() { *x = ContactDetails{} - mi := &file_SignalService_proto_msgTypes[14] + mi := &file_signalpb_SignalService_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3764,7 +3764,7 @@ func (x *ContactDetails) String() string { func (*ContactDetails) ProtoMessage() {} func (x *ContactDetails) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[14] + mi := &file_signalpb_SignalService_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3777,7 +3777,7 @@ func (x *ContactDetails) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactDetails.ProtoReflect.Descriptor instead. func (*ContactDetails) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{14} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{14} } func (x *ContactDetails) GetNumber() string { @@ -3848,7 +3848,7 @@ type PaymentAddress struct { func (x *PaymentAddress) Reset() { *x = PaymentAddress{} - mi := &file_SignalService_proto_msgTypes[15] + mi := &file_signalpb_SignalService_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3860,7 +3860,7 @@ func (x *PaymentAddress) String() string { func (*PaymentAddress) ProtoMessage() {} func (x *PaymentAddress) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[15] + mi := &file_signalpb_SignalService_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3873,7 +3873,7 @@ func (x *PaymentAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentAddress.ProtoReflect.Descriptor instead. func (*PaymentAddress) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{15} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{15} } func (x *PaymentAddress) GetAddress() isPaymentAddress_Address { @@ -3913,7 +3913,7 @@ type DecryptionErrorMessage struct { func (x *DecryptionErrorMessage) Reset() { *x = DecryptionErrorMessage{} - mi := &file_SignalService_proto_msgTypes[16] + mi := &file_signalpb_SignalService_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3925,7 +3925,7 @@ func (x *DecryptionErrorMessage) String() string { func (*DecryptionErrorMessage) ProtoMessage() {} func (x *DecryptionErrorMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[16] + mi := &file_signalpb_SignalService_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3938,7 +3938,7 @@ func (x *DecryptionErrorMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DecryptionErrorMessage.ProtoReflect.Descriptor instead. func (*DecryptionErrorMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{16} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{16} } func (x *DecryptionErrorMessage) GetRatchetKey() []byte { @@ -3973,7 +3973,7 @@ type PniSignatureMessage struct { func (x *PniSignatureMessage) Reset() { *x = PniSignatureMessage{} - mi := &file_SignalService_proto_msgTypes[17] + mi := &file_signalpb_SignalService_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3985,7 +3985,7 @@ func (x *PniSignatureMessage) String() string { func (*PniSignatureMessage) ProtoMessage() {} func (x *PniSignatureMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[17] + mi := &file_signalpb_SignalService_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3998,7 +3998,7 @@ func (x *PniSignatureMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PniSignatureMessage.ProtoReflect.Descriptor instead. func (*PniSignatureMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{17} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{17} } func (x *PniSignatureMessage) GetPni() []byte { @@ -4025,7 +4025,7 @@ type EditMessage struct { func (x *EditMessage) Reset() { *x = EditMessage{} - mi := &file_SignalService_proto_msgTypes[18] + mi := &file_signalpb_SignalService_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4037,7 +4037,7 @@ func (x *EditMessage) String() string { func (*EditMessage) ProtoMessage() {} func (x *EditMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[18] + mi := &file_signalpb_SignalService_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4050,7 +4050,7 @@ func (x *EditMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use EditMessage.ProtoReflect.Descriptor instead. func (*EditMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{18} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{18} } func (x *EditMessage) GetTargetSentTimestamp() uint64 { @@ -4083,7 +4083,7 @@ type BodyRange struct { func (x *BodyRange) Reset() { *x = BodyRange{} - mi := &file_SignalService_proto_msgTypes[19] + mi := &file_signalpb_SignalService_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4095,7 +4095,7 @@ func (x *BodyRange) String() string { func (*BodyRange) ProtoMessage() {} func (x *BodyRange) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[19] + mi := &file_signalpb_SignalService_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4108,7 +4108,7 @@ func (x *BodyRange) ProtoReflect() protoreflect.Message { // Deprecated: Use BodyRange.ProtoReflect.Descriptor instead. func (*BodyRange) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{19} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{19} } func (x *BodyRange) GetStart() uint32 { @@ -4196,7 +4196,7 @@ type AddressableMessage struct { func (x *AddressableMessage) Reset() { *x = AddressableMessage{} - mi := &file_SignalService_proto_msgTypes[20] + mi := &file_signalpb_SignalService_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4208,7 +4208,7 @@ func (x *AddressableMessage) String() string { func (*AddressableMessage) ProtoMessage() {} func (x *AddressableMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[20] + mi := &file_signalpb_SignalService_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4221,7 +4221,7 @@ func (x *AddressableMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressableMessage.ProtoReflect.Descriptor instead. func (*AddressableMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{20} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{20} } func (x *AddressableMessage) GetAuthor() isAddressableMessage_Author { @@ -4302,7 +4302,7 @@ type ConversationIdentifier struct { func (x *ConversationIdentifier) Reset() { *x = ConversationIdentifier{} - mi := &file_SignalService_proto_msgTypes[21] + mi := &file_signalpb_SignalService_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4314,7 +4314,7 @@ func (x *ConversationIdentifier) String() string { func (*ConversationIdentifier) ProtoMessage() {} func (x *ConversationIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[21] + mi := &file_signalpb_SignalService_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4327,7 +4327,7 @@ func (x *ConversationIdentifier) ProtoReflect() protoreflect.Message { // Deprecated: Use ConversationIdentifier.ProtoReflect.Descriptor instead. func (*ConversationIdentifier) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{21} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{21} } func (x *ConversationIdentifier) GetIdentifier() isConversationIdentifier_Identifier { @@ -4412,7 +4412,7 @@ type CallMessage_Offer struct { func (x *CallMessage_Offer) Reset() { *x = CallMessage_Offer{} - mi := &file_SignalService_proto_msgTypes[22] + mi := &file_signalpb_SignalService_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4424,7 +4424,7 @@ func (x *CallMessage_Offer) String() string { func (*CallMessage_Offer) ProtoMessage() {} func (x *CallMessage_Offer) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[22] + mi := &file_signalpb_SignalService_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4437,7 +4437,7 @@ func (x *CallMessage_Offer) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Offer.ProtoReflect.Descriptor instead. func (*CallMessage_Offer) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 0} } func (x *CallMessage_Offer) GetId() uint64 { @@ -4471,7 +4471,7 @@ type CallMessage_Answer struct { func (x *CallMessage_Answer) Reset() { *x = CallMessage_Answer{} - mi := &file_SignalService_proto_msgTypes[23] + mi := &file_signalpb_SignalService_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4483,7 +4483,7 @@ func (x *CallMessage_Answer) String() string { func (*CallMessage_Answer) ProtoMessage() {} func (x *CallMessage_Answer) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[23] + mi := &file_signalpb_SignalService_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4496,7 +4496,7 @@ func (x *CallMessage_Answer) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Answer.ProtoReflect.Descriptor instead. func (*CallMessage_Answer) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 1} } func (x *CallMessage_Answer) GetId() uint64 { @@ -4523,7 +4523,7 @@ type CallMessage_IceUpdate struct { func (x *CallMessage_IceUpdate) Reset() { *x = CallMessage_IceUpdate{} - mi := &file_SignalService_proto_msgTypes[24] + mi := &file_signalpb_SignalService_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4535,7 +4535,7 @@ func (x *CallMessage_IceUpdate) String() string { func (*CallMessage_IceUpdate) ProtoMessage() {} func (x *CallMessage_IceUpdate) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[24] + mi := &file_signalpb_SignalService_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4548,7 +4548,7 @@ func (x *CallMessage_IceUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_IceUpdate.ProtoReflect.Descriptor instead. func (*CallMessage_IceUpdate) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 2} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 2} } func (x *CallMessage_IceUpdate) GetId() uint64 { @@ -4574,7 +4574,7 @@ type CallMessage_Busy struct { func (x *CallMessage_Busy) Reset() { *x = CallMessage_Busy{} - mi := &file_SignalService_proto_msgTypes[25] + mi := &file_signalpb_SignalService_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4586,7 +4586,7 @@ func (x *CallMessage_Busy) String() string { func (*CallMessage_Busy) ProtoMessage() {} func (x *CallMessage_Busy) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[25] + mi := &file_signalpb_SignalService_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4599,7 +4599,7 @@ func (x *CallMessage_Busy) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Busy.ProtoReflect.Descriptor instead. func (*CallMessage_Busy) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 3} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 3} } func (x *CallMessage_Busy) GetId() uint64 { @@ -4620,7 +4620,7 @@ type CallMessage_Hangup struct { func (x *CallMessage_Hangup) Reset() { *x = CallMessage_Hangup{} - mi := &file_SignalService_proto_msgTypes[26] + mi := &file_signalpb_SignalService_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4632,7 +4632,7 @@ func (x *CallMessage_Hangup) String() string { func (*CallMessage_Hangup) ProtoMessage() {} func (x *CallMessage_Hangup) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[26] + mi := &file_signalpb_SignalService_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4645,7 +4645,7 @@ func (x *CallMessage_Hangup) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Hangup.ProtoReflect.Descriptor instead. func (*CallMessage_Hangup) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 4} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 4} } func (x *CallMessage_Hangup) GetId() uint64 { @@ -4679,7 +4679,7 @@ type CallMessage_Opaque struct { func (x *CallMessage_Opaque) Reset() { *x = CallMessage_Opaque{} - mi := &file_SignalService_proto_msgTypes[27] + mi := &file_signalpb_SignalService_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4691,7 +4691,7 @@ func (x *CallMessage_Opaque) String() string { func (*CallMessage_Opaque) ProtoMessage() {} func (x *CallMessage_Opaque) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[27] + mi := &file_signalpb_SignalService_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4704,7 +4704,7 @@ func (x *CallMessage_Opaque) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Opaque.ProtoReflect.Descriptor instead. func (*CallMessage_Opaque) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{2, 5} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 5} } func (x *CallMessage_Opaque) GetData() []byte { @@ -4734,7 +4734,7 @@ type DataMessage_Payment struct { func (x *DataMessage_Payment) Reset() { *x = DataMessage_Payment{} - mi := &file_SignalService_proto_msgTypes[28] + mi := &file_signalpb_SignalService_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4746,7 +4746,7 @@ func (x *DataMessage_Payment) String() string { func (*DataMessage_Payment) ProtoMessage() {} func (x *DataMessage_Payment) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[28] + mi := &file_signalpb_SignalService_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4759,7 +4759,7 @@ func (x *DataMessage_Payment) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Payment.ProtoReflect.Descriptor instead. func (*DataMessage_Payment) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0} } func (x *DataMessage_Payment) GetItem() isDataMessage_Payment_Item { @@ -4818,7 +4818,7 @@ type DataMessage_Quote struct { func (x *DataMessage_Quote) Reset() { *x = DataMessage_Quote{} - mi := &file_SignalService_proto_msgTypes[29] + mi := &file_signalpb_SignalService_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4830,7 +4830,7 @@ func (x *DataMessage_Quote) String() string { func (*DataMessage_Quote) ProtoMessage() {} func (x *DataMessage_Quote) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[29] + mi := &file_signalpb_SignalService_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4843,7 +4843,7 @@ func (x *DataMessage_Quote) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Quote.ProtoReflect.Descriptor instead. func (*DataMessage_Quote) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 1} } func (x *DataMessage_Quote) GetId() uint64 { @@ -4909,7 +4909,7 @@ type DataMessage_Contact struct { func (x *DataMessage_Contact) Reset() { *x = DataMessage_Contact{} - mi := &file_SignalService_proto_msgTypes[30] + mi := &file_signalpb_SignalService_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4921,7 +4921,7 @@ func (x *DataMessage_Contact) String() string { func (*DataMessage_Contact) ProtoMessage() {} func (x *DataMessage_Contact) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[30] + mi := &file_signalpb_SignalService_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4934,7 +4934,7 @@ func (x *DataMessage_Contact) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact.ProtoReflect.Descriptor instead. func (*DataMessage_Contact) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2} } func (x *DataMessage_Contact) GetName() *DataMessage_Contact_Name { @@ -4992,7 +4992,7 @@ type DataMessage_Sticker struct { func (x *DataMessage_Sticker) Reset() { *x = DataMessage_Sticker{} - mi := &file_SignalService_proto_msgTypes[31] + mi := &file_signalpb_SignalService_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5004,7 +5004,7 @@ func (x *DataMessage_Sticker) String() string { func (*DataMessage_Sticker) ProtoMessage() {} func (x *DataMessage_Sticker) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[31] + mi := &file_signalpb_SignalService_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5017,7 +5017,7 @@ func (x *DataMessage_Sticker) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Sticker.ProtoReflect.Descriptor instead. func (*DataMessage_Sticker) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 3} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 3} } func (x *DataMessage_Sticker) GetPackId() []byte { @@ -5068,7 +5068,7 @@ type DataMessage_Reaction struct { func (x *DataMessage_Reaction) Reset() { *x = DataMessage_Reaction{} - mi := &file_SignalService_proto_msgTypes[32] + mi := &file_signalpb_SignalService_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5080,7 +5080,7 @@ func (x *DataMessage_Reaction) String() string { func (*DataMessage_Reaction) ProtoMessage() {} func (x *DataMessage_Reaction) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[32] + mi := &file_signalpb_SignalService_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5093,7 +5093,7 @@ func (x *DataMessage_Reaction) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Reaction.ProtoReflect.Descriptor instead. func (*DataMessage_Reaction) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 4} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 4} } func (x *DataMessage_Reaction) GetEmoji() string { @@ -5140,7 +5140,7 @@ type DataMessage_Delete struct { func (x *DataMessage_Delete) Reset() { *x = DataMessage_Delete{} - mi := &file_SignalService_proto_msgTypes[33] + mi := &file_signalpb_SignalService_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5152,7 +5152,7 @@ func (x *DataMessage_Delete) String() string { func (*DataMessage_Delete) ProtoMessage() {} func (x *DataMessage_Delete) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[33] + mi := &file_signalpb_SignalService_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5165,7 +5165,7 @@ func (x *DataMessage_Delete) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Delete.ProtoReflect.Descriptor instead. func (*DataMessage_Delete) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 5} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 5} } func (x *DataMessage_Delete) GetTargetSentTimestamp() uint64 { @@ -5184,7 +5184,7 @@ type DataMessage_GroupCallUpdate struct { func (x *DataMessage_GroupCallUpdate) Reset() { *x = DataMessage_GroupCallUpdate{} - mi := &file_SignalService_proto_msgTypes[34] + mi := &file_signalpb_SignalService_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5196,7 +5196,7 @@ func (x *DataMessage_GroupCallUpdate) String() string { func (*DataMessage_GroupCallUpdate) ProtoMessage() {} func (x *DataMessage_GroupCallUpdate) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[34] + mi := &file_signalpb_SignalService_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5209,7 +5209,7 @@ func (x *DataMessage_GroupCallUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_GroupCallUpdate.ProtoReflect.Descriptor instead. func (*DataMessage_GroupCallUpdate) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 6} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 6} } func (x *DataMessage_GroupCallUpdate) GetEraId() string { @@ -5230,7 +5230,7 @@ type DataMessage_StoryContext struct { func (x *DataMessage_StoryContext) Reset() { *x = DataMessage_StoryContext{} - mi := &file_SignalService_proto_msgTypes[35] + mi := &file_signalpb_SignalService_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5242,7 +5242,7 @@ func (x *DataMessage_StoryContext) String() string { func (*DataMessage_StoryContext) ProtoMessage() {} func (x *DataMessage_StoryContext) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[35] + mi := &file_signalpb_SignalService_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5255,7 +5255,7 @@ func (x *DataMessage_StoryContext) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_StoryContext.ProtoReflect.Descriptor instead. func (*DataMessage_StoryContext) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 7} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 7} } func (x *DataMessage_StoryContext) GetAuthorAci() string { @@ -5288,7 +5288,7 @@ type DataMessage_GiftBadge struct { func (x *DataMessage_GiftBadge) Reset() { *x = DataMessage_GiftBadge{} - mi := &file_SignalService_proto_msgTypes[36] + mi := &file_signalpb_SignalService_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5300,7 +5300,7 @@ func (x *DataMessage_GiftBadge) String() string { func (*DataMessage_GiftBadge) ProtoMessage() {} func (x *DataMessage_GiftBadge) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[36] + mi := &file_signalpb_SignalService_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5313,7 +5313,7 @@ func (x *DataMessage_GiftBadge) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_GiftBadge.ProtoReflect.Descriptor instead. func (*DataMessage_GiftBadge) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 8} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 8} } func (x *DataMessage_GiftBadge) GetReceiptCredentialPresentation() []byte { @@ -5334,7 +5334,7 @@ type DataMessage_PollCreate struct { func (x *DataMessage_PollCreate) Reset() { *x = DataMessage_PollCreate{} - mi := &file_SignalService_proto_msgTypes[37] + mi := &file_signalpb_SignalService_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5346,7 +5346,7 @@ func (x *DataMessage_PollCreate) String() string { func (*DataMessage_PollCreate) ProtoMessage() {} func (x *DataMessage_PollCreate) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[37] + mi := &file_signalpb_SignalService_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5359,7 +5359,7 @@ func (x *DataMessage_PollCreate) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_PollCreate.ProtoReflect.Descriptor instead. func (*DataMessage_PollCreate) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 9} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 9} } func (x *DataMessage_PollCreate) GetQuestion() string { @@ -5392,7 +5392,7 @@ type DataMessage_PollTerminate struct { func (x *DataMessage_PollTerminate) Reset() { *x = DataMessage_PollTerminate{} - mi := &file_SignalService_proto_msgTypes[38] + mi := &file_signalpb_SignalService_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5404,7 +5404,7 @@ func (x *DataMessage_PollTerminate) String() string { func (*DataMessage_PollTerminate) ProtoMessage() {} func (x *DataMessage_PollTerminate) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[38] + mi := &file_signalpb_SignalService_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5417,7 +5417,7 @@ func (x *DataMessage_PollTerminate) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_PollTerminate.ProtoReflect.Descriptor instead. func (*DataMessage_PollTerminate) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 10} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 10} } func (x *DataMessage_PollTerminate) GetTargetSentTimestamp() uint64 { @@ -5439,7 +5439,7 @@ type DataMessage_PollVote struct { func (x *DataMessage_PollVote) Reset() { *x = DataMessage_PollVote{} - mi := &file_SignalService_proto_msgTypes[39] + mi := &file_signalpb_SignalService_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5451,7 +5451,7 @@ func (x *DataMessage_PollVote) String() string { func (*DataMessage_PollVote) ProtoMessage() {} func (x *DataMessage_PollVote) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[39] + mi := &file_signalpb_SignalService_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5464,7 +5464,7 @@ func (x *DataMessage_PollVote) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_PollVote.ProtoReflect.Descriptor instead. func (*DataMessage_PollVote) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 11} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 11} } func (x *DataMessage_PollVote) GetTargetAuthorAciBinary() []byte { @@ -5510,7 +5510,7 @@ type DataMessage_PinMessage struct { func (x *DataMessage_PinMessage) Reset() { *x = DataMessage_PinMessage{} - mi := &file_SignalService_proto_msgTypes[40] + mi := &file_signalpb_SignalService_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5522,7 +5522,7 @@ func (x *DataMessage_PinMessage) String() string { func (*DataMessage_PinMessage) ProtoMessage() {} func (x *DataMessage_PinMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[40] + mi := &file_signalpb_SignalService_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5535,7 +5535,7 @@ func (x *DataMessage_PinMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_PinMessage.ProtoReflect.Descriptor instead. func (*DataMessage_PinMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 12} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 12} } func (x *DataMessage_PinMessage) GetTargetAuthorAciBinary() []byte { @@ -5603,7 +5603,7 @@ type DataMessage_UnpinMessage struct { func (x *DataMessage_UnpinMessage) Reset() { *x = DataMessage_UnpinMessage{} - mi := &file_SignalService_proto_msgTypes[41] + mi := &file_signalpb_SignalService_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5615,7 +5615,7 @@ func (x *DataMessage_UnpinMessage) String() string { func (*DataMessage_UnpinMessage) ProtoMessage() {} func (x *DataMessage_UnpinMessage) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[41] + mi := &file_signalpb_SignalService_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5628,7 +5628,7 @@ func (x *DataMessage_UnpinMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_UnpinMessage.ProtoReflect.Descriptor instead. func (*DataMessage_UnpinMessage) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 13} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 13} } func (x *DataMessage_UnpinMessage) GetTargetAuthorAciBinary() []byte { @@ -5655,7 +5655,7 @@ type DataMessage_AdminDelete struct { func (x *DataMessage_AdminDelete) Reset() { *x = DataMessage_AdminDelete{} - mi := &file_SignalService_proto_msgTypes[42] + mi := &file_signalpb_SignalService_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5667,7 +5667,7 @@ func (x *DataMessage_AdminDelete) String() string { func (*DataMessage_AdminDelete) ProtoMessage() {} func (x *DataMessage_AdminDelete) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[42] + mi := &file_signalpb_SignalService_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5680,7 +5680,7 @@ func (x *DataMessage_AdminDelete) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_AdminDelete.ProtoReflect.Descriptor instead. func (*DataMessage_AdminDelete) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 14} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 14} } func (x *DataMessage_AdminDelete) GetTargetAuthorAciBinary() []byte { @@ -5709,7 +5709,7 @@ type DataMessage_Payment_Amount struct { func (x *DataMessage_Payment_Amount) Reset() { *x = DataMessage_Payment_Amount{} - mi := &file_SignalService_proto_msgTypes[43] + mi := &file_signalpb_SignalService_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5721,7 +5721,7 @@ func (x *DataMessage_Payment_Amount) String() string { func (*DataMessage_Payment_Amount) ProtoMessage() {} func (x *DataMessage_Payment_Amount) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[43] + mi := &file_signalpb_SignalService_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5734,7 +5734,7 @@ func (x *DataMessage_Payment_Amount) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Payment_Amount.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Amount) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 0} } func (x *DataMessage_Payment_Amount) GetAmount() isDataMessage_Payment_Amount_Amount { @@ -5777,7 +5777,7 @@ type DataMessage_Payment_Notification struct { func (x *DataMessage_Payment_Notification) Reset() { *x = DataMessage_Payment_Notification{} - mi := &file_SignalService_proto_msgTypes[44] + mi := &file_signalpb_SignalService_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5789,7 +5789,7 @@ func (x *DataMessage_Payment_Notification) String() string { func (*DataMessage_Payment_Notification) ProtoMessage() {} func (x *DataMessage_Payment_Notification) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[44] + mi := &file_signalpb_SignalService_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5802,7 +5802,7 @@ func (x *DataMessage_Payment_Notification) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Payment_Notification.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Notification) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 1} } func (x *DataMessage_Payment_Notification) GetTransaction() isDataMessage_Payment_Notification_Transaction { @@ -5848,7 +5848,7 @@ type DataMessage_Payment_Activation struct { func (x *DataMessage_Payment_Activation) Reset() { *x = DataMessage_Payment_Activation{} - mi := &file_SignalService_proto_msgTypes[45] + mi := &file_signalpb_SignalService_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5860,7 +5860,7 @@ func (x *DataMessage_Payment_Activation) String() string { func (*DataMessage_Payment_Activation) ProtoMessage() {} func (x *DataMessage_Payment_Activation) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[45] + mi := &file_signalpb_SignalService_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5873,7 +5873,7 @@ func (x *DataMessage_Payment_Activation) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Payment_Activation.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Activation) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 2} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 2} } func (x *DataMessage_Payment_Activation) GetType() DataMessage_Payment_Activation_Type { @@ -5892,7 +5892,7 @@ type DataMessage_Payment_Amount_MobileCoin struct { func (x *DataMessage_Payment_Amount_MobileCoin) Reset() { *x = DataMessage_Payment_Amount_MobileCoin{} - mi := &file_SignalService_proto_msgTypes[46] + mi := &file_signalpb_SignalService_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5904,7 +5904,7 @@ func (x *DataMessage_Payment_Amount_MobileCoin) String() string { func (*DataMessage_Payment_Amount_MobileCoin) ProtoMessage() {} func (x *DataMessage_Payment_Amount_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[46] + mi := &file_signalpb_SignalService_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5917,7 +5917,7 @@ func (x *DataMessage_Payment_Amount_MobileCoin) ProtoReflect() protoreflect.Mess // Deprecated: Use DataMessage_Payment_Amount_MobileCoin.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Amount_MobileCoin) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 0, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 0, 0} } func (x *DataMessage_Payment_Amount_MobileCoin) GetPicoMob() uint64 { @@ -5936,7 +5936,7 @@ type DataMessage_Payment_Notification_MobileCoin struct { func (x *DataMessage_Payment_Notification_MobileCoin) Reset() { *x = DataMessage_Payment_Notification_MobileCoin{} - mi := &file_SignalService_proto_msgTypes[47] + mi := &file_signalpb_SignalService_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5948,7 +5948,7 @@ func (x *DataMessage_Payment_Notification_MobileCoin) String() string { func (*DataMessage_Payment_Notification_MobileCoin) ProtoMessage() {} func (x *DataMessage_Payment_Notification_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[47] + mi := &file_signalpb_SignalService_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5961,7 +5961,7 @@ func (x *DataMessage_Payment_Notification_MobileCoin) ProtoReflect() protoreflec // Deprecated: Use DataMessage_Payment_Notification_MobileCoin.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Notification_MobileCoin) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 1, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 1, 0} } func (x *DataMessage_Payment_Notification_MobileCoin) GetReceipt() []byte { @@ -5982,7 +5982,7 @@ type DataMessage_Quote_QuotedAttachment struct { func (x *DataMessage_Quote_QuotedAttachment) Reset() { *x = DataMessage_Quote_QuotedAttachment{} - mi := &file_SignalService_proto_msgTypes[48] + mi := &file_signalpb_SignalService_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5994,7 +5994,7 @@ func (x *DataMessage_Quote_QuotedAttachment) String() string { func (*DataMessage_Quote_QuotedAttachment) ProtoMessage() {} func (x *DataMessage_Quote_QuotedAttachment) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[48] + mi := &file_signalpb_SignalService_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6007,7 +6007,7 @@ func (x *DataMessage_Quote_QuotedAttachment) ProtoReflect() protoreflect.Message // Deprecated: Use DataMessage_Quote_QuotedAttachment.ProtoReflect.Descriptor instead. func (*DataMessage_Quote_QuotedAttachment) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 1, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 1, 0} } func (x *DataMessage_Quote_QuotedAttachment) GetContentType() string { @@ -6045,7 +6045,7 @@ type DataMessage_Contact_Name struct { func (x *DataMessage_Contact_Name) Reset() { *x = DataMessage_Contact_Name{} - mi := &file_SignalService_proto_msgTypes[49] + mi := &file_signalpb_SignalService_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6057,7 +6057,7 @@ func (x *DataMessage_Contact_Name) String() string { func (*DataMessage_Contact_Name) ProtoMessage() {} func (x *DataMessage_Contact_Name) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[49] + mi := &file_signalpb_SignalService_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6070,7 +6070,7 @@ func (x *DataMessage_Contact_Name) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact_Name.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_Name) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 0} } func (x *DataMessage_Contact_Name) GetGivenName() string { @@ -6126,7 +6126,7 @@ type DataMessage_Contact_Phone struct { func (x *DataMessage_Contact_Phone) Reset() { *x = DataMessage_Contact_Phone{} - mi := &file_SignalService_proto_msgTypes[50] + mi := &file_signalpb_SignalService_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6138,7 +6138,7 @@ func (x *DataMessage_Contact_Phone) String() string { func (*DataMessage_Contact_Phone) ProtoMessage() {} func (x *DataMessage_Contact_Phone) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[50] + mi := &file_signalpb_SignalService_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6151,7 +6151,7 @@ func (x *DataMessage_Contact_Phone) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact_Phone.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_Phone) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 1} } func (x *DataMessage_Contact_Phone) GetValue() string { @@ -6186,7 +6186,7 @@ type DataMessage_Contact_Email struct { func (x *DataMessage_Contact_Email) Reset() { *x = DataMessage_Contact_Email{} - mi := &file_SignalService_proto_msgTypes[51] + mi := &file_signalpb_SignalService_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6198,7 +6198,7 @@ func (x *DataMessage_Contact_Email) String() string { func (*DataMessage_Contact_Email) ProtoMessage() {} func (x *DataMessage_Contact_Email) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[51] + mi := &file_signalpb_SignalService_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6211,7 +6211,7 @@ func (x *DataMessage_Contact_Email) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact_Email.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_Email) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 2} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 2} } func (x *DataMessage_Contact_Email) GetValue() string { @@ -6252,7 +6252,7 @@ type DataMessage_Contact_PostalAddress struct { func (x *DataMessage_Contact_PostalAddress) Reset() { *x = DataMessage_Contact_PostalAddress{} - mi := &file_SignalService_proto_msgTypes[52] + mi := &file_signalpb_SignalService_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6264,7 +6264,7 @@ func (x *DataMessage_Contact_PostalAddress) String() string { func (*DataMessage_Contact_PostalAddress) ProtoMessage() {} func (x *DataMessage_Contact_PostalAddress) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[52] + mi := &file_signalpb_SignalService_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6277,7 +6277,7 @@ func (x *DataMessage_Contact_PostalAddress) ProtoReflect() protoreflect.Message // Deprecated: Use DataMessage_Contact_PostalAddress.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_PostalAddress) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 3} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 3} } func (x *DataMessage_Contact_PostalAddress) GetType() DataMessage_Contact_PostalAddress_Type { @@ -6353,7 +6353,7 @@ type DataMessage_Contact_Avatar struct { func (x *DataMessage_Contact_Avatar) Reset() { *x = DataMessage_Contact_Avatar{} - mi := &file_SignalService_proto_msgTypes[53] + mi := &file_signalpb_SignalService_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6365,7 +6365,7 @@ func (x *DataMessage_Contact_Avatar) String() string { func (*DataMessage_Contact_Avatar) ProtoMessage() {} func (x *DataMessage_Contact_Avatar) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[53] + mi := &file_signalpb_SignalService_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6378,7 +6378,7 @@ func (x *DataMessage_Contact_Avatar) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact_Avatar.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_Avatar) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 4} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 4} } func (x *DataMessage_Contact_Avatar) GetAvatar() *AttachmentPointer { @@ -6408,7 +6408,7 @@ type TextAttachment_Gradient struct { func (x *TextAttachment_Gradient) Reset() { *x = TextAttachment_Gradient{} - mi := &file_SignalService_proto_msgTypes[54] + mi := &file_signalpb_SignalService_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6420,7 +6420,7 @@ func (x *TextAttachment_Gradient) String() string { func (*TextAttachment_Gradient) ProtoMessage() {} func (x *TextAttachment_Gradient) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[54] + mi := &file_signalpb_SignalService_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6433,7 +6433,7 @@ func (x *TextAttachment_Gradient) ProtoReflect() protoreflect.Message { // Deprecated: Use TextAttachment_Gradient.ProtoReflect.Descriptor instead. func (*TextAttachment_Gradient) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{9, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{9, 0} } func (x *TextAttachment_Gradient) GetStartColor() uint32 { @@ -6495,7 +6495,7 @@ const ( func (x *SyncMessage_Sent) Reset() { *x = SyncMessage_Sent{} - mi := &file_SignalService_proto_msgTypes[55] + mi := &file_signalpb_SignalService_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6507,7 +6507,7 @@ func (x *SyncMessage_Sent) String() string { func (*SyncMessage_Sent) ProtoMessage() {} func (x *SyncMessage_Sent) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[55] + mi := &file_signalpb_SignalService_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6520,7 +6520,7 @@ func (x *SyncMessage_Sent) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Sent.ProtoReflect.Descriptor instead. func (*SyncMessage_Sent) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 0} } func (x *SyncMessage_Sent) GetDestinationE164() string { @@ -6615,7 +6615,7 @@ const ( func (x *SyncMessage_Contacts) Reset() { *x = SyncMessage_Contacts{} - mi := &file_SignalService_proto_msgTypes[56] + mi := &file_signalpb_SignalService_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6627,7 +6627,7 @@ func (x *SyncMessage_Contacts) String() string { func (*SyncMessage_Contacts) ProtoMessage() {} func (x *SyncMessage_Contacts) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[56] + mi := &file_signalpb_SignalService_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6640,7 +6640,7 @@ func (x *SyncMessage_Contacts) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Contacts.ProtoReflect.Descriptor instead. func (*SyncMessage_Contacts) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 1} } func (x *SyncMessage_Contacts) GetBlob() *AttachmentPointer { @@ -6658,18 +6658,21 @@ func (x *SyncMessage_Contacts) GetComplete() bool { } type SyncMessage_Blocked struct { - state protoimpl.MessageState `protogen:"open.v1"` - Numbers []string `protobuf:"bytes,1,rep,name=numbers" json:"numbers,omitempty"` - Acis []string `protobuf:"bytes,3,rep,name=acis" json:"acis,omitempty"` - GroupIds [][]byte `protobuf:"bytes,2,rep,name=groupIds" json:"groupIds,omitempty"` - AcisBinary [][]byte `protobuf:"bytes,4,rep,name=acisBinary" json:"acisBinary,omitempty"` // 16-byte UUID + state protoimpl.MessageState `protogen:"open.v1"` + Numbers []string `protobuf:"bytes,1,rep,name=numbers" json:"numbers,omitempty"` // deprecated: this field will be removed in a future release. + Acis []string `protobuf:"bytes,3,rep,name=acis" json:"acis,omitempty"` + GroupIds [][]byte `protobuf:"bytes,2,rep,name=groupIds" json:"groupIds,omitempty"` // deprecated: this field will be removed in a future release. + AcisBinary [][]byte `protobuf:"bytes,4,rep,name=acisBinary" json:"acisBinary,omitempty"` // deprecated: this field will be removed in a future release. + BlockedE164S []*SyncMessage_Blocked_BlockedE164 `protobuf:"bytes,5,rep,name=blockedE164s" json:"blockedE164s,omitempty"` + BlockedAcis []*SyncMessage_Blocked_BlockedAci `protobuf:"bytes,6,rep,name=blockedAcis" json:"blockedAcis,omitempty"` + BlockedGroups []*SyncMessage_Blocked_BlockedGroup `protobuf:"bytes,7,rep,name=blockedGroups" json:"blockedGroups,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SyncMessage_Blocked) Reset() { *x = SyncMessage_Blocked{} - mi := &file_SignalService_proto_msgTypes[57] + mi := &file_signalpb_SignalService_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6681,7 +6684,7 @@ func (x *SyncMessage_Blocked) String() string { func (*SyncMessage_Blocked) ProtoMessage() {} func (x *SyncMessage_Blocked) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[57] + mi := &file_signalpb_SignalService_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6694,7 +6697,7 @@ func (x *SyncMessage_Blocked) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Blocked.ProtoReflect.Descriptor instead. func (*SyncMessage_Blocked) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 2} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 2} } func (x *SyncMessage_Blocked) GetNumbers() []string { @@ -6725,6 +6728,27 @@ func (x *SyncMessage_Blocked) GetAcisBinary() [][]byte { return nil } +func (x *SyncMessage_Blocked) GetBlockedE164S() []*SyncMessage_Blocked_BlockedE164 { + if x != nil { + return x.BlockedE164S + } + return nil +} + +func (x *SyncMessage_Blocked) GetBlockedAcis() []*SyncMessage_Blocked_BlockedAci { + if x != nil { + return x.BlockedAcis + } + return nil +} + +func (x *SyncMessage_Blocked) GetBlockedGroups() []*SyncMessage_Blocked_BlockedGroup { + if x != nil { + return x.BlockedGroups + } + return nil +} + type SyncMessage_Request struct { state protoimpl.MessageState `protogen:"open.v1"` Type *SyncMessage_Request_Type `protobuf:"varint,1,opt,name=type,enum=signalservice.SyncMessage_Request_Type" json:"type,omitempty"` @@ -6734,7 +6758,7 @@ type SyncMessage_Request struct { func (x *SyncMessage_Request) Reset() { *x = SyncMessage_Request{} - mi := &file_SignalService_proto_msgTypes[58] + mi := &file_signalpb_SignalService_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6746,7 +6770,7 @@ func (x *SyncMessage_Request) String() string { func (*SyncMessage_Request) ProtoMessage() {} func (x *SyncMessage_Request) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[58] + mi := &file_signalpb_SignalService_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6759,7 +6783,7 @@ func (x *SyncMessage_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Request.ProtoReflect.Descriptor instead. func (*SyncMessage_Request) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 3} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 3} } func (x *SyncMessage_Request) GetType() SyncMessage_Request_Type { @@ -6780,7 +6804,7 @@ type SyncMessage_Read struct { func (x *SyncMessage_Read) Reset() { *x = SyncMessage_Read{} - mi := &file_SignalService_proto_msgTypes[59] + mi := &file_signalpb_SignalService_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6792,7 +6816,7 @@ func (x *SyncMessage_Read) String() string { func (*SyncMessage_Read) ProtoMessage() {} func (x *SyncMessage_Read) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[59] + mi := &file_signalpb_SignalService_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6805,7 +6829,7 @@ func (x *SyncMessage_Read) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Read.ProtoReflect.Descriptor instead. func (*SyncMessage_Read) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 4} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 4} } func (x *SyncMessage_Read) GetSenderAci() string { @@ -6840,7 +6864,7 @@ type SyncMessage_Viewed struct { func (x *SyncMessage_Viewed) Reset() { *x = SyncMessage_Viewed{} - mi := &file_SignalService_proto_msgTypes[60] + mi := &file_signalpb_SignalService_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6852,7 +6876,7 @@ func (x *SyncMessage_Viewed) String() string { func (*SyncMessage_Viewed) ProtoMessage() {} func (x *SyncMessage_Viewed) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[60] + mi := &file_signalpb_SignalService_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6865,7 +6889,7 @@ func (x *SyncMessage_Viewed) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Viewed.ProtoReflect.Descriptor instead. func (*SyncMessage_Viewed) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 5} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 5} } func (x *SyncMessage_Viewed) GetSenderAci() string { @@ -6901,7 +6925,7 @@ type SyncMessage_Configuration struct { func (x *SyncMessage_Configuration) Reset() { *x = SyncMessage_Configuration{} - mi := &file_SignalService_proto_msgTypes[61] + mi := &file_signalpb_SignalService_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6913,7 +6937,7 @@ func (x *SyncMessage_Configuration) String() string { func (*SyncMessage_Configuration) ProtoMessage() {} func (x *SyncMessage_Configuration) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[61] + mi := &file_signalpb_SignalService_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6926,7 +6950,7 @@ func (x *SyncMessage_Configuration) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Configuration.ProtoReflect.Descriptor instead. func (*SyncMessage_Configuration) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 6} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 6} } func (x *SyncMessage_Configuration) GetReadReceipts() bool { @@ -6968,7 +6992,7 @@ type SyncMessage_StickerPackOperation struct { func (x *SyncMessage_StickerPackOperation) Reset() { *x = SyncMessage_StickerPackOperation{} - mi := &file_SignalService_proto_msgTypes[62] + mi := &file_signalpb_SignalService_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6980,7 +7004,7 @@ func (x *SyncMessage_StickerPackOperation) String() string { func (*SyncMessage_StickerPackOperation) ProtoMessage() {} func (x *SyncMessage_StickerPackOperation) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[62] + mi := &file_signalpb_SignalService_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6993,7 +7017,7 @@ func (x *SyncMessage_StickerPackOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_StickerPackOperation.ProtoReflect.Descriptor instead. func (*SyncMessage_StickerPackOperation) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 7} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 7} } func (x *SyncMessage_StickerPackOperation) GetPackId() []byte { @@ -7028,7 +7052,7 @@ type SyncMessage_ViewOnceOpen struct { func (x *SyncMessage_ViewOnceOpen) Reset() { *x = SyncMessage_ViewOnceOpen{} - mi := &file_SignalService_proto_msgTypes[63] + mi := &file_signalpb_SignalService_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7040,7 +7064,7 @@ func (x *SyncMessage_ViewOnceOpen) String() string { func (*SyncMessage_ViewOnceOpen) ProtoMessage() {} func (x *SyncMessage_ViewOnceOpen) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[63] + mi := &file_signalpb_SignalService_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7053,7 +7077,7 @@ func (x *SyncMessage_ViewOnceOpen) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_ViewOnceOpen.ProtoReflect.Descriptor instead. func (*SyncMessage_ViewOnceOpen) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 8} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 8} } func (x *SyncMessage_ViewOnceOpen) GetSenderAci() string { @@ -7086,7 +7110,7 @@ type SyncMessage_FetchLatest struct { func (x *SyncMessage_FetchLatest) Reset() { *x = SyncMessage_FetchLatest{} - mi := &file_SignalService_proto_msgTypes[64] + mi := &file_signalpb_SignalService_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7098,7 +7122,7 @@ func (x *SyncMessage_FetchLatest) String() string { func (*SyncMessage_FetchLatest) ProtoMessage() {} func (x *SyncMessage_FetchLatest) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[64] + mi := &file_signalpb_SignalService_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7111,7 +7135,7 @@ func (x *SyncMessage_FetchLatest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_FetchLatest.ProtoReflect.Descriptor instead. func (*SyncMessage_FetchLatest) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 9} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 9} } func (x *SyncMessage_FetchLatest) GetType() SyncMessage_FetchLatest_Type { @@ -7131,7 +7155,7 @@ type SyncMessage_Keys struct { func (x *SyncMessage_Keys) Reset() { *x = SyncMessage_Keys{} - mi := &file_SignalService_proto_msgTypes[65] + mi := &file_signalpb_SignalService_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7143,7 +7167,7 @@ func (x *SyncMessage_Keys) String() string { func (*SyncMessage_Keys) ProtoMessage() {} func (x *SyncMessage_Keys) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[65] + mi := &file_signalpb_SignalService_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7156,7 +7180,7 @@ func (x *SyncMessage_Keys) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Keys.ProtoReflect.Descriptor instead. func (*SyncMessage_Keys) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 10} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 10} } func (x *SyncMessage_Keys) GetAccountEntropyPool() string { @@ -7183,7 +7207,7 @@ type SyncMessage_PniIdentity struct { func (x *SyncMessage_PniIdentity) Reset() { *x = SyncMessage_PniIdentity{} - mi := &file_SignalService_proto_msgTypes[66] + mi := &file_signalpb_SignalService_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7195,7 +7219,7 @@ func (x *SyncMessage_PniIdentity) String() string { func (*SyncMessage_PniIdentity) ProtoMessage() {} func (x *SyncMessage_PniIdentity) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[66] + mi := &file_signalpb_SignalService_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7208,7 +7232,7 @@ func (x *SyncMessage_PniIdentity) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_PniIdentity.ProtoReflect.Descriptor instead. func (*SyncMessage_PniIdentity) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 11} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 11} } func (x *SyncMessage_PniIdentity) GetPublicKey() []byte { @@ -7237,7 +7261,7 @@ type SyncMessage_MessageRequestResponse struct { func (x *SyncMessage_MessageRequestResponse) Reset() { *x = SyncMessage_MessageRequestResponse{} - mi := &file_SignalService_proto_msgTypes[67] + mi := &file_signalpb_SignalService_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7249,7 +7273,7 @@ func (x *SyncMessage_MessageRequestResponse) String() string { func (*SyncMessage_MessageRequestResponse) ProtoMessage() {} func (x *SyncMessage_MessageRequestResponse) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[67] + mi := &file_signalpb_SignalService_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7262,7 +7286,7 @@ func (x *SyncMessage_MessageRequestResponse) ProtoReflect() protoreflect.Message // Deprecated: Use SyncMessage_MessageRequestResponse.ProtoReflect.Descriptor instead. func (*SyncMessage_MessageRequestResponse) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 12} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 12} } func (x *SyncMessage_MessageRequestResponse) GetThreadAci() string { @@ -7307,7 +7331,7 @@ type SyncMessage_OutgoingPayment struct { func (x *SyncMessage_OutgoingPayment) Reset() { *x = SyncMessage_OutgoingPayment{} - mi := &file_SignalService_proto_msgTypes[68] + mi := &file_signalpb_SignalService_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7319,7 +7343,7 @@ func (x *SyncMessage_OutgoingPayment) String() string { func (*SyncMessage_OutgoingPayment) ProtoMessage() {} func (x *SyncMessage_OutgoingPayment) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[68] + mi := &file_signalpb_SignalService_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7332,7 +7356,7 @@ func (x *SyncMessage_OutgoingPayment) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_OutgoingPayment.ProtoReflect.Descriptor instead. func (*SyncMessage_OutgoingPayment) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 13} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 13} } func (x *SyncMessage_OutgoingPayment) GetRecipientServiceId() string { @@ -7389,7 +7413,7 @@ type SyncMessage_PniChangeNumber struct { func (x *SyncMessage_PniChangeNumber) Reset() { *x = SyncMessage_PniChangeNumber{} - mi := &file_SignalService_proto_msgTypes[69] + mi := &file_signalpb_SignalService_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7401,7 +7425,7 @@ func (x *SyncMessage_PniChangeNumber) String() string { func (*SyncMessage_PniChangeNumber) ProtoMessage() {} func (x *SyncMessage_PniChangeNumber) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[69] + mi := &file_signalpb_SignalService_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7414,7 +7438,7 @@ func (x *SyncMessage_PniChangeNumber) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_PniChangeNumber.ProtoReflect.Descriptor instead. func (*SyncMessage_PniChangeNumber) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 14} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 14} } func (x *SyncMessage_PniChangeNumber) GetIdentityKeyPair() []byte { @@ -7471,7 +7495,7 @@ type SyncMessage_CallEvent struct { func (x *SyncMessage_CallEvent) Reset() { *x = SyncMessage_CallEvent{} - mi := &file_SignalService_proto_msgTypes[70] + mi := &file_signalpb_SignalService_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7483,7 +7507,7 @@ func (x *SyncMessage_CallEvent) String() string { func (*SyncMessage_CallEvent) ProtoMessage() {} func (x *SyncMessage_CallEvent) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[70] + mi := &file_signalpb_SignalService_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7496,7 +7520,7 @@ func (x *SyncMessage_CallEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_CallEvent.ProtoReflect.Descriptor instead. func (*SyncMessage_CallEvent) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 15} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 15} } func (x *SyncMessage_CallEvent) GetConversationId() []byte { @@ -7552,7 +7576,7 @@ type SyncMessage_CallLinkUpdate struct { func (x *SyncMessage_CallLinkUpdate) Reset() { *x = SyncMessage_CallLinkUpdate{} - mi := &file_SignalService_proto_msgTypes[71] + mi := &file_signalpb_SignalService_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7564,7 +7588,7 @@ func (x *SyncMessage_CallLinkUpdate) String() string { func (*SyncMessage_CallLinkUpdate) ProtoMessage() {} func (x *SyncMessage_CallLinkUpdate) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[71] + mi := &file_signalpb_SignalService_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7577,7 +7601,7 @@ func (x *SyncMessage_CallLinkUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_CallLinkUpdate.ProtoReflect.Descriptor instead. func (*SyncMessage_CallLinkUpdate) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 16} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 16} } func (x *SyncMessage_CallLinkUpdate) GetRootKey() []byte { @@ -7618,7 +7642,7 @@ type SyncMessage_CallLogEvent struct { func (x *SyncMessage_CallLogEvent) Reset() { *x = SyncMessage_CallLogEvent{} - mi := &file_SignalService_proto_msgTypes[72] + mi := &file_signalpb_SignalService_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7630,7 +7654,7 @@ func (x *SyncMessage_CallLogEvent) String() string { func (*SyncMessage_CallLogEvent) ProtoMessage() {} func (x *SyncMessage_CallLogEvent) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[72] + mi := &file_signalpb_SignalService_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7643,7 +7667,7 @@ func (x *SyncMessage_CallLogEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_CallLogEvent.ProtoReflect.Descriptor instead. func (*SyncMessage_CallLogEvent) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 17} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 17} } func (x *SyncMessage_CallLogEvent) GetType() SyncMessage_CallLogEvent_Type { @@ -7686,7 +7710,7 @@ type SyncMessage_DeleteForMe struct { func (x *SyncMessage_DeleteForMe) Reset() { *x = SyncMessage_DeleteForMe{} - mi := &file_SignalService_proto_msgTypes[73] + mi := &file_signalpb_SignalService_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7698,7 +7722,7 @@ func (x *SyncMessage_DeleteForMe) String() string { func (*SyncMessage_DeleteForMe) ProtoMessage() {} func (x *SyncMessage_DeleteForMe) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[73] + mi := &file_signalpb_SignalService_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7711,7 +7735,7 @@ func (x *SyncMessage_DeleteForMe) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_DeleteForMe.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 18} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18} } func (x *SyncMessage_DeleteForMe) GetMessageDeletes() []*SyncMessage_DeleteForMe_MessageDeletes { @@ -7751,7 +7775,7 @@ type SyncMessage_DeviceNameChange struct { func (x *SyncMessage_DeviceNameChange) Reset() { *x = SyncMessage_DeviceNameChange{} - mi := &file_SignalService_proto_msgTypes[74] + mi := &file_signalpb_SignalService_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7763,7 +7787,7 @@ func (x *SyncMessage_DeviceNameChange) String() string { func (*SyncMessage_DeviceNameChange) ProtoMessage() {} func (x *SyncMessage_DeviceNameChange) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[74] + mi := &file_signalpb_SignalService_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7776,7 +7800,7 @@ func (x *SyncMessage_DeviceNameChange) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_DeviceNameChange.ProtoReflect.Descriptor instead. func (*SyncMessage_DeviceNameChange) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 19} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 19} } func (x *SyncMessage_DeviceNameChange) GetDeviceId() uint32 { @@ -7796,7 +7820,7 @@ type SyncMessage_AttachmentBackfillRequest struct { func (x *SyncMessage_AttachmentBackfillRequest) Reset() { *x = SyncMessage_AttachmentBackfillRequest{} - mi := &file_SignalService_proto_msgTypes[75] + mi := &file_signalpb_SignalService_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7808,7 +7832,7 @@ func (x *SyncMessage_AttachmentBackfillRequest) String() string { func (*SyncMessage_AttachmentBackfillRequest) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillRequest) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[75] + mi := &file_signalpb_SignalService_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7821,7 +7845,7 @@ func (x *SyncMessage_AttachmentBackfillRequest) ProtoReflect() protoreflect.Mess // Deprecated: Use SyncMessage_AttachmentBackfillRequest.ProtoReflect.Descriptor instead. func (*SyncMessage_AttachmentBackfillRequest) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 20} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 20} } func (x *SyncMessage_AttachmentBackfillRequest) GetTargetMessage() *AddressableMessage { @@ -7853,7 +7877,7 @@ type SyncMessage_AttachmentBackfillResponse struct { func (x *SyncMessage_AttachmentBackfillResponse) Reset() { *x = SyncMessage_AttachmentBackfillResponse{} - mi := &file_SignalService_proto_msgTypes[76] + mi := &file_signalpb_SignalService_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7865,7 +7889,7 @@ func (x *SyncMessage_AttachmentBackfillResponse) String() string { func (*SyncMessage_AttachmentBackfillResponse) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[76] + mi := &file_signalpb_SignalService_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7878,7 +7902,7 @@ func (x *SyncMessage_AttachmentBackfillResponse) ProtoReflect() protoreflect.Mes // Deprecated: Use SyncMessage_AttachmentBackfillResponse.ProtoReflect.Descriptor instead. func (*SyncMessage_AttachmentBackfillResponse) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 21} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21} } func (x *SyncMessage_AttachmentBackfillResponse) GetTargetMessage() *AddressableMessage { @@ -7946,7 +7970,7 @@ type SyncMessage_UsernameChange struct { func (x *SyncMessage_UsernameChange) Reset() { *x = SyncMessage_UsernameChange{} - mi := &file_SignalService_proto_msgTypes[77] + mi := &file_signalpb_SignalService_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7958,7 +7982,7 @@ func (x *SyncMessage_UsernameChange) String() string { func (*SyncMessage_UsernameChange) ProtoMessage() {} func (x *SyncMessage_UsernameChange) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[77] + mi := &file_signalpb_SignalService_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7971,7 +7995,7 @@ func (x *SyncMessage_UsernameChange) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_UsernameChange.ProtoReflect.Descriptor instead. func (*SyncMessage_UsernameChange) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 22} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 22} } type SyncMessage_Sent_UnidentifiedDeliveryStatus struct { @@ -7986,7 +8010,7 @@ type SyncMessage_Sent_UnidentifiedDeliveryStatus struct { func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) Reset() { *x = SyncMessage_Sent_UnidentifiedDeliveryStatus{} - mi := &file_SignalService_proto_msgTypes[78] + mi := &file_signalpb_SignalService_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7998,7 +8022,7 @@ func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) String() string { func (*SyncMessage_Sent_UnidentifiedDeliveryStatus) ProtoMessage() {} func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[78] + mi := &file_signalpb_SignalService_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8011,7 +8035,7 @@ func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) ProtoReflect() protoreflec // Deprecated: Use SyncMessage_Sent_UnidentifiedDeliveryStatus.ProtoReflect.Descriptor instead. func (*SyncMessage_Sent_UnidentifiedDeliveryStatus) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 0, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 0, 0} } func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) GetDestinationServiceId() string { @@ -8054,7 +8078,7 @@ type SyncMessage_Sent_StoryMessageRecipient struct { func (x *SyncMessage_Sent_StoryMessageRecipient) Reset() { *x = SyncMessage_Sent_StoryMessageRecipient{} - mi := &file_SignalService_proto_msgTypes[79] + mi := &file_signalpb_SignalService_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8066,7 +8090,7 @@ func (x *SyncMessage_Sent_StoryMessageRecipient) String() string { func (*SyncMessage_Sent_StoryMessageRecipient) ProtoMessage() {} func (x *SyncMessage_Sent_StoryMessageRecipient) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[79] + mi := &file_signalpb_SignalService_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8079,7 +8103,7 @@ func (x *SyncMessage_Sent_StoryMessageRecipient) ProtoReflect() protoreflect.Mes // Deprecated: Use SyncMessage_Sent_StoryMessageRecipient.ProtoReflect.Descriptor instead. func (*SyncMessage_Sent_StoryMessageRecipient) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 0, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 0, 1} } func (x *SyncMessage_Sent_StoryMessageRecipient) GetDestinationServiceId() string { @@ -8110,6 +8134,162 @@ func (x *SyncMessage_Sent_StoryMessageRecipient) GetDestinationServiceIdBinary() return nil } +type SyncMessage_Blocked_BlockedE164 struct { + state protoimpl.MessageState `protogen:"open.v1"` + E164 *string `protobuf:"bytes,1,opt,name=e164" json:"e164,omitempty"` + Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncMessage_Blocked_BlockedE164) Reset() { + *x = SyncMessage_Blocked_BlockedE164{} + mi := &file_signalpb_SignalService_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncMessage_Blocked_BlockedE164) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncMessage_Blocked_BlockedE164) ProtoMessage() {} + +func (x *SyncMessage_Blocked_BlockedE164) ProtoReflect() protoreflect.Message { + mi := &file_signalpb_SignalService_proto_msgTypes[80] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncMessage_Blocked_BlockedE164.ProtoReflect.Descriptor instead. +func (*SyncMessage_Blocked_BlockedE164) Descriptor() ([]byte, []int) { + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 2, 0} +} + +func (x *SyncMessage_Blocked_BlockedE164) GetE164() string { + if x != nil && x.E164 != nil { + return *x.E164 + } + return "" +} + +func (x *SyncMessage_Blocked_BlockedE164) GetTimestamp() uint64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp + } + return 0 +} + +type SyncMessage_Blocked_BlockedAci struct { + state protoimpl.MessageState `protogen:"open.v1"` + AciBinary []byte `protobuf:"bytes,1,opt,name=aciBinary" json:"aciBinary,omitempty"` // 16-byte UUID + Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncMessage_Blocked_BlockedAci) Reset() { + *x = SyncMessage_Blocked_BlockedAci{} + mi := &file_signalpb_SignalService_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncMessage_Blocked_BlockedAci) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncMessage_Blocked_BlockedAci) ProtoMessage() {} + +func (x *SyncMessage_Blocked_BlockedAci) ProtoReflect() protoreflect.Message { + mi := &file_signalpb_SignalService_proto_msgTypes[81] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncMessage_Blocked_BlockedAci.ProtoReflect.Descriptor instead. +func (*SyncMessage_Blocked_BlockedAci) Descriptor() ([]byte, []int) { + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 2, 1} +} + +func (x *SyncMessage_Blocked_BlockedAci) GetAciBinary() []byte { + if x != nil { + return x.AciBinary + } + return nil +} + +func (x *SyncMessage_Blocked_BlockedAci) GetTimestamp() uint64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp + } + return 0 +} + +type SyncMessage_Blocked_BlockedGroup struct { + state protoimpl.MessageState `protogen:"open.v1"` + GroupId []byte `protobuf:"bytes,1,opt,name=groupId" json:"groupId,omitempty"` + Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncMessage_Blocked_BlockedGroup) Reset() { + *x = SyncMessage_Blocked_BlockedGroup{} + mi := &file_signalpb_SignalService_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncMessage_Blocked_BlockedGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncMessage_Blocked_BlockedGroup) ProtoMessage() {} + +func (x *SyncMessage_Blocked_BlockedGroup) ProtoReflect() protoreflect.Message { + mi := &file_signalpb_SignalService_proto_msgTypes[82] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncMessage_Blocked_BlockedGroup.ProtoReflect.Descriptor instead. +func (*SyncMessage_Blocked_BlockedGroup) Descriptor() ([]byte, []int) { + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 2, 2} +} + +func (x *SyncMessage_Blocked_BlockedGroup) GetGroupId() []byte { + if x != nil { + return x.GroupId + } + return nil +} + +func (x *SyncMessage_Blocked_BlockedGroup) GetTimestamp() uint64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp + } + return 0 +} + type SyncMessage_OutgoingPayment_MobileCoin struct { state protoimpl.MessageState `protogen:"open.v1"` RecipientAddress []byte `protobuf:"bytes,1,opt,name=recipientAddress" json:"recipientAddress,omitempty"` @@ -8126,7 +8306,7 @@ type SyncMessage_OutgoingPayment_MobileCoin struct { func (x *SyncMessage_OutgoingPayment_MobileCoin) Reset() { *x = SyncMessage_OutgoingPayment_MobileCoin{} - mi := &file_SignalService_proto_msgTypes[80] + mi := &file_signalpb_SignalService_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8138,7 +8318,7 @@ func (x *SyncMessage_OutgoingPayment_MobileCoin) String() string { func (*SyncMessage_OutgoingPayment_MobileCoin) ProtoMessage() {} func (x *SyncMessage_OutgoingPayment_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[80] + mi := &file_signalpb_SignalService_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8151,7 +8331,7 @@ func (x *SyncMessage_OutgoingPayment_MobileCoin) ProtoReflect() protoreflect.Mes // Deprecated: Use SyncMessage_OutgoingPayment_MobileCoin.ProtoReflect.Descriptor instead. func (*SyncMessage_OutgoingPayment_MobileCoin) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 13, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 13, 0} } func (x *SyncMessage_OutgoingPayment_MobileCoin) GetRecipientAddress() []byte { @@ -8220,7 +8400,7 @@ type SyncMessage_DeleteForMe_MessageDeletes struct { func (x *SyncMessage_DeleteForMe_MessageDeletes) Reset() { *x = SyncMessage_DeleteForMe_MessageDeletes{} - mi := &file_SignalService_proto_msgTypes[81] + mi := &file_signalpb_SignalService_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8232,7 +8412,7 @@ func (x *SyncMessage_DeleteForMe_MessageDeletes) String() string { func (*SyncMessage_DeleteForMe_MessageDeletes) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_MessageDeletes) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[81] + mi := &file_signalpb_SignalService_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8245,7 +8425,7 @@ func (x *SyncMessage_DeleteForMe_MessageDeletes) ProtoReflect() protoreflect.Mes // Deprecated: Use SyncMessage_DeleteForMe_MessageDeletes.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe_MessageDeletes) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 18, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18, 0} } func (x *SyncMessage_DeleteForMe_MessageDeletes) GetConversation() *ConversationIdentifier { @@ -8278,7 +8458,7 @@ type SyncMessage_DeleteForMe_AttachmentDelete struct { func (x *SyncMessage_DeleteForMe_AttachmentDelete) Reset() { *x = SyncMessage_DeleteForMe_AttachmentDelete{} - mi := &file_SignalService_proto_msgTypes[82] + mi := &file_signalpb_SignalService_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8290,7 +8470,7 @@ func (x *SyncMessage_DeleteForMe_AttachmentDelete) String() string { func (*SyncMessage_DeleteForMe_AttachmentDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_AttachmentDelete) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[82] + mi := &file_signalpb_SignalService_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8303,7 +8483,7 @@ func (x *SyncMessage_DeleteForMe_AttachmentDelete) ProtoReflect() protoreflect.M // Deprecated: Use SyncMessage_DeleteForMe_AttachmentDelete.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe_AttachmentDelete) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 18, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18, 1} } func (x *SyncMessage_DeleteForMe_AttachmentDelete) GetConversation() *ConversationIdentifier { @@ -8353,7 +8533,7 @@ type SyncMessage_DeleteForMe_ConversationDelete struct { func (x *SyncMessage_DeleteForMe_ConversationDelete) Reset() { *x = SyncMessage_DeleteForMe_ConversationDelete{} - mi := &file_SignalService_proto_msgTypes[83] + mi := &file_signalpb_SignalService_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8365,7 +8545,7 @@ func (x *SyncMessage_DeleteForMe_ConversationDelete) String() string { func (*SyncMessage_DeleteForMe_ConversationDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_ConversationDelete) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[83] + mi := &file_signalpb_SignalService_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8378,7 +8558,7 @@ func (x *SyncMessage_DeleteForMe_ConversationDelete) ProtoReflect() protoreflect // Deprecated: Use SyncMessage_DeleteForMe_ConversationDelete.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe_ConversationDelete) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 18, 2} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18, 2} } func (x *SyncMessage_DeleteForMe_ConversationDelete) GetConversation() *ConversationIdentifier { @@ -8418,7 +8598,7 @@ type SyncMessage_DeleteForMe_LocalOnlyConversationDelete struct { func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) Reset() { *x = SyncMessage_DeleteForMe_LocalOnlyConversationDelete{} - mi := &file_SignalService_proto_msgTypes[84] + mi := &file_signalpb_SignalService_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8430,7 +8610,7 @@ func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) String() string { func (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[84] + mi := &file_signalpb_SignalService_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8443,7 +8623,7 @@ func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) ProtoReflect() pro // Deprecated: Use SyncMessage_DeleteForMe_LocalOnlyConversationDelete.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 18, 3} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18, 3} } func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) GetConversation() *ConversationIdentifier { @@ -8466,7 +8646,7 @@ type SyncMessage_AttachmentBackfillResponse_AttachmentData struct { func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) Reset() { *x = SyncMessage_AttachmentBackfillResponse_AttachmentData{} - mi := &file_SignalService_proto_msgTypes[85] + mi := &file_signalpb_SignalService_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8478,7 +8658,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) String() string func (*SyncMessage_AttachmentBackfillResponse_AttachmentData) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[85] + mi := &file_signalpb_SignalService_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8491,7 +8671,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) ProtoReflect() p // Deprecated: Use SyncMessage_AttachmentBackfillResponse_AttachmentData.ProtoReflect.Descriptor instead. func (*SyncMessage_AttachmentBackfillResponse_AttachmentData) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 21, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21, 0} } func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) GetData() isSyncMessage_AttachmentBackfillResponse_AttachmentData_Data { @@ -8547,7 +8727,7 @@ type SyncMessage_AttachmentBackfillResponse_AttachmentDataList struct { func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) Reset() { *x = SyncMessage_AttachmentBackfillResponse_AttachmentDataList{} - mi := &file_SignalService_proto_msgTypes[86] + mi := &file_signalpb_SignalService_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8559,7 +8739,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) String() str func (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[86] + mi := &file_signalpb_SignalService_proto_msgTypes[89] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8572,7 +8752,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) ProtoReflect // Deprecated: Use SyncMessage_AttachmentBackfillResponse_AttachmentDataList.ProtoReflect.Descriptor instead. func (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{11, 21, 1} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21, 1} } func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) GetAttachments() []*SyncMessage_AttachmentBackfillResponse_AttachmentData { @@ -8599,7 +8779,7 @@ type ContactDetails_Avatar struct { func (x *ContactDetails_Avatar) Reset() { *x = ContactDetails_Avatar{} - mi := &file_SignalService_proto_msgTypes[87] + mi := &file_signalpb_SignalService_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8611,7 +8791,7 @@ func (x *ContactDetails_Avatar) String() string { func (*ContactDetails_Avatar) ProtoMessage() {} func (x *ContactDetails_Avatar) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[87] + mi := &file_signalpb_SignalService_proto_msgTypes[90] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8624,7 +8804,7 @@ func (x *ContactDetails_Avatar) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactDetails_Avatar.ProtoReflect.Descriptor instead. func (*ContactDetails_Avatar) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{14, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{14, 0} } func (x *ContactDetails_Avatar) GetContentType() string { @@ -8651,7 +8831,7 @@ type PaymentAddress_MobileCoin struct { func (x *PaymentAddress_MobileCoin) Reset() { *x = PaymentAddress_MobileCoin{} - mi := &file_SignalService_proto_msgTypes[88] + mi := &file_signalpb_SignalService_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8663,7 +8843,7 @@ func (x *PaymentAddress_MobileCoin) String() string { func (*PaymentAddress_MobileCoin) ProtoMessage() {} func (x *PaymentAddress_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_SignalService_proto_msgTypes[88] + mi := &file_signalpb_SignalService_proto_msgTypes[91] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8676,7 +8856,7 @@ func (x *PaymentAddress_MobileCoin) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentAddress_MobileCoin.ProtoReflect.Descriptor instead. func (*PaymentAddress_MobileCoin) Descriptor() ([]byte, []int) { - return file_SignalService_proto_rawDescGZIP(), []int{15, 0} + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{15, 0} } func (x *PaymentAddress_MobileCoin) GetPublicAddress() []byte { @@ -8693,11 +8873,11 @@ func (x *PaymentAddress_MobileCoin) GetSignature() []byte { return nil } -var File_SignalService_proto protoreflect.FileDescriptor +var File_signalpb_SignalService_proto protoreflect.FileDescriptor -const file_SignalService_proto_rawDesc = "" + +const file_signalpb_SignalService_proto_rawDesc = "" + "\n" + - "\x13SignalService.proto\x12\rsignalservice\"\x8c\a\n" + + "\x1csignalpb/SignalService.proto\x12\rsignalservice\"\x8c\a\n" + "\bEnvelope\x120\n" + "\x04type\x18\x01 \x01(\x0e2\x1c.signalservice.Envelope.TypeR\x04type\x12(\n" + "\x0fsourceServiceId\x18\v \x01(\tR\x0fsourceServiceId\x12&\n" + @@ -9063,7 +9243,7 @@ const file_SignalService_proto_rawDesc = "" + "\aDEFAULT\x10\x00\x12\f\n" + "\bVERIFIED\x10\x01\x12\x0e\n" + "\n" + - "UNVERIFIED\x10\x02J\x04\b\x01\x10\x02\"\xd8G\n" + + "UNVERIFIED\x10\x02J\x04\b\x01\x10\x02\"\xa8K\n" + "\vSyncMessage\x125\n" + "\x04sent\x18\x01 \x01(\v2\x1f.signalservice.SyncMessage.SentH\x00R\x04sent\x12A\n" + "\bcontacts\x18\x02 \x01(\v2#.signalservice.SyncMessage.ContactsH\x00R\bcontacts\x12>\n" + @@ -9115,14 +9295,27 @@ const file_SignalService_proto_rawDesc = "" + "\x1adestinationServiceIdBinary\x18\x05 \x01(\fR\x1adestinationServiceIdBinaryJ\x04\b\x04\x10\x05J\x04\b\v\x10\f\x1ac\n" + "\bContacts\x124\n" + "\x04blob\x18\x01 \x01(\v2 .signalservice.AttachmentPointerR\x04blob\x12!\n" + - "\bcomplete\x18\x02 \x01(\b:\x05falseR\bcomplete\x1as\n" + + "\bcomplete\x18\x02 \x01(\b:\x05falseR\bcomplete\x1a\xc2\x04\n" + "\aBlocked\x12\x18\n" + "\anumbers\x18\x01 \x03(\tR\anumbers\x12\x12\n" + "\x04acis\x18\x03 \x03(\tR\x04acis\x12\x1a\n" + "\bgroupIds\x18\x02 \x03(\fR\bgroupIds\x12\x1e\n" + "\n" + "acisBinary\x18\x04 \x03(\fR\n" + - "acisBinary\x1a\x9f\x01\n" + + "acisBinary\x12R\n" + + "\fblockedE164s\x18\x05 \x03(\v2..signalservice.SyncMessage.Blocked.BlockedE164R\fblockedE164s\x12O\n" + + "\vblockedAcis\x18\x06 \x03(\v2-.signalservice.SyncMessage.Blocked.BlockedAciR\vblockedAcis\x12U\n" + + "\rblockedGroups\x18\a \x03(\v2/.signalservice.SyncMessage.Blocked.BlockedGroupR\rblockedGroups\x1a?\n" + + "\vBlockedE164\x12\x12\n" + + "\x04e164\x18\x01 \x01(\tR\x04e164\x12\x1c\n" + + "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x1aH\n" + + "\n" + + "BlockedAci\x12\x1c\n" + + "\taciBinary\x18\x01 \x01(\fR\taciBinary\x12\x1c\n" + + "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x1aF\n" + + "\fBlockedGroup\x12\x18\n" + + "\agroupId\x18\x01 \x01(\fR\agroupId\x12\x1c\n" + + "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x1a\x9f\x01\n" + "\aRequest\x12;\n" + "\x04type\x18\x01 \x01(\x0e2'.signalservice.SyncMessage.Request.TypeR\x04type\"W\n" + "\x04Type\x12\v\n" + @@ -9409,20 +9602,20 @@ const file_SignalService_proto_rawDesc = "" + ".org.whispersystems.signalservice.internal.pushB\x13SignalServiceProtos" var ( - file_SignalService_proto_rawDescOnce sync.Once - file_SignalService_proto_rawDescData []byte + file_signalpb_SignalService_proto_rawDescOnce sync.Once + file_signalpb_SignalService_proto_rawDescData []byte ) -func file_SignalService_proto_rawDescGZIP() []byte { - file_SignalService_proto_rawDescOnce.Do(func() { - file_SignalService_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_SignalService_proto_rawDesc), len(file_SignalService_proto_rawDesc))) +func file_signalpb_SignalService_proto_rawDescGZIP() []byte { + file_signalpb_SignalService_proto_rawDescOnce.Do(func() { + file_signalpb_SignalService_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_SignalService_proto_rawDesc), len(file_signalpb_SignalService_proto_rawDesc))) }) - return file_SignalService_proto_rawDescData + return file_signalpb_SignalService_proto_rawDescData } -var file_SignalService_proto_enumTypes = make([]protoimpl.EnumInfo, 28) -var file_SignalService_proto_msgTypes = make([]protoimpl.MessageInfo, 89) -var file_SignalService_proto_goTypes = []any{ +var file_signalpb_SignalService_proto_enumTypes = make([]protoimpl.EnumInfo, 28) +var file_signalpb_SignalService_proto_msgTypes = make([]protoimpl.MessageInfo, 92) +var file_signalpb_SignalService_proto_goTypes = []any{ (Envelope_Type)(0), // 0: signalservice.Envelope.Type (CallMessage_Offer_Type)(0), // 1: signalservice.CallMessage.Offer.Type (CallMessage_Hangup_Type)(0), // 2: signalservice.CallMessage.Hangup.Type @@ -9531,17 +9724,20 @@ var file_SignalService_proto_goTypes = []any{ (*SyncMessage_UsernameChange)(nil), // 105: signalservice.SyncMessage.UsernameChange (*SyncMessage_Sent_UnidentifiedDeliveryStatus)(nil), // 106: signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus (*SyncMessage_Sent_StoryMessageRecipient)(nil), // 107: signalservice.SyncMessage.Sent.StoryMessageRecipient - (*SyncMessage_OutgoingPayment_MobileCoin)(nil), // 108: signalservice.SyncMessage.OutgoingPayment.MobileCoin - (*SyncMessage_DeleteForMe_MessageDeletes)(nil), // 109: signalservice.SyncMessage.DeleteForMe.MessageDeletes - (*SyncMessage_DeleteForMe_AttachmentDelete)(nil), // 110: signalservice.SyncMessage.DeleteForMe.AttachmentDelete - (*SyncMessage_DeleteForMe_ConversationDelete)(nil), // 111: signalservice.SyncMessage.DeleteForMe.ConversationDelete - (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete)(nil), // 112: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete - (*SyncMessage_AttachmentBackfillResponse_AttachmentData)(nil), // 113: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList)(nil), // 114: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList - (*ContactDetails_Avatar)(nil), // 115: signalservice.ContactDetails.Avatar - (*PaymentAddress_MobileCoin)(nil), // 116: signalservice.PaymentAddress.MobileCoin + (*SyncMessage_Blocked_BlockedE164)(nil), // 108: signalservice.SyncMessage.Blocked.BlockedE164 + (*SyncMessage_Blocked_BlockedAci)(nil), // 109: signalservice.SyncMessage.Blocked.BlockedAci + (*SyncMessage_Blocked_BlockedGroup)(nil), // 110: signalservice.SyncMessage.Blocked.BlockedGroup + (*SyncMessage_OutgoingPayment_MobileCoin)(nil), // 111: signalservice.SyncMessage.OutgoingPayment.MobileCoin + (*SyncMessage_DeleteForMe_MessageDeletes)(nil), // 112: signalservice.SyncMessage.DeleteForMe.MessageDeletes + (*SyncMessage_DeleteForMe_AttachmentDelete)(nil), // 113: signalservice.SyncMessage.DeleteForMe.AttachmentDelete + (*SyncMessage_DeleteForMe_ConversationDelete)(nil), // 114: signalservice.SyncMessage.DeleteForMe.ConversationDelete + (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete)(nil), // 115: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete + (*SyncMessage_AttachmentBackfillResponse_AttachmentData)(nil), // 116: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList)(nil), // 117: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList + (*ContactDetails_Avatar)(nil), // 118: signalservice.ContactDetails.Avatar + (*PaymentAddress_MobileCoin)(nil), // 119: signalservice.PaymentAddress.MobileCoin } -var file_SignalService_proto_depIdxs = []int32{ +var file_signalpb_SignalService_proto_depIdxs = []int32{ 0, // 0: signalservice.Envelope.type:type_name -> signalservice.Envelope.Type 31, // 1: signalservice.Content.dataMessage:type_name -> signalservice.DataMessage 39, // 2: signalservice.Content.syncMessage:type_name -> signalservice.SyncMessage @@ -9611,8 +9807,8 @@ var file_SignalService_proto_depIdxs = []int32{ 87, // 66: signalservice.SyncMessage.read:type_name -> signalservice.SyncMessage.Read 90, // 67: signalservice.SyncMessage.stickerPackOperation:type_name -> signalservice.SyncMessage.StickerPackOperation 88, // 68: signalservice.SyncMessage.viewed:type_name -> signalservice.SyncMessage.Viewed - 115, // 69: signalservice.ContactDetails.avatar:type_name -> signalservice.ContactDetails.Avatar - 116, // 70: signalservice.PaymentAddress.mobileCoin:type_name -> signalservice.PaymentAddress.MobileCoin + 118, // 69: signalservice.ContactDetails.avatar:type_name -> signalservice.ContactDetails.Avatar + 119, // 70: signalservice.PaymentAddress.mobileCoin:type_name -> signalservice.PaymentAddress.MobileCoin 31, // 71: signalservice.EditMessage.dataMessage:type_name -> signalservice.DataMessage 27, // 72: signalservice.BodyRange.style:type_name -> signalservice.BodyRange.Style 1, // 73: signalservice.CallMessage.Offer.type:type_name -> signalservice.CallMessage.Offer.Type @@ -9643,51 +9839,54 @@ var file_SignalService_proto_depIdxs = []int32{ 107, // 98: signalservice.SyncMessage.Sent.storyMessageRecipients:type_name -> signalservice.SyncMessage.Sent.StoryMessageRecipient 46, // 99: signalservice.SyncMessage.Sent.editMessage:type_name -> signalservice.EditMessage 40, // 100: signalservice.SyncMessage.Contacts.blob:type_name -> signalservice.AttachmentPointer - 15, // 101: signalservice.SyncMessage.Request.type:type_name -> signalservice.SyncMessage.Request.Type - 16, // 102: signalservice.SyncMessage.StickerPackOperation.type:type_name -> signalservice.SyncMessage.StickerPackOperation.Type - 17, // 103: signalservice.SyncMessage.FetchLatest.type:type_name -> signalservice.SyncMessage.FetchLatest.Type - 18, // 104: signalservice.SyncMessage.MessageRequestResponse.type:type_name -> signalservice.SyncMessage.MessageRequestResponse.Type - 108, // 105: signalservice.SyncMessage.OutgoingPayment.mobileCoin:type_name -> signalservice.SyncMessage.OutgoingPayment.MobileCoin - 19, // 106: signalservice.SyncMessage.CallEvent.type:type_name -> signalservice.SyncMessage.CallEvent.Type - 20, // 107: signalservice.SyncMessage.CallEvent.direction:type_name -> signalservice.SyncMessage.CallEvent.Direction - 21, // 108: signalservice.SyncMessage.CallEvent.event:type_name -> signalservice.SyncMessage.CallEvent.Event - 22, // 109: signalservice.SyncMessage.CallLinkUpdate.type:type_name -> signalservice.SyncMessage.CallLinkUpdate.Type - 23, // 110: signalservice.SyncMessage.CallLogEvent.type:type_name -> signalservice.SyncMessage.CallLogEvent.Type - 109, // 111: signalservice.SyncMessage.DeleteForMe.messageDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.MessageDeletes - 111, // 112: signalservice.SyncMessage.DeleteForMe.conversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.ConversationDelete - 112, // 113: signalservice.SyncMessage.DeleteForMe.localOnlyConversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete - 110, // 114: signalservice.SyncMessage.DeleteForMe.attachmentDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.AttachmentDelete - 48, // 115: signalservice.SyncMessage.AttachmentBackfillRequest.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 116: signalservice.SyncMessage.AttachmentBackfillRequest.targetConversation:type_name -> signalservice.ConversationIdentifier - 48, // 117: signalservice.SyncMessage.AttachmentBackfillResponse.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 118: signalservice.SyncMessage.AttachmentBackfillResponse.targetConversation:type_name -> signalservice.ConversationIdentifier - 114, // 119: signalservice.SyncMessage.AttachmentBackfillResponse.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList - 24, // 120: signalservice.SyncMessage.AttachmentBackfillResponse.error:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.Error - 49, // 121: signalservice.SyncMessage.DeleteForMe.MessageDeletes.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 122: signalservice.SyncMessage.DeleteForMe.MessageDeletes.messages:type_name -> signalservice.AddressableMessage - 49, // 123: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 124: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 125: signalservice.SyncMessage.DeleteForMe.ConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 126: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentMessages:type_name -> signalservice.AddressableMessage - 48, // 127: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentNonExpiringMessages:type_name -> signalservice.AddressableMessage - 49, // 128: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier - 40, // 129: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.attachment:type_name -> signalservice.AttachmentPointer - 25, // 130: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.status:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.Status - 113, // 131: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - 113, // 132: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.longText:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - 133, // [133:133] is the sub-list for method output_type - 133, // [133:133] is the sub-list for method input_type - 133, // [133:133] is the sub-list for extension type_name - 133, // [133:133] is the sub-list for extension extendee - 0, // [0:133] is the sub-list for field type_name + 108, // 101: signalservice.SyncMessage.Blocked.blockedE164s:type_name -> signalservice.SyncMessage.Blocked.BlockedE164 + 109, // 102: signalservice.SyncMessage.Blocked.blockedAcis:type_name -> signalservice.SyncMessage.Blocked.BlockedAci + 110, // 103: signalservice.SyncMessage.Blocked.blockedGroups:type_name -> signalservice.SyncMessage.Blocked.BlockedGroup + 15, // 104: signalservice.SyncMessage.Request.type:type_name -> signalservice.SyncMessage.Request.Type + 16, // 105: signalservice.SyncMessage.StickerPackOperation.type:type_name -> signalservice.SyncMessage.StickerPackOperation.Type + 17, // 106: signalservice.SyncMessage.FetchLatest.type:type_name -> signalservice.SyncMessage.FetchLatest.Type + 18, // 107: signalservice.SyncMessage.MessageRequestResponse.type:type_name -> signalservice.SyncMessage.MessageRequestResponse.Type + 111, // 108: signalservice.SyncMessage.OutgoingPayment.mobileCoin:type_name -> signalservice.SyncMessage.OutgoingPayment.MobileCoin + 19, // 109: signalservice.SyncMessage.CallEvent.type:type_name -> signalservice.SyncMessage.CallEvent.Type + 20, // 110: signalservice.SyncMessage.CallEvent.direction:type_name -> signalservice.SyncMessage.CallEvent.Direction + 21, // 111: signalservice.SyncMessage.CallEvent.event:type_name -> signalservice.SyncMessage.CallEvent.Event + 22, // 112: signalservice.SyncMessage.CallLinkUpdate.type:type_name -> signalservice.SyncMessage.CallLinkUpdate.Type + 23, // 113: signalservice.SyncMessage.CallLogEvent.type:type_name -> signalservice.SyncMessage.CallLogEvent.Type + 112, // 114: signalservice.SyncMessage.DeleteForMe.messageDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.MessageDeletes + 114, // 115: signalservice.SyncMessage.DeleteForMe.conversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.ConversationDelete + 115, // 116: signalservice.SyncMessage.DeleteForMe.localOnlyConversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete + 113, // 117: signalservice.SyncMessage.DeleteForMe.attachmentDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.AttachmentDelete + 48, // 118: signalservice.SyncMessage.AttachmentBackfillRequest.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 119: signalservice.SyncMessage.AttachmentBackfillRequest.targetConversation:type_name -> signalservice.ConversationIdentifier + 48, // 120: signalservice.SyncMessage.AttachmentBackfillResponse.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 121: signalservice.SyncMessage.AttachmentBackfillResponse.targetConversation:type_name -> signalservice.ConversationIdentifier + 117, // 122: signalservice.SyncMessage.AttachmentBackfillResponse.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList + 24, // 123: signalservice.SyncMessage.AttachmentBackfillResponse.error:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.Error + 49, // 124: signalservice.SyncMessage.DeleteForMe.MessageDeletes.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 125: signalservice.SyncMessage.DeleteForMe.MessageDeletes.messages:type_name -> signalservice.AddressableMessage + 49, // 126: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 127: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 128: signalservice.SyncMessage.DeleteForMe.ConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 129: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentMessages:type_name -> signalservice.AddressableMessage + 48, // 130: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentNonExpiringMessages:type_name -> signalservice.AddressableMessage + 49, // 131: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier + 40, // 132: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.attachment:type_name -> signalservice.AttachmentPointer + 25, // 133: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.status:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.Status + 116, // 134: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + 116, // 135: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.longText:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + 136, // [136:136] is the sub-list for method output_type + 136, // [136:136] is the sub-list for method input_type + 136, // [136:136] is the sub-list for extension type_name + 136, // [136:136] is the sub-list for extension extendee + 0, // [0:136] is the sub-list for field type_name } -func init() { file_SignalService_proto_init() } -func file_SignalService_proto_init() { - if File_SignalService_proto != nil { +func init() { file_signalpb_SignalService_proto_init() } +func file_signalpb_SignalService_proto_init() { + if File_signalpb_SignalService_proto != nil { return } - file_SignalService_proto_msgTypes[1].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[1].OneofWrappers = []any{ (*Content_DataMessage)(nil), (*Content_SyncMessage)(nil), (*Content_CallMessage)(nil), @@ -9698,15 +9897,15 @@ func file_SignalService_proto_init() { (*Content_StoryMessage)(nil), (*Content_EditMessage)(nil), } - file_SignalService_proto_msgTypes[7].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[7].OneofWrappers = []any{ (*StoryMessage_FileAttachment)(nil), (*StoryMessage_TextAttachment)(nil), } - file_SignalService_proto_msgTypes[9].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[9].OneofWrappers = []any{ (*TextAttachment_Gradient_)(nil), (*TextAttachment_Color)(nil), } - file_SignalService_proto_msgTypes[11].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[11].OneofWrappers = []any{ (*SyncMessage_Sent_)(nil), (*SyncMessage_Contacts_)(nil), (*SyncMessage_Request_)(nil), @@ -9728,51 +9927,51 @@ func file_SignalService_proto_init() { (*SyncMessage_AttachmentBackfillResponse_)(nil), (*SyncMessage_UsernameChange_)(nil), } - file_SignalService_proto_msgTypes[12].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[12].OneofWrappers = []any{ (*AttachmentPointer_CdnId)(nil), (*AttachmentPointer_CdnKey)(nil), } - file_SignalService_proto_msgTypes[15].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[15].OneofWrappers = []any{ (*PaymentAddress_MobileCoin_)(nil), } - file_SignalService_proto_msgTypes[19].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[19].OneofWrappers = []any{ (*BodyRange_MentionAci)(nil), (*BodyRange_Style_)(nil), (*BodyRange_MentionAciBinary)(nil), } - file_SignalService_proto_msgTypes[20].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[20].OneofWrappers = []any{ (*AddressableMessage_AuthorServiceId)(nil), (*AddressableMessage_AuthorE164)(nil), (*AddressableMessage_AuthorServiceIdBinary)(nil), } - file_SignalService_proto_msgTypes[21].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[21].OneofWrappers = []any{ (*ConversationIdentifier_ThreadServiceId)(nil), (*ConversationIdentifier_ThreadGroupId)(nil), (*ConversationIdentifier_ThreadE164)(nil), (*ConversationIdentifier_ThreadServiceIdBinary)(nil), } - file_SignalService_proto_msgTypes[28].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[28].OneofWrappers = []any{ (*DataMessage_Payment_Notification_)(nil), (*DataMessage_Payment_Activation_)(nil), } - file_SignalService_proto_msgTypes[40].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[40].OneofWrappers = []any{ (*DataMessage_PinMessage_PinDurationSeconds)(nil), (*DataMessage_PinMessage_PinDurationForever)(nil), } - file_SignalService_proto_msgTypes[43].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[43].OneofWrappers = []any{ (*DataMessage_Payment_Amount_MobileCoin_)(nil), } - file_SignalService_proto_msgTypes[44].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[44].OneofWrappers = []any{ (*DataMessage_Payment_Notification_MobileCoin_)(nil), } - file_SignalService_proto_msgTypes[68].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[68].OneofWrappers = []any{ (*SyncMessage_OutgoingPayment_MobileCoin_)(nil), } - file_SignalService_proto_msgTypes[76].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[76].OneofWrappers = []any{ (*SyncMessage_AttachmentBackfillResponse_Attachments)(nil), (*SyncMessage_AttachmentBackfillResponse_Error_)(nil), } - file_SignalService_proto_msgTypes[85].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[88].OneofWrappers = []any{ (*SyncMessage_AttachmentBackfillResponse_AttachmentData_Attachment)(nil), (*SyncMessage_AttachmentBackfillResponse_AttachmentData_Status_)(nil), } @@ -9780,18 +9979,18 @@ func file_SignalService_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_SignalService_proto_rawDesc), len(file_SignalService_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_SignalService_proto_rawDesc), len(file_signalpb_SignalService_proto_rawDesc)), NumEnums: 28, - NumMessages: 89, + NumMessages: 92, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_SignalService_proto_goTypes, - DependencyIndexes: file_SignalService_proto_depIdxs, - EnumInfos: file_SignalService_proto_enumTypes, - MessageInfos: file_SignalService_proto_msgTypes, + GoTypes: file_signalpb_SignalService_proto_goTypes, + DependencyIndexes: file_signalpb_SignalService_proto_depIdxs, + EnumInfos: file_signalpb_SignalService_proto_enumTypes, + MessageInfos: file_signalpb_SignalService_proto_msgTypes, }.Build() - File_SignalService_proto = out.File - file_SignalService_proto_goTypes = nil - file_SignalService_proto_depIdxs = nil + File_signalpb_SignalService_proto = out.File + file_signalpb_SignalService_proto_goTypes = nil + file_signalpb_SignalService_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/SignalService.proto b/pkg/signalmeow/protobuf/signalpb/SignalService.proto similarity index 97% rename from pkg/signalmeow/protobuf/SignalService.proto rename to pkg/signalmeow/protobuf/signalpb/SignalService.proto index 58d0b0f..562f47f 100644 --- a/pkg/signalmeow/protobuf/SignalService.proto +++ b/pkg/signalmeow/protobuf/signalpb/SignalService.proto @@ -579,10 +579,29 @@ message SyncMessage { } message Blocked { - repeated string numbers = 1; + repeated string numbers = 1; // deprecated: this field will be removed in a future release. repeated string acis = 3; - repeated bytes groupIds = 2; - repeated bytes acisBinary = 4; // 16-byte UUID + repeated bytes groupIds = 2; // deprecated: this field will be removed in a future release. + repeated bytes acisBinary = 4; // deprecated: this field will be removed in a future release. + + message BlockedE164 { + optional string e164 = 1; + optional uint64 timestamp = 2; + } + + message BlockedAci { + optional bytes aciBinary = 1; // 16-byte UUID + optional uint64 timestamp = 2; + } + + message BlockedGroup { + optional bytes groupId = 1; + optional uint64 timestamp = 2; + } + + repeated BlockedE164 blockedE164s = 5; + repeated BlockedAci blockedAcis = 6; + repeated BlockedGroup blockedGroups = 7; } message Request { diff --git a/pkg/signalmeow/protobuf/StickerResources.pb.go b/pkg/signalmeow/protobuf/signalpb/StickerResources.pb.go similarity index 71% rename from pkg/signalmeow/protobuf/StickerResources.pb.go rename to pkg/signalmeow/protobuf/signalpb/StickerResources.pb.go index f8194aa..2d32653 100644 --- a/pkg/signalmeow/protobuf/StickerResources.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/StickerResources.pb.go @@ -7,7 +7,7 @@ // versions: // protoc-gen-go v1.36.11 // protoc v7.34.1 -// source: StickerResources.proto +// source: signalpb/StickerResources.proto package signalpb @@ -38,7 +38,7 @@ type Pack struct { func (x *Pack) Reset() { *x = Pack{} - mi := &file_StickerResources_proto_msgTypes[0] + mi := &file_signalpb_StickerResources_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +50,7 @@ func (x *Pack) String() string { func (*Pack) ProtoMessage() {} func (x *Pack) ProtoReflect() protoreflect.Message { - mi := &file_StickerResources_proto_msgTypes[0] + mi := &file_signalpb_StickerResources_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +63,7 @@ func (x *Pack) ProtoReflect() protoreflect.Message { // Deprecated: Use Pack.ProtoReflect.Descriptor instead. func (*Pack) Descriptor() ([]byte, []int) { - return file_StickerResources_proto_rawDescGZIP(), []int{0} + return file_signalpb_StickerResources_proto_rawDescGZIP(), []int{0} } func (x *Pack) GetTitle() string { @@ -105,7 +105,7 @@ type Pack_Sticker struct { func (x *Pack_Sticker) Reset() { *x = Pack_Sticker{} - mi := &file_StickerResources_proto_msgTypes[1] + mi := &file_signalpb_StickerResources_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -117,7 +117,7 @@ func (x *Pack_Sticker) String() string { func (*Pack_Sticker) ProtoMessage() {} func (x *Pack_Sticker) ProtoReflect() protoreflect.Message { - mi := &file_StickerResources_proto_msgTypes[1] + mi := &file_signalpb_StickerResources_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -130,7 +130,7 @@ func (x *Pack_Sticker) ProtoReflect() protoreflect.Message { // Deprecated: Use Pack_Sticker.ProtoReflect.Descriptor instead. func (*Pack_Sticker) Descriptor() ([]byte, []int) { - return file_StickerResources_proto_rawDescGZIP(), []int{0, 0} + return file_signalpb_StickerResources_proto_rawDescGZIP(), []int{0, 0} } func (x *Pack_Sticker) GetId() uint32 { @@ -154,11 +154,11 @@ func (x *Pack_Sticker) GetContentType() string { return "" } -var File_StickerResources_proto protoreflect.FileDescriptor +var File_signalpb_StickerResources_proto protoreflect.FileDescriptor -const file_StickerResources_proto_rawDesc = "" + +const file_signalpb_StickerResources_proto_rawDesc = "" + "\n" + - "\x16StickerResources.proto\x12\rsignalservice\"\xf3\x01\n" + + "\x1fsignalpb/StickerResources.proto\x12\rsignalservice\"\xf3\x01\n" + "\x04Pack\x12\x14\n" + "\x05title\x18\x01 \x01(\tR\x05title\x12\x16\n" + "\x06author\x18\x02 \x01(\tR\x06author\x121\n" + @@ -171,23 +171,23 @@ const file_StickerResources_proto_rawDesc = "" + "1org.whispersystems.signalservice.internal.stickerB\rStickerProtos" var ( - file_StickerResources_proto_rawDescOnce sync.Once - file_StickerResources_proto_rawDescData []byte + file_signalpb_StickerResources_proto_rawDescOnce sync.Once + file_signalpb_StickerResources_proto_rawDescData []byte ) -func file_StickerResources_proto_rawDescGZIP() []byte { - file_StickerResources_proto_rawDescOnce.Do(func() { - file_StickerResources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_StickerResources_proto_rawDesc), len(file_StickerResources_proto_rawDesc))) +func file_signalpb_StickerResources_proto_rawDescGZIP() []byte { + file_signalpb_StickerResources_proto_rawDescOnce.Do(func() { + file_signalpb_StickerResources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_StickerResources_proto_rawDesc), len(file_signalpb_StickerResources_proto_rawDesc))) }) - return file_StickerResources_proto_rawDescData + return file_signalpb_StickerResources_proto_rawDescData } -var file_StickerResources_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_StickerResources_proto_goTypes = []any{ +var file_signalpb_StickerResources_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_signalpb_StickerResources_proto_goTypes = []any{ (*Pack)(nil), // 0: signalservice.Pack (*Pack_Sticker)(nil), // 1: signalservice.Pack.Sticker } -var file_StickerResources_proto_depIdxs = []int32{ +var file_signalpb_StickerResources_proto_depIdxs = []int32{ 1, // 0: signalservice.Pack.cover:type_name -> signalservice.Pack.Sticker 1, // 1: signalservice.Pack.stickers:type_name -> signalservice.Pack.Sticker 2, // [2:2] is the sub-list for method output_type @@ -197,26 +197,26 @@ var file_StickerResources_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_StickerResources_proto_init() } -func file_StickerResources_proto_init() { - if File_StickerResources_proto != nil { +func init() { file_signalpb_StickerResources_proto_init() } +func file_signalpb_StickerResources_proto_init() { + if File_signalpb_StickerResources_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_StickerResources_proto_rawDesc), len(file_StickerResources_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_StickerResources_proto_rawDesc), len(file_signalpb_StickerResources_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_StickerResources_proto_goTypes, - DependencyIndexes: file_StickerResources_proto_depIdxs, - MessageInfos: file_StickerResources_proto_msgTypes, + GoTypes: file_signalpb_StickerResources_proto_goTypes, + DependencyIndexes: file_signalpb_StickerResources_proto_depIdxs, + MessageInfos: file_signalpb_StickerResources_proto_msgTypes, }.Build() - File_StickerResources_proto = out.File - file_StickerResources_proto_goTypes = nil - file_StickerResources_proto_depIdxs = nil + File_signalpb_StickerResources_proto = out.File + file_signalpb_StickerResources_proto_goTypes = nil + file_signalpb_StickerResources_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/StickerResources.proto b/pkg/signalmeow/protobuf/signalpb/StickerResources.proto similarity index 100% rename from pkg/signalmeow/protobuf/StickerResources.proto rename to pkg/signalmeow/protobuf/signalpb/StickerResources.proto diff --git a/pkg/signalmeow/protobuf/StorageService.pb.go b/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go similarity index 78% rename from pkg/signalmeow/protobuf/StorageService.pb.go rename to pkg/signalmeow/protobuf/signalpb/StorageService.pb.go index 0d650af..6c8e24b 100644 --- a/pkg/signalmeow/protobuf/StorageService.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go @@ -1,13 +1,12 @@ -//* -// Copyright (C) 2019 Open Whisper Systems // -// Licensed according to the LICENSE file in this repository. +// Copyright 2020-2021 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 // protoc v7.34.1 -// source: StorageService.proto +// source: signalpb/StorageService.proto package signalpb @@ -59,11 +58,11 @@ func (x OptionalBool) String() string { } func (OptionalBool) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[0].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[0].Descriptor() } func (OptionalBool) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[0] + return &file_signalpb_StorageService_proto_enumTypes[0] } func (x OptionalBool) Number() protoreflect.EnumNumber { @@ -72,7 +71,7 @@ func (x OptionalBool) Number() protoreflect.EnumNumber { // Deprecated: Use OptionalBool.Descriptor instead. func (OptionalBool) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{0} } // If unset - computed as the value of the first byte of SHA-256(msg=CONTACT_ID) @@ -144,11 +143,11 @@ func (x AvatarColor) String() string { } func (AvatarColor) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[1].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[1].Descriptor() } func (AvatarColor) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[1] + return &file_signalpb_StorageService_proto_enumTypes[1] } func (x AvatarColor) Number() protoreflect.EnumNumber { @@ -157,7 +156,7 @@ func (x AvatarColor) Number() protoreflect.EnumNumber { // Deprecated: Use AvatarColor.Descriptor instead. func (AvatarColor) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{1} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{1} } type ManifestRecord_Identifier_Type int32 @@ -169,6 +168,7 @@ const ( ManifestRecord_Identifier_GROUPV2 ManifestRecord_Identifier_Type = 3 ManifestRecord_Identifier_ACCOUNT ManifestRecord_Identifier_Type = 4 ManifestRecord_Identifier_STORY_DISTRIBUTION_LIST ManifestRecord_Identifier_Type = 5 + ManifestRecord_Identifier_STICKER_PACK ManifestRecord_Identifier_Type = 6 ManifestRecord_Identifier_CALL_LINK ManifestRecord_Identifier_Type = 7 ManifestRecord_Identifier_CHAT_FOLDER ManifestRecord_Identifier_Type = 8 ManifestRecord_Identifier_NOTIFICATION_PROFILE ManifestRecord_Identifier_Type = 9 @@ -183,6 +183,7 @@ var ( 3: "GROUPV2", 4: "ACCOUNT", 5: "STORY_DISTRIBUTION_LIST", + 6: "STICKER_PACK", 7: "CALL_LINK", 8: "CHAT_FOLDER", 9: "NOTIFICATION_PROFILE", @@ -194,6 +195,7 @@ var ( "GROUPV2": 3, "ACCOUNT": 4, "STORY_DISTRIBUTION_LIST": 5, + "STICKER_PACK": 6, "CALL_LINK": 7, "CHAT_FOLDER": 8, "NOTIFICATION_PROFILE": 9, @@ -211,11 +213,11 @@ func (x ManifestRecord_Identifier_Type) String() string { } func (ManifestRecord_Identifier_Type) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[2].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[2].Descriptor() } func (ManifestRecord_Identifier_Type) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[2] + return &file_signalpb_StorageService_proto_enumTypes[2] } func (x ManifestRecord_Identifier_Type) Number() protoreflect.EnumNumber { @@ -224,7 +226,7 @@ func (x ManifestRecord_Identifier_Type) Number() protoreflect.EnumNumber { // Deprecated: Use ManifestRecord_Identifier_Type.Descriptor instead. func (ManifestRecord_Identifier_Type) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{5, 0, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{5, 0, 0} } type ContactRecord_IdentityState int32 @@ -260,11 +262,11 @@ func (x ContactRecord_IdentityState) String() string { } func (ContactRecord_IdentityState) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[3].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[3].Descriptor() } func (ContactRecord_IdentityState) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[3] + return &file_signalpb_StorageService_proto_enumTypes[3] } func (x ContactRecord_IdentityState) Number() protoreflect.EnumNumber { @@ -273,7 +275,7 @@ func (x ContactRecord_IdentityState) Number() protoreflect.EnumNumber { // Deprecated: Use ContactRecord_IdentityState.Descriptor instead. func (ContactRecord_IdentityState) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{7, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{7, 0} } type GroupV2Record_StorySendMode int32 @@ -309,11 +311,11 @@ func (x GroupV2Record_StorySendMode) String() string { } func (GroupV2Record_StorySendMode) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[4].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[4].Descriptor() } func (GroupV2Record_StorySendMode) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[4] + return &file_signalpb_StorageService_proto_enumTypes[4] } func (x GroupV2Record_StorySendMode) Number() protoreflect.EnumNumber { @@ -322,7 +324,56 @@ func (x GroupV2Record_StorySendMode) Number() protoreflect.EnumNumber { // Deprecated: Use GroupV2Record_StorySendMode.Descriptor instead. func (GroupV2Record_StorySendMode) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{9, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{9, 0} +} + +type AccountRecord_UnreadBadgeType int32 + +const ( + AccountRecord_UNKNOWN_BADGE_TYPE AccountRecord_UnreadBadgeType = 0 // Interpret as "Unread messages" + AccountRecord_UNREAD_MESSAGES AccountRecord_UnreadBadgeType = 1 + AccountRecord_UNREAD_CHATS AccountRecord_UnreadBadgeType = 2 +) + +// Enum value maps for AccountRecord_UnreadBadgeType. +var ( + AccountRecord_UnreadBadgeType_name = map[int32]string{ + 0: "UNKNOWN_BADGE_TYPE", + 1: "UNREAD_MESSAGES", + 2: "UNREAD_CHATS", + } + AccountRecord_UnreadBadgeType_value = map[string]int32{ + "UNKNOWN_BADGE_TYPE": 0, + "UNREAD_MESSAGES": 1, + "UNREAD_CHATS": 2, + } +) + +func (x AccountRecord_UnreadBadgeType) Enum() *AccountRecord_UnreadBadgeType { + p := new(AccountRecord_UnreadBadgeType) + *p = x + return p +} + +func (x AccountRecord_UnreadBadgeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccountRecord_UnreadBadgeType) Descriptor() protoreflect.EnumDescriptor { + return file_signalpb_StorageService_proto_enumTypes[5].Descriptor() +} + +func (AccountRecord_UnreadBadgeType) Type() protoreflect.EnumType { + return &file_signalpb_StorageService_proto_enumTypes[5] +} + +func (x AccountRecord_UnreadBadgeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccountRecord_UnreadBadgeType.Descriptor instead. +func (AccountRecord_UnreadBadgeType) EnumDescriptor() ([]byte, []int) { + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 0} } type AccountRecord_PhoneNumberSharingMode int32 @@ -358,11 +409,11 @@ func (x AccountRecord_PhoneNumberSharingMode) String() string { } func (AccountRecord_PhoneNumberSharingMode) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[5].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[6].Descriptor() } func (AccountRecord_PhoneNumberSharingMode) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[5] + return &file_signalpb_StorageService_proto_enumTypes[6] } func (x AccountRecord_PhoneNumberSharingMode) Number() protoreflect.EnumNumber { @@ -371,7 +422,7 @@ func (x AccountRecord_PhoneNumberSharingMode) Number() protoreflect.EnumNumber { // Deprecated: Use AccountRecord_PhoneNumberSharingMode.Descriptor instead. func (AccountRecord_PhoneNumberSharingMode) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 1} } type AccountRecord_UsernameLink_Color int32 @@ -425,11 +476,11 @@ func (x AccountRecord_UsernameLink_Color) String() string { } func (AccountRecord_UsernameLink_Color) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[6].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[7].Descriptor() } func (AccountRecord_UsernameLink_Color) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[6] + return &file_signalpb_StorageService_proto_enumTypes[7] } func (x AccountRecord_UsernameLink_Color) Number() protoreflect.EnumNumber { @@ -438,7 +489,7 @@ func (x AccountRecord_UsernameLink_Color) Number() protoreflect.EnumNumber { // Deprecated: Use AccountRecord_UsernameLink_Color.Descriptor instead. func (AccountRecord_UsernameLink_Color) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 1, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 1, 0} } // Represents the default "All chats" folder record vs all other custom folders @@ -475,11 +526,11 @@ func (x ChatFolderRecord_FolderType) String() string { } func (ChatFolderRecord_FolderType) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[7].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[8].Descriptor() } func (ChatFolderRecord_FolderType) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[7] + return &file_signalpb_StorageService_proto_enumTypes[8] } func (x ChatFolderRecord_FolderType) Number() protoreflect.EnumNumber { @@ -488,7 +539,7 @@ func (x ChatFolderRecord_FolderType) Number() protoreflect.EnumNumber { // Deprecated: Use ChatFolderRecord_FolderType.Descriptor instead. func (ChatFolderRecord_FolderType) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{15, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{16, 0} } type NotificationProfile_DayOfWeek int32 @@ -539,11 +590,11 @@ func (x NotificationProfile_DayOfWeek) String() string { } func (NotificationProfile_DayOfWeek) Descriptor() protoreflect.EnumDescriptor { - return file_StorageService_proto_enumTypes[8].Descriptor() + return file_signalpb_StorageService_proto_enumTypes[9].Descriptor() } func (NotificationProfile_DayOfWeek) Type() protoreflect.EnumType { - return &file_StorageService_proto_enumTypes[8] + return &file_signalpb_StorageService_proto_enumTypes[9] } func (x NotificationProfile_DayOfWeek) Number() protoreflect.EnumNumber { @@ -552,7 +603,7 @@ func (x NotificationProfile_DayOfWeek) Number() protoreflect.EnumNumber { // Deprecated: Use NotificationProfile_DayOfWeek.Descriptor instead. func (NotificationProfile_DayOfWeek) EnumDescriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{16, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{17, 0} } type StorageManifest struct { @@ -565,7 +616,7 @@ type StorageManifest struct { func (x *StorageManifest) Reset() { *x = StorageManifest{} - mi := &file_StorageService_proto_msgTypes[0] + mi := &file_signalpb_StorageService_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -577,7 +628,7 @@ func (x *StorageManifest) String() string { func (*StorageManifest) ProtoMessage() {} func (x *StorageManifest) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[0] + mi := &file_signalpb_StorageService_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -590,7 +641,7 @@ func (x *StorageManifest) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageManifest.ProtoReflect.Descriptor instead. func (*StorageManifest) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{0} } func (x *StorageManifest) GetVersion() uint64 { @@ -617,7 +668,7 @@ type StorageItem struct { func (x *StorageItem) Reset() { *x = StorageItem{} - mi := &file_StorageService_proto_msgTypes[1] + mi := &file_signalpb_StorageService_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -629,7 +680,7 @@ func (x *StorageItem) String() string { func (*StorageItem) ProtoMessage() {} func (x *StorageItem) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[1] + mi := &file_signalpb_StorageService_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -642,7 +693,7 @@ func (x *StorageItem) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageItem.ProtoReflect.Descriptor instead. func (*StorageItem) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{1} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{1} } func (x *StorageItem) GetKey() []byte { @@ -668,7 +719,7 @@ type StorageItems struct { func (x *StorageItems) Reset() { *x = StorageItems{} - mi := &file_StorageService_proto_msgTypes[2] + mi := &file_signalpb_StorageService_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -680,7 +731,7 @@ func (x *StorageItems) String() string { func (*StorageItems) ProtoMessage() {} func (x *StorageItems) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[2] + mi := &file_signalpb_StorageService_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -693,7 +744,7 @@ func (x *StorageItems) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageItems.ProtoReflect.Descriptor instead. func (*StorageItems) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{2} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{2} } func (x *StorageItems) GetItems() []*StorageItem { @@ -712,7 +763,7 @@ type ReadOperation struct { func (x *ReadOperation) Reset() { *x = ReadOperation{} - mi := &file_StorageService_proto_msgTypes[3] + mi := &file_signalpb_StorageService_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -724,7 +775,7 @@ func (x *ReadOperation) String() string { func (*ReadOperation) ProtoMessage() {} func (x *ReadOperation) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[3] + mi := &file_signalpb_StorageService_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -737,7 +788,7 @@ func (x *ReadOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadOperation.ProtoReflect.Descriptor instead. func (*ReadOperation) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{3} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{3} } func (x *ReadOperation) GetReadKey() [][]byte { @@ -759,7 +810,7 @@ type WriteOperation struct { func (x *WriteOperation) Reset() { *x = WriteOperation{} - mi := &file_StorageService_proto_msgTypes[4] + mi := &file_signalpb_StorageService_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -771,7 +822,7 @@ func (x *WriteOperation) String() string { func (*WriteOperation) ProtoMessage() {} func (x *WriteOperation) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[4] + mi := &file_signalpb_StorageService_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -784,7 +835,7 @@ func (x *WriteOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteOperation.ProtoReflect.Descriptor instead. func (*WriteOperation) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{4} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{4} } func (x *WriteOperation) GetManifest() *StorageManifest { @@ -827,7 +878,7 @@ type ManifestRecord struct { func (x *ManifestRecord) Reset() { *x = ManifestRecord{} - mi := &file_StorageService_proto_msgTypes[5] + mi := &file_signalpb_StorageService_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -839,7 +890,7 @@ func (x *ManifestRecord) String() string { func (*ManifestRecord) ProtoMessage() {} func (x *ManifestRecord) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[5] + mi := &file_signalpb_StorageService_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -852,7 +903,7 @@ func (x *ManifestRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use ManifestRecord.ProtoReflect.Descriptor instead. func (*ManifestRecord) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{5} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{5} } func (x *ManifestRecord) GetVersion() uint64 { @@ -892,6 +943,7 @@ type StorageRecord struct { // *StorageRecord_GroupV2 // *StorageRecord_Account // *StorageRecord_StoryDistributionList + // *StorageRecord_StickerPack // *StorageRecord_CallLink // *StorageRecord_ChatFolder // *StorageRecord_NotificationProfile @@ -902,7 +954,7 @@ type StorageRecord struct { func (x *StorageRecord) Reset() { *x = StorageRecord{} - mi := &file_StorageService_proto_msgTypes[6] + mi := &file_signalpb_StorageService_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -914,7 +966,7 @@ func (x *StorageRecord) String() string { func (*StorageRecord) ProtoMessage() {} func (x *StorageRecord) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[6] + mi := &file_signalpb_StorageService_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -927,7 +979,7 @@ func (x *StorageRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageRecord.ProtoReflect.Descriptor instead. func (*StorageRecord) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{6} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{6} } func (x *StorageRecord) GetRecord() isStorageRecord_Record { @@ -982,6 +1034,15 @@ func (x *StorageRecord) GetStoryDistributionList() *StoryDistributionListRecord return nil } +func (x *StorageRecord) GetStickerPack() *StickerPackRecord { + if x != nil { + if x, ok := x.Record.(*StorageRecord_StickerPack); ok { + return x.StickerPack + } + } + return nil +} + func (x *StorageRecord) GetCallLink() *CallLinkRecord { if x != nil { if x, ok := x.Record.(*StorageRecord_CallLink); ok { @@ -1033,6 +1094,10 @@ type StorageRecord_StoryDistributionList struct { StoryDistributionList *StoryDistributionListRecord `protobuf:"bytes,5,opt,name=storyDistributionList,proto3,oneof"` } +type StorageRecord_StickerPack struct { + StickerPack *StickerPackRecord `protobuf:"bytes,6,opt,name=stickerPack,proto3,oneof"` +} + type StorageRecord_CallLink struct { CallLink *CallLinkRecord `protobuf:"bytes,7,opt,name=callLink,proto3,oneof"` } @@ -1055,6 +1120,8 @@ func (*StorageRecord_Account) isStorageRecord_Record() {} func (*StorageRecord_StoryDistributionList) isStorageRecord_Record() {} +func (*StorageRecord_StickerPack) isStorageRecord_Record() {} + func (*StorageRecord_CallLink) isStorageRecord_Record() {} func (*StorageRecord_ChatFolder) isStorageRecord_Record() {} @@ -1087,15 +1154,18 @@ type ContactRecord struct { Nickname *ContactRecord_Name `protobuf:"bytes,22,opt,name=nickname,proto3" json:"nickname,omitempty"` Note string `protobuf:"bytes,23,opt,name=note,proto3" json:"note,omitempty"` AvatarColor *AvatarColor `protobuf:"varint,24,opt,name=avatarColor,proto3,enum=signalservice.AvatarColor,oneof" json:"avatarColor,omitempty"` - AciBinary []byte `protobuf:"bytes,25,opt,name=aciBinary,proto3" json:"aciBinary,omitempty"` // 16-byte UUID - PniBinary []byte `protobuf:"bytes,26,opt,name=pniBinary,proto3" json:"pniBinary,omitempty"` // 16-byte UUID + AciBinary []byte `protobuf:"bytes,25,opt,name=aciBinary,proto3" json:"aciBinary,omitempty"` // 16-byte UUID + PniBinary []byte `protobuf:"bytes,26,opt,name=pniBinary,proto3" json:"pniBinary,omitempty"` // 16-byte UUID + BlockedAtTimestamp uint64 `protobuf:"varint,27,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // 0 means the blocked time is unknown + NotifyForCallsIfMuted OptionalBool `protobuf:"varint,28,opt,name=notifyForCallsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForCallsIfMuted,omitempty"` // If unset, use the default settings + ShowUnreadReminders OptionalBool `protobuf:"varint,29,opt,name=showUnreadReminders,proto3,enum=signalservice.OptionalBool" json:"showUnreadReminders,omitempty"` // If unset, use the default settings unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ContactRecord) Reset() { *x = ContactRecord{} - mi := &file_StorageService_proto_msgTypes[7] + mi := &file_signalpb_StorageService_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1107,7 +1177,7 @@ func (x *ContactRecord) String() string { func (*ContactRecord) ProtoMessage() {} func (x *ContactRecord) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[7] + mi := &file_signalpb_StorageService_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1120,7 +1190,7 @@ func (x *ContactRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactRecord.ProtoReflect.Descriptor instead. func (*ContactRecord) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{7} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{7} } func (x *ContactRecord) GetAci() string { @@ -1305,6 +1375,27 @@ func (x *ContactRecord) GetPniBinary() []byte { return nil } +func (x *ContactRecord) GetBlockedAtTimestamp() uint64 { + if x != nil { + return x.BlockedAtTimestamp + } + return 0 +} + +func (x *ContactRecord) GetNotifyForCallsIfMuted() OptionalBool { + if x != nil { + return x.NotifyForCallsIfMuted + } + return OptionalBool_UNSET +} + +func (x *ContactRecord) GetShowUnreadReminders() OptionalBool { + if x != nil { + return x.ShowUnreadReminders + } + return OptionalBool_UNSET +} + type GroupV1Record struct { state protoimpl.MessageState `protogen:"open.v1"` Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -1319,7 +1410,7 @@ type GroupV1Record struct { func (x *GroupV1Record) Reset() { *x = GroupV1Record{} - mi := &file_StorageService_proto_msgTypes[8] + mi := &file_signalpb_StorageService_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1331,7 +1422,7 @@ func (x *GroupV1Record) String() string { func (*GroupV1Record) ProtoMessage() {} func (x *GroupV1Record) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[8] + mi := &file_signalpb_StorageService_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1344,7 +1435,7 @@ func (x *GroupV1Record) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupV1Record.ProtoReflect.Descriptor instead. func (*GroupV1Record) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{8} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{8} } func (x *GroupV1Record) GetId() []byte { @@ -1397,18 +1488,23 @@ type GroupV2Record struct { Archived bool `protobuf:"varint,4,opt,name=archived,proto3" json:"archived,omitempty"` MarkedUnread bool `protobuf:"varint,5,opt,name=markedUnread,proto3" json:"markedUnread,omitempty"` MutedUntilTimestamp uint64 `protobuf:"varint,6,opt,name=mutedUntilTimestamp,proto3" json:"mutedUntilTimestamp,omitempty"` - DontNotifyForMentionsIfMuted bool `protobuf:"varint,7,opt,name=dontNotifyForMentionsIfMuted,proto3" json:"dontNotifyForMentionsIfMuted,omitempty"` + DontNotifyForMentionsIfMuted bool `protobuf:"varint,7,opt,name=dontNotifyForMentionsIfMuted,proto3" json:"dontNotifyForMentionsIfMuted,omitempty"` // will be deprecated in favor of [notifyForMentionsIfMuted] HideStory bool `protobuf:"varint,8,opt,name=hideStory,proto3" json:"hideStory,omitempty"` StorySendMode GroupV2Record_StorySendMode `protobuf:"varint,10,opt,name=storySendMode,proto3,enum=signalservice.GroupV2Record_StorySendMode" json:"storySendMode,omitempty"` AvatarColor *AvatarColor `protobuf:"varint,11,opt,name=avatarColor,proto3,enum=signalservice.AvatarColor,oneof" json:"avatarColor,omitempty"` - VerifiedNameHash []byte `protobuf:"bytes,12,opt,name=verifiedNameHash,proto3" json:"verifiedNameHash,omitempty"` // SHA-256 of UTF-8 encoded decrypted group title that was last verified + VerifiedNameHash []byte `protobuf:"bytes,12,opt,name=verifiedNameHash,proto3" json:"verifiedNameHash,omitempty"` // SHA-256 of UTF-8 encoded decrypted group title that was last verified + BlockedAtTimestamp uint64 `protobuf:"varint,13,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // 0 means the blocked time is unknown + NotifyForCallsIfMuted OptionalBool `protobuf:"varint,14,opt,name=notifyForCallsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForCallsIfMuted,omitempty"` // If unset, use the default settings + NotifyForMentionsIfMuted OptionalBool `protobuf:"varint,15,opt,name=notifyForMentionsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForMentionsIfMuted,omitempty"` // If unset, use the default settings. If [dontNotifyForMentionsIfMuted] is true, this should be initialized to false. + NotifyForRepliesIfMuted OptionalBool `protobuf:"varint,16,opt,name=notifyForRepliesIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForRepliesIfMuted,omitempty"` // If unset, use the default settings + ShowUnreadReminders OptionalBool `protobuf:"varint,17,opt,name=showUnreadReminders,proto3,enum=signalservice.OptionalBool" json:"showUnreadReminders,omitempty"` // If unset, use the default settings unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GroupV2Record) Reset() { *x = GroupV2Record{} - mi := &file_StorageService_proto_msgTypes[9] + mi := &file_signalpb_StorageService_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1420,7 +1516,7 @@ func (x *GroupV2Record) String() string { func (*GroupV2Record) ProtoMessage() {} func (x *GroupV2Record) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[9] + mi := &file_signalpb_StorageService_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1433,7 +1529,7 @@ func (x *GroupV2Record) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupV2Record.ProtoReflect.Descriptor instead. func (*GroupV2Record) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{9} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{9} } func (x *GroupV2Record) GetMasterKey() []byte { @@ -1513,6 +1609,41 @@ func (x *GroupV2Record) GetVerifiedNameHash() []byte { return nil } +func (x *GroupV2Record) GetBlockedAtTimestamp() uint64 { + if x != nil { + return x.BlockedAtTimestamp + } + return 0 +} + +func (x *GroupV2Record) GetNotifyForCallsIfMuted() OptionalBool { + if x != nil { + return x.NotifyForCallsIfMuted + } + return OptionalBool_UNSET +} + +func (x *GroupV2Record) GetNotifyForMentionsIfMuted() OptionalBool { + if x != nil { + return x.NotifyForMentionsIfMuted + } + return OptionalBool_UNSET +} + +func (x *GroupV2Record) GetNotifyForRepliesIfMuted() OptionalBool { + if x != nil { + return x.NotifyForRepliesIfMuted + } + return OptionalBool_UNSET +} + +func (x *GroupV2Record) GetShowUnreadReminders() OptionalBool { + if x != nil { + return x.ShowUnreadReminders + } + return OptionalBool_UNSET +} + type Payments struct { state protoimpl.MessageState `protogen:"open.v1"` Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` @@ -1523,7 +1654,7 @@ type Payments struct { func (x *Payments) Reset() { *x = Payments{} - mi := &file_StorageService_proto_msgTypes[10] + mi := &file_signalpb_StorageService_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1535,7 +1666,7 @@ func (x *Payments) String() string { func (*Payments) ProtoMessage() {} func (x *Payments) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[10] + mi := &file_signalpb_StorageService_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1548,7 +1679,7 @@ func (x *Payments) ProtoReflect() protoreflect.Message { // Deprecated: Use Payments.ProtoReflect.Descriptor instead. func (*Payments) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{10} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{10} } func (x *Payments) GetEnabled() bool { @@ -1601,7 +1732,6 @@ type AccountRecord struct { BackupTier *uint64 `protobuf:"varint,40,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` // See zkgroup for integer particular values. Unset if backups are not enabled. BackupSubscriberData *AccountRecord_IAPSubscriberData `protobuf:"bytes,41,opt,name=backupSubscriberData,proto3" json:"backupSubscriberData,omitempty"` AvatarColor *AvatarColor `protobuf:"varint,42,opt,name=avatarColor,proto3,enum=signalservice.AvatarColor,oneof" json:"avatarColor,omitempty"` - BackupTierHistory *AccountRecord_BackupTierHistory `protobuf:"bytes,43,opt,name=backupTierHistory,proto3" json:"backupTierHistory,omitempty"` NotificationProfileManualOverride *AccountRecord_NotificationProfileManualOverride `protobuf:"bytes,44,opt,name=notificationProfileManualOverride,proto3" json:"notificationProfileManualOverride,omitempty"` NotificationProfileSyncDisabled bool `protobuf:"varint,45,opt,name=notificationProfileSyncDisabled,proto3" json:"notificationProfileSyncDisabled,omitempty"` AutomaticKeyVerificationDisabled bool `protobuf:"varint,46,opt,name=automaticKeyVerificationDisabled,proto3" json:"automaticKeyVerificationDisabled,omitempty"` @@ -1610,13 +1740,22 @@ type AccountRecord struct { ReleaseNotesChatMutedUntilTimestamp *uint64 `protobuf:"varint,49,opt,name=releaseNotesChatMutedUntilTimestamp,proto3,oneof" json:"releaseNotesChatMutedUntilTimestamp,omitempty"` ReleaseNotesChatBlocked *bool `protobuf:"varint,50,opt,name=releaseNotesChatBlocked,proto3,oneof" json:"releaseNotesChatBlocked,omitempty"` ReleaseNotesChatMarkedUnread *bool `protobuf:"varint,51,opt,name=releaseNotesChatMarkedUnread,proto3,oneof" json:"releaseNotesChatMarkedUnread,omitempty"` + ReleaseNotesChatBlockedAt *uint64 `protobuf:"varint,52,opt,name=releaseNotesChatBlockedAt,proto3,oneof" json:"releaseNotesChatBlockedAt,omitempty"` // only set if known (>0) + UnreadBadgeType AccountRecord_UnreadBadgeType `protobuf:"varint,53,opt,name=unreadBadgeType,proto3,enum=signalservice.AccountRecord_UnreadBadgeType" json:"unreadBadgeType,omitempty"` // Only used in desktop/ios + IncludeMutedChatsInBadge OptionalBool `protobuf:"varint,54,opt,name=includeMutedChatsInBadge,proto3,enum=signalservice.OptionalBool" json:"includeMutedChatsInBadge,omitempty"` // Only used in desktop/ios. If unset, consider this off. Only used in desktop/ios + ReactionNotifications OptionalBool `protobuf:"varint,55,opt,name=reactionNotifications,proto3,enum=signalservice.OptionalBool" json:"reactionNotifications,omitempty"` // If unset, consider this on + NotifyForCallsIfMuted OptionalBool `protobuf:"varint,56,opt,name=notifyForCallsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForCallsIfMuted,omitempty"` // If unset, consider this off + NotifyForMentionsIfMuted OptionalBool `protobuf:"varint,57,opt,name=notifyForMentionsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForMentionsIfMuted,omitempty"` // If unset, consider this on + NotifyForRepliesIfMuted OptionalBool `protobuf:"varint,58,opt,name=notifyForRepliesIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForRepliesIfMuted,omitempty"` // If unset, consider this on + ShowUnreadReminders OptionalBool `protobuf:"varint,59,opt,name=showUnreadReminders,proto3,enum=signalservice.OptionalBool" json:"showUnreadReminders,omitempty"` // If unset, consider this on + NotifyWhenContactJoins OptionalBool `protobuf:"varint,60,opt,name=notifyWhenContactJoins,proto3,enum=signalservice.OptionalBool" json:"notifyWhenContactJoins,omitempty"` // If unset, consider this off unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *AccountRecord) Reset() { *x = AccountRecord{} - mi := &file_StorageService_proto_msgTypes[11] + mi := &file_signalpb_StorageService_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1628,7 +1767,7 @@ func (x *AccountRecord) String() string { func (*AccountRecord) ProtoMessage() {} func (x *AccountRecord) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[11] + mi := &file_signalpb_StorageService_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1641,7 +1780,7 @@ func (x *AccountRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountRecord.ProtoReflect.Descriptor instead. func (*AccountRecord) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11} } func (x *AccountRecord) GetProfileKey() []byte { @@ -1882,13 +2021,6 @@ func (x *AccountRecord) GetAvatarColor() AvatarColor { return AvatarColor_A100 } -func (x *AccountRecord) GetBackupTierHistory() *AccountRecord_BackupTierHistory { - if x != nil { - return x.BackupTierHistory - } - return nil -} - func (x *AccountRecord) GetNotificationProfileManualOverride() *AccountRecord_NotificationProfileManualOverride { if x != nil { return x.NotificationProfileManualOverride @@ -1945,6 +2077,69 @@ func (x *AccountRecord) GetReleaseNotesChatMarkedUnread() bool { return false } +func (x *AccountRecord) GetReleaseNotesChatBlockedAt() uint64 { + if x != nil && x.ReleaseNotesChatBlockedAt != nil { + return *x.ReleaseNotesChatBlockedAt + } + return 0 +} + +func (x *AccountRecord) GetUnreadBadgeType() AccountRecord_UnreadBadgeType { + if x != nil { + return x.UnreadBadgeType + } + return AccountRecord_UNKNOWN_BADGE_TYPE +} + +func (x *AccountRecord) GetIncludeMutedChatsInBadge() OptionalBool { + if x != nil { + return x.IncludeMutedChatsInBadge + } + return OptionalBool_UNSET +} + +func (x *AccountRecord) GetReactionNotifications() OptionalBool { + if x != nil { + return x.ReactionNotifications + } + return OptionalBool_UNSET +} + +func (x *AccountRecord) GetNotifyForCallsIfMuted() OptionalBool { + if x != nil { + return x.NotifyForCallsIfMuted + } + return OptionalBool_UNSET +} + +func (x *AccountRecord) GetNotifyForMentionsIfMuted() OptionalBool { + if x != nil { + return x.NotifyForMentionsIfMuted + } + return OptionalBool_UNSET +} + +func (x *AccountRecord) GetNotifyForRepliesIfMuted() OptionalBool { + if x != nil { + return x.NotifyForRepliesIfMuted + } + return OptionalBool_UNSET +} + +func (x *AccountRecord) GetShowUnreadReminders() OptionalBool { + if x != nil { + return x.ShowUnreadReminders + } + return OptionalBool_UNSET +} + +func (x *AccountRecord) GetNotifyWhenContactJoins() OptionalBool { + if x != nil { + return x.NotifyWhenContactJoins + } + return OptionalBool_UNSET +} + type StoryDistributionListRecord struct { state protoimpl.MessageState `protogen:"open.v1"` Identifier []byte `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` @@ -1960,7 +2155,7 @@ type StoryDistributionListRecord struct { func (x *StoryDistributionListRecord) Reset() { *x = StoryDistributionListRecord{} - mi := &file_StorageService_proto_msgTypes[12] + mi := &file_signalpb_StorageService_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1972,7 +2167,7 @@ func (x *StoryDistributionListRecord) String() string { func (*StoryDistributionListRecord) ProtoMessage() {} func (x *StoryDistributionListRecord) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[12] + mi := &file_signalpb_StorageService_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1985,7 +2180,7 @@ func (x *StoryDistributionListRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use StoryDistributionListRecord.ProtoReflect.Descriptor instead. func (*StoryDistributionListRecord) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{12} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{12} } func (x *StoryDistributionListRecord) GetIdentifier() []byte { @@ -2037,6 +2232,88 @@ func (x *StoryDistributionListRecord) GetRecipientServiceIdsBinary() [][]byte { return nil } +type StickerPackRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + PackId []byte `protobuf:"bytes,1,opt,name=packId,proto3" json:"packId,omitempty"` // 16 bytes + PackKey []byte `protobuf:"bytes,2,opt,name=packKey,proto3" json:"packKey,omitempty"` // 32 bytes, used to derive the AES-256 key + // aesKey = HKDF( + // + // input = packKey, + // salt = 32 zero bytes, + // info = "Sticker Pack" + // + // ) + Position uint32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // When displayed sticker packs should be first sorted + // in ascending order by zero-based `position` and + // then by ascending `packId` (lexicographically, + // packId can be treated as a hex string). + // When installing a sticker pack the client should find + // the maximum `position` among currently known stickers + // and use `max_position + 1` as the value for the new + // `position`. + DeletedAtTimestamp uint64 `protobuf:"varint,4,opt,name=deletedAtTimestamp,proto3" json:"deletedAtTimestamp,omitempty"` // Timestamp in milliseconds. When present and + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StickerPackRecord) Reset() { + *x = StickerPackRecord{} + mi := &file_signalpb_StorageService_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StickerPackRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StickerPackRecord) ProtoMessage() {} + +func (x *StickerPackRecord) ProtoReflect() protoreflect.Message { + mi := &file_signalpb_StorageService_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StickerPackRecord.ProtoReflect.Descriptor instead. +func (*StickerPackRecord) Descriptor() ([]byte, []int) { + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{13} +} + +func (x *StickerPackRecord) GetPackId() []byte { + if x != nil { + return x.PackId + } + return nil +} + +func (x *StickerPackRecord) GetPackKey() []byte { + if x != nil { + return x.PackKey + } + return nil +} + +func (x *StickerPackRecord) GetPosition() uint32 { + if x != nil { + return x.Position + } + return 0 +} + +func (x *StickerPackRecord) GetDeletedAtTimestamp() uint64 { + if x != nil { + return x.DeletedAtTimestamp + } + return 0 +} + type CallLinkRecord struct { state protoimpl.MessageState `protogen:"open.v1"` RootKey []byte `protobuf:"bytes,1,opt,name=rootKey,proto3" json:"rootKey,omitempty"` @@ -2048,7 +2325,7 @@ type CallLinkRecord struct { func (x *CallLinkRecord) Reset() { *x = CallLinkRecord{} - mi := &file_StorageService_proto_msgTypes[13] + mi := &file_signalpb_StorageService_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2060,7 +2337,7 @@ func (x *CallLinkRecord) String() string { func (*CallLinkRecord) ProtoMessage() {} func (x *CallLinkRecord) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[13] + mi := &file_signalpb_StorageService_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2073,7 +2350,7 @@ func (x *CallLinkRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use CallLinkRecord.ProtoReflect.Descriptor instead. func (*CallLinkRecord) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{13} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{14} } func (x *CallLinkRecord) GetRootKey() []byte { @@ -2111,7 +2388,7 @@ type Recipient struct { func (x *Recipient) Reset() { *x = Recipient{} - mi := &file_StorageService_proto_msgTypes[14] + mi := &file_signalpb_StorageService_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2123,7 +2400,7 @@ func (x *Recipient) String() string { func (*Recipient) ProtoMessage() {} func (x *Recipient) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[14] + mi := &file_signalpb_StorageService_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2136,7 +2413,7 @@ func (x *Recipient) ProtoReflect() protoreflect.Message { // Deprecated: Use Recipient.ProtoReflect.Descriptor instead. func (*Recipient) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{14} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{15} } func (x *Recipient) GetIdentifier() isRecipient_Identifier { @@ -2214,7 +2491,7 @@ type ChatFolderRecord struct { func (x *ChatFolderRecord) Reset() { *x = ChatFolderRecord{} - mi := &file_StorageService_proto_msgTypes[15] + mi := &file_signalpb_StorageService_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2226,7 +2503,7 @@ func (x *ChatFolderRecord) String() string { func (*ChatFolderRecord) ProtoMessage() {} func (x *ChatFolderRecord) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[15] + mi := &file_signalpb_StorageService_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2239,7 +2516,7 @@ func (x *ChatFolderRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatFolderRecord.ProtoReflect.Descriptor instead. func (*ChatFolderRecord) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{15} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{16} } func (x *ChatFolderRecord) GetIdentifier() []byte { @@ -2340,7 +2617,7 @@ type NotificationProfile struct { func (x *NotificationProfile) Reset() { *x = NotificationProfile{} - mi := &file_StorageService_proto_msgTypes[16] + mi := &file_signalpb_StorageService_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2352,7 +2629,7 @@ func (x *NotificationProfile) String() string { func (*NotificationProfile) ProtoMessage() {} func (x *NotificationProfile) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[16] + mi := &file_signalpb_StorageService_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2365,7 +2642,7 @@ func (x *NotificationProfile) ProtoReflect() protoreflect.Message { // Deprecated: Use NotificationProfile.ProtoReflect.Descriptor instead. func (*NotificationProfile) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{16} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{17} } func (x *NotificationProfile) GetId() []byte { @@ -2469,7 +2746,7 @@ type ManifestRecord_Identifier struct { func (x *ManifestRecord_Identifier) Reset() { *x = ManifestRecord_Identifier{} - mi := &file_StorageService_proto_msgTypes[17] + mi := &file_signalpb_StorageService_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2481,7 +2758,7 @@ func (x *ManifestRecord_Identifier) String() string { func (*ManifestRecord_Identifier) ProtoMessage() {} func (x *ManifestRecord_Identifier) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[17] + mi := &file_signalpb_StorageService_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2494,7 +2771,7 @@ func (x *ManifestRecord_Identifier) ProtoReflect() protoreflect.Message { // Deprecated: Use ManifestRecord_Identifier.ProtoReflect.Descriptor instead. func (*ManifestRecord_Identifier) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{5, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{5, 0} } func (x *ManifestRecord_Identifier) GetRaw() []byte { @@ -2521,7 +2798,7 @@ type ContactRecord_Name struct { func (x *ContactRecord_Name) Reset() { *x = ContactRecord_Name{} - mi := &file_StorageService_proto_msgTypes[18] + mi := &file_signalpb_StorageService_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2533,7 +2810,7 @@ func (x *ContactRecord_Name) String() string { func (*ContactRecord_Name) ProtoMessage() {} func (x *ContactRecord_Name) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[18] + mi := &file_signalpb_StorageService_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2546,7 +2823,7 @@ func (x *ContactRecord_Name) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactRecord_Name.ProtoReflect.Descriptor instead. func (*ContactRecord_Name) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{7, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{7, 0} } func (x *ContactRecord_Name) GetGiven() string { @@ -2578,7 +2855,7 @@ type AccountRecord_PinnedConversation struct { func (x *AccountRecord_PinnedConversation) Reset() { *x = AccountRecord_PinnedConversation{} - mi := &file_StorageService_proto_msgTypes[19] + mi := &file_signalpb_StorageService_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2590,7 +2867,7 @@ func (x *AccountRecord_PinnedConversation) String() string { func (*AccountRecord_PinnedConversation) ProtoMessage() {} func (x *AccountRecord_PinnedConversation) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[19] + mi := &file_signalpb_StorageService_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2603,7 +2880,7 @@ func (x *AccountRecord_PinnedConversation) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountRecord_PinnedConversation.ProtoReflect.Descriptor instead. func (*AccountRecord_PinnedConversation) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 0} } func (x *AccountRecord_PinnedConversation) GetIdentifier() isAccountRecord_PinnedConversation_Identifier { @@ -2691,7 +2968,7 @@ type AccountRecord_UsernameLink struct { func (x *AccountRecord_UsernameLink) Reset() { *x = AccountRecord_UsernameLink{} - mi := &file_StorageService_proto_msgTypes[20] + mi := &file_signalpb_StorageService_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2703,7 +2980,7 @@ func (x *AccountRecord_UsernameLink) String() string { func (*AccountRecord_UsernameLink) ProtoMessage() {} func (x *AccountRecord_UsernameLink) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[20] + mi := &file_signalpb_StorageService_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2716,7 +2993,7 @@ func (x *AccountRecord_UsernameLink) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountRecord_UsernameLink.ProtoReflect.Descriptor instead. func (*AccountRecord_UsernameLink) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 1} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 1} } func (x *AccountRecord_UsernameLink) GetEntropy() []byte { @@ -2754,7 +3031,7 @@ type AccountRecord_IAPSubscriberData struct { func (x *AccountRecord_IAPSubscriberData) Reset() { *x = AccountRecord_IAPSubscriberData{} - mi := &file_StorageService_proto_msgTypes[21] + mi := &file_signalpb_StorageService_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2766,7 +3043,7 @@ func (x *AccountRecord_IAPSubscriberData) String() string { func (*AccountRecord_IAPSubscriberData) ProtoMessage() {} func (x *AccountRecord_IAPSubscriberData) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[21] + mi := &file_signalpb_StorageService_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2779,7 +3056,7 @@ func (x *AccountRecord_IAPSubscriberData) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountRecord_IAPSubscriberData.ProtoReflect.Descriptor instead. func (*AccountRecord_IAPSubscriberData) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 2} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 2} } func (x *AccountRecord_IAPSubscriberData) GetSubscriberId() []byte { @@ -2834,59 +3111,6 @@ func (*AccountRecord_IAPSubscriberData_PurchaseToken) isAccountRecord_IAPSubscri func (*AccountRecord_IAPSubscriberData_OriginalTransactionId) isAccountRecord_IAPSubscriberData_IapSubscriptionId() { } -type AccountRecord_BackupTierHistory struct { - state protoimpl.MessageState `protogen:"open.v1"` - // See zkgroup for integer particular values. Unset if backups are not enabled. - BackupTier *uint64 `protobuf:"varint,1,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` - EndedAtTimestamp *uint64 `protobuf:"varint,2,opt,name=endedAtTimestamp,proto3,oneof" json:"endedAtTimestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccountRecord_BackupTierHistory) Reset() { - *x = AccountRecord_BackupTierHistory{} - mi := &file_StorageService_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccountRecord_BackupTierHistory) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountRecord_BackupTierHistory) ProtoMessage() {} - -func (x *AccountRecord_BackupTierHistory) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccountRecord_BackupTierHistory.ProtoReflect.Descriptor instead. -func (*AccountRecord_BackupTierHistory) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 3} -} - -func (x *AccountRecord_BackupTierHistory) GetBackupTier() uint64 { - if x != nil && x.BackupTier != nil { - return *x.BackupTier - } - return 0 -} - -func (x *AccountRecord_BackupTierHistory) GetEndedAtTimestamp() uint64 { - if x != nil && x.EndedAtTimestamp != nil { - return *x.EndedAtTimestamp - } - return 0 -} - type AccountRecord_NotificationProfileManualOverride struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Override: @@ -2900,7 +3124,7 @@ type AccountRecord_NotificationProfileManualOverride struct { func (x *AccountRecord_NotificationProfileManualOverride) Reset() { *x = AccountRecord_NotificationProfileManualOverride{} - mi := &file_StorageService_proto_msgTypes[23] + mi := &file_signalpb_StorageService_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2912,7 +3136,7 @@ func (x *AccountRecord_NotificationProfileManualOverride) String() string { func (*AccountRecord_NotificationProfileManualOverride) ProtoMessage() {} func (x *AccountRecord_NotificationProfileManualOverride) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[23] + mi := &file_signalpb_StorageService_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2925,7 +3149,7 @@ func (x *AccountRecord_NotificationProfileManualOverride) ProtoReflect() protore // Deprecated: Use AccountRecord_NotificationProfileManualOverride.ProtoReflect.Descriptor instead. func (*AccountRecord_NotificationProfileManualOverride) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 4} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 3} } func (x *AccountRecord_NotificationProfileManualOverride) GetOverride() isAccountRecord_NotificationProfileManualOverride_Override { @@ -2982,7 +3206,7 @@ type AccountRecord_PinnedConversation_Contact struct { func (x *AccountRecord_PinnedConversation_Contact) Reset() { *x = AccountRecord_PinnedConversation_Contact{} - mi := &file_StorageService_proto_msgTypes[24] + mi := &file_signalpb_StorageService_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2994,7 +3218,7 @@ func (x *AccountRecord_PinnedConversation_Contact) String() string { func (*AccountRecord_PinnedConversation_Contact) ProtoMessage() {} func (x *AccountRecord_PinnedConversation_Contact) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[24] + mi := &file_signalpb_StorageService_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3007,7 +3231,7 @@ func (x *AccountRecord_PinnedConversation_Contact) ProtoReflect() protoreflect.M // Deprecated: Use AccountRecord_PinnedConversation_Contact.ProtoReflect.Descriptor instead. func (*AccountRecord_PinnedConversation_Contact) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 0, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 0, 0} } func (x *AccountRecord_PinnedConversation_Contact) GetServiceId() string { @@ -3039,7 +3263,7 @@ type AccountRecord_PinnedConversation_ReleaseNotes struct { func (x *AccountRecord_PinnedConversation_ReleaseNotes) Reset() { *x = AccountRecord_PinnedConversation_ReleaseNotes{} - mi := &file_StorageService_proto_msgTypes[25] + mi := &file_signalpb_StorageService_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3051,7 +3275,7 @@ func (x *AccountRecord_PinnedConversation_ReleaseNotes) String() string { func (*AccountRecord_PinnedConversation_ReleaseNotes) ProtoMessage() {} func (x *AccountRecord_PinnedConversation_ReleaseNotes) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[25] + mi := &file_signalpb_StorageService_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3064,7 +3288,7 @@ func (x *AccountRecord_PinnedConversation_ReleaseNotes) ProtoReflect() protorefl // Deprecated: Use AccountRecord_PinnedConversation_ReleaseNotes.ProtoReflect.Descriptor instead. func (*AccountRecord_PinnedConversation_ReleaseNotes) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 0, 1} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 0, 1} } type AccountRecord_NotificationProfileManualOverride_ManuallyEnabled struct { @@ -3078,7 +3302,7 @@ type AccountRecord_NotificationProfileManualOverride_ManuallyEnabled struct { func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) Reset() { *x = AccountRecord_NotificationProfileManualOverride_ManuallyEnabled{} - mi := &file_StorageService_proto_msgTypes[26] + mi := &file_signalpb_StorageService_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3090,7 +3314,7 @@ func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) String func (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) ProtoMessage() {} func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[26] + mi := &file_signalpb_StorageService_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3103,7 +3327,7 @@ func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) ProtoR // Deprecated: Use AccountRecord_NotificationProfileManualOverride_ManuallyEnabled.ProtoReflect.Descriptor instead. func (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{11, 4, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 3, 0} } func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) GetId() []byte { @@ -3131,7 +3355,7 @@ type Recipient_Contact struct { func (x *Recipient_Contact) Reset() { *x = Recipient_Contact{} - mi := &file_StorageService_proto_msgTypes[27] + mi := &file_signalpb_StorageService_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3143,7 +3367,7 @@ func (x *Recipient_Contact) String() string { func (*Recipient_Contact) ProtoMessage() {} func (x *Recipient_Contact) ProtoReflect() protoreflect.Message { - mi := &file_StorageService_proto_msgTypes[27] + mi := &file_signalpb_StorageService_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3156,7 +3380,7 @@ func (x *Recipient_Contact) ProtoReflect() protoreflect.Message { // Deprecated: Use Recipient_Contact.ProtoReflect.Descriptor instead. func (*Recipient_Contact) Descriptor() ([]byte, []int) { - return file_StorageService_proto_rawDescGZIP(), []int{14, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{15, 0} } func (x *Recipient_Contact) GetServiceId() string { @@ -3180,11 +3404,11 @@ func (x *Recipient_Contact) GetServiceIdBinary() []byte { return nil } -var File_StorageService_proto protoreflect.FileDescriptor +var File_signalpb_StorageService_proto protoreflect.FileDescriptor -const file_StorageService_proto_rawDesc = "" + +const file_signalpb_StorageService_proto_rawDesc = "" + "\n" + - "\x14StorageService.proto\x12\rsignalservice\"A\n" + + "\x1dsignalpb/StorageService.proto\x12\rsignalservice\"A\n" + "\x0fStorageManifest\x12\x18\n" + "\aversion\x18\x01 \x01(\x04R\aversion\x12\x14\n" + "\x05value\x18\x02 \x01(\fR\x05value\"5\n" + @@ -3201,38 +3425,41 @@ const file_StorageService_proto_rawDesc = "" + "insertItem\x18\x02 \x03(\v2\x1a.signalservice.StorageItemR\n" + "insertItem\x12\x1c\n" + "\tdeleteKey\x18\x03 \x03(\fR\tdeleteKey\x12\x1a\n" + - "\bclearAll\x18\x04 \x01(\bR\bclearAll\"\xbd\x03\n" + + "\bclearAll\x18\x04 \x01(\bR\bclearAll\"\xcf\x03\n" + "\x0eManifestRecord\x12\x18\n" + "\aversion\x18\x01 \x01(\x04R\aversion\x12\"\n" + "\fsourceDevice\x18\x03 \x01(\rR\fsourceDevice\x12J\n" + "\videntifiers\x18\x02 \x03(\v2(.signalservice.ManifestRecord.IdentifierR\videntifiers\x12\x1c\n" + - "\trecordIkm\x18\x04 \x01(\fR\trecordIkm\x1a\x82\x02\n" + + "\trecordIkm\x18\x04 \x01(\fR\trecordIkm\x1a\x94\x02\n" + "\n" + "Identifier\x12\x10\n" + "\x03raw\x18\x01 \x01(\fR\x03raw\x12A\n" + - "\x04type\x18\x02 \x01(\x0e2-.signalservice.ManifestRecord.Identifier.TypeR\x04type\"\x9e\x01\n" + + "\x04type\x18\x02 \x01(\x0e2-.signalservice.ManifestRecord.Identifier.TypeR\x04type\"\xb0\x01\n" + "\x04Type\x12\v\n" + "\aUNKNOWN\x10\x00\x12\v\n" + "\aCONTACT\x10\x01\x12\v\n" + "\aGROUPV1\x10\x02\x12\v\n" + "\aGROUPV2\x10\x03\x12\v\n" + "\aACCOUNT\x10\x04\x12\x1b\n" + - "\x17STORY_DISTRIBUTION_LIST\x10\x05\x12\r\n" + + "\x17STORY_DISTRIBUTION_LIST\x10\x05\x12\x10\n" + + "\fSTICKER_PACK\x10\x06\x12\r\n" + "\tCALL_LINK\x10\a\x12\x0f\n" + "\vCHAT_FOLDER\x10\b\x12\x18\n" + - "\x14NOTIFICATION_PROFILE\x10\t\"\xbd\x04\n" + + "\x14NOTIFICATION_PROFILE\x10\t\"\x83\x05\n" + "\rStorageRecord\x128\n" + "\acontact\x18\x01 \x01(\v2\x1c.signalservice.ContactRecordH\x00R\acontact\x128\n" + "\agroupV1\x18\x02 \x01(\v2\x1c.signalservice.GroupV1RecordH\x00R\agroupV1\x128\n" + "\agroupV2\x18\x03 \x01(\v2\x1c.signalservice.GroupV2RecordH\x00R\agroupV2\x128\n" + "\aaccount\x18\x04 \x01(\v2\x1c.signalservice.AccountRecordH\x00R\aaccount\x12b\n" + - "\x15storyDistributionList\x18\x05 \x01(\v2*.signalservice.StoryDistributionListRecordH\x00R\x15storyDistributionList\x12;\n" + + "\x15storyDistributionList\x18\x05 \x01(\v2*.signalservice.StoryDistributionListRecordH\x00R\x15storyDistributionList\x12D\n" + + "\vstickerPack\x18\x06 \x01(\v2 .signalservice.StickerPackRecordH\x00R\vstickerPack\x12;\n" + "\bcallLink\x18\a \x01(\v2\x1d.signalservice.CallLinkRecordH\x00R\bcallLink\x12A\n" + "\n" + "chatFolder\x18\b \x01(\v2\x1f.signalservice.ChatFolderRecordH\x00R\n" + "chatFolder\x12V\n" + "\x13notificationProfile\x18\t \x01(\v2\".signalservice.NotificationProfileH\x00R\x13notificationProfileB\b\n" + - "\x06record\"\xd9\b\n" + + "\x06record\"\xab\n" + + "\n" + "\rContactRecord\x12\x10\n" + "\x03aci\x18\x01 \x01(\tR\x03aci\x12\x12\n" + "\x04e164\x18\x02 \x01(\tR\x04e164\x12\x10\n" + @@ -3264,7 +3491,10 @@ const file_StorageService_proto_rawDesc = "" + "\x04note\x18\x17 \x01(\tR\x04note\x12A\n" + "\vavatarColor\x18\x18 \x01(\x0e2\x1a.signalservice.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x12\x1c\n" + "\taciBinary\x18\x19 \x01(\fR\taciBinary\x12\x1c\n" + - "\tpniBinary\x18\x1a \x01(\fR\tpniBinary\x1a4\n" + + "\tpniBinary\x18\x1a \x01(\fR\tpniBinary\x12.\n" + + "\x12blockedAtTimestamp\x18\x1b \x01(\x04R\x12blockedAtTimestamp\x12Q\n" + + "\x15notifyForCallsIfMuted\x18\x1c \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15notifyForCallsIfMuted\x12M\n" + + "\x13showUnreadReminders\x18\x1d \x01(\x0e2\x1b.signalservice.OptionalBoolR\x13showUnreadReminders\x1a4\n" + "\x04Name\x12\x14\n" + "\x05given\x18\x01 \x01(\tR\x05given\x12\x16\n" + "\x06family\x18\x02 \x01(\tR\x06family\":\n" + @@ -3280,7 +3510,7 @@ const file_StorageService_proto_rawDesc = "" + "\vwhitelisted\x18\x03 \x01(\bR\vwhitelisted\x12\x1a\n" + "\barchived\x18\x04 \x01(\bR\barchived\x12\"\n" + "\fmarkedUnread\x18\x05 \x01(\bR\fmarkedUnread\x120\n" + - "\x13mutedUntilTimestamp\x18\x06 \x01(\x04R\x13mutedUntilTimestamp\"\xcd\x04\n" + + "\x13mutedUntilTimestamp\x18\x06 \x01(\x04R\x13mutedUntilTimestamp\"\xcf\a\n" + "\rGroupV2Record\x12\x1c\n" + "\tmasterKey\x18\x01 \x01(\fR\tmasterKey\x12\x18\n" + "\ablocked\x18\x02 \x01(\bR\ablocked\x12 \n" + @@ -3293,7 +3523,12 @@ const file_StorageService_proto_rawDesc = "" + "\rstorySendMode\x18\n" + " \x01(\x0e2*.signalservice.GroupV2Record.StorySendModeR\rstorySendMode\x12A\n" + "\vavatarColor\x18\v \x01(\x0e2\x1a.signalservice.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x12*\n" + - "\x10verifiedNameHash\x18\f \x01(\fR\x10verifiedNameHash\"7\n" + + "\x10verifiedNameHash\x18\f \x01(\fR\x10verifiedNameHash\x12.\n" + + "\x12blockedAtTimestamp\x18\r \x01(\x04R\x12blockedAtTimestamp\x12Q\n" + + "\x15notifyForCallsIfMuted\x18\x0e \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15notifyForCallsIfMuted\x12W\n" + + "\x18notifyForMentionsIfMuted\x18\x0f \x01(\x0e2\x1b.signalservice.OptionalBoolR\x18notifyForMentionsIfMuted\x12U\n" + + "\x17notifyForRepliesIfMuted\x18\x10 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x17notifyForRepliesIfMuted\x12M\n" + + "\x13showUnreadReminders\x18\x11 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x13showUnreadReminders\"7\n" + "\rStorySendMode\x12\v\n" + "\aDEFAULT\x10\x00\x12\f\n" + "\bDISABLED\x10\x01\x12\v\n" + @@ -3302,7 +3537,7 @@ const file_StorageService_proto_rawDesc = "" + "\">\n" + "\bPayments\x12\x18\n" + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x18\n" + - "\aentropy\x18\x02 \x01(\fR\aentropy\"\x84!\n" + + "\aentropy\x18\x02 \x01(\fR\aentropy\"\xfa%\n" + "\rAccountRecord\x12\x1e\n" + "\n" + "profileKey\x18\x01 \x01(\fR\n" + @@ -3344,8 +3579,7 @@ const file_StorageService_proto_rawDesc = "" + "backupTier\x18( \x01(\x04H\x00R\n" + "backupTier\x88\x01\x01\x12b\n" + "\x14backupSubscriberData\x18) \x01(\v2..signalservice.AccountRecord.IAPSubscriberDataR\x14backupSubscriberData\x12A\n" + - "\vavatarColor\x18* \x01(\x0e2\x1a.signalservice.AvatarColorH\x01R\vavatarColor\x88\x01\x01\x12\\\n" + - "\x11backupTierHistory\x18+ \x01(\v2..signalservice.AccountRecord.BackupTierHistoryR\x11backupTierHistory\x12\x8c\x01\n" + + "\vavatarColor\x18* \x01(\x0e2\x1a.signalservice.AvatarColorH\x01R\vavatarColor\x88\x01\x01\x12\x8c\x01\n" + "!notificationProfileManualOverride\x18, \x01(\v2>.signalservice.AccountRecord.NotificationProfileManualOverrideR!notificationProfileManualOverride\x12H\n" + "\x1fnotificationProfileSyncDisabled\x18- \x01(\bR\x1fnotificationProfileSyncDisabled\x12J\n" + " automaticKeyVerificationDisabled\x18. \x01(\bR automaticKeyVerificationDisabled\x12L\n" + @@ -3353,7 +3587,16 @@ const file_StorageService_proto_rawDesc = "" + "\x18releaseNotesChatArchived\x180 \x01(\bH\x02R\x18releaseNotesChatArchived\x88\x01\x01\x12U\n" + "#releaseNotesChatMutedUntilTimestamp\x181 \x01(\x04H\x03R#releaseNotesChatMutedUntilTimestamp\x88\x01\x01\x12=\n" + "\x17releaseNotesChatBlocked\x182 \x01(\bH\x04R\x17releaseNotesChatBlocked\x88\x01\x01\x12G\n" + - "\x1creleaseNotesChatMarkedUnread\x183 \x01(\bH\x05R\x1creleaseNotesChatMarkedUnread\x88\x01\x01\x1a\xa4\x03\n" + + "\x1creleaseNotesChatMarkedUnread\x183 \x01(\bH\x05R\x1creleaseNotesChatMarkedUnread\x88\x01\x01\x12A\n" + + "\x19releaseNotesChatBlockedAt\x184 \x01(\x04H\x06R\x19releaseNotesChatBlockedAt\x88\x01\x01\x12V\n" + + "\x0funreadBadgeType\x185 \x01(\x0e2,.signalservice.AccountRecord.UnreadBadgeTypeR\x0funreadBadgeType\x12W\n" + + "\x18includeMutedChatsInBadge\x186 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x18includeMutedChatsInBadge\x12Q\n" + + "\x15reactionNotifications\x187 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15reactionNotifications\x12Q\n" + + "\x15notifyForCallsIfMuted\x188 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15notifyForCallsIfMuted\x12W\n" + + "\x18notifyForMentionsIfMuted\x189 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x18notifyForMentionsIfMuted\x12U\n" + + "\x17notifyForRepliesIfMuted\x18: \x01(\x0e2\x1b.signalservice.OptionalBoolR\x17notifyForRepliesIfMuted\x12M\n" + + "\x13showUnreadReminders\x18; \x01(\x0e2\x1b.signalservice.OptionalBoolR\x13showUnreadReminders\x12S\n" + + "\x16notifyWhenContactJoins\x18< \x01(\x0e2\x1b.signalservice.OptionalBoolR\x16notifyWhenContactJoins\x1a\xa4\x03\n" + "\x12PinnedConversation\x12S\n" + "\acontact\x18\x01 \x01(\v27.signalservice.AccountRecord.PinnedConversation.ContactH\x00R\acontact\x12&\n" + "\rlegacyGroupId\x18\x03 \x01(\fH\x00R\rlegacyGroupId\x12(\n" + @@ -3386,14 +3629,7 @@ const file_StorageService_proto_rawDesc = "" + "\fsubscriberId\x18\x01 \x01(\fR\fsubscriberId\x12&\n" + "\rpurchaseToken\x18\x02 \x01(\tH\x00R\rpurchaseToken\x126\n" + "\x15originalTransactionId\x18\x03 \x01(\x04H\x00R\x15originalTransactionIdB\x13\n" + - "\x11iapSubscriptionId\x1a\x8d\x01\n" + - "\x11BackupTierHistory\x12#\n" + - "\n" + - "backupTier\x18\x01 \x01(\x04H\x00R\n" + - "backupTier\x88\x01\x01\x12/\n" + - "\x10endedAtTimestamp\x18\x02 \x01(\x04H\x01R\x10endedAtTimestamp\x88\x01\x01B\r\n" + - "\v_backupTierB\x13\n" + - "\x11_endedAtTimestamp\x1a\xa2\x02\n" + + "\x11iapSubscriptionId\x1a\xa2\x02\n" + "!NotificationProfileManualOverride\x126\n" + "\x15disabledAtTimestampMs\x18\x01 \x01(\x04H\x00R\x15disabledAtTimestampMs\x12j\n" + "\aenabled\x18\x02 \x01(\v2N.signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabledH\x00R\aenabled\x1aM\n" + @@ -3401,7 +3637,11 @@ const file_StorageService_proto_rawDesc = "" + "\x02id\x18\x01 \x01(\fR\x02id\x12*\n" + "\x10endAtTimestampMs\x18\x03 \x01(\x04R\x10endAtTimestampMsB\n" + "\n" + - "\boverride\"@\n" + + "\boverride\"P\n" + + "\x0fUnreadBadgeType\x12\x16\n" + + "\x12UNKNOWN_BADGE_TYPE\x10\x00\x12\x13\n" + + "\x0fUNREAD_MESSAGES\x10\x01\x12\x10\n" + + "\fUNREAD_CHATS\x10\x02\"@\n" + "\x16PhoneNumberSharingMode\x12\v\n" + "\aUNKNOWN\x10\x00\x12\r\n" + "\tEVERYBODY\x10\x01\x12\n" + @@ -3412,8 +3652,9 @@ const file_StorageService_proto_rawDesc = "" + "\x19_releaseNotesChatArchivedB&\n" + "$_releaseNotesChatMutedUntilTimestampB\x1a\n" + "\x18_releaseNotesChatBlockedB\x1f\n" + - "\x1d_releaseNotesChatMarkedUnreadJ\x04\b\t\x10\n" + - "J\x04\b\x13\x10\x14J\x04\b\x1c\x10\x1dJ\x04\b\x1f\x10 J\x04\b$\x10%J\x04\b%\x10&J\x04\b&\x10'J\x04\b'\x10(\"\xb9\x02\n" + + "\x1d_releaseNotesChatMarkedUnreadB\x1c\n" + + "\x1a_releaseNotesChatBlockedAtJ\x04\b\t\x10\n" + + "J\x04\b\x13\x10\x14J\x04\b\x1c\x10\x1dJ\x04\b\x1f\x10 J\x04\b$\x10%J\x04\b%\x10&J\x04\b&\x10'J\x04\b'\x10(J\x04\b+\x10,\"\xb9\x02\n" + "\x1bStoryDistributionListRecord\x12\x1e\n" + "\n" + "identifier\x18\x01 \x01(\fR\n" + @@ -3423,7 +3664,12 @@ const file_StorageService_proto_rawDesc = "" + "\x12deletedAtTimestamp\x18\x04 \x01(\x04R\x12deletedAtTimestamp\x12$\n" + "\rallowsReplies\x18\x05 \x01(\bR\rallowsReplies\x12 \n" + "\visBlockList\x18\x06 \x01(\bR\visBlockList\x12<\n" + - "\x19recipientServiceIdsBinary\x18\a \x03(\fR\x19recipientServiceIdsBinary\"\x88\x01\n" + + "\x19recipientServiceIdsBinary\x18\a \x03(\fR\x19recipientServiceIdsBinary\"\x91\x01\n" + + "\x11StickerPackRecord\x12\x16\n" + + "\x06packId\x18\x01 \x01(\fR\x06packId\x12\x18\n" + + "\apackKey\x18\x02 \x01(\fR\apackKey\x12\x1a\n" + + "\bposition\x18\x03 \x01(\rR\bposition\x12.\n" + + "\x12deletedAtTimestamp\x18\x04 \x01(\x04R\x12deletedAtTimestamp\"\x88\x01\n" + "\x0eCallLinkRecord\x12\x18\n" + "\arootKey\x18\x01 \x01(\fR\arootKey\x12\"\n" + "\fadminPasskey\x18\x02 \x01(\fR\fadminPasskey\x122\n" + @@ -3510,139 +3756,154 @@ const file_StorageService_proto_rawDesc = "" + "8org.whispersystems.signalservice.internal.storage.protosP\x01b\x06proto3" var ( - file_StorageService_proto_rawDescOnce sync.Once - file_StorageService_proto_rawDescData []byte + file_signalpb_StorageService_proto_rawDescOnce sync.Once + file_signalpb_StorageService_proto_rawDescData []byte ) -func file_StorageService_proto_rawDescGZIP() []byte { - file_StorageService_proto_rawDescOnce.Do(func() { - file_StorageService_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_StorageService_proto_rawDesc), len(file_StorageService_proto_rawDesc))) +func file_signalpb_StorageService_proto_rawDescGZIP() []byte { + file_signalpb_StorageService_proto_rawDescOnce.Do(func() { + file_signalpb_StorageService_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_StorageService_proto_rawDesc), len(file_signalpb_StorageService_proto_rawDesc))) }) - return file_StorageService_proto_rawDescData + return file_signalpb_StorageService_proto_rawDescData } -var file_StorageService_proto_enumTypes = make([]protoimpl.EnumInfo, 9) -var file_StorageService_proto_msgTypes = make([]protoimpl.MessageInfo, 28) -var file_StorageService_proto_goTypes = []any{ +var file_signalpb_StorageService_proto_enumTypes = make([]protoimpl.EnumInfo, 10) +var file_signalpb_StorageService_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_signalpb_StorageService_proto_goTypes = []any{ (OptionalBool)(0), // 0: signalservice.OptionalBool (AvatarColor)(0), // 1: signalservice.AvatarColor (ManifestRecord_Identifier_Type)(0), // 2: signalservice.ManifestRecord.Identifier.Type (ContactRecord_IdentityState)(0), // 3: signalservice.ContactRecord.IdentityState (GroupV2Record_StorySendMode)(0), // 4: signalservice.GroupV2Record.StorySendMode - (AccountRecord_PhoneNumberSharingMode)(0), // 5: signalservice.AccountRecord.PhoneNumberSharingMode - (AccountRecord_UsernameLink_Color)(0), // 6: signalservice.AccountRecord.UsernameLink.Color - (ChatFolderRecord_FolderType)(0), // 7: signalservice.ChatFolderRecord.FolderType - (NotificationProfile_DayOfWeek)(0), // 8: signalservice.NotificationProfile.DayOfWeek - (*StorageManifest)(nil), // 9: signalservice.StorageManifest - (*StorageItem)(nil), // 10: signalservice.StorageItem - (*StorageItems)(nil), // 11: signalservice.StorageItems - (*ReadOperation)(nil), // 12: signalservice.ReadOperation - (*WriteOperation)(nil), // 13: signalservice.WriteOperation - (*ManifestRecord)(nil), // 14: signalservice.ManifestRecord - (*StorageRecord)(nil), // 15: signalservice.StorageRecord - (*ContactRecord)(nil), // 16: signalservice.ContactRecord - (*GroupV1Record)(nil), // 17: signalservice.GroupV1Record - (*GroupV2Record)(nil), // 18: signalservice.GroupV2Record - (*Payments)(nil), // 19: signalservice.Payments - (*AccountRecord)(nil), // 20: signalservice.AccountRecord - (*StoryDistributionListRecord)(nil), // 21: signalservice.StoryDistributionListRecord - (*CallLinkRecord)(nil), // 22: signalservice.CallLinkRecord - (*Recipient)(nil), // 23: signalservice.Recipient - (*ChatFolderRecord)(nil), // 24: signalservice.ChatFolderRecord - (*NotificationProfile)(nil), // 25: signalservice.NotificationProfile - (*ManifestRecord_Identifier)(nil), // 26: signalservice.ManifestRecord.Identifier - (*ContactRecord_Name)(nil), // 27: signalservice.ContactRecord.Name - (*AccountRecord_PinnedConversation)(nil), // 28: signalservice.AccountRecord.PinnedConversation - (*AccountRecord_UsernameLink)(nil), // 29: signalservice.AccountRecord.UsernameLink - (*AccountRecord_IAPSubscriberData)(nil), // 30: signalservice.AccountRecord.IAPSubscriberData - (*AccountRecord_BackupTierHistory)(nil), // 31: signalservice.AccountRecord.BackupTierHistory - (*AccountRecord_NotificationProfileManualOverride)(nil), // 32: signalservice.AccountRecord.NotificationProfileManualOverride - (*AccountRecord_PinnedConversation_Contact)(nil), // 33: signalservice.AccountRecord.PinnedConversation.Contact - (*AccountRecord_PinnedConversation_ReleaseNotes)(nil), // 34: signalservice.AccountRecord.PinnedConversation.ReleaseNotes - (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled)(nil), // 35: signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled - (*Recipient_Contact)(nil), // 36: signalservice.Recipient.Contact + (AccountRecord_UnreadBadgeType)(0), // 5: signalservice.AccountRecord.UnreadBadgeType + (AccountRecord_PhoneNumberSharingMode)(0), // 6: signalservice.AccountRecord.PhoneNumberSharingMode + (AccountRecord_UsernameLink_Color)(0), // 7: signalservice.AccountRecord.UsernameLink.Color + (ChatFolderRecord_FolderType)(0), // 8: signalservice.ChatFolderRecord.FolderType + (NotificationProfile_DayOfWeek)(0), // 9: signalservice.NotificationProfile.DayOfWeek + (*StorageManifest)(nil), // 10: signalservice.StorageManifest + (*StorageItem)(nil), // 11: signalservice.StorageItem + (*StorageItems)(nil), // 12: signalservice.StorageItems + (*ReadOperation)(nil), // 13: signalservice.ReadOperation + (*WriteOperation)(nil), // 14: signalservice.WriteOperation + (*ManifestRecord)(nil), // 15: signalservice.ManifestRecord + (*StorageRecord)(nil), // 16: signalservice.StorageRecord + (*ContactRecord)(nil), // 17: signalservice.ContactRecord + (*GroupV1Record)(nil), // 18: signalservice.GroupV1Record + (*GroupV2Record)(nil), // 19: signalservice.GroupV2Record + (*Payments)(nil), // 20: signalservice.Payments + (*AccountRecord)(nil), // 21: signalservice.AccountRecord + (*StoryDistributionListRecord)(nil), // 22: signalservice.StoryDistributionListRecord + (*StickerPackRecord)(nil), // 23: signalservice.StickerPackRecord + (*CallLinkRecord)(nil), // 24: signalservice.CallLinkRecord + (*Recipient)(nil), // 25: signalservice.Recipient + (*ChatFolderRecord)(nil), // 26: signalservice.ChatFolderRecord + (*NotificationProfile)(nil), // 27: signalservice.NotificationProfile + (*ManifestRecord_Identifier)(nil), // 28: signalservice.ManifestRecord.Identifier + (*ContactRecord_Name)(nil), // 29: signalservice.ContactRecord.Name + (*AccountRecord_PinnedConversation)(nil), // 30: signalservice.AccountRecord.PinnedConversation + (*AccountRecord_UsernameLink)(nil), // 31: signalservice.AccountRecord.UsernameLink + (*AccountRecord_IAPSubscriberData)(nil), // 32: signalservice.AccountRecord.IAPSubscriberData + (*AccountRecord_NotificationProfileManualOverride)(nil), // 33: signalservice.AccountRecord.NotificationProfileManualOverride + (*AccountRecord_PinnedConversation_Contact)(nil), // 34: signalservice.AccountRecord.PinnedConversation.Contact + (*AccountRecord_PinnedConversation_ReleaseNotes)(nil), // 35: signalservice.AccountRecord.PinnedConversation.ReleaseNotes + (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled)(nil), // 36: signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled + (*Recipient_Contact)(nil), // 37: signalservice.Recipient.Contact } -var file_StorageService_proto_depIdxs = []int32{ - 10, // 0: signalservice.StorageItems.items:type_name -> signalservice.StorageItem - 9, // 1: signalservice.WriteOperation.manifest:type_name -> signalservice.StorageManifest - 10, // 2: signalservice.WriteOperation.insertItem:type_name -> signalservice.StorageItem - 26, // 3: signalservice.ManifestRecord.identifiers:type_name -> signalservice.ManifestRecord.Identifier - 16, // 4: signalservice.StorageRecord.contact:type_name -> signalservice.ContactRecord - 17, // 5: signalservice.StorageRecord.groupV1:type_name -> signalservice.GroupV1Record - 18, // 6: signalservice.StorageRecord.groupV2:type_name -> signalservice.GroupV2Record - 20, // 7: signalservice.StorageRecord.account:type_name -> signalservice.AccountRecord - 21, // 8: signalservice.StorageRecord.storyDistributionList:type_name -> signalservice.StoryDistributionListRecord - 22, // 9: signalservice.StorageRecord.callLink:type_name -> signalservice.CallLinkRecord - 24, // 10: signalservice.StorageRecord.chatFolder:type_name -> signalservice.ChatFolderRecord - 25, // 11: signalservice.StorageRecord.notificationProfile:type_name -> signalservice.NotificationProfile - 3, // 12: signalservice.ContactRecord.identityState:type_name -> signalservice.ContactRecord.IdentityState - 27, // 13: signalservice.ContactRecord.nickname:type_name -> signalservice.ContactRecord.Name - 1, // 14: signalservice.ContactRecord.avatarColor:type_name -> signalservice.AvatarColor - 4, // 15: signalservice.GroupV2Record.storySendMode:type_name -> signalservice.GroupV2Record.StorySendMode - 1, // 16: signalservice.GroupV2Record.avatarColor:type_name -> signalservice.AvatarColor - 5, // 17: signalservice.AccountRecord.phoneNumberSharingMode:type_name -> signalservice.AccountRecord.PhoneNumberSharingMode - 28, // 18: signalservice.AccountRecord.pinnedConversations:type_name -> signalservice.AccountRecord.PinnedConversation - 19, // 19: signalservice.AccountRecord.payments:type_name -> signalservice.Payments - 0, // 20: signalservice.AccountRecord.storyViewReceiptsEnabled:type_name -> signalservice.OptionalBool - 29, // 21: signalservice.AccountRecord.usernameLink:type_name -> signalservice.AccountRecord.UsernameLink - 30, // 22: signalservice.AccountRecord.backupSubscriberData:type_name -> signalservice.AccountRecord.IAPSubscriberData - 1, // 23: signalservice.AccountRecord.avatarColor:type_name -> signalservice.AvatarColor - 31, // 24: signalservice.AccountRecord.backupTierHistory:type_name -> signalservice.AccountRecord.BackupTierHistory - 32, // 25: signalservice.AccountRecord.notificationProfileManualOverride:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride - 36, // 26: signalservice.Recipient.contact:type_name -> signalservice.Recipient.Contact - 7, // 27: signalservice.ChatFolderRecord.folderType:type_name -> signalservice.ChatFolderRecord.FolderType - 23, // 28: signalservice.ChatFolderRecord.includedRecipients:type_name -> signalservice.Recipient - 23, // 29: signalservice.ChatFolderRecord.excludedRecipients:type_name -> signalservice.Recipient - 23, // 30: signalservice.NotificationProfile.allowedMembers:type_name -> signalservice.Recipient - 8, // 31: signalservice.NotificationProfile.scheduleDaysEnabled:type_name -> signalservice.NotificationProfile.DayOfWeek - 2, // 32: signalservice.ManifestRecord.Identifier.type:type_name -> signalservice.ManifestRecord.Identifier.Type - 33, // 33: signalservice.AccountRecord.PinnedConversation.contact:type_name -> signalservice.AccountRecord.PinnedConversation.Contact - 34, // 34: signalservice.AccountRecord.PinnedConversation.releaseNotes:type_name -> signalservice.AccountRecord.PinnedConversation.ReleaseNotes - 6, // 35: signalservice.AccountRecord.UsernameLink.color:type_name -> signalservice.AccountRecord.UsernameLink.Color - 35, // 36: signalservice.AccountRecord.NotificationProfileManualOverride.enabled:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled - 37, // [37:37] is the sub-list for method output_type - 37, // [37:37] is the sub-list for method input_type - 37, // [37:37] is the sub-list for extension type_name - 37, // [37:37] is the sub-list for extension extendee - 0, // [0:37] is the sub-list for field type_name +var file_signalpb_StorageService_proto_depIdxs = []int32{ + 11, // 0: signalservice.StorageItems.items:type_name -> signalservice.StorageItem + 10, // 1: signalservice.WriteOperation.manifest:type_name -> signalservice.StorageManifest + 11, // 2: signalservice.WriteOperation.insertItem:type_name -> signalservice.StorageItem + 28, // 3: signalservice.ManifestRecord.identifiers:type_name -> signalservice.ManifestRecord.Identifier + 17, // 4: signalservice.StorageRecord.contact:type_name -> signalservice.ContactRecord + 18, // 5: signalservice.StorageRecord.groupV1:type_name -> signalservice.GroupV1Record + 19, // 6: signalservice.StorageRecord.groupV2:type_name -> signalservice.GroupV2Record + 21, // 7: signalservice.StorageRecord.account:type_name -> signalservice.AccountRecord + 22, // 8: signalservice.StorageRecord.storyDistributionList:type_name -> signalservice.StoryDistributionListRecord + 23, // 9: signalservice.StorageRecord.stickerPack:type_name -> signalservice.StickerPackRecord + 24, // 10: signalservice.StorageRecord.callLink:type_name -> signalservice.CallLinkRecord + 26, // 11: signalservice.StorageRecord.chatFolder:type_name -> signalservice.ChatFolderRecord + 27, // 12: signalservice.StorageRecord.notificationProfile:type_name -> signalservice.NotificationProfile + 3, // 13: signalservice.ContactRecord.identityState:type_name -> signalservice.ContactRecord.IdentityState + 29, // 14: signalservice.ContactRecord.nickname:type_name -> signalservice.ContactRecord.Name + 1, // 15: signalservice.ContactRecord.avatarColor:type_name -> signalservice.AvatarColor + 0, // 16: signalservice.ContactRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool + 0, // 17: signalservice.ContactRecord.showUnreadReminders:type_name -> signalservice.OptionalBool + 4, // 18: signalservice.GroupV2Record.storySendMode:type_name -> signalservice.GroupV2Record.StorySendMode + 1, // 19: signalservice.GroupV2Record.avatarColor:type_name -> signalservice.AvatarColor + 0, // 20: signalservice.GroupV2Record.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool + 0, // 21: signalservice.GroupV2Record.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool + 0, // 22: signalservice.GroupV2Record.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool + 0, // 23: signalservice.GroupV2Record.showUnreadReminders:type_name -> signalservice.OptionalBool + 6, // 24: signalservice.AccountRecord.phoneNumberSharingMode:type_name -> signalservice.AccountRecord.PhoneNumberSharingMode + 30, // 25: signalservice.AccountRecord.pinnedConversations:type_name -> signalservice.AccountRecord.PinnedConversation + 20, // 26: signalservice.AccountRecord.payments:type_name -> signalservice.Payments + 0, // 27: signalservice.AccountRecord.storyViewReceiptsEnabled:type_name -> signalservice.OptionalBool + 31, // 28: signalservice.AccountRecord.usernameLink:type_name -> signalservice.AccountRecord.UsernameLink + 32, // 29: signalservice.AccountRecord.backupSubscriberData:type_name -> signalservice.AccountRecord.IAPSubscriberData + 1, // 30: signalservice.AccountRecord.avatarColor:type_name -> signalservice.AvatarColor + 33, // 31: signalservice.AccountRecord.notificationProfileManualOverride:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride + 5, // 32: signalservice.AccountRecord.unreadBadgeType:type_name -> signalservice.AccountRecord.UnreadBadgeType + 0, // 33: signalservice.AccountRecord.includeMutedChatsInBadge:type_name -> signalservice.OptionalBool + 0, // 34: signalservice.AccountRecord.reactionNotifications:type_name -> signalservice.OptionalBool + 0, // 35: signalservice.AccountRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool + 0, // 36: signalservice.AccountRecord.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool + 0, // 37: signalservice.AccountRecord.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool + 0, // 38: signalservice.AccountRecord.showUnreadReminders:type_name -> signalservice.OptionalBool + 0, // 39: signalservice.AccountRecord.notifyWhenContactJoins:type_name -> signalservice.OptionalBool + 37, // 40: signalservice.Recipient.contact:type_name -> signalservice.Recipient.Contact + 8, // 41: signalservice.ChatFolderRecord.folderType:type_name -> signalservice.ChatFolderRecord.FolderType + 25, // 42: signalservice.ChatFolderRecord.includedRecipients:type_name -> signalservice.Recipient + 25, // 43: signalservice.ChatFolderRecord.excludedRecipients:type_name -> signalservice.Recipient + 25, // 44: signalservice.NotificationProfile.allowedMembers:type_name -> signalservice.Recipient + 9, // 45: signalservice.NotificationProfile.scheduleDaysEnabled:type_name -> signalservice.NotificationProfile.DayOfWeek + 2, // 46: signalservice.ManifestRecord.Identifier.type:type_name -> signalservice.ManifestRecord.Identifier.Type + 34, // 47: signalservice.AccountRecord.PinnedConversation.contact:type_name -> signalservice.AccountRecord.PinnedConversation.Contact + 35, // 48: signalservice.AccountRecord.PinnedConversation.releaseNotes:type_name -> signalservice.AccountRecord.PinnedConversation.ReleaseNotes + 7, // 49: signalservice.AccountRecord.UsernameLink.color:type_name -> signalservice.AccountRecord.UsernameLink.Color + 36, // 50: signalservice.AccountRecord.NotificationProfileManualOverride.enabled:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled + 51, // [51:51] is the sub-list for method output_type + 51, // [51:51] is the sub-list for method input_type + 51, // [51:51] is the sub-list for extension type_name + 51, // [51:51] is the sub-list for extension extendee + 0, // [0:51] is the sub-list for field type_name } -func init() { file_StorageService_proto_init() } -func file_StorageService_proto_init() { - if File_StorageService_proto != nil { +func init() { file_signalpb_StorageService_proto_init() } +func file_signalpb_StorageService_proto_init() { + if File_signalpb_StorageService_proto != nil { return } - file_StorageService_proto_msgTypes[6].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[6].OneofWrappers = []any{ (*StorageRecord_Contact)(nil), (*StorageRecord_GroupV1)(nil), (*StorageRecord_GroupV2)(nil), (*StorageRecord_Account)(nil), (*StorageRecord_StoryDistributionList)(nil), + (*StorageRecord_StickerPack)(nil), (*StorageRecord_CallLink)(nil), (*StorageRecord_ChatFolder)(nil), (*StorageRecord_NotificationProfile)(nil), } - file_StorageService_proto_msgTypes[7].OneofWrappers = []any{} - file_StorageService_proto_msgTypes[9].OneofWrappers = []any{} - file_StorageService_proto_msgTypes[11].OneofWrappers = []any{} - file_StorageService_proto_msgTypes[14].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[7].OneofWrappers = []any{} + file_signalpb_StorageService_proto_msgTypes[9].OneofWrappers = []any{} + file_signalpb_StorageService_proto_msgTypes[11].OneofWrappers = []any{} + file_signalpb_StorageService_proto_msgTypes[15].OneofWrappers = []any{ (*Recipient_Contact_)(nil), (*Recipient_LegacyGroupId)(nil), (*Recipient_GroupMasterKey)(nil), } - file_StorageService_proto_msgTypes[16].OneofWrappers = []any{} - file_StorageService_proto_msgTypes[19].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[17].OneofWrappers = []any{} + file_signalpb_StorageService_proto_msgTypes[20].OneofWrappers = []any{ (*AccountRecord_PinnedConversation_Contact_)(nil), (*AccountRecord_PinnedConversation_LegacyGroupId)(nil), (*AccountRecord_PinnedConversation_GroupMasterKey)(nil), (*AccountRecord_PinnedConversation_ReleaseNotes_)(nil), } - file_StorageService_proto_msgTypes[21].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[22].OneofWrappers = []any{ (*AccountRecord_IAPSubscriberData_PurchaseToken)(nil), (*AccountRecord_IAPSubscriberData_OriginalTransactionId)(nil), } - file_StorageService_proto_msgTypes[22].OneofWrappers = []any{} - file_StorageService_proto_msgTypes[23].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[23].OneofWrappers = []any{ (*AccountRecord_NotificationProfileManualOverride_DisabledAtTimestampMs)(nil), (*AccountRecord_NotificationProfileManualOverride_Enabled)(nil), } @@ -3650,18 +3911,18 @@ func file_StorageService_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_StorageService_proto_rawDesc), len(file_StorageService_proto_rawDesc)), - NumEnums: 9, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_StorageService_proto_rawDesc), len(file_signalpb_StorageService_proto_rawDesc)), + NumEnums: 10, NumMessages: 28, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_StorageService_proto_goTypes, - DependencyIndexes: file_StorageService_proto_depIdxs, - EnumInfos: file_StorageService_proto_enumTypes, - MessageInfos: file_StorageService_proto_msgTypes, + GoTypes: file_signalpb_StorageService_proto_goTypes, + DependencyIndexes: file_signalpb_StorageService_proto_depIdxs, + EnumInfos: file_signalpb_StorageService_proto_enumTypes, + MessageInfos: file_signalpb_StorageService_proto_msgTypes, }.Build() - File_StorageService_proto = out.File - file_StorageService_proto_goTypes = nil - file_StorageService_proto_depIdxs = nil + File_signalpb_StorageService_proto = out.File + file_signalpb_StorageService_proto_goTypes = nil + file_signalpb_StorageService_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/StorageService.proto b/pkg/signalmeow/protobuf/signalpb/StorageService.proto similarity index 80% rename from pkg/signalmeow/protobuf/StorageService.proto rename to pkg/signalmeow/protobuf/signalpb/StorageService.proto index 0072714..4109826 100644 --- a/pkg/signalmeow/protobuf/StorageService.proto +++ b/pkg/signalmeow/protobuf/signalpb/StorageService.proto @@ -1,7 +1,6 @@ -/** - * Copyright (C) 2019 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. +/* + * Copyright 2020-2021 Signal Messenger, LLC + * SPDX-License-Identifier: AGPL-3.0-only */ syntax = "proto3"; @@ -50,6 +49,7 @@ message ManifestRecord { GROUPV2 = 3; ACCOUNT = 4; STORY_DISTRIBUTION_LIST = 5; + STICKER_PACK = 6; CALL_LINK = 7; CHAT_FOLDER = 8; NOTIFICATION_PROFILE = 9; @@ -73,6 +73,7 @@ message StorageRecord { GroupV2Record groupV2 = 3; AccountRecord account = 4; StoryDistributionListRecord storyDistributionList = 5; + StickerPackRecord stickerPack = 6; CallLinkRecord callLink = 7; ChatFolderRecord chatFolder = 8; NotificationProfile notificationProfile = 9; @@ -142,7 +143,10 @@ message ContactRecord { optional AvatarColor avatarColor = 24; bytes aciBinary = 25; // 16-byte UUID bytes pniBinary = 26; // 16-byte UUID - // Next ID: 27 + uint64 blockedAtTimestamp = 27; // 0 means the blocked time is unknown + OptionalBool notifyForCallsIfMuted = 28; // If unset, use the default settings + OptionalBool showUnreadReminders = 29; // If unset, use the default settings + // Next ID: 30 } message GroupV1Record { @@ -167,12 +171,17 @@ message GroupV2Record { bool archived = 4; bool markedUnread = 5; uint64 mutedUntilTimestamp = 6; - bool dontNotifyForMentionsIfMuted = 7; + bool dontNotifyForMentionsIfMuted = 7; // will be deprecated in favor of [notifyForMentionsIfMuted] bool hideStory = 8; reserved /* storySendEnabled */ 9; StorySendMode storySendMode = 10; optional AvatarColor avatarColor = 11; bytes verifiedNameHash = 12; // SHA-256 of UTF-8 encoded decrypted group title that was last verified + uint64 blockedAtTimestamp = 13; // 0 means the blocked time is unknown + OptionalBool notifyForCallsIfMuted = 14; // If unset, use the default settings + OptionalBool notifyForMentionsIfMuted = 15; // If unset, use the default settings. If [dontNotifyForMentionsIfMuted] is true, this should be initialized to false. + OptionalBool notifyForRepliesIfMuted = 16; // If unset, use the default settings + OptionalBool showUnreadReminders = 17; // If unset, use the default settings } message Payments { @@ -182,6 +191,12 @@ message Payments { message AccountRecord { + enum UnreadBadgeType { + UNKNOWN_BADGE_TYPE = 0; // Interpret as "Unread messages" + UNREAD_MESSAGES = 1; + UNREAD_CHATS = 2; + } + enum PhoneNumberSharingMode { UNKNOWN = 0; EVERYBODY = 1; @@ -234,12 +249,6 @@ message AccountRecord { } } - message BackupTierHistory { - // See zkgroup for integer particular values. Unset if backups are not enabled. - optional uint64 backupTier = 1; - optional uint64 endedAtTimestamp = 2; - } - message NotificationProfileManualOverride { message ManuallyEnabled { bytes id = 1; @@ -296,7 +305,7 @@ message AccountRecord { optional uint64 backupTier = 40; // See zkgroup for integer particular values. Unset if backups are not enabled. IAPSubscriberData backupSubscriberData = 41; optional AvatarColor avatarColor = 42; - BackupTierHistory backupTierHistory = 43; + reserved /* backupTierHistory */ 43; NotificationProfileManualOverride notificationProfileManualOverride = 44; bool notificationProfileSyncDisabled = 45; bool automaticKeyVerificationDisabled = 46; @@ -305,6 +314,15 @@ message AccountRecord { optional uint64 releaseNotesChatMutedUntilTimestamp = 49; optional bool releaseNotesChatBlocked = 50; optional bool releaseNotesChatMarkedUnread = 51; + optional uint64 releaseNotesChatBlockedAt = 52; // only set if known (>0) + UnreadBadgeType unreadBadgeType = 53; // Only used in desktop/ios + OptionalBool includeMutedChatsInBadge = 54; // Only used in desktop/ios. If unset, consider this off. Only used in desktop/ios + OptionalBool reactionNotifications = 55; // If unset, consider this on + OptionalBool notifyForCallsIfMuted = 56; // If unset, consider this off + OptionalBool notifyForMentionsIfMuted = 57; // If unset, consider this on + OptionalBool notifyForRepliesIfMuted = 58; // If unset, consider this on + OptionalBool showUnreadReminders = 59; // If unset, consider this on + OptionalBool notifyWhenContactJoins = 60; // If unset, consider this off } message StoryDistributionListRecord { @@ -317,6 +335,27 @@ message StoryDistributionListRecord { repeated bytes recipientServiceIdsBinary = 7; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI) } +message StickerPackRecord { + bytes packId = 1; // 16 bytes + bytes packKey = 2; // 32 bytes, used to derive the AES-256 key + // aesKey = HKDF( + // input = packKey, + // salt = 32 zero bytes, + // info = "Sticker Pack" + // ) + uint32 position = 3; // When displayed sticker packs should be first sorted + // in ascending order by zero-based `position` and + // then by ascending `packId` (lexicographically, + // packId can be treated as a hex string). + // When installing a sticker pack the client should find + // the maximum `position` among currently known stickers + // and use `max_position + 1` as the value for the new + // `position`. + uint64 deletedAtTimestamp = 4; // Timestamp in milliseconds. When present and + // non-zero - `packKey` and `position` should + // be unset +} + message CallLinkRecord { bytes rootKey = 1; bytes adminPasskey = 2; diff --git a/pkg/signalmeow/protobuf/WebSocketResources.pb.go b/pkg/signalmeow/protobuf/signalpb/WebSocketResources.pb.go similarity index 78% rename from pkg/signalmeow/protobuf/WebSocketResources.pb.go rename to pkg/signalmeow/protobuf/signalpb/WebSocketResources.pb.go index d52ae1e..28efd72 100644 --- a/pkg/signalmeow/protobuf/WebSocketResources.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/WebSocketResources.pb.go @@ -7,7 +7,7 @@ // versions: // protoc-gen-go v1.36.11 // protoc v7.34.1 -// source: WebSocketResources.proto +// source: signalpb/WebSocketResources.proto package signalpb @@ -59,11 +59,11 @@ func (x WebSocketMessage_Type) String() string { } func (WebSocketMessage_Type) Descriptor() protoreflect.EnumDescriptor { - return file_WebSocketResources_proto_enumTypes[0].Descriptor() + return file_signalpb_WebSocketResources_proto_enumTypes[0].Descriptor() } func (WebSocketMessage_Type) Type() protoreflect.EnumType { - return &file_WebSocketResources_proto_enumTypes[0] + return &file_signalpb_WebSocketResources_proto_enumTypes[0] } func (x WebSocketMessage_Type) Number() protoreflect.EnumNumber { @@ -82,7 +82,7 @@ func (x *WebSocketMessage_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use WebSocketMessage_Type.Descriptor instead. func (WebSocketMessage_Type) EnumDescriptor() ([]byte, []int) { - return file_WebSocketResources_proto_rawDescGZIP(), []int{2, 0} + return file_signalpb_WebSocketResources_proto_rawDescGZIP(), []int{2, 0} } type WebSocketRequestMessage struct { @@ -98,7 +98,7 @@ type WebSocketRequestMessage struct { func (x *WebSocketRequestMessage) Reset() { *x = WebSocketRequestMessage{} - mi := &file_WebSocketResources_proto_msgTypes[0] + mi := &file_signalpb_WebSocketResources_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -110,7 +110,7 @@ func (x *WebSocketRequestMessage) String() string { func (*WebSocketRequestMessage) ProtoMessage() {} func (x *WebSocketRequestMessage) ProtoReflect() protoreflect.Message { - mi := &file_WebSocketResources_proto_msgTypes[0] + mi := &file_signalpb_WebSocketResources_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -123,7 +123,7 @@ func (x *WebSocketRequestMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use WebSocketRequestMessage.ProtoReflect.Descriptor instead. func (*WebSocketRequestMessage) Descriptor() ([]byte, []int) { - return file_WebSocketResources_proto_rawDescGZIP(), []int{0} + return file_signalpb_WebSocketResources_proto_rawDescGZIP(), []int{0} } func (x *WebSocketRequestMessage) GetVerb() string { @@ -174,7 +174,7 @@ type WebSocketResponseMessage struct { func (x *WebSocketResponseMessage) Reset() { *x = WebSocketResponseMessage{} - mi := &file_WebSocketResources_proto_msgTypes[1] + mi := &file_signalpb_WebSocketResources_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -186,7 +186,7 @@ func (x *WebSocketResponseMessage) String() string { func (*WebSocketResponseMessage) ProtoMessage() {} func (x *WebSocketResponseMessage) ProtoReflect() protoreflect.Message { - mi := &file_WebSocketResources_proto_msgTypes[1] + mi := &file_signalpb_WebSocketResources_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -199,7 +199,7 @@ func (x *WebSocketResponseMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use WebSocketResponseMessage.ProtoReflect.Descriptor instead. func (*WebSocketResponseMessage) Descriptor() ([]byte, []int) { - return file_WebSocketResources_proto_rawDescGZIP(), []int{1} + return file_signalpb_WebSocketResources_proto_rawDescGZIP(), []int{1} } func (x *WebSocketResponseMessage) GetId() uint64 { @@ -248,7 +248,7 @@ type WebSocketMessage struct { func (x *WebSocketMessage) Reset() { *x = WebSocketMessage{} - mi := &file_WebSocketResources_proto_msgTypes[2] + mi := &file_signalpb_WebSocketResources_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -260,7 +260,7 @@ func (x *WebSocketMessage) String() string { func (*WebSocketMessage) ProtoMessage() {} func (x *WebSocketMessage) ProtoReflect() protoreflect.Message { - mi := &file_WebSocketResources_proto_msgTypes[2] + mi := &file_signalpb_WebSocketResources_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -273,7 +273,7 @@ func (x *WebSocketMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use WebSocketMessage.ProtoReflect.Descriptor instead. func (*WebSocketMessage) Descriptor() ([]byte, []int) { - return file_WebSocketResources_proto_rawDescGZIP(), []int{2} + return file_signalpb_WebSocketResources_proto_rawDescGZIP(), []int{2} } func (x *WebSocketMessage) GetType() WebSocketMessage_Type { @@ -297,11 +297,11 @@ func (x *WebSocketMessage) GetResponse() *WebSocketResponseMessage { return nil } -var File_WebSocketResources_proto protoreflect.FileDescriptor +var File_signalpb_WebSocketResources_proto protoreflect.FileDescriptor -const file_WebSocketResources_proto_rawDesc = "" + +const file_signalpb_WebSocketResources_proto_rawDesc = "" + "\n" + - "\x18WebSocketResources.proto\x12\rsignalservice\"\x7f\n" + + "!signalpb/WebSocketResources.proto\x12\rsignalservice\"\x7f\n" + "\x17WebSocketRequestMessage\x12\x12\n" + "\x04verb\x18\x01 \x01(\tR\x04verb\x12\x12\n" + "\x04path\x18\x02 \x01(\tR\x04path\x12\x12\n" + @@ -325,26 +325,26 @@ const file_WebSocketResources_proto_rawDesc = "" + "\x1corg.signal.network.websocketB\x0fWebSocketProtos" var ( - file_WebSocketResources_proto_rawDescOnce sync.Once - file_WebSocketResources_proto_rawDescData []byte + file_signalpb_WebSocketResources_proto_rawDescOnce sync.Once + file_signalpb_WebSocketResources_proto_rawDescData []byte ) -func file_WebSocketResources_proto_rawDescGZIP() []byte { - file_WebSocketResources_proto_rawDescOnce.Do(func() { - file_WebSocketResources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_WebSocketResources_proto_rawDesc), len(file_WebSocketResources_proto_rawDesc))) +func file_signalpb_WebSocketResources_proto_rawDescGZIP() []byte { + file_signalpb_WebSocketResources_proto_rawDescOnce.Do(func() { + file_signalpb_WebSocketResources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_WebSocketResources_proto_rawDesc), len(file_signalpb_WebSocketResources_proto_rawDesc))) }) - return file_WebSocketResources_proto_rawDescData + return file_signalpb_WebSocketResources_proto_rawDescData } -var file_WebSocketResources_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_WebSocketResources_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_WebSocketResources_proto_goTypes = []any{ +var file_signalpb_WebSocketResources_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_signalpb_WebSocketResources_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_signalpb_WebSocketResources_proto_goTypes = []any{ (WebSocketMessage_Type)(0), // 0: signalservice.WebSocketMessage.Type (*WebSocketRequestMessage)(nil), // 1: signalservice.WebSocketRequestMessage (*WebSocketResponseMessage)(nil), // 2: signalservice.WebSocketResponseMessage (*WebSocketMessage)(nil), // 3: signalservice.WebSocketMessage } -var file_WebSocketResources_proto_depIdxs = []int32{ +var file_signalpb_WebSocketResources_proto_depIdxs = []int32{ 0, // 0: signalservice.WebSocketMessage.type:type_name -> signalservice.WebSocketMessage.Type 1, // 1: signalservice.WebSocketMessage.request:type_name -> signalservice.WebSocketRequestMessage 2, // 2: signalservice.WebSocketMessage.response:type_name -> signalservice.WebSocketResponseMessage @@ -355,27 +355,27 @@ var file_WebSocketResources_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_WebSocketResources_proto_init() } -func file_WebSocketResources_proto_init() { - if File_WebSocketResources_proto != nil { +func init() { file_signalpb_WebSocketResources_proto_init() } +func file_signalpb_WebSocketResources_proto_init() { + if File_signalpb_WebSocketResources_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_WebSocketResources_proto_rawDesc), len(file_WebSocketResources_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_WebSocketResources_proto_rawDesc), len(file_signalpb_WebSocketResources_proto_rawDesc)), NumEnums: 1, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_WebSocketResources_proto_goTypes, - DependencyIndexes: file_WebSocketResources_proto_depIdxs, - EnumInfos: file_WebSocketResources_proto_enumTypes, - MessageInfos: file_WebSocketResources_proto_msgTypes, + GoTypes: file_signalpb_WebSocketResources_proto_goTypes, + DependencyIndexes: file_signalpb_WebSocketResources_proto_depIdxs, + EnumInfos: file_signalpb_WebSocketResources_proto_enumTypes, + MessageInfos: file_signalpb_WebSocketResources_proto_msgTypes, }.Build() - File_WebSocketResources_proto = out.File - file_WebSocketResources_proto_goTypes = nil - file_WebSocketResources_proto_depIdxs = nil + File_signalpb_WebSocketResources_proto = out.File + file_signalpb_WebSocketResources_proto_goTypes = nil + file_signalpb_WebSocketResources_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/WebSocketResources.proto b/pkg/signalmeow/protobuf/signalpb/WebSocketResources.proto similarity index 100% rename from pkg/signalmeow/protobuf/WebSocketResources.proto rename to pkg/signalmeow/protobuf/signalpb/WebSocketResources.proto diff --git a/pkg/signalmeow/protobuf/extra.go b/pkg/signalmeow/protobuf/signalpb/extra.go similarity index 100% rename from pkg/signalmeow/protobuf/extra.go rename to pkg/signalmeow/protobuf/signalpb/extra.go diff --git a/pkg/signalmeow/protobuf/update-protos.sh b/pkg/signalmeow/protobuf/update-protos.sh index 9bc1023..c1e3c71 100755 --- a/pkg/signalmeow/protobuf/update-protos.sh +++ b/pkg/signalmeow/protobuf/update-protos.sh @@ -1,9 +1,8 @@ #!/bin/bash +cd $(dirname "$0") set -euo pipefail -ANDROID_GIT_REVISION=${1:-aa9591211ba0c77376318bdd5f014e064b8e8de4} -DESKTOP_GIT_REVISION=${2:-a0af83d7488930c213a7b6dd554490ebe9e65628} -LIBSIGNAL_GIT_REVISION=${3:-46d867c986f66201e34e7ae20ce423eec742bf3f} +ANDROID_GIT_REVISION=${1:-46d6eeb2f3d3e12e6938151a8dbd2a33b5604b1f} update_proto() { case "$1" in @@ -22,19 +21,15 @@ update_proto() { prefix="core/network/src/main/protowire/" GIT_REVISION=$ANDROID_GIT_REVISION ;; - Signal-Desktop) - REPO="Signal-Desktop" - prefix="protos/" - GIT_REVISION=$DESKTOP_GIT_REVISION - ;; - libsignal) - REPO="libsignal" - prefix="rust/net/src/proto/" - GIT_REVISION=$LIBSIGNAL_GIT_REVISION + Signal-Android-Util) + REPO="Signal-Android" + prefix="core/util-jvm/src/main/protowire/" + GIT_REVISION=$ANDROID_GIT_REVISION ;; esac + DIRNAME=${3:-signalpb} echo https://raw.githubusercontent.com/signalapp/${REPO}/${GIT_REVISION}/${prefix}${2} - curl -LOf https://raw.githubusercontent.com/signalapp/${REPO}/${GIT_REVISION}/${prefix}${2} + curl -Lf https://raw.githubusercontent.com/signalapp/${REPO}/${GIT_REVISION}/${prefix}${2} -o ${DIRNAME}/${2} } @@ -44,12 +39,10 @@ update_proto Signal-Android SignalService.proto update_proto Signal-Android StickerResources.proto update_proto Signal-Android-Network WebSocketResources.proto update_proto Signal-Android StorageService.proto +update_proto Signal-Android-Util DeviceName.proto +update_proto Signal-Android-Archive Backup.proto backuppb -update_proto Signal-Android-Archive Backup.proto -mv Backup.proto backuppb/Backup.proto - -update_proto Signal-Desktop DeviceName.proto -update_proto libsignal cds2.proto -mv cds2.proto cds2pb/cds2.proto -# TODO these were moved to libsignal only -#update_proto Signal-Desktop UnidentifiedDelivery.proto +cp -f ../../libsignalgo/libsignal/rust/net/src/proto/cds2.proto cds2pb/cds2.proto +cp -rf ../../libsignalgo/libsignal/rust/net/grpc/proto/org . +sed 's#TextSecure.proto#signalpb/SignalService.proto#' -i org/signal/chat/messages.proto +sed 's/textsecure.Envelope/signalservice.Envelope/' -i org/signal/chat/messages.proto diff --git a/pkg/signalmeow/provisioning.go b/pkg/signalmeow/provisioning.go index 250e5d3..bba1411 100644 --- a/pkg/signalmeow/provisioning.go +++ b/pkg/signalmeow/provisioning.go @@ -34,7 +34,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/store" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" diff --git a/pkg/signalmeow/provisioning_cipher.go b/pkg/signalmeow/provisioning_cipher.go index 8670274..b20beb0 100644 --- a/pkg/signalmeow/provisioning_cipher.go +++ b/pkg/signalmeow/provisioning_cipher.go @@ -29,7 +29,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) type ProvisioningCipher struct { diff --git a/pkg/signalmeow/pushreg.go b/pkg/signalmeow/pushreg.go index 79d0318..b912f0c 100644 --- a/pkg/signalmeow/pushreg.go +++ b/pkg/signalmeow/pushreg.go @@ -21,7 +21,7 @@ import ( "encoding/json" "net/http" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index e592c98..0254a21 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -34,7 +34,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalmeow/events" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) @@ -84,6 +84,10 @@ func (cli *Client) startWebsocketsInternal( loopCtx context.Context, loopCancel context.CancelFunc, err error, ) { + cli.GRPC, err = web.NewGRPCClient(cli.Store.BasicAuthCreds()) + if err != nil { + return + } loopCtx, loopCancel = context.WithCancel(ctx) unauthChan, err = cli.connectUnauthedWS(loopCtx) if err != nil { @@ -283,26 +287,23 @@ func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnection func (cli *Client) ForceReconnect() { cli.AuthedWS.ForceReconnect() cli.UnauthedWS.ForceReconnect() + cli.GRPC.ResetConnectBackoff() } func (cli *Client) StopReceiveLoops() error { defer func() { cli.AuthedWS = nil cli.UnauthedWS = nil + cli.GRPC = nil }() authErr := cli.AuthedWS.Close() unauthErr := cli.UnauthedWS.Close() + grpcErr := cli.GRPC.Close() if cli.loopCancel != nil { cli.loopCancel() cli.loopWg.Wait() } - if authErr != nil { - return authErr - } - if unauthErr != nil { - return unauthErr - } - return nil + return errors.Join(authErr, unauthErr, grpcErr) } func (cli *Client) LastConnectionStatus() SignalConnectionStatus { @@ -318,13 +319,7 @@ func (cli *Client) ClearKeysAndDisconnect(ctx context.Context) error { clearErr2 := cli.Store.ClearPassword(ctx) stopLoopErr := cli.StopReceiveLoops() - if clearErr != nil { - return clearErr - } - if clearErr2 != nil { - return clearErr2 - } - return stopLoopErr + return errors.Join(clearErr, clearErr2, stopLoopErr) } func (cli *Client) incomingRequestHandler(ctx context.Context, req *signalpb.WebSocketRequestMessage) (*web.SimpleResponse, error) { @@ -484,7 +479,7 @@ func (cli *Client) handleDecryptedResult( // Only send decryption error event if the message was urgent, // to prevent spamming errors for typing notifications and whatnot if envelope.GetUrgent() && - result.ContentHint != signalpb.UnidentifiedSenderMessage_Message_IMPLICIT && + result.ContentHint != libsignalgo.UnidentifiedSenderMessageContentHintImplicit && !strings.Contains(result.Err.Error(), "message with old counter") { handlerSuccess = cli.handleEvent(&events.DecryptionError{ Sender: theirServiceID.UUID, diff --git a/pkg/signalmeow/receiving_decrypt.go b/pkg/signalmeow/receiving_decrypt.go index 1d2c8cc..7d3c1a3 100644 --- a/pkg/signalmeow/receiving_decrypt.go +++ b/pkg/signalmeow/receiving_decrypt.go @@ -29,7 +29,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/store" ) @@ -37,7 +37,7 @@ type DecryptionResult struct { SenderAddress *libsignalgo.Address CiphertextHash *[32]byte Content *signalpb.Content - ContentHint signalpb.UnidentifiedSenderMessage_Message_ContentHint + ContentHint libsignalgo.UnidentifiedSenderMessageContentHint Err error GroupID *libsignalgo.GroupIdentifier Unencrypted bool @@ -344,7 +344,7 @@ func (cli *Client) decryptUnidentifiedSenderEnvelope(ctx context.Context, destin if err != nil { return result, fmt.Errorf("failed to get group ID: %w", err) } - result.ContentHint = signalpb.UnidentifiedSenderMessage_Message_ContentHint(contentHint) + result.ContentHint = contentHint senderUUID, err := senderCertificate.GetSenderUUID() if err != nil { return result, fmt.Errorf("failed to get sender UUID: %w", err) @@ -410,7 +410,7 @@ func (cli *Client) decryptUnidentifiedSenderEnvelope(ctx context.Context, destin return result, fmt.Errorf("unsupported sealed sender message type %d", messageType) } if err != nil { - result.Retriable = result.ContentHint == signalpb.UnidentifiedSenderMessage_Message_RESENDABLE + result.Retriable = result.ContentHint == libsignalgo.UnidentifiedSenderMessageContentHintResendable return result, err } resultPtr.GroupID = result.GroupID diff --git a/pkg/signalmeow/retry.go b/pkg/signalmeow/retry.go index a581075..0faf04a 100644 --- a/pkg/signalmeow/retry.go +++ b/pkg/signalmeow/retry.go @@ -27,7 +27,7 @@ import ( "go.mau.fi/util/random" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) diff --git a/pkg/signalmeow/senderkey.go b/pkg/signalmeow/senderkey.go index 62ae832..6e2c2da 100644 --- a/pkg/signalmeow/senderkey.go +++ b/pkg/signalmeow/senderkey.go @@ -32,7 +32,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/store" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index 756e673..8852197 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -36,7 +36,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) diff --git a/pkg/signalmeow/sticker.go b/pkg/signalmeow/sticker.go index 2759d18..e1364b1 100644 --- a/pkg/signalmeow/sticker.go +++ b/pkg/signalmeow/sticker.go @@ -35,7 +35,7 @@ import ( "golang.org/x/sync/semaphore" "google.golang.org/protobuf/proto" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) diff --git a/pkg/signalmeow/storageservice.go b/pkg/signalmeow/storageservice.go index 2326e1c..df26a8d 100644 --- a/pkg/signalmeow/storageservice.go +++ b/pkg/signalmeow/storageservice.go @@ -37,7 +37,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalmeow/events" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) diff --git a/pkg/signalmeow/store/container.go b/pkg/signalmeow/store/container.go index e6335e5..d1c670a 100644 --- a/pkg/signalmeow/store/container.go +++ b/pkg/signalmeow/store/container.go @@ -12,7 +12,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/store/upgrades" ) diff --git a/pkg/signalmeow/store/device.go b/pkg/signalmeow/store/device.go index e72c04f..3b6ebe5 100644 --- a/pkg/signalmeow/store/device.go +++ b/pkg/signalmeow/store/device.go @@ -10,7 +10,7 @@ import ( "go.mau.fi/util/dbutil" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) type sqlStore struct { diff --git a/pkg/signalmeow/web/grpc.go b/pkg/signalmeow/web/grpc.go new file mode 100644 index 0000000..fb7cf7c --- /dev/null +++ b/pkg/signalmeow/web/grpc.go @@ -0,0 +1,169 @@ +// mautrix-signal - A Matrix-signal puppeting bridge. +// Copyright (C) 2026 Tulir Asokan +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package web + +import ( + "context" + "encoding/base64" + "errors" + + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/account" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/attachments" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/backups" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/call_quality" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/calling" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/challenge" + scredentials "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/credentials" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/device" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/donations" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/keys" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/login_purchase" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/messages" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/one_time_donations" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/payments" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/product_configuration" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/profile" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/remote_configuration" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/subscriptions" +) + +type GRPCAuthHeader struct { + value string +} + +var _ credentials.PerRPCCredentials = (*GRPCAuthHeader)(nil) + +func basicAuth(username, password string) string { + auth := username + ":" + password + return base64.StdEncoding.EncodeToString([]byte(auth)) +} + +func (a *GRPCAuthHeader) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { + return map[string]string{ + "authorization": a.value, + }, nil +} + +func (a *GRPCAuthHeader) RequireTransportSecurity() bool { + return true +} + +type GRPCClient struct { + AuthConn *grpc.ClientConn + UnauthConn *grpc.ClientConn + + Accounts account.AccountsClient + Attachments attachments.AttachmentsClient + Backups backups.BackupsClient + Calling calling.CallingClient + Challenge challenge.ChallengeClient + Credentials scredentials.CredentialsClient + Devices device.DevicesClient + Donations donations.DonationsClient + Keys keys.KeysClient + Messages messages.MessagesClient + Payments payments.PaymentsClient + Profile profile.ProfileClient + RemoteConfiguration remote_configuration.RemoteConfigurationClient + + AccountsAnonymous account.AccountsAnonymousClient + BackupsAnonymous backups.BackupsAnonymousClient + CredentialsAnonymous scredentials.CredentialsAnonymousClient + KeysAnonymous keys.KeysAnonymousClient + MessagesAnonymous messages.MessagesAnonymousClient + ProfileAnonymous profile.ProfileAnonymousClient + CallQuality call_quality.CallQualityClient + LoginPurchase login_purchase.LoginPurchaseClient + OneTimeDonations one_time_donations.OneTimeDonationsClient + ProductConfiguration product_configuration.ProductConfigurationClient + Subscriptions subscriptions.SubscriptionsClient +} + +func (gc *GRPCClient) Close() error { + if gc == nil { + return nil + } + return errors.Join( + gc.AuthConn.Close(), + gc.UnauthConn.Close(), + ) +} + +func (gc *GRPCClient) ResetConnectBackoff() { + if gc == nil { + return + } + gc.AuthConn.ResetConnectBackoff() + gc.UnauthConn.ResetConnectBackoff() +} + +const GRPCTarget = "dns://grpc.chat.signal.org:443" + +func NewGRPCClient(username, password string) (*GRPCClient, error) { + grpcTLSConfig := credentials.NewTLS(SignalTLSConfig) + authConn, err := grpc.NewClient( + GRPCTarget, + grpc.WithUserAgent(UserAgent), + grpc.WithTransportCredentials(grpcTLSConfig), + grpc.WithPerRPCCredentials(&GRPCAuthHeader{value: "Basic " + basicAuth(username, password)}), + ) + if err != nil { + return nil, err + } + unauthConn, err := grpc.NewClient( + GRPCTarget, + grpc.WithUserAgent(UserAgent), + grpc.WithTransportCredentials(grpcTLSConfig), + ) + if err != nil { + _ = authConn.Close() + return nil, err + } + return &GRPCClient{ + AuthConn: authConn, + UnauthConn: unauthConn, + + Accounts: account.NewAccountsClient(authConn), + Attachments: attachments.NewAttachmentsClient(authConn), + Backups: backups.NewBackupsClient(authConn), + Calling: calling.NewCallingClient(authConn), + Challenge: challenge.NewChallengeClient(authConn), + Credentials: scredentials.NewCredentialsClient(authConn), + Devices: device.NewDevicesClient(authConn), + Donations: donations.NewDonationsClient(authConn), + Keys: keys.NewKeysClient(authConn), + Messages: messages.NewMessagesClient(authConn), + Payments: payments.NewPaymentsClient(authConn), + Profile: profile.NewProfileClient(authConn), + RemoteConfiguration: remote_configuration.NewRemoteConfigurationClient(authConn), + + AccountsAnonymous: account.NewAccountsAnonymousClient(unauthConn), + BackupsAnonymous: backups.NewBackupsAnonymousClient(unauthConn), + CredentialsAnonymous: scredentials.NewCredentialsAnonymousClient(unauthConn), + KeysAnonymous: keys.NewKeysAnonymousClient(unauthConn), + MessagesAnonymous: messages.NewMessagesAnonymousClient(unauthConn), + ProfileAnonymous: profile.NewProfileAnonymousClient(unauthConn), + CallQuality: call_quality.NewCallQualityClient(unauthConn), + LoginPurchase: login_purchase.NewLoginPurchaseClient(unauthConn), + OneTimeDonations: one_time_donations.NewOneTimeDonationsClient(unauthConn), + ProductConfiguration: product_configuration.NewProductConfigurationClient(unauthConn), + Subscriptions: subscriptions.NewSubscriptionsClient(unauthConn), + }, nil +} diff --git a/pkg/signalmeow/web/signal-root-ed25519.crt.der b/pkg/signalmeow/web/signal-root-ed25519.crt.der new file mode 100644 index 0000000..131e23d Binary files /dev/null and b/pkg/signalmeow/web/signal-root-ed25519.crt.der differ diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index a2153a1..3231322 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -33,7 +33,7 @@ import ( "github.com/rs/zerolog" "go.mau.fi/util/exsync" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/wspb" ) @@ -616,13 +616,12 @@ func (s *SignalWebsocket) SendRequest( Path: &path, Body: body, Headers: headerArray, - }, time.Now(), 0) + }, 0) } func (s *SignalWebsocket) sendRequestInternal( ctx context.Context, request *signalpb.WebSocketRequestMessage, - startTime time.Time, retryCount int, ) (*signalpb.WebSocketResponseMessage, error) { if s.basicAuth != nil { @@ -632,7 +631,7 @@ func (s *SignalWebsocket) sendRequestInternal( err := s.pushOutgoing(ctx, SignalWebsocketSendMessage{ RequestMessage: request, ResponseChannel: responseChannel, - RequestTime: startTime, + RequestTime: time.Now(), }) if err != nil { return nil, err @@ -657,7 +656,7 @@ func (s *SignalWebsocket) sendRequestInternal( } } zerolog.Ctx(ctx).Warn().Int("retry_count", retryCount).Msg("Received nil response, retrying recursively") - return s.sendRequestInternal(ctx, request, startTime, retryCount+1) + return s.sendRequestInternal(ctx, request, retryCount+1) } return response, nil } diff --git a/pkg/signalmeow/web/web.go b/pkg/signalmeow/web/web.go index f211b77..c5a0e12 100644 --- a/pkg/signalmeow/web/web.go +++ b/pkg/signalmeow/web/web.go @@ -31,9 +31,10 @@ import ( "time" "github.com/rs/zerolog" + "go.mau.fi/util/exerrors" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) var BaseUserAgent = "libsignal/" + libsignalgo.Version + " go/" + strings.TrimPrefix(runtime.Version(), "go") @@ -57,8 +58,15 @@ var CDNHosts = []string{ //go:embed signal-root.crt.der var signalRootCertBytes []byte + +//go:embed signal-root-ed25519.crt.der +var signalEd25519CertBytes []byte + var SignalCertPool = x509.NewCertPool() -var SignalTLSConfig = &tls.Config{RootCAs: SignalCertPool} +var SignalTLSConfig = &tls.Config{ + RootCAs: SignalCertPool, + MinVersion: tls.VersionTLS13, +} var signalTransport = &http.Transport{ ForceAttemptHTTP2: true, TLSClientConfig: SignalTLSConfig, @@ -68,11 +76,8 @@ var SignalHTTPClient = &http.Client{ } func init() { - cert, err := x509.ParseCertificate(signalRootCertBytes) - if err != nil { - panic(err) - } - SignalCertPool.AddCert(cert) + SignalCertPool.AddCert(exerrors.Must(x509.ParseCertificate(signalRootCertBytes))) + SignalCertPool.AddCert(exerrors.Must(x509.ParseCertificate(signalEd25519CertBytes))) } type ContentType string