1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//! Sew wire contracts.
//!
//! Every wire type lives here: ids, chat addresses, errors, HTTP request and response bodies,
//! gateway frames and events, change-log kinds, mgmt API bodies, permission bits, org policies
//! and audit events. Server, clients and K2 share this crate; nothing else defines wire JSON.
//!
//! The crate is pure: it reads the clock (only in [`clock`]) and does no other IO. It builds on
//! macOS as well as Linux.
/// Client API and gateway protocol version. Changes only with a breaking change after the
/// first release.
pub const PROTOCOL_VERSION: u32 = 1;
/// Logical export archive format version carried in export manifests.
pub const EXPORT_FORMAT: u32 = 1;
/// Additive revision of export format 1. Readers refuse archives with
/// a higher minor (`format_too_new`); a breaking change bumps [`EXPORT_FORMAT`]. Minor 1:
/// `spaces.ndjson` records carry the space's default channels, description, rules
/// and welcome channels. Minor 2: they also carry the App a space belongs to. Minor 3:
/// and whether a space is hidden. Minor 4: `space_bans.ndjson` and
/// `space_timeout_carry.ndjson`; importing an older minor gives every role holding
/// REMOVE_MEMBERS (bit 38) BAN_MEMBERS (bit 47), as the migration did. Minor 5: message
/// records of on-behalf posts carry `on_behalf_approval`; an older archive's on-behalf posts
/// import as pending. Minor 6: space records carry `private`; a private space imports
/// invite-only. Minor 7: space records carry `orphaned_from`, member records
/// `relinked_from` and the install record `identity_switched_at`. Minor 8 (Sew 0.6.0):
/// space records carry `governance` and role records the managed-role mark `managed`. Minor 9
/// (Sew 0.7.0): space records may carry governance `server` (the server-governed Space,
/// owned by the `k2:server` member) and channel records `closing`. Minor 10 (Sew 0.8.0): space
/// records carry `participant_app_ids` (the participant links). Minor 11: member records of an
/// erased account carry `erased_at` and `erase_mode` (with the `erased:<id>` external id),
/// messages and attachments the delete and remove kind `erased`. Minor 12 (Sew 0.9.0): space
/// records carry the recording overrides `recording_start_level` and `recording_required`,
/// voice channel records `recording_required`, and recording records `trigger: required` for a
/// recording a required room started. Minor 13 (Sew 0.10.0): channel records carry
/// `members_can_leave`. Minor 14: full exports carry `dm_seen.ndjson` and
/// `read_receipt_prefs.ndjson` (read receipts in DMs).
pub const EXPORT_FORMAT_MINOR: u32 = 14;
/// The first export minor that carries BAN_MEMBERS (bit 47) itself.
pub const EXPORT_MINOR_BAN_MEMBERS: u32 = 4;
/// The recorder participant's user-facing name. Clients label
/// the recorder's roster entry, the recording banner and notices with it. The engine never sees
/// it (only the pseudonymous `p_…` identity); the binary, unit and user stay
/// Sew's call recorder (not published).
pub const RECORDER_DISPLAY_NAME: &str = "Bobbin";
pub use ;
pub use ;
pub use ;
pub use ExternalId;
pub use ;
pub use ;
pub use Perms;
pub use Timestamp;
/// README.md's examples, compiled and run as doc tests.
;