Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit b62207d

Browse files
committed
move P2Export format to schema/model
1 parent 8db33fc commit b62207d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

api/src/core/main.tsp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,23 @@ namespace models {
115115
}
116116

117117
model MessageBatchExample extends MessageBatch<string> {}
118+
119+
/** The data is a gzipped tarball (.tar.gz) named `export1234567890-user@subdomain.example.com`, where
120+
* - `export[numbers]` is the word `export` with 20 random digits appended to it
121+
* - `user` is the actors' name
122+
* - `subdomain.example.com` is the FQDN of the server the actor is registered on.
123+
* This file archive contains a file `messages.json` which is a JSON `MessageBatch` of all
124+
* messages sent by the user. Note the [definition of the word "message" in polyproto](https://docs.polyphony.chat/Protocol%20Specifications/core/#:~:text=software%20for%20clients.-,message%2C%20messages,-%3A%20In%20the%20context).
125+
* If the server where the data export was requested from has [RawR](https://docs.polyphony.chat/Protocol%20Specifications/core/#731-resource-addressing-with-relative-roots)
126+
* enabled, the file archive will contain a folder named `rawr`. This folder contains all
127+
* RawR-content uploaded by the actor to that server. The files in this folder are named after
128+
* the resource ID. File extensions are only added if they were known to the server. An
129+
* example file name might be `2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`,
130+
* referencing the file which was hosted at `<server_url>/.p2/core/resource/2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`.
131+
* If the server where the data export was requested from is the actors' home server, the
132+
* archive will contain two folders `certs` and `crypt_certs`. `certs` will contain all ID-Certs
133+
* the server has stored of the actor. `crypt_certs` will contain all encrypted private key
134+
* material that the actor has uploaded to the server.
135+
*/
136+
model P2Export {}
118137
}

0 commit comments

Comments
 (0)