Add saved payout destination UX and service contracts (#54)
This commit is contained in:
1 parent
a5689876ff
commit
24af794112
49 files changed
+4687
-62
No files matched your search
@@ -11,8 +11,11 @@ enum JourneyKind {
|
||||
exchange,
|
||||
payout,
|
||||
security,
|
||||
destination,
|
||||
}
|
||||
|
||||
enum DestinationResolution { created, duplicate }
|
||||
|
||||
enum JourneyStep {
|
||||
login,
|
||||
signup,
|
||||
@@ -23,6 +26,10 @@ enum JourneyStep {
|
||||
kycSelfie,
|
||||
kycSubmission,
|
||||
kycStatus,
|
||||
destinationDraft,
|
||||
destinationSave,
|
||||
destinationReconciliation,
|
||||
destinationBinding,
|
||||
transferDraft,
|
||||
transferQuote,
|
||||
transferSubmission,
|
||||
@@ -78,6 +85,7 @@ class AnalyticsEvent {
|
||||
required this.sequence,
|
||||
required this.elapsedMs,
|
||||
this.step,
|
||||
this.resolution,
|
||||
this.operation,
|
||||
this.failure,
|
||||
this.exit,
|
||||
@@ -90,6 +98,7 @@ class AnalyticsEvent {
|
||||
final JourneyKind kind;
|
||||
final JourneySignal signal;
|
||||
final JourneyStep? step;
|
||||
final DestinationResolution? resolution;
|
||||
final JourneyFailure? failure;
|
||||
final JourneyExit? exit;
|
||||
final int sequence;
|
||||
@@ -105,6 +114,7 @@ class AnalyticsEvent {
|
||||
JourneyKind.exchange => 'exchange',
|
||||
JourneyKind.payout => 'payout',
|
||||
JourneyKind.security => 'security',
|
||||
JourneyKind.destination => 'destination',
|
||||
_ => 'auth',
|
||||
};
|
||||
var stage = step == null ? 'journey' : _snake(step!.name);
|
||||
@@ -123,6 +133,7 @@ class AnalyticsEvent {
|
||||
'terminal': terminal,
|
||||
'simulated': simulated,
|
||||
if (step != null) 'step': _snake(step!.name),
|
||||
if (resolution != null) 'destination_resolution': resolution!.name,
|
||||
if (operation != null) 'operation': operation!,
|
||||
if (failure != null) 'failure': _snake(failure!.name),
|
||||
if (exit != null) 'exit': _snake(exit!.name),
|
||||
@@ -210,6 +221,7 @@ class JourneyRecorder {
|
||||
JourneyFailure? failure,
|
||||
bool terminal = false,
|
||||
bool cancelled = false,
|
||||
DestinationResolution? resolution,
|
||||
}) {
|
||||
final journey = operation._journey;
|
||||
if (_disposed || operation._finished || journey.closed) return;
|
||||
@@ -227,6 +239,7 @@ class JourneyRecorder {
|
||||
? JourneySignal.simulated
|
||||
: JourneySignal.succeeded,
|
||||
operation: operation,
|
||||
resolution: resolution,
|
||||
failure: failure,
|
||||
terminal: complete,
|
||||
simulated: simulated || (complete && journey.simulated),
|
||||
@@ -258,6 +271,7 @@ class JourneyRecorder {
|
||||
_Journey journey,
|
||||
JourneySignal signal, {
|
||||
JourneyOperation? operation,
|
||||
DestinationResolution? resolution,
|
||||
JourneyFailure? failure,
|
||||
JourneyExit? exit,
|
||||
bool terminal = false,
|
||||
@@ -271,6 +285,7 @@ class JourneyRecorder {
|
||||
sequence: ++journey.sequence,
|
||||
elapsedMs: journey.time.elapsedMilliseconds,
|
||||
step: operation?.step,
|
||||
resolution: resolution,
|
||||
operation: operation?.number,
|
||||
failure: failure,
|
||||
exit: exit,
|
||||
|
||||
Reference in new issue
Block a user