PairingView class

Constructors

PairingView({String? channel, String? code, int? createdAt, int? lastSeen, String? sender})
Returns a new PairingView instance.

Properties

channel ↔ String?
Channel is the transport the request arrived on — discord, slack, teams or telegram — and half of what approval names. The cap of three unapproved requests applies per (org, channel); while it is full no further code is minted until one is approved or expires.
getter/setter pair
code ↔ String?
Code is the CAPABILITY that authorises the approval: eight characters from a 32-symbol uppercase alphabet (A-Z0-9 minus the confusables 0, O, 1 and I), minted with crypto/rand and also sent to the requester in chat. An org admin passes it with the channel to POST /v1/channels/pairing/approve, which CONSUMES it — the request row is deleted, so a code approves once — and which takes org admin as well as the code. It lives ONE HOUR from CreatedAt; expired requests are not listed here, and approving one is a 404. It is shown on this admin surface and NEVER logged.
getter/setter pair
createdAt ↔ int?
CreatedAt is Unix SECONDS of FIRST contact: when the request was minted and the code sent. Expiry is measured from here and from nowhere else.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
lastSeen ↔ int?
LastSeen is Unix SECONDS of the MOST RECENT message from this sender while the request has been pending. It moves as they keep writing, which is how an admin tells a live request from an abandoned one — but it does not extend the hour and does not re-send the code, since one request sends exactly one chat reply.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sender ↔ String?
Sender is the transport-native user id waiting for access — the same identity inbox messages carry. Approving mints a DM allow entry for exactly this value and nothing wider: pairing never grants group access.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → PairingView?
Returns a new PairingView instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<PairingView>
mapFromJson(dynamic json) → Map<String, PairingView>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<PairingView>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.