1pub type NoxyIdentityAddress = String;
5
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
8#[repr(i32)]
9pub enum NoxyDeliveryStatus {
10 Delivered = 0,
11 Queued = 1,
12 NoDevices = 2,
13 Rejected = 3,
14 Error = 4,
15}
16
17impl From<i32> for NoxyDeliveryStatus {
18 fn from(v: i32) -> Self {
19 match v {
20 0 => Self::Delivered,
21 1 => Self::Queued,
22 2 => Self::NoDevices,
23 3 => Self::Rejected,
24 4 => Self::Error,
25 _ => Self::Error,
26 }
27 }
28}
29
30#[derive(Debug, Clone)]
32pub struct NoxyDeliveryOutcome {
33 pub status: NoxyDeliveryStatus,
34 pub request_id: String,
35 pub decision_id: String,
37}
38
39#[derive(Debug, Clone, Copy, PartialEq, Eq)]
41#[repr(i32)]
42pub enum NoxyHumanDecisionOutcome {
43 Pending = 0,
44 Approved = 1,
45 Rejected = 2,
46 Expired = 3,
47}
48
49impl From<i32> for NoxyHumanDecisionOutcome {
50 fn from(v: i32) -> Self {
51 match v {
52 0 => Self::Pending,
53 1 => Self::Approved,
54 2 => Self::Rejected,
55 3 => Self::Expired,
56 _ => Self::Pending,
57 }
58 }
59}
60
61#[derive(Debug, Clone)]
63pub struct NoxyGetDecisionOutcomeResponse {
64 pub request_id: String,
65 pub pending: bool,
66 pub outcome: NoxyHumanDecisionOutcome,
67}
68
69#[derive(Debug, Clone, Copy, PartialEq, Eq)]
71#[repr(i32)]
72pub enum NoxyQuotaStatus {
73 QuotaActive = 0,
74 QuotaSuspended = 1,
75 QuotaDeleted = 2,
76}
77
78impl From<i32> for NoxyQuotaStatus {
79 fn from(v: i32) -> Self {
80 match v {
81 0 => Self::QuotaActive,
82 1 => Self::QuotaSuspended,
83 2 => Self::QuotaDeleted,
84 _ => Self::QuotaActive,
85 }
86 }
87}
88
89#[derive(Debug, Clone)]
91pub struct NoxyGetQuotaResponse {
92 pub request_id: String,
93 pub app_name: String,
94 pub quota_total: u64,
95 pub quota_remaining: u64,
96 pub status: NoxyQuotaStatus,
97}
98
99#[derive(Debug, Clone)]
101pub struct NoxyIdentityDevice {
102 pub device_id: String,
103 pub public_key: Vec<u8>,
104 pub pq_public_key: Vec<u8>,
105}