Updating documentation

This commit is contained in:
Documentation Updater 2023-05-17 18:11:55 +00:00
parent 075b268805
commit 9404dfb89e
1 changed files with 138 additions and 19 deletions

View File

@ -955,6 +955,8 @@ paths:
get: get:
tags: tags:
- Keys - Keys
summary: Retrieves the public identity key and available device prekeys for
a specified account or phone-number identity
operationId: getDeviceKeys operationId: getDeviceKeys
parameters: parameters:
- name: Unidentified-Access-Key - name: Unidentified-Access-Key
@ -963,15 +965,25 @@ paths:
$ref: '#/components/schemas/Anonymous' $ref: '#/components/schemas/Anonymous'
- name: identifier - name: identifier
in: path in: path
description: the account or phone-number identifier to retrieve keys for
required: true required: true
schema: schema:
type: string type: string
format: uuid format: uuid
- name: device_id - name: device_id
in: path in: path
description: "the device id of a single device to retrieve prekeys for, or\
\ `*` for all enabled devices"
required: true required: true
schema: schema:
type: string type: string
- name: pq
in: query
description: whether to retrieve post-quantum prekeys
allowEmptyValue: true
schema:
type: boolean
default: false
- name: User-Agent - name: User-Agent
in: header in: header
schema: schema:
@ -1028,6 +1040,7 @@ paths:
get: get:
tags: tags:
- Keys - Keys
summary: Returns the number of available one-time prekeys for this device
operationId: getStatus operationId: getStatus
parameters: parameters:
- name: identity - name: identity
@ -1046,22 +1059,25 @@ paths:
put: put:
tags: tags:
- Keys - Keys
summary: Sets the identity key for the account or phone-number identity and/or
prekeys for this device
operationId: setKeys operationId: setKeys
parameters: parameters:
- name: identity - name: identity
in: query in: query
allowEmptyValue: true
schema: schema:
type: string type: string
description: whether this operation applies to the account (aci) or phone-number
(pni) identity
default: aci
enum:
- aci
- pni
- name: User-Agent - name: User-Agent
in: header in: header
schema: schema:
type: string type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PreKeyState'
required: true
responses: responses:
default: default:
description: default response description: default response
@ -2430,25 +2446,52 @@ components:
properties: properties:
reglock: reglock:
type: string type: string
description: "the registration lock password for the new phone number, if\
\ necessary"
number: number:
type: string type: string
description: the new phone number for this account
code: code:
type: string type: string
description: the registration verification code to authenticate this request
pniIdentityKey: pniIdentityKey:
type: string type: string
description: the new public identity key to use for the phone-number identity
associated with the new phone number
deviceMessages: deviceMessages:
type: array type: array
description: |-
A list of synchronization messages to send to companion devices to supply the private keys
associated with the new identity key and their new prekeys.
Exactly one message must be supplied for each enabled device other than the sending (primary) device.
items: items:
$ref: '#/components/schemas/IncomingMessage' $ref: '#/components/schemas/IncomingMessage'
devicePniSignedPrekeys: devicePniSignedPrekeys:
type: object type: object
additionalProperties: additionalProperties:
$ref: '#/components/schemas/SignedPreKey' $ref: '#/components/schemas/SignedPreKey'
description: |-
A new signed elliptic-curve prekey for each enabled device on the account, including this one.
Each must be accompanied by a valid signature from the new identity key in this request.
devicePniPqLastResortPrekeys:
type: object
additionalProperties:
$ref: '#/components/schemas/SignedPreKey'
description: |-
A new signed post-quantum last-resort prekey for each enabled device on the account, including this one.
May be absent, in which case the last resort PQ prekeys for each device will be deleted if any had been stored.
If present, must contain one prekey per enabled device including this one.
Prekeys for devices that did not previously have any post-quantum prekeys stored will be silently dropped.
Each must be accompanied by a valid signature from the new identity key in this request.
pniRegistrationIds: pniRegistrationIds:
type: object type: object
additionalProperties: additionalProperties:
type: integer type: integer
description: "the new phone-number-identity registration ID for each enabled\
\ device on the account, including this one"
format: int32 format: int32
description: "the new phone-number-identity registration ID for each enabled\
\ device on the account, including this one"
signatureValidOnEachSignedPreKey: signatureValidOnEachSignedPreKey:
type: boolean type: boolean
IncomingMessage: IncomingMessage:
@ -2710,30 +2753,65 @@ components:
properties: properties:
reglock: reglock:
type: string type: string
description: "the registration lock password for the new phone number, if\
\ necessary"
sessionId: sessionId:
type: string type: string
description: |-
A session ID from registration service, if using session id to authenticate this request.
Must not be combined with `recoveryPassword`.
recoveryPassword: recoveryPassword:
type: array type: array
description: |-
The recovery password for the new phone number, if using a recovery password to authenticate this request.
Must not be combined with `sessionId`.
items: items:
type: string type: string
description: |-
The recovery password for the new phone number, if using a recovery password to authenticate this request.
Must not be combined with `sessionId`.
format: byte format: byte
number: number:
type: string type: string
description: the new phone number for this account
pniIdentityKey: pniIdentityKey:
type: string type: string
description: the new public identity key to use for the phone-number identity
associated with the new phone number
deviceMessages: deviceMessages:
type: array type: array
description: |-
A list of synchronization messages to send to companion devices to supply the private keys
associated with the new identity key and their new prekeys.
Exactly one message must be supplied for each enabled device other than the sending (primary) device.
items: items:
$ref: '#/components/schemas/IncomingMessage' $ref: '#/components/schemas/IncomingMessage'
devicePniSignedPrekeys: devicePniSignedPrekeys:
type: object type: object
additionalProperties: additionalProperties:
$ref: '#/components/schemas/SignedPreKey' $ref: '#/components/schemas/SignedPreKey'
description: |-
A new signed elliptic-curve prekey for each enabled device on the account, including this one.
Each must be accompanied by a valid signature from the new identity key in this request.
devicePniPqLastResortPrekeys:
type: object
additionalProperties:
$ref: '#/components/schemas/SignedPreKey'
description: |-
A new signed post-quantum last-resort prekey for each enabled device on the account, including this one.
May be absent, in which case the last resort PQ prekeys for each device will be deleted if any had been stored.
If present, must contain one prekey per enabled device including this one.
Prekeys for devices that did not previously have any post-quantum prekeys stored will be silently dropped.
Each must be accompanied by a valid signature from the new identity key in this request.
pniRegistrationIds: pniRegistrationIds:
type: object type: object
additionalProperties: additionalProperties:
type: integer type: integer
description: "the new phone-number-identity registration ID for each enabled\
\ device on the account, including this one"
format: int32 format: int32
description: "the new phone-number-identity registration ID for each enabled\
\ device on the account, including this one"
signatureValidOnEachSignedPreKey: signatureValidOnEachSignedPreKey:
type: boolean type: boolean
valid: valid:
@ -2751,16 +2829,29 @@ components:
description: the new identity key for this account's phone-number identity description: the new identity key for this account's phone-number identity
deviceMessages: deviceMessages:
type: array type: array
description: A message for each companion device to pass its new private description: |-
keys A list of synchronization messages to send to companion devices to supply the private keys
associated with the new identity key and their new prekeys.
Exactly one message must be supplied for each enabled device other than the sending (primary) device.
items: items:
$ref: '#/components/schemas/IncomingMessage' $ref: '#/components/schemas/IncomingMessage'
devicePniSignedPrekeys: devicePniSignedPrekeys:
type: object type: object
additionalProperties: additionalProperties:
$ref: '#/components/schemas/SignedPreKey' $ref: '#/components/schemas/SignedPreKey'
description: The public key of a new signed elliptic-curve prekey pair for description: |-
each device A new signed elliptic-curve prekey for each enabled device on the account, including this one.
Each must be accompanied by a valid signature from the new identity key in this request.
devicePniPqLastResortPrekeys:
type: object
additionalProperties:
$ref: '#/components/schemas/SignedPreKey'
description: |-
A new signed post-quantum last-resort prekey for each enabled device on the account, including this one.
May be absent, in which case the last resort PQ prekeys for each device will be deleted if any had been stored.
If present, must contain one prekey per enabled device including this one.
Prekeys for devices that did not previously have any post-quantum prekeys stored will be silently dropped.
Each must be accompanied by a valid signature from the new identity key in this request.
pniRegistrationIds: pniRegistrationIds:
type: object type: object
additionalProperties: additionalProperties:
@ -3033,11 +3124,11 @@ components:
properties: properties:
open: open:
type: boolean type: boolean
userAgent:
type: string
createdTimestamp: createdTimestamp:
type: integer type: integer
format: int64 format: int64
userAgent:
type: string
WebSocketSessionContext: WebSocketSessionContext:
type: object type: object
properties: properties:
@ -3058,6 +3149,13 @@ components:
properties: properties:
count: count:
type: integer type: integer
description: the number of stored unsigned elliptic-curve prekeys for this
device
format: int32
pqCount:
type: integer
description: the number of stored one-time post-quantum prekeys for this
device
format: int32 format: int32
PreKey: PreKey:
required: required:
@ -3070,22 +3168,43 @@ components:
format: int64 format: int64
publicKey: publicKey:
type: string type: string
description: "A list of unsigned elliptic-curve prekeys to use for this device.\
\ If present and not empty, replaces all stored unsigned EC prekeys for the\
\ device; if absent or empty, any stored unsigned EC prekeys for the device\
\ are not deleted."
PreKeyState: PreKeyState:
required: required:
- identityKey - identityKey
- preKeys
- signedPreKey
type: object type: object
properties: properties:
preKeys: preKeys:
type: array type: array
description: "A list of unsigned elliptic-curve prekeys to use for this\
\ device. If present and not empty, replaces all stored unsigned EC prekeys\
\ for the device; if absent or empty, any stored unsigned EC prekeys for\
\ the device are not deleted."
items: items:
$ref: '#/components/schemas/PreKey' $ref: '#/components/schemas/PreKey'
signedPreKey: signedPreKey:
$ref: '#/components/schemas/SignedPreKey' $ref: '#/components/schemas/SignedPreKey'
pqPreKeys:
type: array
description: "A list of signed post-quantum one-time prekeys to use for\
\ this device. Each key must have a valid signature from the identity\
\ key in this request. If present and not empty, replaces all stored unsigned\
\ PQ prekeys for the device; if absent or empty, any stored unsigned PQ\
\ prekeys for the device are not deleted."
items:
$ref: '#/components/schemas/SignedPreKey'
pqLastResortPreKey:
$ref: '#/components/schemas/SignedPreKey'
identityKey: identityKey:
type: string type: string
signatureValid: description: "Required. The public identity key for this identity (account\
\ or phone-number identity). If this device is not the primary device\
\ for the account, must match the existing stored identity key for this\
\ identity."
signatureValidOnEachSignedKey:
type: boolean type: boolean
SpamReport: SpamReport:
type: object type: object
@ -3361,16 +3480,16 @@ components:
type: string type: string
commitment: commitment:
$ref: '#/components/schemas/ProfileKeyCommitment' $ref: '#/components/schemas/ProfileKeyCommitment'
badges:
type: array
items:
type: string
avatarChange: avatarChange:
type: string type: string
enum: enum:
- UNCHANGED - UNCHANGED
- CLEAR - CLEAR
- UPDATE - UPDATE
badges:
type: array
items:
type: string
ProfileKeyCommitment: ProfileKeyCommitment:
type: object type: object
properties: properties: