Updating documentation
This commit is contained in:
parent
f4a49617f3
commit
aaf5f4250b
|
@ -588,7 +588,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/MessageBackupResponse'
|
$ref: '#/components/schemas/UploadDescriptorResponse'
|
||||||
"429":
|
"429":
|
||||||
description: Rate limited.
|
description: Rate limited.
|
||||||
"403":
|
"403":
|
||||||
|
@ -926,6 +926,12 @@ paths:
|
||||||
operations against that backup-id. Clients may (and should) request up to 7 days of credentials at a time.
|
operations against that backup-id. Clients may (and should) request up to 7 days of credentials at a time.
|
||||||
|
|
||||||
The redemptionStart and redemptionEnd seconds must be UTC day aligned, and must not span more than 7 days.
|
The redemptionStart and redemptionEnd 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.
|
||||||
operationId: getBackupZKCredentials
|
operationId: getBackupZKCredentials
|
||||||
parameters:
|
parameters:
|
||||||
- name: redemptionStartSeconds
|
- name: redemptionStartSeconds
|
||||||
|
@ -977,6 +983,13 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
- name: cdn
|
||||||
|
in: query
|
||||||
|
description: The number of the CDN to get credentials for
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
content:
|
content:
|
||||||
|
@ -999,6 +1012,33 @@ paths:
|
||||||
security:
|
security:
|
||||||
- authenticatedAccount: []
|
- authenticatedAccount: []
|
||||||
- {}
|
- {}
|
||||||
|
/v1/archives/redeem-receipt:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Archive
|
||||||
|
summary: Redeem receipt
|
||||||
|
description: |
|
||||||
|
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 /v1/archive/auth will return credentials with the level on
|
||||||
|
the provided receipt until the expiration time on the receipt.
|
||||||
|
operationId: redeemReceipt
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/RedeemReceiptRequest'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: The receipt was redeemed
|
||||||
|
"400":
|
||||||
|
description: The provided presentation or receipt was invalid
|
||||||
|
"429":
|
||||||
|
description: Rate limited.
|
||||||
|
security:
|
||||||
|
- authenticatedAccount: []
|
||||||
/v1/archives/backupid:
|
/v1/archives/backupid:
|
||||||
put:
|
put:
|
||||||
tags:
|
tags:
|
||||||
|
@ -1077,6 +1117,54 @@ paths:
|
||||||
security:
|
security:
|
||||||
- authenticatedAccount: []
|
- authenticatedAccount: []
|
||||||
- {}
|
- {}
|
||||||
|
/v1/archives/media/upload/form:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Archive
|
||||||
|
summary: Fetch media attachment upload form
|
||||||
|
description: |
|
||||||
|
Retrieve an upload form that can be used to perform a resumable upload of an attachment. After uploading, the
|
||||||
|
attachment can be copied into the backup at PUT /archives/media/.
|
||||||
|
|
||||||
|
Like the account authenticated version at /attachments, the uploaded object is only temporary.
|
||||||
|
operationId: uploadTemporaryAttachment
|
||||||
|
parameters:
|
||||||
|
- name: X-Signal-ZK-Auth
|
||||||
|
in: header
|
||||||
|
description: "Presentation of a ZK backup auth credential acquired from /v1/archives/auth,\
|
||||||
|
\ encoded in standard padded base64"
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: X-Signal-ZK-Auth-Signature
|
||||||
|
in: header
|
||||||
|
description: "Signature of the ZK auth credential's presentation, encoded\
|
||||||
|
\ in standard padded base64"
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/UploadDescriptorResponse'
|
||||||
|
"429":
|
||||||
|
description: Rate limited.
|
||||||
|
"403":
|
||||||
|
description: Forbidden. The request had insufficient permissions to perform
|
||||||
|
the requested action
|
||||||
|
"401":
|
||||||
|
description: |-
|
||||||
|
The provided backup auth credential 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
|
||||||
|
"400":
|
||||||
|
description: Bad arguments. The request may have been made on an authenticated
|
||||||
|
channel
|
||||||
|
security:
|
||||||
|
- authenticatedAccount: []
|
||||||
|
- {}
|
||||||
/v1/art/auth:
|
/v1/art/auth:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
@ -1495,7 +1583,7 @@ paths:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Donations
|
- Donations
|
||||||
operationId: redeemReceipt
|
operationId: redeemReceipt_1
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
@ -3435,7 +3523,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
discoverableByPhoneNumber:
|
discoverableByPhoneNumber:
|
||||||
type: boolean
|
type: boolean
|
||||||
MessageBackupResponse:
|
UploadDescriptorResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
cdn:
|
cdn:
|
||||||
|
@ -3677,6 +3765,20 @@ components:
|
||||||
type: string
|
type: string
|
||||||
description: Auth headers to include with cdn read requests
|
description: Auth headers to include with cdn read requests
|
||||||
description: Auth headers to include with cdn read requests
|
description: Auth headers to include with cdn read requests
|
||||||
|
RedeemReceiptRequest:
|
||||||
|
required:
|
||||||
|
- receiptCredentialPresentation
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
receiptCredentialPresentation:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
format: byte
|
||||||
|
visible:
|
||||||
|
type: boolean
|
||||||
|
primary:
|
||||||
|
type: boolean
|
||||||
SetBackupIdRequest:
|
SetBackupIdRequest:
|
||||||
required:
|
required:
|
||||||
- backupAuthCredentialRequest
|
- backupAuthCredentialRequest
|
||||||
|
@ -3942,27 +4044,13 @@ components:
|
||||||
$ref: '#/components/schemas/ApnRegistrationId'
|
$ref: '#/components/schemas/ApnRegistrationId'
|
||||||
gcmToken:
|
gcmToken:
|
||||||
$ref: '#/components/schemas/GcmRegistrationId'
|
$ref: '#/components/schemas/GcmRegistrationId'
|
||||||
RedeemReceiptRequest:
|
|
||||||
required:
|
|
||||||
- receiptCredentialPresentation
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
receiptCredentialPresentation:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
format: byte
|
|
||||||
visible:
|
|
||||||
type: boolean
|
|
||||||
primary:
|
|
||||||
type: boolean
|
|
||||||
WebSocketClient:
|
WebSocketClient:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
open:
|
|
||||||
type: boolean
|
|
||||||
userAgent:
|
userAgent:
|
||||||
type: string
|
type: string
|
||||||
|
open:
|
||||||
|
type: boolean
|
||||||
createdTimestamp:
|
createdTimestamp:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
|
Loading…
Reference in New Issue