Skip to content

Commit 9634d55

Browse files
committed
update jwt request
1 parent f61bf9e commit 9634d55

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/api/response/freshchat_jwt_response_result.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ignore_for_file: prefer_single_quotes
22

33
import 'package:flutter_deriv_api/api/exceptions/exceptions.dart';
4-
import 'package:flutter_deriv_api/basic_api/generated/freshchat_auth_jwt_send.dart';
4+
import 'package:flutter_deriv_api/basic_api/generated/freshchat_user_jwt_send.dart';
55
import 'package:flutter_deriv_api/basic_api/generated/service_token_receive.dart';
66
import 'package:flutter_deriv_api/helpers/helpers.dart';
77
import 'package:flutter_deriv_api/services/connection/api_manager/base_api.dart';
@@ -67,7 +67,7 @@ class FreshChatJwtResponse extends FreshChatJwtResponseModel {
6767
///
6868
/// Throws a [BaseAPIException] if the API response contains an error.
6969
static Future<FreshChatJwtResponse> fetchFreshworksJwt(
70-
FreshworksAuthJwtRequest
70+
FreshworksUserJwtRequest
7171
request, // Replace with your actual request type if available
7272
) async {
7373
final ServiceTokenReceive response = await _api.call(

lib/basic_api/generated/freshchat_auth_jwt_send.dart renamed to lib/basic_api/generated/freshchat_user_jwt_send.dart

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
import '../request.dart';
44

55
/// Freshworks Auth JWT request class.
6-
class FreshworksAuthJwtRequest extends Request {
6+
class FreshworksUserJwtRequest extends Request {
77
/// Initializes the Freshworks Auth JWT request class.
8-
const FreshworksAuthJwtRequest({
8+
const FreshworksUserJwtRequest({
99
required this.serviceToken,
1010
required this.referrer,
1111
required this.extraFields,
12-
this.service = 'freshworks_auth_jwt',
13-
super.msgType = 'freshworks_auth_jwt',
12+
this.service = 'freshworks_user_jwt',
13+
super.msgType = 'freshworks_user_jwt',
1414
super.passthrough,
1515
super.reqId,
1616
}); // Set service to the value of msgType
1717

1818
/// Creates an instance from JSON.
19-
factory FreshworksAuthJwtRequest.fromJson(Map<String, dynamic> json) =>
20-
FreshworksAuthJwtRequest(
19+
factory FreshworksUserJwtRequest.fromJson(Map<String, dynamic> json) =>
20+
FreshworksUserJwtRequest(
2121
serviceToken: json['service_token'] as int,
2222
referrer: json['referrer'] as String,
2323
extraFields: ExtraFields.fromJson(json['extra_fields']),
@@ -50,15 +50,15 @@ class FreshworksAuthJwtRequest extends Request {
5050

5151
/// Creates a copy of the instance with given parameters.
5252
@override
53-
FreshworksAuthJwtRequest copyWith({
53+
FreshworksUserJwtRequest copyWith({
5454
int? serviceToken,
5555
String? referrer,
5656
ExtraFields? extraFields,
5757
String? service,
5858
Map<String, dynamic>? passthrough,
5959
int? reqId,
6060
}) =>
61-
FreshworksAuthJwtRequest(
61+
FreshworksUserJwtRequest(
6262
serviceToken: serviceToken ?? this.serviceToken,
6363
referrer: referrer ?? this.referrer,
6464
extraFields: extraFields ?? this.extraFields,

0 commit comments

Comments
 (0)