@@ -9,6 +9,7 @@ class FreshworksUserJwtRequest extends Request {
9
9
required this .serviceToken,
10
10
required this .referrer,
11
11
required this .extraFields,
12
+ required this .loginId,
12
13
this .service = 'freshworks_user_jwt' ,
13
14
super .msgType = 'freshworks_user_jwt' ,
14
15
super .passthrough,
@@ -23,6 +24,7 @@ class FreshworksUserJwtRequest extends Request {
23
24
extraFields: ExtraFields .fromJson (json['extra_fields' ]),
24
25
passthrough: json['passthrough' ] as Map <String , dynamic >? ,
25
26
reqId: json['req_id' ] as int ? ,
27
+ loginId: json['login_id' ] as String ,
26
28
);
27
29
28
30
/// The service for the request, same as msgType.
@@ -37,10 +39,14 @@ class FreshworksUserJwtRequest extends Request {
37
39
/// Extra fields for the request.
38
40
final ExtraFields extraFields;
39
41
42
+ /// Login ID for the request.
43
+ final String loginId;
44
+
40
45
/// Converts this instance to JSON.
41
46
@override
42
47
Map <String , dynamic > toJson () => < String , dynamic > {
43
48
'service_token' : serviceToken,
49
+ 'login_id' : loginId,
44
50
'referrer' : referrer,
45
51
'extra_fields' : extraFields.toJson (),
46
52
'service' : service, // Add service field to JSON
@@ -57,6 +63,7 @@ class FreshworksUserJwtRequest extends Request {
57
63
String ? service,
58
64
Map <String , dynamic >? passthrough,
59
65
int ? reqId,
66
+ String ? loginId,
60
67
}) =>
61
68
FreshworksUserJwtRequest (
62
69
serviceToken: serviceToken ?? this .serviceToken,
@@ -65,6 +72,7 @@ class FreshworksUserJwtRequest extends Request {
65
72
service: service ?? this .service, // Include service in copy
66
73
passthrough: passthrough ?? this .passthrough,
67
74
reqId: reqId ?? this .reqId,
75
+ loginId: loginId ?? this .loginId,
68
76
);
69
77
70
78
/// Override equatable class.
@@ -76,6 +84,7 @@ class FreshworksUserJwtRequest extends Request {
76
84
service, // Include service in props for equality
77
85
passthrough,
78
86
reqId,
87
+ loginId,
79
88
];
80
89
}
81
90
0 commit comments