增加csrf_token的模型,屏蔽自动生成的文件
parent
a9e70fccac
commit
7c80f5b5ea
@ -1,21 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'mw_api.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
MWApiErrorException _$MWApiExceptionFromJson(Map<String, dynamic> json) =>
|
|
||||||
MWApiErrorException(
|
|
||||||
code: json['code'] as String,
|
|
||||||
info: json['info'] as String?,
|
|
||||||
detail: json['*'] as String?,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MWApiExceptionToJson(MWApiErrorException instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'code': instance.code,
|
|
||||||
'info': instance.info,
|
|
||||||
'*': instance.detail,
|
|
||||||
};
|
|
@ -0,0 +1,29 @@
|
|||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
|
part 'csrf_token.freezed.dart';
|
||||||
|
part 'csrf_token.g.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class CSRFTokenInfo with _$CSRFTokenInfo {
|
||||||
|
const factory CSRFTokenInfo({
|
||||||
|
String? csrftoken,
|
||||||
|
String? logintoken,
|
||||||
|
String? createaccounttoken,
|
||||||
|
String? patroltoken,
|
||||||
|
String? rollbacktoken,
|
||||||
|
String? userrightstoken,
|
||||||
|
String? watchtoken,
|
||||||
|
}) = _CSRFTokenInfo;
|
||||||
|
|
||||||
|
factory CSRFTokenInfo.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$CSRFTokenInfoFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class CSRFTokenResponse with _$CSRFTokenResponse {
|
||||||
|
const factory CSRFTokenResponse({required CSRFTokenInfo tokens}) =
|
||||||
|
_CSRFTokenInfoResponse;
|
||||||
|
|
||||||
|
factory CSRFTokenResponse.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$CSRFTokenResponseFromJson(json);
|
||||||
|
}
|
@ -1,65 +1,47 @@
|
|||||||
import 'package:json_annotation/json_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
|
part 'mugenapp.freezed.dart';
|
||||||
part 'mugenapp.g.dart';
|
part 'mugenapp.g.dart';
|
||||||
|
|
||||||
@JsonSerializable()
|
@freezed
|
||||||
class MugenAppStartAuthInfo {
|
class MugenAppStartAuthInfo with _$MugenAppStartAuthInfo {
|
||||||
String loginUrl;
|
const factory MugenAppStartAuthInfo({
|
||||||
String loginRequestKey;
|
required String loginUrl,
|
||||||
int ttl;
|
required String loginRequestKey,
|
||||||
|
@Default(0) int ttl,
|
||||||
MugenAppStartAuthInfo({
|
}) = _MugenAppStartAuthInfo;
|
||||||
required this.loginUrl,
|
|
||||||
required this.loginRequestKey,
|
|
||||||
this.ttl = 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory MugenAppStartAuthInfo.fromJson(Map<String, dynamic> json) =>
|
factory MugenAppStartAuthInfo.fromJson(Map<String, dynamic> json) =>
|
||||||
_$MugenAppStartAuthInfoFromJson(json);
|
_$MugenAppStartAuthInfoFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$MugenAppStartAuthInfoToJson(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonSerializable()
|
@freezed
|
||||||
class MugenAppStartAuthResponse {
|
class MugenAppStartAuthResponse with _$MugenAppStartAuthResponse {
|
||||||
MugenAppStartAuthInfo startauth;
|
const factory MugenAppStartAuthResponse(
|
||||||
|
{required MugenAppStartAuthInfo startauth}) = _MugenAppStartAuthResponse;
|
||||||
MugenAppStartAuthResponse({required this.startauth});
|
|
||||||
|
|
||||||
factory MugenAppStartAuthResponse.fromJson(Map<String, dynamic> json) =>
|
factory MugenAppStartAuthResponse.fromJson(Map<String, dynamic> json) =>
|
||||||
_$MugenAppStartAuthResponseFromJson(json);
|
_$MugenAppStartAuthResponseFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$MugenAppStartAuthResponseToJson(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonSerializable()
|
@freezed
|
||||||
class MugenAppAttemptAuthInfo {
|
class MugenAppAttemptAuthInfo with _$MugenAppAttemptAuthInfo {
|
||||||
String status;
|
const factory MugenAppAttemptAuthInfo({
|
||||||
int? userid;
|
required String status,
|
||||||
String? username;
|
int? userid,
|
||||||
|
String? username,
|
||||||
MugenAppAttemptAuthInfo({
|
}) = _MugenAppAttemptAuthInfo;
|
||||||
required this.status,
|
|
||||||
this.userid,
|
|
||||||
this.username,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory MugenAppAttemptAuthInfo.fromJson(Map<String, dynamic> json) =>
|
factory MugenAppAttemptAuthInfo.fromJson(Map<String, dynamic> json) =>
|
||||||
_$MugenAppAttemptAuthInfoFromJson(json);
|
_$MugenAppAttemptAuthInfoFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$MugenAppAttemptAuthInfoToJson(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonSerializable()
|
@freezed
|
||||||
class MugenAppAttemptAuthResponse {
|
class MugenAppAttemptAuthResponse with _$MugenAppAttemptAuthResponse {
|
||||||
MugenAppAttemptAuthInfo attemptauth;
|
const factory MugenAppAttemptAuthResponse({
|
||||||
|
required MugenAppAttemptAuthInfo attemptauth,
|
||||||
MugenAppAttemptAuthResponse({
|
}) = _MugenAppAttemptAuthResponse;
|
||||||
required this.attemptauth,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory MugenAppAttemptAuthResponse.fromJson(Map<String, dynamic> json) =>
|
factory MugenAppAttemptAuthResponse.fromJson(Map<String, dynamic> json) =>
|
||||||
_$MugenAppAttemptAuthResponseFromJson(json);
|
_$MugenAppAttemptAuthResponseFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$MugenAppAttemptAuthResponseToJson(this);
|
|
||||||
}
|
}
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'mugenapp.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
MugenAppStartAuthInfo _$MugenAppStartAuthInfoFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
MugenAppStartAuthInfo(
|
|
||||||
loginUrl: json['loginUrl'] as String,
|
|
||||||
loginRequestKey: json['loginRequestKey'] as String,
|
|
||||||
ttl: json['ttl'] as int? ?? 0,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MugenAppStartAuthInfoToJson(
|
|
||||||
MugenAppStartAuthInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'loginUrl': instance.loginUrl,
|
|
||||||
'loginRequestKey': instance.loginRequestKey,
|
|
||||||
'ttl': instance.ttl,
|
|
||||||
};
|
|
||||||
|
|
||||||
MugenAppStartAuthResponse _$MugenAppStartAuthResponseFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
MugenAppStartAuthResponse(
|
|
||||||
startauth: MugenAppStartAuthInfo.fromJson(
|
|
||||||
json['startauth'] as Map<String, dynamic>),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MugenAppStartAuthResponseToJson(
|
|
||||||
MugenAppStartAuthResponse instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'startauth': instance.startauth,
|
|
||||||
};
|
|
||||||
|
|
||||||
MugenAppAttemptAuthInfo _$MugenAppAttemptAuthInfoFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
MugenAppAttemptAuthInfo(
|
|
||||||
status: json['status'] as String,
|
|
||||||
userid: json['userid'] as int?,
|
|
||||||
username: json['username'] as String?,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MugenAppAttemptAuthInfoToJson(
|
|
||||||
MugenAppAttemptAuthInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'status': instance.status,
|
|
||||||
'userid': instance.userid,
|
|
||||||
'username': instance.username,
|
|
||||||
};
|
|
||||||
|
|
||||||
MugenAppAttemptAuthResponse _$MugenAppAttemptAuthResponseFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
MugenAppAttemptAuthResponse(
|
|
||||||
attemptauth: MugenAppAttemptAuthInfo.fromJson(
|
|
||||||
json['attemptauth'] as Map<String, dynamic>),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MugenAppAttemptAuthResponseToJson(
|
|
||||||
MugenAppAttemptAuthResponse instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'attemptauth': instance.attemptauth,
|
|
||||||
};
|
|
@ -1,78 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'page_info.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
PageInfo _$PageInfoFromJson(Map<String, dynamic> json) => PageInfo(
|
|
||||||
pageid: json['pageid'] as int,
|
|
||||||
ns: json['ns'] as int,
|
|
||||||
title: json['title'] as String,
|
|
||||||
subtitle: json['subtitle'] as String?,
|
|
||||||
displayTitle: json['displayTitle'] as String?,
|
|
||||||
description: json['extract'] as String?,
|
|
||||||
contentmodel: json['contentmodel'] as String?,
|
|
||||||
pagelanguage: json['pagelanguage'] as String?,
|
|
||||||
pagelanguagehtmlcode: json['pagelanguagehtmlcode'] as String?,
|
|
||||||
pagelanguagedir: json['pagelanguagedir'] as String?,
|
|
||||||
inwatchlist: json['inwatchlist'] as bool?,
|
|
||||||
updatedTime: json['touched'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['touched'] as String),
|
|
||||||
lastrevid: json['lastrevid'] as int?,
|
|
||||||
length: json['length'] as int?,
|
|
||||||
fullurl: json['fullurl'] as String?,
|
|
||||||
editurl: json['editurl'] as String?,
|
|
||||||
canonicalurl: json['canonicalurl'] as String?,
|
|
||||||
)..thumbnail = json['thumbnail'] == null
|
|
||||||
? null
|
|
||||||
: PageImageInfo.fromJson(json['thumbnail'] as Map<String, dynamic>);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$PageInfoToJson(PageInfo instance) => <String, dynamic>{
|
|
||||||
'pageid': instance.pageid,
|
|
||||||
'ns': instance.ns,
|
|
||||||
'title': instance.title,
|
|
||||||
'displayTitle': instance.displayTitle,
|
|
||||||
'subtitle': instance.subtitle,
|
|
||||||
'lastrevid': instance.lastrevid,
|
|
||||||
'contentmodel': instance.contentmodel,
|
|
||||||
'pagelanguage': instance.pagelanguage,
|
|
||||||
'pagelanguagehtmlcode': instance.pagelanguagehtmlcode,
|
|
||||||
'pagelanguagedir': instance.pagelanguagedir,
|
|
||||||
'inwatchlist': instance.inwatchlist,
|
|
||||||
'length': instance.length,
|
|
||||||
'fullurl': instance.fullurl,
|
|
||||||
'editurl': instance.editurl,
|
|
||||||
'canonicalurl': instance.canonicalurl,
|
|
||||||
'thumbnail': instance.thumbnail,
|
|
||||||
'extract': instance.description,
|
|
||||||
'touched': instance.updatedTime?.toIso8601String(),
|
|
||||||
};
|
|
||||||
|
|
||||||
PagesResponse _$PagesResponseFromJson(Map<String, dynamic> json) =>
|
|
||||||
PagesResponse(
|
|
||||||
pages: (json['pages'] as List<dynamic>)
|
|
||||||
.map((e) => PageInfo.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$PagesResponseToJson(PagesResponse instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'pages': instance.pages,
|
|
||||||
};
|
|
||||||
|
|
||||||
PageImageInfo _$PageImageInfoFromJson(Map<String, dynamic> json) =>
|
|
||||||
PageImageInfo(
|
|
||||||
source: json['source'] as String,
|
|
||||||
width: json['width'] as int?,
|
|
||||||
height: json['height'] as int?,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$PageImageInfoToJson(PageImageInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'source': instance.source,
|
|
||||||
'width': instance.width,
|
|
||||||
'height': instance.height,
|
|
||||||
};
|
|
@ -1,168 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'parse.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
MWParseCategoryInfo _$MWParseCategoryInfoFromJson(Map<String, dynamic> json) =>
|
|
||||||
MWParseCategoryInfo(
|
|
||||||
sortkey: json['sortkey'] as String? ?? "",
|
|
||||||
category: json['category'] as String? ?? "",
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MWParseCategoryInfoToJson(
|
|
||||||
MWParseCategoryInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'sortkey': instance.sortkey,
|
|
||||||
'category': instance.category,
|
|
||||||
};
|
|
||||||
|
|
||||||
MWParseLangLinkInfo _$MWParseLangLinkInfoFromJson(Map<String, dynamic> json) =>
|
|
||||||
MWParseLangLinkInfo(
|
|
||||||
lang: json['lang'] as String? ?? "",
|
|
||||||
url: json['url'] as String? ?? "",
|
|
||||||
langname: json['langname'] as String? ?? "",
|
|
||||||
autonym: json['autonym'] as String? ?? "",
|
|
||||||
title: json['title'] as String? ?? "",
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MWParseLangLinkInfoToJson(
|
|
||||||
MWParseLangLinkInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'lang': instance.lang,
|
|
||||||
'url': instance.url,
|
|
||||||
'langname': instance.langname,
|
|
||||||
'autonym': instance.autonym,
|
|
||||||
'title': instance.title,
|
|
||||||
};
|
|
||||||
|
|
||||||
MWParsePageLinkInfo _$MWParsePageLinkInfoFromJson(Map<String, dynamic> json) =>
|
|
||||||
MWParsePageLinkInfo(
|
|
||||||
ns: json['ns'] as int? ?? -1,
|
|
||||||
title: json['title'] as String? ?? "",
|
|
||||||
exists: json['exists'] as bool? ?? false,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MWParsePageLinkInfoToJson(
|
|
||||||
MWParsePageLinkInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'ns': instance.ns,
|
|
||||||
'title': instance.title,
|
|
||||||
'exists': instance.exists,
|
|
||||||
};
|
|
||||||
|
|
||||||
MWParseSectionInfo _$MWParseSectionInfoFromJson(Map<String, dynamic> json) =>
|
|
||||||
MWParseSectionInfo(
|
|
||||||
toclevel: json['toclevel'] as int? ?? -1,
|
|
||||||
level: json['level'] as int? ?? -1,
|
|
||||||
line: json['line'] as String? ?? "",
|
|
||||||
number: json['number'] as String? ?? "",
|
|
||||||
index: json['index'] as String? ?? "",
|
|
||||||
fromtitle: json['fromtitle'] as String? ?? "",
|
|
||||||
byteoffset: json['byteoffset'] as int?,
|
|
||||||
anchor: json['anchor'] as String? ?? "",
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MWParseSectionInfoToJson(MWParseSectionInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'toclevel': instance.toclevel,
|
|
||||||
'level': instance.level,
|
|
||||||
'line': instance.line,
|
|
||||||
'number': instance.number,
|
|
||||||
'index': instance.index,
|
|
||||||
'fromtitle': instance.fromtitle,
|
|
||||||
'byteoffset': instance.byteoffset,
|
|
||||||
'anchor': instance.anchor,
|
|
||||||
};
|
|
||||||
|
|
||||||
MWParseInfo _$MWParseInfoFromJson(Map<String, dynamic> json) => MWParseInfo(
|
|
||||||
title: json['title'] as String? ?? "",
|
|
||||||
pageid: json['pageid'] as int? ?? -1,
|
|
||||||
revid: json['revid'] as int? ?? -1,
|
|
||||||
text: json['text'] as String? ?? "",
|
|
||||||
langlink: (json['langlink'] as List<dynamic>?)
|
|
||||||
?.map((e) =>
|
|
||||||
MWParseLangLinkInfo.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
categories: (json['categories'] as List<dynamic>?)
|
|
||||||
?.map((e) =>
|
|
||||||
MWParseCategoryInfo.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
links: (json['links'] as List<dynamic>?)
|
|
||||||
?.map((e) =>
|
|
||||||
MWParsePageLinkInfo.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
templates: (json['templates'] as List<dynamic>?)
|
|
||||||
?.map((e) =>
|
|
||||||
MWParsePageLinkInfo.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
images: (json['images'] as List<dynamic>?)
|
|
||||||
?.map((e) => e as String)
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
externallinks: (json['externallinks'] as List<dynamic>?)
|
|
||||||
?.map((e) => e as String)
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
sections: (json['sections'] as List<dynamic>?)
|
|
||||||
?.map(
|
|
||||||
(e) => MWParseSectionInfo.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
showtoc: json['showtoc'] as bool? ?? true,
|
|
||||||
displaytitle: json['displaytitle'] as String? ?? "",
|
|
||||||
modules: (json['modules'] as List<dynamic>?)
|
|
||||||
?.map((e) => e as String)
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
modulescripts: (json['modulescripts'] as List<dynamic>?)
|
|
||||||
?.map((e) => e as String)
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
modulestyles: (json['modulestyles'] as List<dynamic>?)
|
|
||||||
?.map((e) => e as String)
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
jsconfigvars: json['jsconfigvars'] as Map<String, dynamic>? ?? const {},
|
|
||||||
iwlinks: json['iwlinks'] as Map<String, dynamic>? ?? const {},
|
|
||||||
properties: json['properties'] as Map<String, dynamic>? ?? const {},
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MWParseInfoToJson(MWParseInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'title': instance.title,
|
|
||||||
'pageid': instance.pageid,
|
|
||||||
'revid': instance.revid,
|
|
||||||
'text': instance.text,
|
|
||||||
'langlink': instance.langlink,
|
|
||||||
'categories': instance.categories,
|
|
||||||
'links': instance.links,
|
|
||||||
'templates': instance.templates,
|
|
||||||
'images': instance.images,
|
|
||||||
'externallinks': instance.externallinks,
|
|
||||||
'sections': instance.sections,
|
|
||||||
'showtoc': instance.showtoc,
|
|
||||||
'displaytitle': instance.displaytitle,
|
|
||||||
'modules': instance.modules,
|
|
||||||
'modulescripts': instance.modulescripts,
|
|
||||||
'modulestyles': instance.modulestyles,
|
|
||||||
'jsconfigvars': instance.jsconfigvars,
|
|
||||||
'iwlinks': instance.iwlinks,
|
|
||||||
'properties': instance.properties,
|
|
||||||
};
|
|
||||||
|
|
||||||
MWParseResponse _$MWParseResponseFromJson(Map<String, dynamic> json) =>
|
|
||||||
MWParseResponse(
|
|
||||||
parse: MWParseInfo.fromJson(json['parse'] as Map<String, dynamic>),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MWParseResponseToJson(MWParseResponse instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'parse': instance.parse,
|
|
||||||
};
|
|
@ -1,45 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'recent_changes.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
RecentChangesItem _$RecentChangesItemFromJson(Map<String, dynamic> json) =>
|
|
||||||
RecentChangesItem(
|
|
||||||
type: json['type'] as String?,
|
|
||||||
ns: json['ns'] as int,
|
|
||||||
title: json['title'] as String,
|
|
||||||
pageid: json['pageid'] as int,
|
|
||||||
revid: json['revid'] as int,
|
|
||||||
oldRevid: json['old_revid'] as int?,
|
|
||||||
rcid: json['rcid'] as int?,
|
|
||||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$RecentChangesItemToJson(RecentChangesItem instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'type': instance.type,
|
|
||||||
'ns': instance.ns,
|
|
||||||
'title': instance.title,
|
|
||||||
'pageid': instance.pageid,
|
|
||||||
'revid': instance.revid,
|
|
||||||
'old_revid': instance.oldRevid,
|
|
||||||
'rcid': instance.rcid,
|
|
||||||
'timestamp': instance.timestamp.toIso8601String(),
|
|
||||||
};
|
|
||||||
|
|
||||||
RecentChangesResponse _$RecentChangesResponseFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
RecentChangesResponse(
|
|
||||||
recentchanges: (json['recentchanges'] as List<dynamic>)
|
|
||||||
.map((e) => RecentChangesItem.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$RecentChangesResponseToJson(
|
|
||||||
RecentChangesResponse instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'recentchanges': instance.recentchanges,
|
|
||||||
};
|
|
@ -1,114 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'userinfo.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
UserGroupMembership _$UserGroupMembershipFromJson(Map<String, dynamic> json) =>
|
|
||||||
UserGroupMembership(
|
|
||||||
group: json['group'] as String,
|
|
||||||
expiry: json['expiry'] as String,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$UserGroupMembershipToJson(
|
|
||||||
UserGroupMembership instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'group': instance.group,
|
|
||||||
'expiry': instance.expiry,
|
|
||||||
};
|
|
||||||
|
|
||||||
UserAcceptLang _$UserAcceptLangFromJson(Map<String, dynamic> json) =>
|
|
||||||
UserAcceptLang(
|
|
||||||
q: (json['q'] as num).toDouble(),
|
|
||||||
langCode: json['*'] as String,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$UserAcceptLangToJson(UserAcceptLang instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'q': instance.q,
|
|
||||||
'*': instance.langCode,
|
|
||||||
};
|
|
||||||
|
|
||||||
MetaUserInfo _$MetaUserInfoFromJson(Map<String, dynamic> json) => MetaUserInfo(
|
|
||||||
id: json['id'] as int,
|
|
||||||
name: json['name'] as String,
|
|
||||||
groups:
|
|
||||||
(json['groups'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
|
||||||
groupmemberships: (json['groupmemberships'] as List<dynamic>?)
|
|
||||||
?.map((e) => UserGroupMembership.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
implicitgroups: (json['implicitgroups'] as List<dynamic>?)
|
|
||||||
?.map((e) => e as String)
|
|
||||||
.toList(),
|
|
||||||
rights:
|
|
||||||
(json['rights'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
|
||||||
changeablegroups:
|
|
||||||
(json['changeablegroups'] as Map<String, dynamic>?)?.map(
|
|
||||||
(k, e) =>
|
|
||||||
MapEntry(k, (e as List<dynamic>).map((e) => e as String).toList()),
|
|
||||||
),
|
|
||||||
options: json['options'] as Map<String, dynamic>?,
|
|
||||||
editcount: json['editcount'] as int?,
|
|
||||||
realname: json['realname'] as String?,
|
|
||||||
email: json['email'] as String?,
|
|
||||||
emailauthenticated: json['emailauthenticated'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['emailauthenticated'] as String),
|
|
||||||
registrationdate: json['registrationdate'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['registrationdate'] as String),
|
|
||||||
acceptlang: (json['acceptlang'] as List<dynamic>?)
|
|
||||||
?.map((e) => UserAcceptLang.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
unreadcount: json['unreadcount'] as int?,
|
|
||||||
centralids: (json['centralids'] as Map<String, dynamic>?)?.map(
|
|
||||||
(k, e) => MapEntry(k, e as int),
|
|
||||||
),
|
|
||||||
attachedlocal: (json['attachedlocal'] as Map<String, dynamic>?)?.map(
|
|
||||||
(k, e) => MapEntry(k, e as String),
|
|
||||||
),
|
|
||||||
latestcontrib: json['latestcontrib'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['latestcontrib'] as String),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MetaUserInfoToJson(MetaUserInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'id': instance.id,
|
|
||||||
'name': instance.name,
|
|
||||||
'groups': instance.groups,
|
|
||||||
'groupmemberships': instance.groupmemberships,
|
|
||||||
'implicitgroups': instance.implicitgroups,
|
|
||||||
'rights': instance.rights,
|
|
||||||
'changeablegroups': instance.changeablegroups,
|
|
||||||
'options': instance.options,
|
|
||||||
'editcount': instance.editcount,
|
|
||||||
'realname': instance.realname,
|
|
||||||
'email': instance.email,
|
|
||||||
'emailauthenticated': instance.emailauthenticated?.toIso8601String(),
|
|
||||||
'registrationdate': instance.registrationdate?.toIso8601String(),
|
|
||||||
'acceptlang': instance.acceptlang,
|
|
||||||
'unreadcount': instance.unreadcount,
|
|
||||||
'centralids': instance.centralids,
|
|
||||||
'attachedlocal': instance.attachedlocal,
|
|
||||||
'latestcontrib': instance.latestcontrib?.toIso8601String(),
|
|
||||||
};
|
|
||||||
|
|
||||||
MetaUserInfoResponse _$MetaUserInfoResponseFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
MetaUserInfoResponse(
|
|
||||||
userinfo: MetaUserInfo.fromJson(json['userinfo'] as Map<String, dynamic>),
|
|
||||||
useravatar: (json['useravatar'] as Map<String, dynamic>?)?.map(
|
|
||||||
(k, e) => MapEntry(int.parse(k), e as String),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MetaUserInfoResponseToJson(
|
|
||||||
MetaUserInfoResponse instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'userinfo': instance.userinfo,
|
|
||||||
'useravatar':
|
|
||||||
instance.useravatar?.map((k, e) => MapEntry(k.toString(), e)),
|
|
||||||
};
|
|
@ -1,16 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'settings.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
AppSettings _$AppSettingsFromJson(Map<String, dynamic> json) => AppSettings(
|
|
||||||
betaPageRender: json['betaPageRender'] as bool?,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$AppSettingsToJson(AppSettings instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'betaPageRender': instance.betaPageRender,
|
|
||||||
};
|
|
@ -1,26 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'site_config.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
SiteConfig _$SiteConfigFromJson(Map<String, dynamic> json) => SiteConfig(
|
|
||||||
moduleStyles: (json['moduleStyles'] as List<dynamic>?)
|
|
||||||
?.map((e) => e as String)
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
moduleScripts: (json['moduleScripts'] as List<dynamic>?)
|
|
||||||
?.map((e) => e as String)
|
|
||||||
.toList() ??
|
|
||||||
const [],
|
|
||||||
renderTheme: json['renderTheme'] as String? ?? Global.renderThemeFallback,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$SiteConfigToJson(SiteConfig instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'moduleStyles': instance.moduleStyles,
|
|
||||||
'moduleScripts': instance.moduleScripts,
|
|
||||||
'renderTheme': instance.renderTheme,
|
|
||||||
};
|
|
@ -1,24 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'user.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
UserInfo _$UserInfoFromJson(Map<String, dynamic> json) => UserInfo(
|
|
||||||
userId: json['userId'] as int,
|
|
||||||
userName: json['userName'] as String,
|
|
||||||
nickName: json['nickName'] as String?,
|
|
||||||
avatarUrlSet: (json['avatarUrlSet'] as Map<String, dynamic>?)?.map(
|
|
||||||
(k, e) => MapEntry(int.parse(k), e as String),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$UserInfoToJson(UserInfo instance) => <String, dynamic>{
|
|
||||||
'userId': instance.userId,
|
|
||||||
'userName': instance.userName,
|
|
||||||
'nickName': instance.nickName,
|
|
||||||
'avatarUrlSet':
|
|
||||||
instance.avatarUrlSet?.map((k, e) => MapEntry(k.toString(), e)),
|
|
||||||
};
|
|
Loading…
Reference in New Issue