Compare commits

..

18 Commits

Author SHA1 Message Date
33ec0b1d9a 🚀 Launch 3.5.0+150 2025-12-03 01:41:30 +08:00
f698385494 🍱 Sync zh-CN translation 2025-12-03 01:36:01 +08:00
6ecdf89d20 Unactivated account hint, close #199 2025-12-03 01:34:02 +08:00
683f686540 🐛 Fix opening large files, close #201 2025-12-03 01:01:32 +08:00
6a115ab1cc Allow user to enter affiliation spell when creating account 2025-12-03 00:53:21 +08:00
d05283d3b1 💄 Optimize some styling 2025-12-03 00:42:34 +08:00
b9653e7264 👽 Update to match server side updates 2025-12-03 00:39:12 +08:00
87d1c8b320 🐛 Fix site manager will treat all files like text 2025-12-01 23:29:57 +08:00
22eb54b61f 🐛 Fix file management do not support windows format 2025-12-01 22:36:26 +08:00
a90ad2debc 💄 Optimize style of online counter again 2025-12-01 00:04:51 +08:00
2f00bf660d 💄 Optimize style of online count 2025-11-30 22:47:53 +08:00
322a93324c 🐛 Fix room content didn't continely load 2025-11-30 22:00:23 +08:00
c3a3be0807 👽 Update message db to support server changes 2025-11-30 21:57:35 +08:00
27c7c8f039 👽 Update third party login 2025-11-30 21:38:36 +08:00
a7960da362 💫 Adjust snackbar animation 2025-11-30 17:29:20 +08:00
64ab30b0a9 🐛 Fix websocket didn't connect after logged out 2025-11-30 17:25:16 +08:00
935e6d5833 💄 Logout now will clear database to avoid wrong state 2025-11-30 17:24:27 +08:00
938b128b1e 💄 Optimize create account flow and add some hints 2025-11-30 17:05:15 +08:00
33 changed files with 4272 additions and 3948 deletions

View File

@@ -23,6 +23,8 @@
"next": "Next", "next": "Next",
"createAccount": "Create an Account", "createAccount": "Create an Account",
"createAccountDescription": "New to here? We got you covered!", "createAccountDescription": "New to here? We got you covered!",
"affiliationSpell": "Affiliation Spell",
"affiliationSpellHint": "If you have an affiliation spell, enter it here.",
"nickname": "Nickname", "nickname": "Nickname",
"email": "Email", "email": "Email",
"bio": "Bio", "bio": "Bio",
@@ -1475,5 +1477,17 @@
"lotteryMultiplierRequired": "Please enter a multiplier", "lotteryMultiplierRequired": "Please enter a multiplier",
"lotteryMultiplierRange": "Multiplier must be between 1 and 10", "lotteryMultiplierRange": "Multiplier must be between 1 and 10",
"dropToShare": "Drop to share", "dropToShare": "Drop to share",
"friendsOnline": "Friends Online" "friendsOnline": "Friends Online",
"createAccountAlmostThere": "Almost There",
"createAccountAlmostThereHint": "You're one step away from joining the Solar Network! Please solve the captcha puzzle shows next.",
"createAccountNotice": "Things you need to know before you create an account:",
"createAccountConfirmEmail": "After your account being created, you need go to your email inbox to active your account to get permission to use all features.",
"createAccountNoAltAccounts": "Multiple or alternative accounts are banned from the Solar Network, that will violates our terms of services.",
"createAccountAgreeTerms": "I've read these terms and agree to the terms of service.",
"createAccountProfile": "Create your profile",
"createAccountToS": "Review Terms & Conditions",
"accountActivationAlert": "Remember to activate your account",
"accountActivationAlertHint": "Unactivated account may leads to various of permission issues, activate your account by clicking the link we sent to your email inbox.",
"accountActivationResendHint": "Didn't see it? Try click the button below to resend one. If you need to update your email while your account was unactivated, feel free to contact our customer service.",
"accountActivationResend": "Resend"
} }

View File

@@ -1341,138 +1341,153 @@
"unindexedFiles": "未索引的文件", "unindexedFiles": "未索引的文件",
"folder": "文件夹", "folder": "文件夹",
"clearCompleted": "清除已完成的", "clearCompleted": "清除已完成的",
"uploadSuccess": "Upload successful!", "uploadSuccess": "上传成功!",
"wouldYouLikeToViewFile": "Would you like to view the file?", "wouldYouLikeToViewFile": "预览此文件?",
"contentCantEmpty": "Content cannot be empty", "contentCantEmpty": "内容不能为空",
"features": "Features", "features": "特征",
"unnamed": "Unnamed", "unnamed": "未命名",
"fundEnvelopeLoadFailed": "Failed to load fund envelope", "fundEnvelopeLoadFailed": "加载支票信封失败",
"fundEnvelope": "Fund Envelope", "fundEnvelope": "支票信封",
"fundEnvelopeRemaining": "Remaining: {} {}", "fundEnvelopeRemaining": "剩余:{} {}",
"fundEnvelopeSplit": "Split: {}", "fundEnvelopeSplit": "拆分:{}",
"fundEnvelopeSplitEvenly": "Evenly", "fundEnvelopeSplitEvenly": "均分",
"fundEnvelopeSplitRandomly": "Randomly", "fundEnvelopeSplitRandomly": "随机",
"fundEnvelopeClaimSuccess": "Fund claimed successfully!", "fundEnvelopeClaimSuccess": "支票领取成功!",
"fundEnvelopeStatusCreated": "Created", "fundEnvelopeStatusCreated": "已创建",
"fundEnvelopeStatusPartial": "Partially Claimed", "fundEnvelopeStatusPartial": "已领取部分",
"fundEnvelopeStatusCompleted": "Fully Claimed", "fundEnvelopeStatusCompleted": "已全部领取",
"fundEnvelopeStatusExpired": "Expired", "fundEnvelopeStatusExpired": "已过期",
"fundEnvelopeStatusUnknown": "Unknown", "fundEnvelopeStatusUnknown": "未知",
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)", "fundEnvelopeRecipients": "收款人 ({}/{} 已领取)",
"fundEnvelopeExpiredDaysAgo": { "fundEnvelopeExpiredDaysAgo": {
"one": "Expired {} day ago", "one": "{} 天前过期",
"other": "Expired {} days ago" "other": "{} 天前过期"
}, },
"fundEnvelopeExpiresSoon": "Expires soon", "fundEnvelopeExpiresSoon": "即将到期",
"fundEnvelopeExpiresInHours": { "fundEnvelopeExpiresInHours": {
"one": "Expires in {} hour", "one": "{} 小时后到期",
"other": "Expires in {} hours" "other": "{}小时后到期"
}, },
"fundEnvelopeExpiresInDays": { "fundEnvelopeExpiresInDays": {
"one": "Expires in {} day", "one": "{} 天后到期",
"other": "Expires in {} days" "other": "{} 天后到期"
}, },
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits", "fundEnvelopeRemainingWithSplits": "{} {} / {} ",
"fundEnvelopeUnknownUser": "Unknown User", "fundEnvelopeUnknownUser": "未知用户",
"deleteSite": "Delete Site", "deleteSite": "删除网站",
"deleteSiteConfirm": "Are you sure you want to delete this site?", "deleteSiteConfirm": "您确定要删除此网站?",
"siteDeletedSuccess": "Site deleted successfully", "siteDeletedSuccess": "网站成功删除",
"siteSlug": "Slug", "siteSlug": "标识符",
"siteSlugHint": "my-site", "siteSlugHint": "我的网站",
"siteSlugRequired": "Please enter a slug", "siteSlugRequired": "请输入一个标识符",
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes", "siteSlugInvalid": "标识符只能包含小写字母、数字和短横线",
"siteName": "Site Name", "siteName": "网站名称",
"siteNameHint": "My Publication Site", "siteNameHint": "我的发布者网站",
"siteNameRequired": "Please enter a site name", "siteNameRequired": "请输入网站名称",
"siteMode": "Mode", "siteMode": "模式",
"siteModeFullyManaged": "Fully Managed", "siteModeFullyManaged": "全托管",
"siteModeSelfManaged": "Self-Managed", "siteModeSelfManaged": "自托管",
"editPublicationSite": "Edit Publication Site", "editPublicationSite": "编辑发布者网站",
"deletePublicationSite": "Delete Publication Site", "deletePublicationSite": "删除发布者网站",
"publicationSiteSavedSuccess": "Publication site saved successfully", "publicationSiteSavedSuccess": "发布者网站成功删除",
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.", "publicationSiteDeleteConfirm": "您确定要删除该发布者网站吗?此操作不能撤销。",
"publicationSiteDeletedSuccess": "Publication site deleted successfully", "publicationSiteDeletedSuccess": "发布者网站成功删除",
"newPublicationSite": "New Publication Site", "newPublicationSite": "新建发布者网站",
"siteDetails": "Site Details", "siteDetails": "网站描述",
"siteInformation": "Site Information", "siteInformation": "网站信息",
"siteDomain": "Domain", "siteDomain": "域名",
"siteCreated": "Created", "siteCreated": "创建于",
"siteUpdated": "Updated", "siteUpdated": "更新于",
"failedToLoadSite": "Failed to load site", "failedToLoadSite": "加载网站失败",
"sitePages": "Pages", "sitePages": "页面",
"noPagesYet": "No pages yet", "noPagesYet": "还没有页面",
"createFirstPage": "Create your first page to get started", "createFirstPage": "创建您的第一个页面以开始",
"failedToLoadPages": "Failed to load pages", "failedToLoadPages": "加载页面失败",
"fileManagement": "File Management", "fileManagement": "文件管理",
"siteFiles": "Files", "siteFiles": "文件",
"siteFolder": "Folder", "siteFolder": "文件夹",
"siteRoot": "Root", "siteRoot": "",
"noFilesUploadedYet": "No files uploaded yet", "noFilesUploadedYet": "还没有文件被删除",
"uploadFirstFile": "Upload your first file to get started", "uploadFirstFile": "上传您的第一个文件以开始",
"failedToLoadFiles": "Failed to load files", "failedToLoadFiles": "加载文件失败",
"noFilesFoundInFolder": "No files found in the selected folder", "noFilesFoundInFolder": "选择的文件夹里没有文件",
"fileActions": "File Actions", "fileActions": "文件选项",
"purgeFiles": "Purge Files", "purgeFiles": "清除文件",
"purgeFilesDescription": "Remove all uploaded files from the site", "purgeFilesDescription": "从这个网站删除全部文件",
"deploySite": "Deploy Site", "deploySite": "部署网站",
"deploySiteDescription": "Upload and deploy a new version from ZIP archive", "deploySiteDescription": "从ZIP存档上传和部署新版本",
"confirmPurge": "Confirm Purge", "confirmPurge": "确认清空",
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?", "purgeFilesConfirm": "这将永久删除上传到本网站的所有文件。此操作无法撤销。您确定要继续吗?",
"purgeAllFiles": "Purge All Files", "purgeAllFiles": "清除所有文件",
"allFilesPurgedSuccess": "All files purged successfully", "allFilesPurgedSuccess": "所有文件都清除成功",
"failedToPurgeFiles": "Failed to purge files: {}", "failedToPurgeFiles": "清除文件失败:{}",
"siteDeployedSuccess": "Site deployed successfully", "siteDeployedSuccess": "网站部署成功",
"failedToDeploySite": "Failed to deploy site: {}", "failedToDeploySite": "部署网站失败:{}",
"createPage": "Create Page", "createPage": "创建页面",
"editPage": "Edit Page", "editPage": "编辑页面",
"pageType": "Page Type", "pageType": "页面类型",
"htmlPage": "HTML Page", "htmlPage": "HTML 页面",
"redirectPage": "Redirect Page", "redirectPage": "重定向页面",
"pageTypeRequired": "Please select a page type", "pageTypeRequired": "请选择一个页面类型",
"pagePath": "Page Path", "pagePath": "页面路径",
"pagePathHint": "/about, /contact, etc.", "pagePathHint": "例如 /about, /contact 等。",
"pagePathRequired": "Please enter a page path", "pagePathRequired": "请输入一个页面路径",
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes", "pagePathInvalid": "页面路径只能包含字母、数字、连字符、下划线和斜杠",
"pagePathMustStartWithSlash": "Page path must start with /", "pagePathMustStartWithSlash": "页面路径必须以 / 开头",
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes", "pagePathNoConsecutiveSlashes": "页面路径不能有连续的斜杠",
"pageTitle": "Page Title", "pageTitle": "页面标题",
"pageTitleHint": "About Us, Contact, etc.", "pageTitleHint": "例如关于我们,联系方式等。",
"pageTitleRequired": "Please enter a page title", "pageTitleRequired": "请输入一个页面标题",
"pageContentHtml": "Page Content (HTML)", "pageContentHtml": "页面内容 (HTML)",
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>", "pageContentHint": "<h1>Hello World</h1><p>这是我的页面内容…</p>",
"pageContentRequired": "Please enter HTML content for the page", "pageContentRequired": "请为这个页面输入HTML内容",
"redirectTarget": "Redirect Target", "redirectTarget": "重定向目标",
"redirectTargetHint": "/new-page, https://example.com, etc.", "redirectTargetHint": "例如 /new-page, https://example.com 等。",
"redirectTargetRequired": "Please enter a redirect target", "redirectTargetRequired": "请输入重定向目标",
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)", "redirectTargetInvalid": "目标必须是相对路径 (/) 或绝对URL (http/https)",
"deletePage": "Delete Page", "deletePage": "删除页面",
"deletePageConfirm": "Are you sure you want to delete this page?", "deletePageConfirm": "您确定要删除此页面?",
"savePage": "Save Page", "savePage": "保存页面",
"pageCreatedSuccess": "Page created successfully", "pageCreatedSuccess": "页面成功创建",
"pageUpdatedSuccess": "Page updated successfully", "pageUpdatedSuccess": "页面上传成功",
"pageDeletedSuccess": "Page deleted successfully", "pageDeletedSuccess": "页面已成功删除",
"uploadFiles": "Upload Files", "uploadFiles": "上传文件",
"uploadPath": "Upload Path", "uploadPath": "上传路径",
"uploadPathHint": "/ (root) or /assets/images/", "uploadPathHint": "/ (根) 或 /assets/images/",
"uploadPathRequired": "Please enter an upload path", "uploadPathRequired": "请输入一个上传路径",
"uploadPathMustStartWithSlash": "Path must start with /", "uploadPathMustStartWithSlash": "路径必须以/开头",
"uploadPathNoSpaces": "Path cannot contain spaces", "uploadPathNoSpaces": "路径不能包含空格",
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes", "uploadPathNoConsecutiveSlashes": "路径不能有连续的斜杠",
"percentCompleted": "{}% completed", "percentCompleted": "{}% 已完成",
"filesToUpload": "{} files to upload", "filesToUpload": "{} 个文件已上传",
"fileSizeKb": "Size: {} KB", "fileSizeKb": "大小:{} KB",
"uploadingEllipsis": "Uploading...", "uploadingEllipsis": "上传中……",
"uploadFilesCount": { "uploadFilesCount": {
"one": "Upload {} File", "one": "上传 {} 个文件",
"other": "Upload {} Files" "other": "上传 {} 个文件"
}, },
"allUploadsCompleted": "All uploads completed", "allUploadsCompleted": "所有文件已上传",
"someUploadsFailed": "Some uploads failed", "someUploadsFailed": "一些上传失败",
"uploadingInProgress": "Uploading in progress", "uploadingInProgress": "上传正在进行中",
"readyToUpload": "Ready to upload", "readyToUpload": "准备好上传",
"allFilesUploadedSuccess": "All files uploaded successfully", "allFilesUploadedSuccess": "所有文件已成功上传",
"lotteryLastNumberSpecial": "The last selected number will be your special number.", "lotteryLastNumberSpecial": "最后选择的数字将是您的特殊数字。",
"lotteryMultiplierRequired": "Please enter a multiplier", "lotteryMultiplierRequired": "请输入倍率",
"lotteryMultiplierRange": "Multiplier must be between 1 and 10", "lotteryMultiplierRange": "倍率必须在 1 到 10 之间",
"dropToShare": "Drop to share" "dropToShare": "拖到此处以分享",
"affiliationSpell": "邀请码",
"affiliationSpellHint": "如果您有邀请码,请在此处输入。",
"friendsOnline": "在线好友",
"createAccountAlmostThere": "就差一步",
"createAccountAlmostThereHint": "您距离加入 Solar Network 仅一步之遥!请解决接下来显示的验证码谜题。",
"createAccountNotice": "创建账户前您需要了解的事项:",
"createAccountConfirmEmail": "账户创建后,您需要前往您的邮箱收件箱激活账户,以获得使用所有功能的权限。",
"createAccountNoAltAccounts": "Solar Network 禁止使用多个或替代账户,这会违反我们的服务条款。",
"createAccountAgreeTerms": "我已阅读并同意服务条款。",
"createAccountProfile": "创建您的个人资料",
"createAccountToS": "查看条款与条件",
"accountActivationAlert": "请记住激活您的账户",
"accountActivationAlertHint": "未激活的账户可能会导致各种权限问题,请点击我们发送到您邮箱收件箱的链接来激活您的账户。",
"accountActivationResendHint": "没收到?请尝试点击下方按钮重新发送。如果您在账户未激活期间需要更新邮箱,请随时联系我们的客服。",
"accountActivationResend": "重新发送"
} }

View File

@@ -231,7 +231,7 @@ PODS:
- libwebp/sharpyuv (1.5.0) - libwebp/sharpyuv (1.5.0)
- libwebp/webp (1.5.0): - libwebp/webp (1.5.0):
- libwebp/sharpyuv - libwebp/sharpyuv
- livekit_client (2.5.3): - livekit_client (2.5.4):
- Flutter - Flutter
- flutter_webrtc - flutter_webrtc
- WebRTC-SDK (= 137.7151.04) - WebRTC-SDK (= 137.7151.04)
@@ -249,13 +249,14 @@ PODS:
- nanopb/encode (3.30910.0) - nanopb/encode (3.30910.0)
- native_exif (0.0.1): - native_exif (0.0.1):
- Flutter - Flutter
- objective_c (0.0.1):
- Flutter
- OrderedSet (6.0.3) - OrderedSet (6.0.3)
- package_info_plus (0.4.5): - package_info_plus (0.4.5):
- Flutter - Flutter
- pasteboard (0.0.1): - pasteboard (0.0.1):
- Flutter - Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- pointer_interceptor_ios (0.0.1): - pointer_interceptor_ios (0.0.1):
- Flutter - Flutter
- PromisesObjC (2.4.0) - PromisesObjC (2.4.0)
@@ -347,9 +348,9 @@ DEPENDENCIES:
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`) - media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`) - media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
- native_exif (from `.symlinks/plugins/native_exif/ios`) - native_exif (from `.symlinks/plugins/native_exif/ios`)
- objective_c (from `.symlinks/plugins/objective_c/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- pasteboard (from `.symlinks/plugins/pasteboard/ios`) - pasteboard (from `.symlinks/plugins/pasteboard/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`) - pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`)
- protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`) - protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`)
- receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`) - receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`)
@@ -451,12 +452,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/media_kit_video/ios" :path: ".symlinks/plugins/media_kit_video/ios"
native_exif: native_exif:
:path: ".symlinks/plugins/native_exif/ios" :path: ".symlinks/plugins/native_exif/ios"
objective_c:
:path: ".symlinks/plugins/objective_c/ios"
package_info_plus: package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios" :path: ".symlinks/plugins/package_info_plus/ios"
pasteboard: pasteboard:
:path: ".symlinks/plugins/pasteboard/ios" :path: ".symlinks/plugins/pasteboard/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
pointer_interceptor_ios: pointer_interceptor_ios:
:path: ".symlinks/plugins/pointer_interceptor_ios/ios" :path: ".symlinks/plugins/pointer_interceptor_ios/ios"
protocol_handler_ios: protocol_handler_ios:
@@ -528,16 +529,16 @@ SPEC CHECKSUMS:
Kingfisher: 23d18f54677d973b713e54ce6a8f5eef6e7056ba Kingfisher: 23d18f54677d973b713e54ce6a8f5eef6e7056ba
KingfisherWebP: 38b9721821947f547afb78f933f75f4f9e0ae402 KingfisherWebP: 38b9721821947f547afb78f933f75f4f9e0ae402
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
livekit_client: 86c8af579274e4b7a215185a8080db2d4e176f40 livekit_client: 53ca658779b78710fb458cccee28b53a13356c15
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854 media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474 media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
native_exif: 0eb73d3d5b3ca892719228df8d2d1b13d1ae396c native_exif: 0eb73d3d5b3ca892719228df8d2d1b13d1ae396c
objective_c: 89e720c30d716b036faf9c9684022048eee1eee2
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499 package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
pasteboard: 49088aeb6119d51f976a421db60d8e1ab079b63c pasteboard: 49088aeb6119d51f976a421db60d8e1ab079b63c
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
pointer_interceptor_ios: da06a662d5bfd329602b45b2ab41bc0fb5fdb0f0 pointer_interceptor_ios: da06a662d5bfd329602b45b2ab41bc0fb5fdb0f0
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851

View File

@@ -14,7 +14,7 @@ class AppDatabase extends _$AppDatabase {
AppDatabase(super.e); AppDatabase(super.e);
@override @override
int get schemaVersion => 8; int get schemaVersion => 9;
@override @override
MigrationStrategy get migration => MigrationStrategy( MigrationStrategy get migration => MigrationStrategy(
@@ -62,6 +62,15 @@ class AppDatabase extends _$AppDatabase {
await m.createTable(chatRooms); await m.createTable(chatRooms);
await m.createTable(chatMembers); await m.createTable(chatMembers);
} }
if (from < 9) {
// Remove unused columns from chat_members
await customStatement('ALTER TABLE chat_members DROP COLUMN role');
await customStatement('ALTER TABLE chat_members DROP COLUMN is_bot');
await customStatement('ALTER TABLE chat_members DROP COLUMN status');
await customStatement(
'ALTER TABLE chat_members DROP COLUMN last_typed',
);
}
}, },
); );
@@ -237,14 +246,11 @@ class AppDatabase extends _$AppDatabase {
accountId: senderRow.accountId, accountId: senderRow.accountId,
account: senderAccount, account: senderAccount,
nick: senderRow.nick, nick: senderRow.nick,
role: senderRow.role,
notify: senderRow.notify, notify: senderRow.notify,
joinedAt: senderRow.joinedAt, joinedAt: senderRow.joinedAt,
breakUntil: senderRow.breakUntil, breakUntil: senderRow.breakUntil,
timeoutUntil: senderRow.timeoutUntil, timeoutUntil: senderRow.timeoutUntil,
isBot: senderRow.isBot,
status: null, status: null,
lastTyped: senderRow.lastTyped,
createdAt: senderRow.createdAt, createdAt: senderRow.createdAt,
updatedAt: senderRow.updatedAt, updatedAt: senderRow.updatedAt,
deletedAt: senderRow.deletedAt, deletedAt: senderRow.deletedAt,
@@ -260,6 +266,7 @@ class AppDatabase extends _$AppDatabase {
id: 'unknown', id: 'unknown',
name: 'unknown', name: 'unknown',
nick: dbMessage.senderId, // Show the ID instead of Unknown nick: dbMessage.senderId, // Show the ID instead of Unknown
activatedAt: null,
profile: SnAccountProfile( profile: SnAccountProfile(
picture: null, picture: null,
id: 'unknown', id: 'unknown',
@@ -281,12 +288,10 @@ class AppDatabase extends _$AppDatabase {
updatedAt: DateTime.now(), updatedAt: DateTime.now(),
), ),
nick: dbMessage.senderId, // Show the senderId as fallback nick: dbMessage.senderId, // Show the senderId as fallback
role: 0,
notify: 0, notify: 0,
joinedAt: null, joinedAt: null,
breakUntil: null, breakUntil: null,
timeoutUntil: null, timeoutUntil: null,
isBot: false,
status: null, status: null,
lastTyped: null, lastTyped: null,
createdAt: DateTime.now(), createdAt: DateTime.now(),
@@ -343,16 +348,10 @@ class AppDatabase extends _$AppDatabase {
accountId: Value(member.accountId), accountId: Value(member.accountId),
account: Value(member.account.toJson()), account: Value(member.account.toJson()),
nick: Value(member.nick), nick: Value(member.nick),
role: Value(member.role),
notify: Value(member.notify), notify: Value(member.notify),
joinedAt: Value(member.joinedAt), joinedAt: Value(member.joinedAt),
breakUntil: Value(member.breakUntil), breakUntil: Value(member.breakUntil),
timeoutUntil: Value(member.timeoutUntil), timeoutUntil: Value(member.timeoutUntil),
isBot: Value(member.isBot),
status: Value(
member.status == null ? null : jsonEncode(member.status!.toJson()),
),
lastTyped: Value(member.lastTyped),
createdAt: Value(member.createdAt), createdAt: Value(member.createdAt),
updatedAt: Value(member.updatedAt), updatedAt: Value(member.updatedAt),
deletedAt: Value(member.deletedAt), deletedAt: Value(member.deletedAt),

View File

@@ -106,6 +106,17 @@ class $ChatRoomsTable extends ChatRooms
type: DriftSqlType.string, type: DriftSqlType.string,
requiredDuringInsert: false, requiredDuringInsert: false,
); );
static const VerificationMeta _accountIdMeta = const VerificationMeta(
'accountId',
);
@override
late final GeneratedColumn<String> accountId = GeneratedColumn<String>(
'account_id',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
static const VerificationMeta _createdAtMeta = const VerificationMeta( static const VerificationMeta _createdAtMeta = const VerificationMeta(
'createdAt', 'createdAt',
); );
@@ -150,6 +161,7 @@ class $ChatRoomsTable extends ChatRooms
picture, picture,
background, background,
realmId, realmId,
accountId,
createdAt, createdAt,
updatedAt, updatedAt,
deletedAt, deletedAt,
@@ -215,6 +227,12 @@ class $ChatRoomsTable extends ChatRooms
realmId.isAcceptableOrUnknown(data['realm_id']!, _realmIdMeta), realmId.isAcceptableOrUnknown(data['realm_id']!, _realmIdMeta),
); );
} }
if (data.containsKey('account_id')) {
context.handle(
_accountIdMeta,
accountId.isAcceptableOrUnknown(data['account_id']!, _accountIdMeta),
);
}
if (data.containsKey('created_at')) { if (data.containsKey('created_at')) {
context.handle( context.handle(
_createdAtMeta, _createdAtMeta,
@@ -288,6 +306,10 @@ class $ChatRoomsTable extends ChatRooms
DriftSqlType.string, DriftSqlType.string,
data['${effectivePrefix}realm_id'], data['${effectivePrefix}realm_id'],
), ),
accountId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}account_id'],
),
createdAt: createdAt:
attachedDatabase.typeMapping.read( attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, DriftSqlType.dateTime,
@@ -330,6 +352,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
final Map<String, dynamic>? picture; final Map<String, dynamic>? picture;
final Map<String, dynamic>? background; final Map<String, dynamic>? background;
final String? realmId; final String? realmId;
final String? accountId;
final DateTime createdAt; final DateTime createdAt;
final DateTime updatedAt; final DateTime updatedAt;
final DateTime? deletedAt; final DateTime? deletedAt;
@@ -343,6 +366,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
this.picture, this.picture,
this.background, this.background,
this.realmId, this.realmId,
this.accountId,
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
this.deletedAt, this.deletedAt,
@@ -377,6 +401,9 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
if (!nullToAbsent || realmId != null) { if (!nullToAbsent || realmId != null) {
map['realm_id'] = Variable<String>(realmId); map['realm_id'] = Variable<String>(realmId);
} }
if (!nullToAbsent || accountId != null) {
map['account_id'] = Variable<String>(accountId);
}
map['created_at'] = Variable<DateTime>(createdAt); map['created_at'] = Variable<DateTime>(createdAt);
map['updated_at'] = Variable<DateTime>(updatedAt); map['updated_at'] = Variable<DateTime>(updatedAt);
if (!nullToAbsent || deletedAt != null) { if (!nullToAbsent || deletedAt != null) {
@@ -414,6 +441,10 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
realmId == null && nullToAbsent realmId == null && nullToAbsent
? const Value.absent() ? const Value.absent()
: Value(realmId), : Value(realmId),
accountId:
accountId == null && nullToAbsent
? const Value.absent()
: Value(accountId),
createdAt: Value(createdAt), createdAt: Value(createdAt),
updatedAt: Value(updatedAt), updatedAt: Value(updatedAt),
deletedAt: deletedAt:
@@ -440,6 +471,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
json['background'], json['background'],
), ),
realmId: serializer.fromJson<String?>(json['realmId']), realmId: serializer.fromJson<String?>(json['realmId']),
accountId: serializer.fromJson<String?>(json['accountId']),
createdAt: serializer.fromJson<DateTime>(json['createdAt']), createdAt: serializer.fromJson<DateTime>(json['createdAt']),
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']), updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']), deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),
@@ -458,6 +490,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
'picture': serializer.toJson<Map<String, dynamic>?>(picture), 'picture': serializer.toJson<Map<String, dynamic>?>(picture),
'background': serializer.toJson<Map<String, dynamic>?>(background), 'background': serializer.toJson<Map<String, dynamic>?>(background),
'realmId': serializer.toJson<String?>(realmId), 'realmId': serializer.toJson<String?>(realmId),
'accountId': serializer.toJson<String?>(accountId),
'createdAt': serializer.toJson<DateTime>(createdAt), 'createdAt': serializer.toJson<DateTime>(createdAt),
'updatedAt': serializer.toJson<DateTime>(updatedAt), 'updatedAt': serializer.toJson<DateTime>(updatedAt),
'deletedAt': serializer.toJson<DateTime?>(deletedAt), 'deletedAt': serializer.toJson<DateTime?>(deletedAt),
@@ -474,6 +507,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
Value<Map<String, dynamic>?> picture = const Value.absent(), Value<Map<String, dynamic>?> picture = const Value.absent(),
Value<Map<String, dynamic>?> background = const Value.absent(), Value<Map<String, dynamic>?> background = const Value.absent(),
Value<String?> realmId = const Value.absent(), Value<String?> realmId = const Value.absent(),
Value<String?> accountId = const Value.absent(),
DateTime? createdAt, DateTime? createdAt,
DateTime? updatedAt, DateTime? updatedAt,
Value<DateTime?> deletedAt = const Value.absent(), Value<DateTime?> deletedAt = const Value.absent(),
@@ -487,6 +521,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
picture: picture.present ? picture.value : this.picture, picture: picture.present ? picture.value : this.picture,
background: background.present ? background.value : this.background, background: background.present ? background.value : this.background,
realmId: realmId.present ? realmId.value : this.realmId, realmId: realmId.present ? realmId.value : this.realmId,
accountId: accountId.present ? accountId.value : this.accountId,
createdAt: createdAt ?? this.createdAt, createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt, updatedAt: updatedAt ?? this.updatedAt,
deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,
@@ -505,6 +540,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
background: background:
data.background.present ? data.background.value : this.background, data.background.present ? data.background.value : this.background,
realmId: data.realmId.present ? data.realmId.value : this.realmId, realmId: data.realmId.present ? data.realmId.value : this.realmId,
accountId: data.accountId.present ? data.accountId.value : this.accountId,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,
@@ -523,6 +559,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
..write('picture: $picture, ') ..write('picture: $picture, ')
..write('background: $background, ') ..write('background: $background, ')
..write('realmId: $realmId, ') ..write('realmId: $realmId, ')
..write('accountId: $accountId, ')
..write('createdAt: $createdAt, ') ..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ') ..write('updatedAt: $updatedAt, ')
..write('deletedAt: $deletedAt') ..write('deletedAt: $deletedAt')
@@ -541,6 +578,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
picture, picture,
background, background,
realmId, realmId,
accountId,
createdAt, createdAt,
updatedAt, updatedAt,
deletedAt, deletedAt,
@@ -558,6 +596,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
other.picture == this.picture && other.picture == this.picture &&
other.background == this.background && other.background == this.background &&
other.realmId == this.realmId && other.realmId == this.realmId &&
other.accountId == this.accountId &&
other.createdAt == this.createdAt && other.createdAt == this.createdAt &&
other.updatedAt == this.updatedAt && other.updatedAt == this.updatedAt &&
other.deletedAt == this.deletedAt); other.deletedAt == this.deletedAt);
@@ -573,6 +612,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
final Value<Map<String, dynamic>?> picture; final Value<Map<String, dynamic>?> picture;
final Value<Map<String, dynamic>?> background; final Value<Map<String, dynamic>?> background;
final Value<String?> realmId; final Value<String?> realmId;
final Value<String?> accountId;
final Value<DateTime> createdAt; final Value<DateTime> createdAt;
final Value<DateTime> updatedAt; final Value<DateTime> updatedAt;
final Value<DateTime?> deletedAt; final Value<DateTime?> deletedAt;
@@ -587,6 +627,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
this.picture = const Value.absent(), this.picture = const Value.absent(),
this.background = const Value.absent(), this.background = const Value.absent(),
this.realmId = const Value.absent(), this.realmId = const Value.absent(),
this.accountId = const Value.absent(),
this.createdAt = const Value.absent(), this.createdAt = const Value.absent(),
this.updatedAt = const Value.absent(), this.updatedAt = const Value.absent(),
this.deletedAt = const Value.absent(), this.deletedAt = const Value.absent(),
@@ -602,6 +643,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
this.picture = const Value.absent(), this.picture = const Value.absent(),
this.background = const Value.absent(), this.background = const Value.absent(),
this.realmId = const Value.absent(), this.realmId = const Value.absent(),
this.accountId = const Value.absent(),
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
this.deletedAt = const Value.absent(), this.deletedAt = const Value.absent(),
@@ -620,6 +662,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
Expression<String>? picture, Expression<String>? picture,
Expression<String>? background, Expression<String>? background,
Expression<String>? realmId, Expression<String>? realmId,
Expression<String>? accountId,
Expression<DateTime>? createdAt, Expression<DateTime>? createdAt,
Expression<DateTime>? updatedAt, Expression<DateTime>? updatedAt,
Expression<DateTime>? deletedAt, Expression<DateTime>? deletedAt,
@@ -635,6 +678,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
if (picture != null) 'picture': picture, if (picture != null) 'picture': picture,
if (background != null) 'background': background, if (background != null) 'background': background,
if (realmId != null) 'realm_id': realmId, if (realmId != null) 'realm_id': realmId,
if (accountId != null) 'account_id': accountId,
if (createdAt != null) 'created_at': createdAt, if (createdAt != null) 'created_at': createdAt,
if (updatedAt != null) 'updated_at': updatedAt, if (updatedAt != null) 'updated_at': updatedAt,
if (deletedAt != null) 'deleted_at': deletedAt, if (deletedAt != null) 'deleted_at': deletedAt,
@@ -652,6 +696,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
Value<Map<String, dynamic>?>? picture, Value<Map<String, dynamic>?>? picture,
Value<Map<String, dynamic>?>? background, Value<Map<String, dynamic>?>? background,
Value<String?>? realmId, Value<String?>? realmId,
Value<String?>? accountId,
Value<DateTime>? createdAt, Value<DateTime>? createdAt,
Value<DateTime>? updatedAt, Value<DateTime>? updatedAt,
Value<DateTime?>? deletedAt, Value<DateTime?>? deletedAt,
@@ -667,6 +712,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
picture: picture ?? this.picture, picture: picture ?? this.picture,
background: background ?? this.background, background: background ?? this.background,
realmId: realmId ?? this.realmId, realmId: realmId ?? this.realmId,
accountId: accountId ?? this.accountId,
createdAt: createdAt ?? this.createdAt, createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt, updatedAt: updatedAt ?? this.updatedAt,
deletedAt: deletedAt ?? this.deletedAt, deletedAt: deletedAt ?? this.deletedAt,
@@ -708,6 +754,9 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
if (realmId.present) { if (realmId.present) {
map['realm_id'] = Variable<String>(realmId.value); map['realm_id'] = Variable<String>(realmId.value);
} }
if (accountId.present) {
map['account_id'] = Variable<String>(accountId.value);
}
if (createdAt.present) { if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value); map['created_at'] = Variable<DateTime>(createdAt.value);
} }
@@ -735,6 +784,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
..write('picture: $picture, ') ..write('picture: $picture, ')
..write('background: $background, ') ..write('background: $background, ')
..write('realmId: $realmId, ') ..write('realmId: $realmId, ')
..write('accountId: $accountId, ')
..write('createdAt: $createdAt, ') ..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ') ..write('updatedAt: $updatedAt, ')
..write('deletedAt: $deletedAt, ') ..write('deletedAt: $deletedAt, ')
@@ -802,15 +852,6 @@ class $ChatMembersTable extends ChatMembers
type: DriftSqlType.string, type: DriftSqlType.string,
requiredDuringInsert: false, requiredDuringInsert: false,
); );
static const VerificationMeta _roleMeta = const VerificationMeta('role');
@override
late final GeneratedColumn<int> role = GeneratedColumn<int>(
'role',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: true,
);
static const VerificationMeta _notifyMeta = const VerificationMeta('notify'); static const VerificationMeta _notifyMeta = const VerificationMeta('notify');
@override @override
late final GeneratedColumn<int> notify = GeneratedColumn<int>( late final GeneratedColumn<int> notify = GeneratedColumn<int>(
@@ -853,38 +894,6 @@ class $ChatMembersTable extends ChatMembers
type: DriftSqlType.dateTime, type: DriftSqlType.dateTime,
requiredDuringInsert: false, requiredDuringInsert: false,
); );
static const VerificationMeta _isBotMeta = const VerificationMeta('isBot');
@override
late final GeneratedColumn<bool> isBot = GeneratedColumn<bool>(
'is_bot',
aliasedName,
false,
type: DriftSqlType.bool,
requiredDuringInsert: true,
defaultConstraints: GeneratedColumn.constraintIsAlways(
'CHECK ("is_bot" IN (0, 1))',
),
);
static const VerificationMeta _statusMeta = const VerificationMeta('status');
@override
late final GeneratedColumn<String> status = GeneratedColumn<String>(
'status',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
static const VerificationMeta _lastTypedMeta = const VerificationMeta(
'lastTyped',
);
@override
late final GeneratedColumn<DateTime> lastTyped = GeneratedColumn<DateTime>(
'last_typed',
aliasedName,
true,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
);
static const VerificationMeta _createdAtMeta = const VerificationMeta( static const VerificationMeta _createdAtMeta = const VerificationMeta(
'createdAt', 'createdAt',
); );
@@ -925,14 +934,10 @@ class $ChatMembersTable extends ChatMembers
accountId, accountId,
account, account,
nick, nick,
role,
notify, notify,
joinedAt, joinedAt,
breakUntil, breakUntil,
timeoutUntil, timeoutUntil,
isBot,
status,
lastTyped,
createdAt, createdAt,
updatedAt, updatedAt,
deletedAt, deletedAt,
@@ -979,14 +984,6 @@ class $ChatMembersTable extends ChatMembers
nick.isAcceptableOrUnknown(data['nick']!, _nickMeta), nick.isAcceptableOrUnknown(data['nick']!, _nickMeta),
); );
} }
if (data.containsKey('role')) {
context.handle(
_roleMeta,
role.isAcceptableOrUnknown(data['role']!, _roleMeta),
);
} else if (isInserting) {
context.missing(_roleMeta);
}
if (data.containsKey('notify')) { if (data.containsKey('notify')) {
context.handle( context.handle(
_notifyMeta, _notifyMeta,
@@ -1016,26 +1013,6 @@ class $ChatMembersTable extends ChatMembers
), ),
); );
} }
if (data.containsKey('is_bot')) {
context.handle(
_isBotMeta,
isBot.isAcceptableOrUnknown(data['is_bot']!, _isBotMeta),
);
} else if (isInserting) {
context.missing(_isBotMeta);
}
if (data.containsKey('status')) {
context.handle(
_statusMeta,
status.isAcceptableOrUnknown(data['status']!, _statusMeta),
);
}
if (data.containsKey('last_typed')) {
context.handle(
_lastTypedMeta,
lastTyped.isAcceptableOrUnknown(data['last_typed']!, _lastTypedMeta),
);
}
if (data.containsKey('created_at')) { if (data.containsKey('created_at')) {
context.handle( context.handle(
_createdAtMeta, _createdAtMeta,
@@ -1092,11 +1069,6 @@ class $ChatMembersTable extends ChatMembers
DriftSqlType.string, DriftSqlType.string,
data['${effectivePrefix}nick'], data['${effectivePrefix}nick'],
), ),
role:
attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}role'],
)!,
notify: notify:
attachedDatabase.typeMapping.read( attachedDatabase.typeMapping.read(
DriftSqlType.int, DriftSqlType.int,
@@ -1114,19 +1086,6 @@ class $ChatMembersTable extends ChatMembers
DriftSqlType.dateTime, DriftSqlType.dateTime,
data['${effectivePrefix}timeout_until'], data['${effectivePrefix}timeout_until'],
), ),
isBot:
attachedDatabase.typeMapping.read(
DriftSqlType.bool,
data['${effectivePrefix}is_bot'],
)!,
status: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}status'],
),
lastTyped: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}last_typed'],
),
createdAt: createdAt:
attachedDatabase.typeMapping.read( attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, DriftSqlType.dateTime,
@@ -1159,14 +1118,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
final String accountId; final String accountId;
final Map<String, dynamic> account; final Map<String, dynamic> account;
final String? nick; final String? nick;
final int role;
final int notify; final int notify;
final DateTime? joinedAt; final DateTime? joinedAt;
final DateTime? breakUntil; final DateTime? breakUntil;
final DateTime? timeoutUntil; final DateTime? timeoutUntil;
final bool isBot;
final String? status;
final DateTime? lastTyped;
final DateTime createdAt; final DateTime createdAt;
final DateTime updatedAt; final DateTime updatedAt;
final DateTime? deletedAt; final DateTime? deletedAt;
@@ -1176,14 +1131,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
required this.accountId, required this.accountId,
required this.account, required this.account,
this.nick, this.nick,
required this.role,
required this.notify, required this.notify,
this.joinedAt, this.joinedAt,
this.breakUntil, this.breakUntil,
this.timeoutUntil, this.timeoutUntil,
required this.isBot,
this.status,
this.lastTyped,
required this.createdAt, required this.createdAt,
required this.updatedAt, required this.updatedAt,
this.deletedAt, this.deletedAt,
@@ -1202,7 +1153,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
if (!nullToAbsent || nick != null) { if (!nullToAbsent || nick != null) {
map['nick'] = Variable<String>(nick); map['nick'] = Variable<String>(nick);
} }
map['role'] = Variable<int>(role);
map['notify'] = Variable<int>(notify); map['notify'] = Variable<int>(notify);
if (!nullToAbsent || joinedAt != null) { if (!nullToAbsent || joinedAt != null) {
map['joined_at'] = Variable<DateTime>(joinedAt); map['joined_at'] = Variable<DateTime>(joinedAt);
@@ -1213,13 +1163,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
if (!nullToAbsent || timeoutUntil != null) { if (!nullToAbsent || timeoutUntil != null) {
map['timeout_until'] = Variable<DateTime>(timeoutUntil); map['timeout_until'] = Variable<DateTime>(timeoutUntil);
} }
map['is_bot'] = Variable<bool>(isBot);
if (!nullToAbsent || status != null) {
map['status'] = Variable<String>(status);
}
if (!nullToAbsent || lastTyped != null) {
map['last_typed'] = Variable<DateTime>(lastTyped);
}
map['created_at'] = Variable<DateTime>(createdAt); map['created_at'] = Variable<DateTime>(createdAt);
map['updated_at'] = Variable<DateTime>(updatedAt); map['updated_at'] = Variable<DateTime>(updatedAt);
if (!nullToAbsent || deletedAt != null) { if (!nullToAbsent || deletedAt != null) {
@@ -1235,7 +1178,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
accountId: Value(accountId), accountId: Value(accountId),
account: Value(account), account: Value(account),
nick: nick == null && nullToAbsent ? const Value.absent() : Value(nick), nick: nick == null && nullToAbsent ? const Value.absent() : Value(nick),
role: Value(role),
notify: Value(notify), notify: Value(notify),
joinedAt: joinedAt:
joinedAt == null && nullToAbsent joinedAt == null && nullToAbsent
@@ -1249,13 +1191,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
timeoutUntil == null && nullToAbsent timeoutUntil == null && nullToAbsent
? const Value.absent() ? const Value.absent()
: Value(timeoutUntil), : Value(timeoutUntil),
isBot: Value(isBot),
status:
status == null && nullToAbsent ? const Value.absent() : Value(status),
lastTyped:
lastTyped == null && nullToAbsent
? const Value.absent()
: Value(lastTyped),
createdAt: Value(createdAt), createdAt: Value(createdAt),
updatedAt: Value(updatedAt), updatedAt: Value(updatedAt),
deletedAt: deletedAt:
@@ -1276,14 +1211,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
accountId: serializer.fromJson<String>(json['accountId']), accountId: serializer.fromJson<String>(json['accountId']),
account: serializer.fromJson<Map<String, dynamic>>(json['account']), account: serializer.fromJson<Map<String, dynamic>>(json['account']),
nick: serializer.fromJson<String?>(json['nick']), nick: serializer.fromJson<String?>(json['nick']),
role: serializer.fromJson<int>(json['role']),
notify: serializer.fromJson<int>(json['notify']), notify: serializer.fromJson<int>(json['notify']),
joinedAt: serializer.fromJson<DateTime?>(json['joinedAt']), joinedAt: serializer.fromJson<DateTime?>(json['joinedAt']),
breakUntil: serializer.fromJson<DateTime?>(json['breakUntil']), breakUntil: serializer.fromJson<DateTime?>(json['breakUntil']),
timeoutUntil: serializer.fromJson<DateTime?>(json['timeoutUntil']), timeoutUntil: serializer.fromJson<DateTime?>(json['timeoutUntil']),
isBot: serializer.fromJson<bool>(json['isBot']),
status: serializer.fromJson<String?>(json['status']),
lastTyped: serializer.fromJson<DateTime?>(json['lastTyped']),
createdAt: serializer.fromJson<DateTime>(json['createdAt']), createdAt: serializer.fromJson<DateTime>(json['createdAt']),
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']), updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']), deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),
@@ -1298,14 +1229,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
'accountId': serializer.toJson<String>(accountId), 'accountId': serializer.toJson<String>(accountId),
'account': serializer.toJson<Map<String, dynamic>>(account), 'account': serializer.toJson<Map<String, dynamic>>(account),
'nick': serializer.toJson<String?>(nick), 'nick': serializer.toJson<String?>(nick),
'role': serializer.toJson<int>(role),
'notify': serializer.toJson<int>(notify), 'notify': serializer.toJson<int>(notify),
'joinedAt': serializer.toJson<DateTime?>(joinedAt), 'joinedAt': serializer.toJson<DateTime?>(joinedAt),
'breakUntil': serializer.toJson<DateTime?>(breakUntil), 'breakUntil': serializer.toJson<DateTime?>(breakUntil),
'timeoutUntil': serializer.toJson<DateTime?>(timeoutUntil), 'timeoutUntil': serializer.toJson<DateTime?>(timeoutUntil),
'isBot': serializer.toJson<bool>(isBot),
'status': serializer.toJson<String?>(status),
'lastTyped': serializer.toJson<DateTime?>(lastTyped),
'createdAt': serializer.toJson<DateTime>(createdAt), 'createdAt': serializer.toJson<DateTime>(createdAt),
'updatedAt': serializer.toJson<DateTime>(updatedAt), 'updatedAt': serializer.toJson<DateTime>(updatedAt),
'deletedAt': serializer.toJson<DateTime?>(deletedAt), 'deletedAt': serializer.toJson<DateTime?>(deletedAt),
@@ -1318,14 +1245,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
String? accountId, String? accountId,
Map<String, dynamic>? account, Map<String, dynamic>? account,
Value<String?> nick = const Value.absent(), Value<String?> nick = const Value.absent(),
int? role,
int? notify, int? notify,
Value<DateTime?> joinedAt = const Value.absent(), Value<DateTime?> joinedAt = const Value.absent(),
Value<DateTime?> breakUntil = const Value.absent(), Value<DateTime?> breakUntil = const Value.absent(),
Value<DateTime?> timeoutUntil = const Value.absent(), Value<DateTime?> timeoutUntil = const Value.absent(),
bool? isBot,
Value<String?> status = const Value.absent(),
Value<DateTime?> lastTyped = const Value.absent(),
DateTime? createdAt, DateTime? createdAt,
DateTime? updatedAt, DateTime? updatedAt,
Value<DateTime?> deletedAt = const Value.absent(), Value<DateTime?> deletedAt = const Value.absent(),
@@ -1335,14 +1258,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
accountId: accountId ?? this.accountId, accountId: accountId ?? this.accountId,
account: account ?? this.account, account: account ?? this.account,
nick: nick.present ? nick.value : this.nick, nick: nick.present ? nick.value : this.nick,
role: role ?? this.role,
notify: notify ?? this.notify, notify: notify ?? this.notify,
joinedAt: joinedAt.present ? joinedAt.value : this.joinedAt, joinedAt: joinedAt.present ? joinedAt.value : this.joinedAt,
breakUntil: breakUntil.present ? breakUntil.value : this.breakUntil, breakUntil: breakUntil.present ? breakUntil.value : this.breakUntil,
timeoutUntil: timeoutUntil.present ? timeoutUntil.value : this.timeoutUntil, timeoutUntil: timeoutUntil.present ? timeoutUntil.value : this.timeoutUntil,
isBot: isBot ?? this.isBot,
status: status.present ? status.value : this.status,
lastTyped: lastTyped.present ? lastTyped.value : this.lastTyped,
createdAt: createdAt ?? this.createdAt, createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt, updatedAt: updatedAt ?? this.updatedAt,
deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,
@@ -1355,7 +1274,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
accountId: data.accountId.present ? data.accountId.value : this.accountId, accountId: data.accountId.present ? data.accountId.value : this.accountId,
account: data.account.present ? data.account.value : this.account, account: data.account.present ? data.account.value : this.account,
nick: data.nick.present ? data.nick.value : this.nick, nick: data.nick.present ? data.nick.value : this.nick,
role: data.role.present ? data.role.value : this.role,
notify: data.notify.present ? data.notify.value : this.notify, notify: data.notify.present ? data.notify.value : this.notify,
joinedAt: data.joinedAt.present ? data.joinedAt.value : this.joinedAt, joinedAt: data.joinedAt.present ? data.joinedAt.value : this.joinedAt,
breakUntil: breakUntil:
@@ -1364,9 +1282,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
data.timeoutUntil.present data.timeoutUntil.present
? data.timeoutUntil.value ? data.timeoutUntil.value
: this.timeoutUntil, : this.timeoutUntil,
isBot: data.isBot.present ? data.isBot.value : this.isBot,
status: data.status.present ? data.status.value : this.status,
lastTyped: data.lastTyped.present ? data.lastTyped.value : this.lastTyped,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,
@@ -1381,14 +1296,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
..write('accountId: $accountId, ') ..write('accountId: $accountId, ')
..write('account: $account, ') ..write('account: $account, ')
..write('nick: $nick, ') ..write('nick: $nick, ')
..write('role: $role, ')
..write('notify: $notify, ') ..write('notify: $notify, ')
..write('joinedAt: $joinedAt, ') ..write('joinedAt: $joinedAt, ')
..write('breakUntil: $breakUntil, ') ..write('breakUntil: $breakUntil, ')
..write('timeoutUntil: $timeoutUntil, ') ..write('timeoutUntil: $timeoutUntil, ')
..write('isBot: $isBot, ')
..write('status: $status, ')
..write('lastTyped: $lastTyped, ')
..write('createdAt: $createdAt, ') ..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ') ..write('updatedAt: $updatedAt, ')
..write('deletedAt: $deletedAt') ..write('deletedAt: $deletedAt')
@@ -1403,14 +1314,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
accountId, accountId,
account, account,
nick, nick,
role,
notify, notify,
joinedAt, joinedAt,
breakUntil, breakUntil,
timeoutUntil, timeoutUntil,
isBot,
status,
lastTyped,
createdAt, createdAt,
updatedAt, updatedAt,
deletedAt, deletedAt,
@@ -1424,14 +1331,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
other.accountId == this.accountId && other.accountId == this.accountId &&
other.account == this.account && other.account == this.account &&
other.nick == this.nick && other.nick == this.nick &&
other.role == this.role &&
other.notify == this.notify && other.notify == this.notify &&
other.joinedAt == this.joinedAt && other.joinedAt == this.joinedAt &&
other.breakUntil == this.breakUntil && other.breakUntil == this.breakUntil &&
other.timeoutUntil == this.timeoutUntil && other.timeoutUntil == this.timeoutUntil &&
other.isBot == this.isBot &&
other.status == this.status &&
other.lastTyped == this.lastTyped &&
other.createdAt == this.createdAt && other.createdAt == this.createdAt &&
other.updatedAt == this.updatedAt && other.updatedAt == this.updatedAt &&
other.deletedAt == this.deletedAt); other.deletedAt == this.deletedAt);
@@ -1443,14 +1346,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
final Value<String> accountId; final Value<String> accountId;
final Value<Map<String, dynamic>> account; final Value<Map<String, dynamic>> account;
final Value<String?> nick; final Value<String?> nick;
final Value<int> role;
final Value<int> notify; final Value<int> notify;
final Value<DateTime?> joinedAt; final Value<DateTime?> joinedAt;
final Value<DateTime?> breakUntil; final Value<DateTime?> breakUntil;
final Value<DateTime?> timeoutUntil; final Value<DateTime?> timeoutUntil;
final Value<bool> isBot;
final Value<String?> status;
final Value<DateTime?> lastTyped;
final Value<DateTime> createdAt; final Value<DateTime> createdAt;
final Value<DateTime> updatedAt; final Value<DateTime> updatedAt;
final Value<DateTime?> deletedAt; final Value<DateTime?> deletedAt;
@@ -1461,14 +1360,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
this.accountId = const Value.absent(), this.accountId = const Value.absent(),
this.account = const Value.absent(), this.account = const Value.absent(),
this.nick = const Value.absent(), this.nick = const Value.absent(),
this.role = const Value.absent(),
this.notify = const Value.absent(), this.notify = const Value.absent(),
this.joinedAt = const Value.absent(), this.joinedAt = const Value.absent(),
this.breakUntil = const Value.absent(), this.breakUntil = const Value.absent(),
this.timeoutUntil = const Value.absent(), this.timeoutUntil = const Value.absent(),
this.isBot = const Value.absent(),
this.status = const Value.absent(),
this.lastTyped = const Value.absent(),
this.createdAt = const Value.absent(), this.createdAt = const Value.absent(),
this.updatedAt = const Value.absent(), this.updatedAt = const Value.absent(),
this.deletedAt = const Value.absent(), this.deletedAt = const Value.absent(),
@@ -1480,14 +1375,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
required String accountId, required String accountId,
required Map<String, dynamic> account, required Map<String, dynamic> account,
this.nick = const Value.absent(), this.nick = const Value.absent(),
required int role,
required int notify, required int notify,
this.joinedAt = const Value.absent(), this.joinedAt = const Value.absent(),
this.breakUntil = const Value.absent(), this.breakUntil = const Value.absent(),
this.timeoutUntil = const Value.absent(), this.timeoutUntil = const Value.absent(),
required bool isBot,
this.status = const Value.absent(),
this.lastTyped = const Value.absent(),
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
this.deletedAt = const Value.absent(), this.deletedAt = const Value.absent(),
@@ -1496,9 +1387,7 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
chatRoomId = Value(chatRoomId), chatRoomId = Value(chatRoomId),
accountId = Value(accountId), accountId = Value(accountId),
account = Value(account), account = Value(account),
role = Value(role),
notify = Value(notify), notify = Value(notify),
isBot = Value(isBot),
createdAt = Value(createdAt), createdAt = Value(createdAt),
updatedAt = Value(updatedAt); updatedAt = Value(updatedAt);
static Insertable<ChatMember> custom({ static Insertable<ChatMember> custom({
@@ -1507,14 +1396,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
Expression<String>? accountId, Expression<String>? accountId,
Expression<String>? account, Expression<String>? account,
Expression<String>? nick, Expression<String>? nick,
Expression<int>? role,
Expression<int>? notify, Expression<int>? notify,
Expression<DateTime>? joinedAt, Expression<DateTime>? joinedAt,
Expression<DateTime>? breakUntil, Expression<DateTime>? breakUntil,
Expression<DateTime>? timeoutUntil, Expression<DateTime>? timeoutUntil,
Expression<bool>? isBot,
Expression<String>? status,
Expression<DateTime>? lastTyped,
Expression<DateTime>? createdAt, Expression<DateTime>? createdAt,
Expression<DateTime>? updatedAt, Expression<DateTime>? updatedAt,
Expression<DateTime>? deletedAt, Expression<DateTime>? deletedAt,
@@ -1526,14 +1411,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
if (accountId != null) 'account_id': accountId, if (accountId != null) 'account_id': accountId,
if (account != null) 'account': account, if (account != null) 'account': account,
if (nick != null) 'nick': nick, if (nick != null) 'nick': nick,
if (role != null) 'role': role,
if (notify != null) 'notify': notify, if (notify != null) 'notify': notify,
if (joinedAt != null) 'joined_at': joinedAt, if (joinedAt != null) 'joined_at': joinedAt,
if (breakUntil != null) 'break_until': breakUntil, if (breakUntil != null) 'break_until': breakUntil,
if (timeoutUntil != null) 'timeout_until': timeoutUntil, if (timeoutUntil != null) 'timeout_until': timeoutUntil,
if (isBot != null) 'is_bot': isBot,
if (status != null) 'status': status,
if (lastTyped != null) 'last_typed': lastTyped,
if (createdAt != null) 'created_at': createdAt, if (createdAt != null) 'created_at': createdAt,
if (updatedAt != null) 'updated_at': updatedAt, if (updatedAt != null) 'updated_at': updatedAt,
if (deletedAt != null) 'deleted_at': deletedAt, if (deletedAt != null) 'deleted_at': deletedAt,
@@ -1547,14 +1428,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
Value<String>? accountId, Value<String>? accountId,
Value<Map<String, dynamic>>? account, Value<Map<String, dynamic>>? account,
Value<String?>? nick, Value<String?>? nick,
Value<int>? role,
Value<int>? notify, Value<int>? notify,
Value<DateTime?>? joinedAt, Value<DateTime?>? joinedAt,
Value<DateTime?>? breakUntil, Value<DateTime?>? breakUntil,
Value<DateTime?>? timeoutUntil, Value<DateTime?>? timeoutUntil,
Value<bool>? isBot,
Value<String?>? status,
Value<DateTime?>? lastTyped,
Value<DateTime>? createdAt, Value<DateTime>? createdAt,
Value<DateTime>? updatedAt, Value<DateTime>? updatedAt,
Value<DateTime?>? deletedAt, Value<DateTime?>? deletedAt,
@@ -1566,14 +1443,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
accountId: accountId ?? this.accountId, accountId: accountId ?? this.accountId,
account: account ?? this.account, account: account ?? this.account,
nick: nick ?? this.nick, nick: nick ?? this.nick,
role: role ?? this.role,
notify: notify ?? this.notify, notify: notify ?? this.notify,
joinedAt: joinedAt ?? this.joinedAt, joinedAt: joinedAt ?? this.joinedAt,
breakUntil: breakUntil ?? this.breakUntil, breakUntil: breakUntil ?? this.breakUntil,
timeoutUntil: timeoutUntil ?? this.timeoutUntil, timeoutUntil: timeoutUntil ?? this.timeoutUntil,
isBot: isBot ?? this.isBot,
status: status ?? this.status,
lastTyped: lastTyped ?? this.lastTyped,
createdAt: createdAt ?? this.createdAt, createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt, updatedAt: updatedAt ?? this.updatedAt,
deletedAt: deletedAt ?? this.deletedAt, deletedAt: deletedAt ?? this.deletedAt,
@@ -1601,9 +1474,6 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
if (nick.present) { if (nick.present) {
map['nick'] = Variable<String>(nick.value); map['nick'] = Variable<String>(nick.value);
} }
if (role.present) {
map['role'] = Variable<int>(role.value);
}
if (notify.present) { if (notify.present) {
map['notify'] = Variable<int>(notify.value); map['notify'] = Variable<int>(notify.value);
} }
@@ -1616,15 +1486,6 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
if (timeoutUntil.present) { if (timeoutUntil.present) {
map['timeout_until'] = Variable<DateTime>(timeoutUntil.value); map['timeout_until'] = Variable<DateTime>(timeoutUntil.value);
} }
if (isBot.present) {
map['is_bot'] = Variable<bool>(isBot.value);
}
if (status.present) {
map['status'] = Variable<String>(status.value);
}
if (lastTyped.present) {
map['last_typed'] = Variable<DateTime>(lastTyped.value);
}
if (createdAt.present) { if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value); map['created_at'] = Variable<DateTime>(createdAt.value);
} }
@@ -1648,14 +1509,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
..write('accountId: $accountId, ') ..write('accountId: $accountId, ')
..write('account: $account, ') ..write('account: $account, ')
..write('nick: $nick, ') ..write('nick: $nick, ')
..write('role: $role, ')
..write('notify: $notify, ') ..write('notify: $notify, ')
..write('joinedAt: $joinedAt, ') ..write('joinedAt: $joinedAt, ')
..write('breakUntil: $breakUntil, ') ..write('breakUntil: $breakUntil, ')
..write('timeoutUntil: $timeoutUntil, ') ..write('timeoutUntil: $timeoutUntil, ')
..write('isBot: $isBot, ')
..write('status: $status, ')
..write('lastTyped: $lastTyped, ')
..write('createdAt: $createdAt, ') ..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ') ..write('updatedAt: $updatedAt, ')
..write('deletedAt: $deletedAt, ') ..write('deletedAt: $deletedAt, ')
@@ -3327,6 +3184,7 @@ typedef $$ChatRoomsTableCreateCompanionBuilder =
Value<Map<String, dynamic>?> picture, Value<Map<String, dynamic>?> picture,
Value<Map<String, dynamic>?> background, Value<Map<String, dynamic>?> background,
Value<String?> realmId, Value<String?> realmId,
Value<String?> accountId,
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
Value<DateTime?> deletedAt, Value<DateTime?> deletedAt,
@@ -3343,6 +3201,7 @@ typedef $$ChatRoomsTableUpdateCompanionBuilder =
Value<Map<String, dynamic>?> picture, Value<Map<String, dynamic>?> picture,
Value<Map<String, dynamic>?> background, Value<Map<String, dynamic>?> background,
Value<String?> realmId, Value<String?> realmId,
Value<String?> accountId,
Value<DateTime> createdAt, Value<DateTime> createdAt,
Value<DateTime> updatedAt, Value<DateTime> updatedAt,
Value<DateTime?> deletedAt, Value<DateTime?> deletedAt,
@@ -3454,6 +3313,11 @@ class $$ChatRoomsTableFilterComposer
builder: (column) => ColumnFilters(column), builder: (column) => ColumnFilters(column),
); );
ColumnFilters<String> get accountId => $composableBuilder(
column: $table.accountId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get createdAt => $composableBuilder( ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt, column: $table.createdAt,
builder: (column) => ColumnFilters(column), builder: (column) => ColumnFilters(column),
@@ -3574,6 +3438,11 @@ class $$ChatRoomsTableOrderingComposer
builder: (column) => ColumnOrderings(column), builder: (column) => ColumnOrderings(column),
); );
ColumnOrderings<String> get accountId => $composableBuilder(
column: $table.accountId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get createdAt => $composableBuilder( ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt, column: $table.createdAt,
builder: (column) => ColumnOrderings(column), builder: (column) => ColumnOrderings(column),
@@ -3633,6 +3502,9 @@ class $$ChatRoomsTableAnnotationComposer
GeneratedColumn<String> get realmId => GeneratedColumn<String> get realmId =>
$composableBuilder(column: $table.realmId, builder: (column) => column); $composableBuilder(column: $table.realmId, builder: (column) => column);
GeneratedColumn<String> get accountId =>
$composableBuilder(column: $table.accountId, builder: (column) => column);
GeneratedColumn<DateTime> get createdAt => GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column); $composableBuilder(column: $table.createdAt, builder: (column) => column);
@@ -3730,6 +3602,7 @@ class $$ChatRoomsTableTableManager
Value<Map<String, dynamic>?> picture = const Value.absent(), Value<Map<String, dynamic>?> picture = const Value.absent(),
Value<Map<String, dynamic>?> background = const Value.absent(), Value<Map<String, dynamic>?> background = const Value.absent(),
Value<String?> realmId = const Value.absent(), Value<String?> realmId = const Value.absent(),
Value<String?> accountId = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(), Value<DateTime> createdAt = const Value.absent(),
Value<DateTime> updatedAt = const Value.absent(), Value<DateTime> updatedAt = const Value.absent(),
Value<DateTime?> deletedAt = const Value.absent(), Value<DateTime?> deletedAt = const Value.absent(),
@@ -3744,6 +3617,7 @@ class $$ChatRoomsTableTableManager
picture: picture, picture: picture,
background: background, background: background,
realmId: realmId, realmId: realmId,
accountId: accountId,
createdAt: createdAt, createdAt: createdAt,
updatedAt: updatedAt, updatedAt: updatedAt,
deletedAt: deletedAt, deletedAt: deletedAt,
@@ -3760,6 +3634,7 @@ class $$ChatRoomsTableTableManager
Value<Map<String, dynamic>?> picture = const Value.absent(), Value<Map<String, dynamic>?> picture = const Value.absent(),
Value<Map<String, dynamic>?> background = const Value.absent(), Value<Map<String, dynamic>?> background = const Value.absent(),
Value<String?> realmId = const Value.absent(), Value<String?> realmId = const Value.absent(),
Value<String?> accountId = const Value.absent(),
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
Value<DateTime?> deletedAt = const Value.absent(), Value<DateTime?> deletedAt = const Value.absent(),
@@ -3774,6 +3649,7 @@ class $$ChatRoomsTableTableManager
picture: picture, picture: picture,
background: background, background: background,
realmId: realmId, realmId: realmId,
accountId: accountId,
createdAt: createdAt, createdAt: createdAt,
updatedAt: updatedAt, updatedAt: updatedAt,
deletedAt: deletedAt, deletedAt: deletedAt,
@@ -3874,14 +3750,10 @@ typedef $$ChatMembersTableCreateCompanionBuilder =
required String accountId, required String accountId,
required Map<String, dynamic> account, required Map<String, dynamic> account,
Value<String?> nick, Value<String?> nick,
required int role,
required int notify, required int notify,
Value<DateTime?> joinedAt, Value<DateTime?> joinedAt,
Value<DateTime?> breakUntil, Value<DateTime?> breakUntil,
Value<DateTime?> timeoutUntil, Value<DateTime?> timeoutUntil,
required bool isBot,
Value<String?> status,
Value<DateTime?> lastTyped,
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
Value<DateTime?> deletedAt, Value<DateTime?> deletedAt,
@@ -3894,14 +3766,10 @@ typedef $$ChatMembersTableUpdateCompanionBuilder =
Value<String> accountId, Value<String> accountId,
Value<Map<String, dynamic>> account, Value<Map<String, dynamic>> account,
Value<String?> nick, Value<String?> nick,
Value<int> role,
Value<int> notify, Value<int> notify,
Value<DateTime?> joinedAt, Value<DateTime?> joinedAt,
Value<DateTime?> breakUntil, Value<DateTime?> breakUntil,
Value<DateTime?> timeoutUntil, Value<DateTime?> timeoutUntil,
Value<bool> isBot,
Value<String?> status,
Value<DateTime?> lastTyped,
Value<DateTime> createdAt, Value<DateTime> createdAt,
Value<DateTime> updatedAt, Value<DateTime> updatedAt,
Value<DateTime?> deletedAt, Value<DateTime?> deletedAt,
@@ -3987,11 +3855,6 @@ class $$ChatMembersTableFilterComposer
builder: (column) => ColumnFilters(column), builder: (column) => ColumnFilters(column),
); );
ColumnFilters<int> get role => $composableBuilder(
column: $table.role,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get notify => $composableBuilder( ColumnFilters<int> get notify => $composableBuilder(
column: $table.notify, column: $table.notify,
builder: (column) => ColumnFilters(column), builder: (column) => ColumnFilters(column),
@@ -4012,21 +3875,6 @@ class $$ChatMembersTableFilterComposer
builder: (column) => ColumnFilters(column), builder: (column) => ColumnFilters(column),
); );
ColumnFilters<bool> get isBot => $composableBuilder(
column: $table.isBot,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get status => $composableBuilder(
column: $table.status,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get lastTyped => $composableBuilder(
column: $table.lastTyped,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get createdAt => $composableBuilder( ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt, column: $table.createdAt,
builder: (column) => ColumnFilters(column), builder: (column) => ColumnFilters(column),
@@ -4120,11 +3968,6 @@ class $$ChatMembersTableOrderingComposer
builder: (column) => ColumnOrderings(column), builder: (column) => ColumnOrderings(column),
); );
ColumnOrderings<int> get role => $composableBuilder(
column: $table.role,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get notify => $composableBuilder( ColumnOrderings<int> get notify => $composableBuilder(
column: $table.notify, column: $table.notify,
builder: (column) => ColumnOrderings(column), builder: (column) => ColumnOrderings(column),
@@ -4145,21 +3988,6 @@ class $$ChatMembersTableOrderingComposer
builder: (column) => ColumnOrderings(column), builder: (column) => ColumnOrderings(column),
); );
ColumnOrderings<bool> get isBot => $composableBuilder(
column: $table.isBot,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get status => $composableBuilder(
column: $table.status,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get lastTyped => $composableBuilder(
column: $table.lastTyped,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get createdAt => $composableBuilder( ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt, column: $table.createdAt,
builder: (column) => ColumnOrderings(column), builder: (column) => ColumnOrderings(column),
@@ -4220,9 +4048,6 @@ class $$ChatMembersTableAnnotationComposer
GeneratedColumn<String> get nick => GeneratedColumn<String> get nick =>
$composableBuilder(column: $table.nick, builder: (column) => column); $composableBuilder(column: $table.nick, builder: (column) => column);
GeneratedColumn<int> get role =>
$composableBuilder(column: $table.role, builder: (column) => column);
GeneratedColumn<int> get notify => GeneratedColumn<int> get notify =>
$composableBuilder(column: $table.notify, builder: (column) => column); $composableBuilder(column: $table.notify, builder: (column) => column);
@@ -4239,15 +4064,6 @@ class $$ChatMembersTableAnnotationComposer
builder: (column) => column, builder: (column) => column,
); );
GeneratedColumn<bool> get isBot =>
$composableBuilder(column: $table.isBot, builder: (column) => column);
GeneratedColumn<String> get status =>
$composableBuilder(column: $table.status, builder: (column) => column);
GeneratedColumn<DateTime> get lastTyped =>
$composableBuilder(column: $table.lastTyped, builder: (column) => column);
GeneratedColumn<DateTime> get createdAt => GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column); $composableBuilder(column: $table.createdAt, builder: (column) => column);
@@ -4340,14 +4156,10 @@ class $$ChatMembersTableTableManager
Value<String> accountId = const Value.absent(), Value<String> accountId = const Value.absent(),
Value<Map<String, dynamic>> account = const Value.absent(), Value<Map<String, dynamic>> account = const Value.absent(),
Value<String?> nick = const Value.absent(), Value<String?> nick = const Value.absent(),
Value<int> role = const Value.absent(),
Value<int> notify = const Value.absent(), Value<int> notify = const Value.absent(),
Value<DateTime?> joinedAt = const Value.absent(), Value<DateTime?> joinedAt = const Value.absent(),
Value<DateTime?> breakUntil = const Value.absent(), Value<DateTime?> breakUntil = const Value.absent(),
Value<DateTime?> timeoutUntil = const Value.absent(), Value<DateTime?> timeoutUntil = const Value.absent(),
Value<bool> isBot = const Value.absent(),
Value<String?> status = const Value.absent(),
Value<DateTime?> lastTyped = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(), Value<DateTime> createdAt = const Value.absent(),
Value<DateTime> updatedAt = const Value.absent(), Value<DateTime> updatedAt = const Value.absent(),
Value<DateTime?> deletedAt = const Value.absent(), Value<DateTime?> deletedAt = const Value.absent(),
@@ -4358,14 +4170,10 @@ class $$ChatMembersTableTableManager
accountId: accountId, accountId: accountId,
account: account, account: account,
nick: nick, nick: nick,
role: role,
notify: notify, notify: notify,
joinedAt: joinedAt, joinedAt: joinedAt,
breakUntil: breakUntil, breakUntil: breakUntil,
timeoutUntil: timeoutUntil, timeoutUntil: timeoutUntil,
isBot: isBot,
status: status,
lastTyped: lastTyped,
createdAt: createdAt, createdAt: createdAt,
updatedAt: updatedAt, updatedAt: updatedAt,
deletedAt: deletedAt, deletedAt: deletedAt,
@@ -4378,14 +4186,10 @@ class $$ChatMembersTableTableManager
required String accountId, required String accountId,
required Map<String, dynamic> account, required Map<String, dynamic> account,
Value<String?> nick = const Value.absent(), Value<String?> nick = const Value.absent(),
required int role,
required int notify, required int notify,
Value<DateTime?> joinedAt = const Value.absent(), Value<DateTime?> joinedAt = const Value.absent(),
Value<DateTime?> breakUntil = const Value.absent(), Value<DateTime?> breakUntil = const Value.absent(),
Value<DateTime?> timeoutUntil = const Value.absent(), Value<DateTime?> timeoutUntil = const Value.absent(),
required bool isBot,
Value<String?> status = const Value.absent(),
Value<DateTime?> lastTyped = const Value.absent(),
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
Value<DateTime?> deletedAt = const Value.absent(), Value<DateTime?> deletedAt = const Value.absent(),
@@ -4396,14 +4200,10 @@ class $$ChatMembersTableTableManager
accountId: accountId, accountId: accountId,
account: account, account: account,
nick: nick, nick: nick,
role: role,
notify: notify, notify: notify,
joinedAt: joinedAt, joinedAt: joinedAt,
breakUntil: breakUntil, breakUntil: breakUntil,
timeoutUntil: timeoutUntil, timeoutUntil: timeoutUntil,
isBot: isBot,
status: status,
lastTyped: lastTyped,
createdAt: createdAt, createdAt: createdAt,
updatedAt: updatedAt, updatedAt: updatedAt,
deletedAt: deletedAt, deletedAt: deletedAt,

View File

@@ -48,6 +48,7 @@ class ChatRooms extends Table {
TextColumn get picture => text().map(const MapConverter()).nullable()(); TextColumn get picture => text().map(const MapConverter()).nullable()();
TextColumn get background => text().map(const MapConverter()).nullable()(); TextColumn get background => text().map(const MapConverter()).nullable()();
TextColumn get realmId => text().nullable()(); TextColumn get realmId => text().nullable()();
TextColumn get accountId => text().nullable()();
DateTimeColumn get createdAt => dateTime()(); DateTimeColumn get createdAt => dateTime()();
DateTimeColumn get updatedAt => dateTime()(); DateTimeColumn get updatedAt => dateTime()();
DateTimeColumn get deletedAt => dateTime().nullable()(); DateTimeColumn get deletedAt => dateTime().nullable()();
@@ -62,14 +63,10 @@ class ChatMembers extends Table {
TextColumn get accountId => text()(); TextColumn get accountId => text()();
TextColumn get account => text().map(const MapConverter())(); TextColumn get account => text().map(const MapConverter())();
TextColumn get nick => text().nullable()(); TextColumn get nick => text().nullable()();
IntColumn get role => integer()();
IntColumn get notify => integer()(); IntColumn get notify => integer()();
DateTimeColumn get joinedAt => dateTime().nullable()(); DateTimeColumn get joinedAt => dateTime().nullable()();
DateTimeColumn get breakUntil => dateTime().nullable()(); DateTimeColumn get breakUntil => dateTime().nullable()();
DateTimeColumn get timeoutUntil => dateTime().nullable()(); DateTimeColumn get timeoutUntil => dateTime().nullable()();
BoolColumn get isBot => boolean()();
TextColumn get status => text().nullable()();
DateTimeColumn get lastTyped => dateTime().nullable()();
DateTimeColumn get createdAt => dateTime()(); DateTimeColumn get createdAt => dateTime()();
DateTimeColumn get updatedAt => dateTime()(); DateTimeColumn get updatedAt => dateTime()();
DateTimeColumn get deletedAt => dateTime().nullable()(); DateTimeColumn get deletedAt => dateTime().nullable()();

View File

@@ -21,6 +21,7 @@ sealed class SnAccount with _$SnAccount {
required SnWalletSubscriptionRef? perkSubscription, required SnWalletSubscriptionRef? perkSubscription,
@Default([]) List<SnAccountBadge> badges, @Default([]) List<SnAccountBadge> badges,
@Default([]) List<SnContactMethod> contacts, @Default([]) List<SnContactMethod> contacts,
required DateTime? activatedAt,
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
required DateTime? deletedAt, required DateTime? deletedAt,

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc /// @nodoc
mixin _$SnAccount { mixin _$SnAccount {
String get id; String get name; String get nick; String get language; String get region; bool get isSuperuser; String? get automatedId; SnAccountProfile get profile; SnWalletSubscriptionRef? get perkSubscription; List<SnAccountBadge> get badges; List<SnContactMethod> get contacts; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; String get name; String get nick; String get language; String get region; bool get isSuperuser; String? get automatedId; SnAccountProfile get profile; SnWalletSubscriptionRef? get perkSubscription; List<SnAccountBadge> get badges; List<SnContactMethod> get contacts; DateTime? get activatedAt; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
/// Create a copy of SnAccount /// Create a copy of SnAccount
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $SnAccountCopyWith<SnAccount> get copyWith => _$SnAccountCopyWithImpl<SnAccount>
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other.badges, badges)&&const DeepCollectionEquality().equals(other.contacts, contacts)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other.badges, badges)&&const DeepCollectionEquality().equals(other.contacts, contacts)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(badges),const DeepCollectionEquality().hash(contacts),createdAt,updatedAt,deletedAt); int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(badges),const DeepCollectionEquality().hash(contacts),activatedAt,createdAt,updatedAt,deletedAt);
@override @override
String toString() { String toString() {
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, activatedAt: $activatedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
} }
@@ -48,7 +48,7 @@ abstract mixin class $SnAccountCopyWith<$Res> {
factory $SnAccountCopyWith(SnAccount value, $Res Function(SnAccount) _then) = _$SnAccountCopyWithImpl; factory $SnAccountCopyWith(SnAccount value, $Res Function(SnAccount) _then) = _$SnAccountCopyWithImpl;
@useResult @useResult
$Res call({ $Res call({
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
}); });
@@ -65,7 +65,7 @@ class _$SnAccountCopyWithImpl<$Res>
/// Create a copy of SnAccount /// Create a copy of SnAccount
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) { @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? activatedAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_self.copyWith( return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
@@ -78,7 +78,8 @@ as String?,profile: null == profile ? _self.profile : profile // ignore: cast_nu
as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable
as SnWalletSubscriptionRef?,badges: null == badges ? _self.badges : badges // ignore: cast_nullable_to_non_nullable as SnWalletSubscriptionRef?,badges: null == badges ? _self.badges : badges // ignore: cast_nullable_to_non_nullable
as List<SnAccountBadge>,contacts: null == contacts ? _self.contacts : contacts // ignore: cast_nullable_to_non_nullable as List<SnAccountBadge>,contacts: null == contacts ? _self.contacts : contacts // ignore: cast_nullable_to_non_nullable
as List<SnContactMethod>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as List<SnContactMethod>,activatedAt: freezed == activatedAt ? _self.activatedAt : activatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
@@ -184,10 +185,10 @@ return $default(_that);case _:
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this; @optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) { switch (_that) {
case _SnAccount() when $default != null: case _SnAccount() when $default != null:
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);case _: return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return orElse(); return orElse();
} }
@@ -205,10 +206,10 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this; @optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnAccount(): case _SnAccount():
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);} return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);}
} }
/// A variant of `when` that fallback to returning `null` /// A variant of `when` that fallback to returning `null`
/// ///
@@ -222,10 +223,10 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this; @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnAccount() when $default != null: case _SnAccount() when $default != null:
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);case _: return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return null; return null;
} }
@@ -237,7 +238,7 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
@JsonSerializable() @JsonSerializable()
class _SnAccount implements SnAccount { class _SnAccount implements SnAccount {
const _SnAccount({required this.id, required this.name, required this.nick, required this.language, this.region = "", required this.isSuperuser, required this.automatedId, required this.profile, required this.perkSubscription, final List<SnAccountBadge> badges = const [], final List<SnContactMethod> contacts = const [], required this.createdAt, required this.updatedAt, required this.deletedAt}): _badges = badges,_contacts = contacts; const _SnAccount({required this.id, required this.name, required this.nick, required this.language, this.region = "", required this.isSuperuser, required this.automatedId, required this.profile, required this.perkSubscription, final List<SnAccountBadge> badges = const [], final List<SnContactMethod> contacts = const [], required this.activatedAt, required this.createdAt, required this.updatedAt, required this.deletedAt}): _badges = badges,_contacts = contacts;
factory _SnAccount.fromJson(Map<String, dynamic> json) => _$SnAccountFromJson(json); factory _SnAccount.fromJson(Map<String, dynamic> json) => _$SnAccountFromJson(json);
@override final String id; @override final String id;
@@ -263,6 +264,7 @@ class _SnAccount implements SnAccount {
return EqualUnmodifiableListView(_contacts); return EqualUnmodifiableListView(_contacts);
} }
@override final DateTime? activatedAt;
@override final DateTime createdAt; @override final DateTime createdAt;
@override final DateTime updatedAt; @override final DateTime updatedAt;
@override final DateTime? deletedAt; @override final DateTime? deletedAt;
@@ -280,16 +282,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other._badges, _badges)&&const DeepCollectionEquality().equals(other._contacts, _contacts)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other._badges, _badges)&&const DeepCollectionEquality().equals(other._contacts, _contacts)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(_badges),const DeepCollectionEquality().hash(_contacts),createdAt,updatedAt,deletedAt); int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(_badges),const DeepCollectionEquality().hash(_contacts),activatedAt,createdAt,updatedAt,deletedAt);
@override @override
String toString() { String toString() {
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, activatedAt: $activatedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
} }
@@ -300,7 +302,7 @@ abstract mixin class _$SnAccountCopyWith<$Res> implements $SnAccountCopyWith<$Re
factory _$SnAccountCopyWith(_SnAccount value, $Res Function(_SnAccount) _then) = __$SnAccountCopyWithImpl; factory _$SnAccountCopyWith(_SnAccount value, $Res Function(_SnAccount) _then) = __$SnAccountCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $Res call({
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
}); });
@@ -317,7 +319,7 @@ class __$SnAccountCopyWithImpl<$Res>
/// Create a copy of SnAccount /// Create a copy of SnAccount
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) { @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? activatedAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_SnAccount( return _then(_SnAccount(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
@@ -330,7 +332,8 @@ as String?,profile: null == profile ? _self.profile : profile // ignore: cast_nu
as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable
as SnWalletSubscriptionRef?,badges: null == badges ? _self._badges : badges // ignore: cast_nullable_to_non_nullable as SnWalletSubscriptionRef?,badges: null == badges ? _self._badges : badges // ignore: cast_nullable_to_non_nullable
as List<SnAccountBadge>,contacts: null == contacts ? _self._contacts : contacts // ignore: cast_nullable_to_non_nullable as List<SnAccountBadge>,contacts: null == contacts ? _self._contacts : contacts // ignore: cast_nullable_to_non_nullable
as List<SnContactMethod>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as List<SnContactMethod>,activatedAt: freezed == activatedAt ? _self.activatedAt : activatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,

View File

@@ -31,6 +31,10 @@ _SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount(
?.map((e) => SnContactMethod.fromJson(e as Map<String, dynamic>)) ?.map((e) => SnContactMethod.fromJson(e as Map<String, dynamic>))
.toList() ?? .toList() ??
const [], const [],
activatedAt:
json['activated_at'] == null
? null
: DateTime.parse(json['activated_at'] as String),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
deletedAt: deletedAt:
@@ -52,6 +56,7 @@ Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
'perk_subscription': instance.perkSubscription?.toJson(), 'perk_subscription': instance.perkSubscription?.toJson(),
'badges': instance.badges.map((e) => e.toJson()).toList(), 'badges': instance.badges.map((e) => e.toJson()).toList(),
'contacts': instance.contacts.map((e) => e.toJson()).toList(), 'contacts': instance.contacts.map((e) => e.toJson()).toList(),
'activated_at': instance.activatedAt?.toIso8601String(),
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(),
'deleted_at': instance.deletedAt?.toIso8601String(), 'deleted_at': instance.deletedAt?.toIso8601String(),

View File

@@ -33,7 +33,6 @@ sealed class SnAuthChallenge with _$SnAuthChallenge {
required int stepRemain, required int stepRemain,
required int stepTotal, required int stepTotal,
required int failedAttempts, required int failedAttempts,
required int type,
required List<String> blacklistFactors, required List<String> blacklistFactors,
required List<dynamic> audiences, required List<dynamic> audiences,
required List<dynamic> scopes, required List<dynamic> scopes,
@@ -58,9 +57,12 @@ sealed class SnAuthSession with _$SnAuthSession {
required String? label, required String? label,
required DateTime lastGrantedAt, required DateTime lastGrantedAt,
required DateTime? expiredAt, required DateTime? expiredAt,
required List<dynamic> audiences,
required List<dynamic> scopes,
required String ipAddress,
required String userAgent,
required int type,
required String accountId, required String accountId,
required String challengeId,
required SnAuthChallenge challenge,
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
required DateTime? deletedAt, required DateTime? deletedAt,

View File

@@ -541,7 +541,7 @@ as String?,
/// @nodoc /// @nodoc
mixin _$SnAuthChallenge { mixin _$SnAuthChallenge {
String get id; DateTime? get expiredAt; int get stepRemain; int get stepTotal; int get failedAttempts; int get type; List<String> get blacklistFactors; List<dynamic> get audiences; List<dynamic> get scopes; String get ipAddress; String get userAgent; String? get nonce; GeoIpLocation? get location; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; DateTime? get expiredAt; int get stepRemain; int get stepTotal; int get failedAttempts; List<String> get blacklistFactors; List<dynamic> get audiences; List<dynamic> get scopes; String get ipAddress; String get userAgent; String? get nonce; GeoIpLocation? get location; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
/// Create a copy of SnAuthChallenge /// Create a copy of SnAuthChallenge
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -554,16 +554,16 @@ $SnAuthChallengeCopyWith<SnAuthChallenge> get copyWith => _$SnAuthChallengeCopyW
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.blacklistFactors, blacklistFactors)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&const DeepCollectionEquality().equals(other.blacklistFactors, blacklistFactors)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,type,const DeepCollectionEquality().hash(blacklistFactors),const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt); int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,const DeepCollectionEquality().hash(blacklistFactors),const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
@override @override
String toString() { String toString() {
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, type: $type, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
} }
@@ -574,7 +574,7 @@ abstract mixin class $SnAuthChallengeCopyWith<$Res> {
factory $SnAuthChallengeCopyWith(SnAuthChallenge value, $Res Function(SnAuthChallenge) _then) = _$SnAuthChallengeCopyWithImpl; factory $SnAuthChallengeCopyWith(SnAuthChallenge value, $Res Function(SnAuthChallenge) _then) = _$SnAuthChallengeCopyWithImpl;
@useResult @useResult
$Res call({ $Res call({
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
}); });
@@ -591,14 +591,13 @@ class _$SnAuthChallengeCopyWithImpl<$Res>
/// Create a copy of SnAuthChallenge /// Create a copy of SnAuthChallenge
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? type = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) { @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_self.copyWith( return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable
as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable
as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable
as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as int,blacklistFactors: null == blacklistFactors ? _self.blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable as int,blacklistFactors: null == blacklistFactors ? _self.blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable
as List<String>,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable as List<String>,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable
as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable
@@ -704,10 +703,10 @@ return $default(_that);case _:
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this; @optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) { switch (_that) {
case _SnAuthChallenge() when $default != null: case _SnAuthChallenge() when $default != null:
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _: return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return orElse(); return orElse();
} }
@@ -725,10 +724,10 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this; @optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnAuthChallenge(): case _SnAuthChallenge():
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);} return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);}
} }
/// A variant of `when` that fallback to returning `null` /// A variant of `when` that fallback to returning `null`
/// ///
@@ -742,10 +741,10 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this; @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnAuthChallenge() when $default != null: case _SnAuthChallenge() when $default != null:
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _: return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return null; return null;
} }
@@ -757,7 +756,7 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
@JsonSerializable() @JsonSerializable()
class _SnAuthChallenge implements SnAuthChallenge { class _SnAuthChallenge implements SnAuthChallenge {
const _SnAuthChallenge({required this.id, required this.expiredAt, required this.stepRemain, required this.stepTotal, required this.failedAttempts, required this.type, required final List<String> blacklistFactors, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.nonce, required this.location, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _blacklistFactors = blacklistFactors,_audiences = audiences,_scopes = scopes; const _SnAuthChallenge({required this.id, required this.expiredAt, required this.stepRemain, required this.stepTotal, required this.failedAttempts, required final List<String> blacklistFactors, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.nonce, required this.location, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _blacklistFactors = blacklistFactors,_audiences = audiences,_scopes = scopes;
factory _SnAuthChallenge.fromJson(Map<String, dynamic> json) => _$SnAuthChallengeFromJson(json); factory _SnAuthChallenge.fromJson(Map<String, dynamic> json) => _$SnAuthChallengeFromJson(json);
@override final String id; @override final String id;
@@ -765,7 +764,6 @@ class _SnAuthChallenge implements SnAuthChallenge {
@override final int stepRemain; @override final int stepRemain;
@override final int stepTotal; @override final int stepTotal;
@override final int failedAttempts; @override final int failedAttempts;
@override final int type;
final List<String> _blacklistFactors; final List<String> _blacklistFactors;
@override List<String> get blacklistFactors { @override List<String> get blacklistFactors {
if (_blacklistFactors is EqualUnmodifiableListView) return _blacklistFactors; if (_blacklistFactors is EqualUnmodifiableListView) return _blacklistFactors;
@@ -809,16 +807,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._blacklistFactors, _blacklistFactors)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&const DeepCollectionEquality().equals(other._blacklistFactors, _blacklistFactors)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,type,const DeepCollectionEquality().hash(_blacklistFactors),const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt); int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,const DeepCollectionEquality().hash(_blacklistFactors),const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
@override @override
String toString() { String toString() {
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, type: $type, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
} }
@@ -829,7 +827,7 @@ abstract mixin class _$SnAuthChallengeCopyWith<$Res> implements $SnAuthChallenge
factory _$SnAuthChallengeCopyWith(_SnAuthChallenge value, $Res Function(_SnAuthChallenge) _then) = __$SnAuthChallengeCopyWithImpl; factory _$SnAuthChallengeCopyWith(_SnAuthChallenge value, $Res Function(_SnAuthChallenge) _then) = __$SnAuthChallengeCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $Res call({
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
}); });
@@ -846,14 +844,13 @@ class __$SnAuthChallengeCopyWithImpl<$Res>
/// Create a copy of SnAuthChallenge /// Create a copy of SnAuthChallenge
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? type = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) { @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_SnAuthChallenge( return _then(_SnAuthChallenge(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable
as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable
as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable
as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as int,blacklistFactors: null == blacklistFactors ? _self._blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable as int,blacklistFactors: null == blacklistFactors ? _self._blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable
as List<String>,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable as List<String>,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable
as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
@@ -888,7 +885,7 @@ $GeoIpLocationCopyWith<$Res>? get location {
/// @nodoc /// @nodoc
mixin _$SnAuthSession { mixin _$SnAuthSession {
String get id; String? get label; DateTime get lastGrantedAt; DateTime? get expiredAt; String get accountId; String get challengeId; SnAuthChallenge get challenge; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; String? get label; DateTime get lastGrantedAt; DateTime? get expiredAt; List<dynamic> get audiences; List<dynamic> get scopes; String get ipAddress; String get userAgent; int get type; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
/// Create a copy of SnAuthSession /// Create a copy of SnAuthSession
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -901,16 +898,16 @@ $SnAuthSessionCopyWith<SnAuthSession> get copyWith => _$SnAuthSessionCopyWithImp
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.challengeId, challengeId) || other.challengeId == challengeId)&&(identical(other.challenge, challenge) || other.challenge == challenge)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.type, type) || other.type == type)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,accountId,challengeId,challenge,createdAt,updatedAt,deletedAt); int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,type,accountId,createdAt,updatedAt,deletedAt);
@override @override
String toString() { String toString() {
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, accountId: $accountId, challengeId: $challengeId, challenge: $challenge, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, type: $type, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
} }
@@ -921,11 +918,11 @@ abstract mixin class $SnAuthSessionCopyWith<$Res> {
factory $SnAuthSessionCopyWith(SnAuthSession value, $Res Function(SnAuthSession) _then) = _$SnAuthSessionCopyWithImpl; factory $SnAuthSessionCopyWith(SnAuthSession value, $Res Function(SnAuthSession) _then) = _$SnAuthSessionCopyWithImpl;
@useResult @useResult
$Res call({ $Res call({
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
}); });
$SnAuthChallengeCopyWith<$Res> get challenge;
} }
/// @nodoc /// @nodoc
@@ -938,31 +935,25 @@ class _$SnAuthSessionCopyWithImpl<$Res>
/// Create a copy of SnAuthSession /// Create a copy of SnAuthSession
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? accountId = null,Object? challengeId = null,Object? challenge = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) { @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? type = null,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_self.copyWith( return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable
as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
as DateTime?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as DateTime?,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable
as String,challengeId: null == challengeId ? _self.challengeId : challengeId // ignore: cast_nullable_to_non_nullable as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable
as String,challenge: null == challenge ? _self.challenge : challenge // ignore: cast_nullable_to_non_nullable as List<dynamic>,ipAddress: null == ipAddress ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable
as SnAuthChallenge,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String,userAgent: null == userAgent ? _self.userAgent : userAgent // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as int,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
)); ));
} }
/// Create a copy of SnAuthSession
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SnAuthChallengeCopyWith<$Res> get challenge {
return $SnAuthChallengeCopyWith<$Res>(_self.challenge, (value) {
return _then(_self.copyWith(challenge: value));
});
}
} }
@@ -1041,10 +1032,10 @@ return $default(_that);case _:
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this; @optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) { switch (_that) {
case _SnAuthSession() when $default != null: case _SnAuthSession() when $default != null:
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);case _: return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return orElse(); return orElse();
} }
@@ -1062,10 +1053,10 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this; @optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnAuthSession(): case _SnAuthSession():
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);} return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);}
} }
/// A variant of `when` that fallback to returning `null` /// A variant of `when` that fallback to returning `null`
/// ///
@@ -1079,10 +1070,10 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this; @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnAuthSession() when $default != null: case _SnAuthSession() when $default != null:
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);case _: return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return null; return null;
} }
@@ -1094,16 +1085,31 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
@JsonSerializable() @JsonSerializable()
class _SnAuthSession implements SnAuthSession { class _SnAuthSession implements SnAuthSession {
const _SnAuthSession({required this.id, required this.label, required this.lastGrantedAt, required this.expiredAt, required this.accountId, required this.challengeId, required this.challenge, required this.createdAt, required this.updatedAt, required this.deletedAt}); const _SnAuthSession({required this.id, required this.label, required this.lastGrantedAt, required this.expiredAt, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.type, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _audiences = audiences,_scopes = scopes;
factory _SnAuthSession.fromJson(Map<String, dynamic> json) => _$SnAuthSessionFromJson(json); factory _SnAuthSession.fromJson(Map<String, dynamic> json) => _$SnAuthSessionFromJson(json);
@override final String id; @override final String id;
@override final String? label; @override final String? label;
@override final DateTime lastGrantedAt; @override final DateTime lastGrantedAt;
@override final DateTime? expiredAt; @override final DateTime? expiredAt;
final List<dynamic> _audiences;
@override List<dynamic> get audiences {
if (_audiences is EqualUnmodifiableListView) return _audiences;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_audiences);
}
final List<dynamic> _scopes;
@override List<dynamic> get scopes {
if (_scopes is EqualUnmodifiableListView) return _scopes;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_scopes);
}
@override final String ipAddress;
@override final String userAgent;
@override final int type;
@override final String accountId; @override final String accountId;
@override final String challengeId;
@override final SnAuthChallenge challenge;
@override final DateTime createdAt; @override final DateTime createdAt;
@override final DateTime updatedAt; @override final DateTime updatedAt;
@override final DateTime? deletedAt; @override final DateTime? deletedAt;
@@ -1121,16 +1127,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.challengeId, challengeId) || other.challengeId == challengeId)&&(identical(other.challenge, challenge) || other.challenge == challenge)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.type, type) || other.type == type)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,accountId,challengeId,challenge,createdAt,updatedAt,deletedAt); int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,type,accountId,createdAt,updatedAt,deletedAt);
@override @override
String toString() { String toString() {
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, accountId: $accountId, challengeId: $challengeId, challenge: $challenge, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, type: $type, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
} }
@@ -1141,11 +1147,11 @@ abstract mixin class _$SnAuthSessionCopyWith<$Res> implements $SnAuthSessionCopy
factory _$SnAuthSessionCopyWith(_SnAuthSession value, $Res Function(_SnAuthSession) _then) = __$SnAuthSessionCopyWithImpl; factory _$SnAuthSessionCopyWith(_SnAuthSession value, $Res Function(_SnAuthSession) _then) = __$SnAuthSessionCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $Res call({
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
}); });
@override $SnAuthChallengeCopyWith<$Res> get challenge;
} }
/// @nodoc /// @nodoc
@@ -1158,32 +1164,26 @@ class __$SnAuthSessionCopyWithImpl<$Res>
/// Create a copy of SnAuthSession /// Create a copy of SnAuthSession
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? accountId = null,Object? challengeId = null,Object? challenge = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) { @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? type = null,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_SnAuthSession( return _then(_SnAuthSession(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable
as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
as DateTime?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as DateTime?,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable
as String,challengeId: null == challengeId ? _self.challengeId : challengeId // ignore: cast_nullable_to_non_nullable as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
as String,challenge: null == challenge ? _self.challenge : challenge // ignore: cast_nullable_to_non_nullable as List<dynamic>,ipAddress: null == ipAddress ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable
as SnAuthChallenge,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String,userAgent: null == userAgent ? _self.userAgent : userAgent // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as int,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
)); ));
} }
/// Create a copy of SnAuthSession
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SnAuthChallengeCopyWith<$Res> get challenge {
return $SnAuthChallengeCopyWith<$Res>(_self.challenge, (value) {
return _then(_self.copyWith(challenge: value));
});
}
} }

View File

@@ -41,7 +41,6 @@ _SnAuthChallenge _$SnAuthChallengeFromJson(Map<String, dynamic> json) =>
stepRemain: (json['step_remain'] as num).toInt(), stepRemain: (json['step_remain'] as num).toInt(),
stepTotal: (json['step_total'] as num).toInt(), stepTotal: (json['step_total'] as num).toInt(),
failedAttempts: (json['failed_attempts'] as num).toInt(), failedAttempts: (json['failed_attempts'] as num).toInt(),
type: (json['type'] as num).toInt(),
blacklistFactors: blacklistFactors:
(json['blacklist_factors'] as List<dynamic>) (json['blacklist_factors'] as List<dynamic>)
.map((e) => e as String) .map((e) => e as String)
@@ -73,7 +72,6 @@ Map<String, dynamic> _$SnAuthChallengeToJson(_SnAuthChallenge instance) =>
'step_remain': instance.stepRemain, 'step_remain': instance.stepRemain,
'step_total': instance.stepTotal, 'step_total': instance.stepTotal,
'failed_attempts': instance.failedAttempts, 'failed_attempts': instance.failedAttempts,
'type': instance.type,
'blacklist_factors': instance.blacklistFactors, 'blacklist_factors': instance.blacklistFactors,
'audiences': instance.audiences, 'audiences': instance.audiences,
'scopes': instance.scopes, 'scopes': instance.scopes,
@@ -96,11 +94,12 @@ _SnAuthSession _$SnAuthSessionFromJson(Map<String, dynamic> json) =>
json['expired_at'] == null json['expired_at'] == null
? null ? null
: DateTime.parse(json['expired_at'] as String), : DateTime.parse(json['expired_at'] as String),
audiences: json['audiences'] as List<dynamic>,
scopes: json['scopes'] as List<dynamic>,
ipAddress: json['ip_address'] as String,
userAgent: json['user_agent'] as String,
type: (json['type'] as num).toInt(),
accountId: json['account_id'] as String, accountId: json['account_id'] as String,
challengeId: json['challenge_id'] as String,
challenge: SnAuthChallenge.fromJson(
json['challenge'] as Map<String, dynamic>,
),
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
deletedAt: deletedAt:
@@ -115,9 +114,12 @@ Map<String, dynamic> _$SnAuthSessionToJson(_SnAuthSession instance) =>
'label': instance.label, 'label': instance.label,
'last_granted_at': instance.lastGrantedAt.toIso8601String(), 'last_granted_at': instance.lastGrantedAt.toIso8601String(),
'expired_at': instance.expiredAt?.toIso8601String(), 'expired_at': instance.expiredAt?.toIso8601String(),
'audiences': instance.audiences,
'scopes': instance.scopes,
'ip_address': instance.ipAddress,
'user_agent': instance.userAgent,
'type': instance.type,
'account_id': instance.accountId, 'account_id': instance.accountId,
'challenge_id': instance.challengeId,
'challenge': instance.challenge.toJson(),
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(),
'deleted_at': instance.deletedAt?.toIso8601String(), 'deleted_at': instance.deletedAt?.toIso8601String(),

View File

@@ -18,6 +18,7 @@ sealed class SnChatRoom with _$SnChatRoom {
required SnCloudFile? picture, required SnCloudFile? picture,
required SnCloudFile? background, required SnCloudFile? background,
required String? realmId, required String? realmId,
required String? accountId,
required SnRealm? realm, required SnRealm? realm,
required DateTime createdAt, required DateTime createdAt,
required DateTime updatedAt, required DateTime updatedAt,
@@ -85,12 +86,10 @@ sealed class SnChatMember with _$SnChatMember {
required String accountId, required String accountId,
required SnAccount account, required SnAccount account,
required String? nick, required String? nick,
required int role,
required int notify, required int notify,
required DateTime? joinedAt, required DateTime? joinedAt,
required DateTime? breakUntil, required DateTime? breakUntil,
required DateTime? timeoutUntil, required DateTime? timeoutUntil,
required bool isBot,
required SnAccountStatus? status, required SnAccountStatus? status,
// Frontend data // Frontend data
DateTime? lastTyped, DateTime? lastTyped,

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc /// @nodoc
mixin _$SnChatRoom { mixin _$SnChatRoom {
String get id; String? get name; String? get description; int get type; bool get isPublic; bool get isCommunity; SnCloudFile? get picture; SnCloudFile? get background; String? get realmId; SnRealm? get realm; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnChatMember>? get members; String get id; String? get name; String? get description; int get type; bool get isPublic; bool get isCommunity; SnCloudFile? get picture; SnCloudFile? get background; String? get realmId; String? get accountId; SnRealm? get realm; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnChatMember>? get members;
/// Create a copy of SnChatRoom /// Create a copy of SnChatRoom
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $SnChatRoomCopyWith<SnChatRoom> get copyWith => _$SnChatRoomCopyWithImpl<SnChatR
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.members, members)); return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.members, members));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(members)); int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,accountId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(members));
@override @override
String toString() { String toString() {
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)'; return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, accountId: $accountId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)';
} }
@@ -48,7 +48,7 @@ abstract mixin class $SnChatRoomCopyWith<$Res> {
factory $SnChatRoomCopyWith(SnChatRoom value, $Res Function(SnChatRoom) _then) = _$SnChatRoomCopyWithImpl; factory $SnChatRoomCopyWith(SnChatRoom value, $Res Function(SnChatRoom) _then) = _$SnChatRoomCopyWithImpl;
@useResult @useResult
$Res call({ $Res call({
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members
}); });
@@ -65,7 +65,7 @@ class _$SnChatRoomCopyWithImpl<$Res>
/// Create a copy of SnChatRoom /// Create a copy of SnChatRoom
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,}) { @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? accountId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,}) {
return _then(_self.copyWith( return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
@@ -76,6 +76,7 @@ as bool,isCommunity: null == isCommunity ? _self.isCommunity : isCommunity // ig
as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
as SnCloudFile?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable as SnCloudFile?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
as String?,accountId: freezed == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable
as SnRealm?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as SnRealm?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
@@ -199,10 +200,10 @@ return $default(_that);case _:
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members)? $default,{required TResult orElse(),}) {final _that = this; @optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) { switch (_that) {
case _SnChatRoom() when $default != null: case _SnChatRoom() when $default != null:
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);case _: return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);case _:
return orElse(); return orElse();
} }
@@ -220,10 +221,10 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members) $default,) {final _that = this; @optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members) $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnChatRoom(): case _SnChatRoom():
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);} return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);}
} }
/// A variant of `when` that fallback to returning `null` /// A variant of `when` that fallback to returning `null`
/// ///
@@ -237,10 +238,10 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members)? $default,) {final _that = this; @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members)? $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnChatRoom() when $default != null: case _SnChatRoom() when $default != null:
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);case _: return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);case _:
return null; return null;
} }
@@ -252,7 +253,7 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
@JsonSerializable() @JsonSerializable()
class _SnChatRoom implements SnChatRoom { class _SnChatRoom implements SnChatRoom {
const _SnChatRoom({required this.id, required this.name, required this.description, required this.type, this.isPublic = false, this.isCommunity = false, required this.picture, required this.background, required this.realmId, required this.realm, required this.createdAt, required this.updatedAt, required this.deletedAt, required final List<SnChatMember>? members}): _members = members; const _SnChatRoom({required this.id, required this.name, required this.description, required this.type, this.isPublic = false, this.isCommunity = false, required this.picture, required this.background, required this.realmId, required this.accountId, required this.realm, required this.createdAt, required this.updatedAt, required this.deletedAt, required final List<SnChatMember>? members}): _members = members;
factory _SnChatRoom.fromJson(Map<String, dynamic> json) => _$SnChatRoomFromJson(json); factory _SnChatRoom.fromJson(Map<String, dynamic> json) => _$SnChatRoomFromJson(json);
@override final String id; @override final String id;
@@ -264,6 +265,7 @@ class _SnChatRoom implements SnChatRoom {
@override final SnCloudFile? picture; @override final SnCloudFile? picture;
@override final SnCloudFile? background; @override final SnCloudFile? background;
@override final String? realmId; @override final String? realmId;
@override final String? accountId;
@override final SnRealm? realm; @override final SnRealm? realm;
@override final DateTime createdAt; @override final DateTime createdAt;
@override final DateTime updatedAt; @override final DateTime updatedAt;
@@ -291,16 +293,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._members, _members)); return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._members, _members));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_members)); int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,accountId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_members));
@override @override
String toString() { String toString() {
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)'; return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, accountId: $accountId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)';
} }
@@ -311,7 +313,7 @@ abstract mixin class _$SnChatRoomCopyWith<$Res> implements $SnChatRoomCopyWith<$
factory _$SnChatRoomCopyWith(_SnChatRoom value, $Res Function(_SnChatRoom) _then) = __$SnChatRoomCopyWithImpl; factory _$SnChatRoomCopyWith(_SnChatRoom value, $Res Function(_SnChatRoom) _then) = __$SnChatRoomCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $Res call({
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members
}); });
@@ -328,7 +330,7 @@ class __$SnChatRoomCopyWithImpl<$Res>
/// Create a copy of SnChatRoom /// Create a copy of SnChatRoom
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,}) { @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? accountId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,}) {
return _then(_SnChatRoom( return _then(_SnChatRoom(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
@@ -339,6 +341,7 @@ as bool,isCommunity: null == isCommunity ? _self.isCommunity : isCommunity // ig
as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
as SnCloudFile?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable as SnCloudFile?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
as String?,accountId: freezed == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable
as SnRealm?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as SnRealm?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
@@ -1037,7 +1040,7 @@ $SnChatMemberCopyWith<$Res> get sender {
/// @nodoc /// @nodoc
mixin _$SnChatMember { mixin _$SnChatMember {
DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; String get chatRoomId; SnChatRoom? get chatRoom; String get accountId; SnAccount get account; String? get nick; int get role; int get notify; DateTime? get joinedAt; DateTime? get breakUntil; DateTime? get timeoutUntil; bool get isBot; SnAccountStatus? get status;// Frontend data DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; String get chatRoomId; SnChatRoom? get chatRoom; String get accountId; SnAccount get account; String? get nick; int get notify; DateTime? get joinedAt; DateTime? get breakUntil; DateTime? get timeoutUntil; SnAccountStatus? get status;// Frontend data
DateTime? get lastTyped; DateTime? get lastTyped;
/// Create a copy of SnChatMember /// Create a copy of SnChatMember
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@@ -1051,16 +1054,16 @@ $SnChatMemberCopyWith<SnChatMember> get copyWith => _$SnChatMemberCopyWithImpl<S
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped)); return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,breakUntil,timeoutUntil,isBot,status,lastTyped); int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,notify,joinedAt,breakUntil,timeoutUntil,status,lastTyped);
@override @override
String toString() { String toString() {
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, status: $status, lastTyped: $lastTyped)'; return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, status: $status, lastTyped: $lastTyped)';
} }
@@ -1071,7 +1074,7 @@ abstract mixin class $SnChatMemberCopyWith<$Res> {
factory $SnChatMemberCopyWith(SnChatMember value, $Res Function(SnChatMember) _then) = _$SnChatMemberCopyWithImpl; factory $SnChatMemberCopyWith(SnChatMember value, $Res Function(SnChatMember) _then) = _$SnChatMemberCopyWithImpl;
@useResult @useResult
$Res call({ $Res call({
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped
}); });
@@ -1088,7 +1091,7 @@ class _$SnChatMemberCopyWithImpl<$Res>
/// Create a copy of SnChatMember /// Create a copy of SnChatMember
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? role = null,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? isBot = null,Object? status = freezed,Object? lastTyped = freezed,}) { @pragma('vm:prefer-inline') @override $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? status = freezed,Object? lastTyped = freezed,}) {
return _then(_self.copyWith( return _then(_self.copyWith(
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
@@ -1099,13 +1102,11 @@ as String,chatRoom: freezed == chatRoom ? _self.chatRoom : chatRoom // ignore: c
as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable
as String?,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable as String?,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
as int,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
as int,joinedAt: freezed == joinedAt ? _self.joinedAt : joinedAt // ignore: cast_nullable_to_non_nullable as int,joinedAt: freezed == joinedAt ? _self.joinedAt : joinedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,breakUntil: freezed == breakUntil ? _self.breakUntil : breakUntil // ignore: cast_nullable_to_non_nullable as DateTime?,breakUntil: freezed == breakUntil ? _self.breakUntil : breakUntil // ignore: cast_nullable_to_non_nullable
as DateTime?,timeoutUntil: freezed == timeoutUntil ? _self.timeoutUntil : timeoutUntil // ignore: cast_nullable_to_non_nullable as DateTime?,timeoutUntil: freezed == timeoutUntil ? _self.timeoutUntil : timeoutUntil // ignore: cast_nullable_to_non_nullable
as DateTime?,isBot: null == isBot ? _self.isBot : isBot // ignore: cast_nullable_to_non_nullable as DateTime?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as bool,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
)); ));
@@ -1222,10 +1223,10 @@ return $default(_that);case _:
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped)? $default,{required TResult orElse(),}) {final _that = this; @optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) { switch (_that) {
case _SnChatMember() when $default != null: case _SnChatMember() when $default != null:
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);case _: return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);case _:
return orElse(); return orElse();
} }
@@ -1243,10 +1244,10 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped) $default,) {final _that = this; @optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped) $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnChatMember(): case _SnChatMember():
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);} return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);}
} }
/// A variant of `when` that fallback to returning `null` /// A variant of `when` that fallback to returning `null`
/// ///
@@ -1260,10 +1261,10 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
/// } /// }
/// ``` /// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped)? $default,) {final _that = this; @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped)? $default,) {final _that = this;
switch (_that) { switch (_that) {
case _SnChatMember() when $default != null: case _SnChatMember() when $default != null:
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);case _: return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);case _:
return null; return null;
} }
@@ -1275,7 +1276,7 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
@JsonSerializable() @JsonSerializable()
class _SnChatMember implements SnChatMember { class _SnChatMember implements SnChatMember {
const _SnChatMember({required this.createdAt, required this.updatedAt, required this.deletedAt, required this.id, required this.chatRoomId, required this.chatRoom, required this.accountId, required this.account, required this.nick, required this.role, required this.notify, required this.joinedAt, required this.breakUntil, required this.timeoutUntil, required this.isBot, required this.status, this.lastTyped}); const _SnChatMember({required this.createdAt, required this.updatedAt, required this.deletedAt, required this.id, required this.chatRoomId, required this.chatRoom, required this.accountId, required this.account, required this.nick, required this.notify, required this.joinedAt, required this.breakUntil, required this.timeoutUntil, required this.status, this.lastTyped});
factory _SnChatMember.fromJson(Map<String, dynamic> json) => _$SnChatMemberFromJson(json); factory _SnChatMember.fromJson(Map<String, dynamic> json) => _$SnChatMemberFromJson(json);
@override final DateTime createdAt; @override final DateTime createdAt;
@@ -1287,12 +1288,10 @@ class _SnChatMember implements SnChatMember {
@override final String accountId; @override final String accountId;
@override final SnAccount account; @override final SnAccount account;
@override final String? nick; @override final String? nick;
@override final int role;
@override final int notify; @override final int notify;
@override final DateTime? joinedAt; @override final DateTime? joinedAt;
@override final DateTime? breakUntil; @override final DateTime? breakUntil;
@override final DateTime? timeoutUntil; @override final DateTime? timeoutUntil;
@override final bool isBot;
@override final SnAccountStatus? status; @override final SnAccountStatus? status;
// Frontend data // Frontend data
@override final DateTime? lastTyped; @override final DateTime? lastTyped;
@@ -1310,16 +1309,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped)); return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
} }
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,breakUntil,timeoutUntil,isBot,status,lastTyped); int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,notify,joinedAt,breakUntil,timeoutUntil,status,lastTyped);
@override @override
String toString() { String toString() {
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, status: $status, lastTyped: $lastTyped)'; return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, status: $status, lastTyped: $lastTyped)';
} }
@@ -1330,7 +1329,7 @@ abstract mixin class _$SnChatMemberCopyWith<$Res> implements $SnChatMemberCopyWi
factory _$SnChatMemberCopyWith(_SnChatMember value, $Res Function(_SnChatMember) _then) = __$SnChatMemberCopyWithImpl; factory _$SnChatMemberCopyWith(_SnChatMember value, $Res Function(_SnChatMember) _then) = __$SnChatMemberCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $Res call({
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped
}); });
@@ -1347,7 +1346,7 @@ class __$SnChatMemberCopyWithImpl<$Res>
/// Create a copy of SnChatMember /// Create a copy of SnChatMember
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? role = null,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? isBot = null,Object? status = freezed,Object? lastTyped = freezed,}) { @override @pragma('vm:prefer-inline') $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? status = freezed,Object? lastTyped = freezed,}) {
return _then(_SnChatMember( return _then(_SnChatMember(
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
@@ -1358,13 +1357,11 @@ as String,chatRoom: freezed == chatRoom ? _self.chatRoom : chatRoom // ignore: c
as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable
as String?,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable as String?,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
as int,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
as int,joinedAt: freezed == joinedAt ? _self.joinedAt : joinedAt // ignore: cast_nullable_to_non_nullable as int,joinedAt: freezed == joinedAt ? _self.joinedAt : joinedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,breakUntil: freezed == breakUntil ? _self.breakUntil : breakUntil // ignore: cast_nullable_to_non_nullable as DateTime?,breakUntil: freezed == breakUntil ? _self.breakUntil : breakUntil // ignore: cast_nullable_to_non_nullable
as DateTime?,timeoutUntil: freezed == timeoutUntil ? _self.timeoutUntil : timeoutUntil // ignore: cast_nullable_to_non_nullable as DateTime?,timeoutUntil: freezed == timeoutUntil ? _self.timeoutUntil : timeoutUntil // ignore: cast_nullable_to_non_nullable
as DateTime?,isBot: null == isBot ? _self.isBot : isBot // ignore: cast_nullable_to_non_nullable as DateTime?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as bool,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
as DateTime?, as DateTime?,
)); ));

View File

@@ -22,6 +22,7 @@ _SnChatRoom _$SnChatRoomFromJson(Map<String, dynamic> json) => _SnChatRoom(
? null ? null
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>), : SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
realmId: json['realm_id'] as String?, realmId: json['realm_id'] as String?,
accountId: json['account_id'] as String?,
realm: realm:
json['realm'] == null json['realm'] == null
? null ? null
@@ -49,6 +50,7 @@ Map<String, dynamic> _$SnChatRoomToJson(_SnChatRoom instance) =>
'picture': instance.picture?.toJson(), 'picture': instance.picture?.toJson(),
'background': instance.background?.toJson(), 'background': instance.background?.toJson(),
'realm_id': instance.realmId, 'realm_id': instance.realmId,
'account_id': instance.accountId,
'realm': instance.realm?.toJson(), 'realm': instance.realm?.toJson(),
'created_at': instance.createdAt.toIso8601String(), 'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(),
@@ -162,7 +164,6 @@ _SnChatMember _$SnChatMemberFromJson(Map<String, dynamic> json) =>
accountId: json['account_id'] as String, accountId: json['account_id'] as String,
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>), account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
nick: json['nick'] as String?, nick: json['nick'] as String?,
role: (json['role'] as num).toInt(),
notify: (json['notify'] as num).toInt(), notify: (json['notify'] as num).toInt(),
joinedAt: joinedAt:
json['joined_at'] == null json['joined_at'] == null
@@ -176,7 +177,6 @@ _SnChatMember _$SnChatMemberFromJson(Map<String, dynamic> json) =>
json['timeout_until'] == null json['timeout_until'] == null
? null ? null
: DateTime.parse(json['timeout_until'] as String), : DateTime.parse(json['timeout_until'] as String),
isBot: json['is_bot'] as bool,
status: status:
json['status'] == null json['status'] == null
? null ? null
@@ -200,12 +200,10 @@ Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
'account_id': instance.accountId, 'account_id': instance.accountId,
'account': instance.account.toJson(), 'account': instance.account.toJson(),
'nick': instance.nick, 'nick': instance.nick,
'role': instance.role,
'notify': instance.notify, 'notify': instance.notify,
'joined_at': instance.joinedAt?.toIso8601String(), 'joined_at': instance.joinedAt?.toIso8601String(),
'break_until': instance.breakUntil?.toIso8601String(), 'break_until': instance.breakUntil?.toIso8601String(),
'timeout_until': instance.timeoutUntil?.toIso8601String(), 'timeout_until': instance.timeoutUntil?.toIso8601String(),
'is_bot': instance.isBot,
'status': instance.status?.toJson(), 'status': instance.status?.toJson(),
'last_typed': instance.lastTyped?.toIso8601String(), 'last_typed': instance.lastTyped?.toIso8601String(),
}; };

View File

@@ -24,7 +24,7 @@ final chatUnreadCountNotifierProvider =
); );
typedef _$ChatUnreadCountNotifier = AutoDisposeAsyncNotifier<int>; typedef _$ChatUnreadCountNotifier = AutoDisposeAsyncNotifier<int>;
String _$chatSummaryHash() => r'33815a3bd81d20902b7063e8194fe336930df9b4'; String _$chatSummaryHash() => r'8479ef53cfb0b698b800d0117d04774b6f78b3cc';
/// See also [ChatSummary]. /// See also [ChatSummary].
@ProviderFor(ChatSummary) @ProviderFor(ChatSummary)

View File

@@ -3,8 +3,10 @@ import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:gap/gap.dart'; import 'package:gap/gap.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:island/pods/message.dart';
import 'package:island/pods/network.dart'; import 'package:island/pods/network.dart';
import 'package:island/pods/userinfo.dart'; import 'package:island/pods/userinfo.dart';
import 'package:island/pods/websocket.dart';
import 'package:island/screens/notification.dart'; import 'package:island/screens/notification.dart';
import 'package:island/services/responsive.dart'; import 'package:island/services/responsive.dart';
import 'package:island/widgets/account/account_name.dart'; import 'package:island/widgets/account/account_name.dart';
@@ -176,6 +178,8 @@ class AccountScreen extends HookConsumerWidget {
], ],
), ),
).padding(horizontal: 8), ).padding(horizontal: 8),
if (user.value?.activatedAt == null)
AccountUnactivatedCard().padding(horizontal: 12, bottom: 4),
Card( Card(
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
child: Column( child: Column(
@@ -467,13 +471,16 @@ class AccountScreen extends HookConsumerWidget {
contentPadding: EdgeInsets.symmetric(horizontal: 24), contentPadding: EdgeInsets.symmetric(horizontal: 24),
title: Text('logout').tr(), title: Text('logout').tr(),
onTap: () async { onTap: () async {
final ws = ref.watch(websocketStateProvider.notifier);
final apiClient = ref.watch(apiClientProvider); final apiClient = ref.watch(apiClientProvider);
showLoadingModal(context); showLoadingModal(context);
await apiClient.delete('/pass/accounts/me/sessions/current'); await apiClient.delete('/pass/accounts/me/sessions/current');
await resetDatabase(ref);
if (!context.mounted) return; if (!context.mounted) return;
hideLoadingModal(context); hideLoadingModal(context);
final userNotifier = ref.read(userInfoProvider.notifier); final userNotifier = ref.read(userInfoProvider.notifier);
userNotifier.logOut(); userNotifier.logOut();
ws.close();
}, },
), ),
], ],
@@ -501,6 +508,7 @@ class _UnauthorizedAccountScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 24), padding: const EdgeInsets.symmetric(horizontal: 24),
child: Card( child: Card(
child: InkWell( child: InkWell(
borderRadius: const BorderRadius.all(Radius.circular(8)),
onTap: () { onTap: () {
context.pushNamed('createAccount'); context.pushNamed('createAccount');
}, },
@@ -523,6 +531,7 @@ class _UnauthorizedAccountScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 24), padding: const EdgeInsets.symmetric(horizontal: 24),
child: Card( child: Card(
child: InkWell( child: InkWell(
borderRadius: const BorderRadius.all(Radius.circular(8)),
onTap: () { onTap: () {
context.pushNamed('login'); context.pushNamed('login');
}, },
@@ -544,26 +553,35 @@ class _UnauthorizedAccountScreen extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
TextButton( IconButton(
onPressed: () { onPressed: () {
context.pushNamed('about'); context.pushNamed('about');
}, },
child: Text('about').tr(), iconSize: 18,
color: Theme.of(context).colorScheme.secondary,
icon: const Icon(Icons.info, fill: 1),
tooltip: 'about'.tr(),
), ),
TextButton( IconButton(
child: Text('debugOptions').tr(), icon: const Icon(Icons.bug_report, fill: 1),
onPressed: () { onPressed: () {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
builder: (context) => DebugSheet(), builder: (context) => DebugSheet(),
); );
}, },
iconSize: 18,
color: Theme.of(context).colorScheme.secondary,
tooltip: 'debugOptions'.tr(),
), ),
TextButton( IconButton(
onPressed: () { onPressed: () {
context.pushNamed('settings'); context.pushNamed('settings');
}, },
child: Text('appSettings').tr(), icon: const Icon(Icons.settings, fill: 1),
iconSize: 18,
color: Theme.of(context).colorScheme.secondary,
tooltip: 'appSettings'.tr(),
), ),
], ],
), ),

File diff suppressed because it is too large Load Diff

View File

@@ -38,6 +38,20 @@ final Map<int, (String, String, IconData)> kFactorTypes = {
4: ('authFactorPin', 'authFactorPinDescription', Symbols.nest_secure_alarm), 4: ('authFactorPin', 'authFactorPinDescription', Symbols.nest_secure_alarm),
}; };
/// Performs post-login tasks including fetching user info, subscribing to push
/// notifications, connecting websocket, and closing the login dialog.
Future<void> performPostLogin(BuildContext context, WidgetRef ref) async {
final userNotifier = ref.read(userInfoProvider.notifier);
await userNotifier.fetchUser();
final apiClient = ref.read(apiClientProvider);
subscribePushNotification(apiClient);
final wsNotifier = ref.read(websocketStateProvider.notifier);
wsNotifier.connect();
if (context.mounted && Navigator.canPop(context)) {
Navigator.pop(context, true);
}
}
class _LoginCheckScreen extends HookConsumerWidget { class _LoginCheckScreen extends HookConsumerWidget {
final SnAuthChallenge? challenge; final SnAuthChallenge? challenge;
final SnAuthFactor? factor; final SnAuthFactor? factor;
@@ -80,14 +94,7 @@ class _LoginCheckScreen extends HookConsumerWidget {
if (!context.mounted) return; if (!context.mounted) return;
// Do post login tasks // Do post login tasks
final userNotifier = ref.read(userInfoProvider.notifier); await performPostLogin(context, ref);
userNotifier.fetchUser().then((_) {
final apiClient = ref.read(apiClientProvider);
subscribePushNotification(apiClient);
final wsNotifier = ref.read(websocketStateProvider.notifier);
wsNotifier.connect();
if (context.mounted) Navigator.pop(context, true);
});
} }
useEffect(() { useEffect(() {
@@ -628,17 +635,13 @@ class _LoginLookupScreen extends HookConsumerWidget {
}, },
); );
final challenge = SnAuthChallenge.fromJson(resp.data); final token = resp.data['token'];
onChallenge(challenge); setToken(ref.watch(sharedPreferencesProvider), token);
final factorResp = await client.get( ref.invalidate(tokenProvider);
'/pass/auth/challenge/${challenge.id}/factors', if (!context.mounted) return;
);
onFactor( // Do post login tasks
List<SnAuthFactor>.from( await performPostLogin(context, ref);
factorResp.data.map((ele) => SnAuthFactor.fromJson(ele)),
),
);
onNext();
} catch (err) { } catch (err) {
if (err is SignInWithAppleAuthorizationException) return; if (err is SignInWithAppleAuthorizationException) return;
showErrorAlert(err); showErrorAlert(err);

View File

@@ -1,5 +1,4 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -199,24 +198,17 @@ Future<List<SnChatRoom>> chatroomsJoined(Ref ref) async {
final members = final members =
membersRows.map((mRow) { membersRows.map((mRow) {
final account = SnAccount.fromJson(mRow.account); final account = SnAccount.fromJson(mRow.account);
SnAccountStatus? status;
if (mRow.status != null) {
status = SnAccountStatus.fromJson(jsonDecode(mRow.status!));
}
return SnChatMember( return SnChatMember(
id: mRow.id, id: mRow.id,
chatRoomId: mRow.chatRoomId, chatRoomId: mRow.chatRoomId,
accountId: mRow.accountId, accountId: mRow.accountId,
account: account, account: account,
nick: mRow.nick, nick: mRow.nick,
role: mRow.role,
notify: mRow.notify, notify: mRow.notify,
joinedAt: mRow.joinedAt, joinedAt: mRow.joinedAt,
breakUntil: mRow.breakUntil, breakUntil: mRow.breakUntil,
timeoutUntil: mRow.timeoutUntil, timeoutUntil: mRow.timeoutUntil,
isBot: mRow.isBot, status: null,
status: status,
lastTyped: mRow.lastTyped,
createdAt: mRow.createdAt, createdAt: mRow.createdAt,
updatedAt: mRow.updatedAt, updatedAt: mRow.updatedAt,
deletedAt: mRow.deletedAt, deletedAt: mRow.deletedAt,
@@ -237,6 +229,7 @@ Future<List<SnChatRoom>> chatroomsJoined(Ref ref) async {
? SnCloudFile.fromJson(row.background!) ? SnCloudFile.fromJson(row.background!)
: null, : null,
realmId: row.realmId, realmId: row.realmId,
accountId: row.accountId,
realm: null, realm: null,
createdAt: row.createdAt, createdAt: row.createdAt,
updatedAt: row.updatedAt, updatedAt: row.updatedAt,
@@ -709,16 +702,6 @@ class _ChatInvitesSheet extends HookConsumerWidget {
subtitle: Row( subtitle: Row(
spacing: 6, spacing: 6,
children: [ children: [
Flexible(
child:
Text(
invite.role >= 100
? 'permissionOwner'
: invite.role >= 50
? 'permissionModerator'
: 'permissionMember',
).tr(),
),
if (invite.chatRoom!.type == 1) if (invite.chatRoom!.type == 1)
Badge( Badge(
label: const Text('directMessage').tr(), label: const Text('directMessage').tr(),

View File

@@ -6,7 +6,7 @@ part of 'chat.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$chatroomsJoinedHash() => r'9523efecd1869e7dd26adfc8ec87be48db19ee1c'; String _$chatroomsJoinedHash() => r'50abce4f03a7a8509f16d5ad0b1dbf8e3aeb73b6';
/// See also [chatroomsJoined]. /// See also [chatroomsJoined].
@ProviderFor(chatroomsJoined) @ProviderFor(chatroomsJoined)

View File

@@ -2,6 +2,7 @@ import "dart:async";
import "dart:math" as math; import "dart:math" as math;
import "package:easy_localization/easy_localization.dart"; import "package:easy_localization/easy_localization.dart";
import "package:file_picker/file_picker.dart"; import "package:file_picker/file_picker.dart";
import "package:google_fonts/google_fonts.dart";
import "package:image_picker/image_picker.dart"; import "package:image_picker/image_picker.dart";
import "package:flutter/material.dart"; import "package:flutter/material.dart";
import "package:go_router/go_router.dart"; import "package:go_router/go_router.dart";
@@ -409,38 +410,20 @@ class ChatRoomScreen extends HookConsumerWidget {
final compactHeader = isWideScreen(context); final compactHeader = isWideScreen(context);
Widget onlineIndicator() => Row(
spacing: 8,
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
width: 8,
height: 8,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: (onlineCount as AsyncData).value > 1 ? Colors.green : null,
border:
(onlineCount as AsyncData).value <= 1
? Border.all(color: Colors.grey)
: null,
),
),
Text(
'${(onlineCount as AsyncData).value} online',
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: Theme.of(context).appBarTheme.foregroundColor!,
),
),
],
);
Widget comfortHeaderWidget(SnChatRoom? room) => Column( Widget comfortHeaderWidget(SnChatRoom? room) => Column(
spacing: 4, spacing: 4,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox( Badge(
isLabelVisible: hasOnlineCount,
label: Text('${(onlineCount as AsyncData?)?.value}'),
backgroundColor:
(onlineCount as AsyncData?)?.value != null &&
(onlineCount as AsyncData).value > 1
? Colors.green
: Colors.grey,
child: SizedBox(
height: 26, height: 26,
width: 26, width: 26,
child: child:
@@ -463,12 +446,12 @@ class ChatRoomScreen extends HookConsumerWidget {
), ),
), ),
), ),
),
Text( Text(
(room.type == 1 && room.name == null) (room.type == 1 && room.name == null)
? room.members!.map((e) => e.account.nick).join(', ') ? room.members!.map((e) => e.account.nick).join(', ')
: room.name!, : room.name!,
).fontSize(15), ).fontSize(15),
if (hasOnlineCount) onlineIndicator(),
], ],
); );
@@ -477,7 +460,15 @@ class ChatRoomScreen extends HookConsumerWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
SizedBox( Badge(
isLabelVisible: (onlineCount.value ?? 0) > 1,
label: Text('${(onlineCount as AsyncData?)?.value}'),
textStyle: GoogleFonts.robotoMono(fontSize: 10),
backgroundColor:
(onlineCount.value ?? 0) > 1 ? Colors.green : Colors.grey,
textColor: Colors.white,
offset: Offset(6, 14),
child: SizedBox(
height: 28, height: 28,
width: 28, width: 28,
child: child:
@@ -500,12 +491,12 @@ class ChatRoomScreen extends HookConsumerWidget {
), ),
), ),
), ),
),
Text( Text(
(room.type == 1 && room.name == null) (room.type == 1 && room.name == null)
? room.members!.map((e) => e.account.nick).join(', ') ? room.members!.map((e) => e.account.nick).join(', ')
: room.name!, : room.name!,
).fontSize(19), ).fontSize(19),
if (hasOnlineCount) onlineIndicator().padding(left: 4, top: 6),
], ],
); );
@@ -663,9 +654,11 @@ class ChatRoomScreen extends HookConsumerWidget {
curve: Curves.easeOut, curve: Curves.easeOut,
tween: EdgeInsetsTween( tween: EdgeInsetsTween(
begin: EdgeInsets.only( begin: EdgeInsets.only(
top: MediaQuery.of(context).padding.top,
bottom: MediaQuery.of(context).padding.bottom + 8 + height, bottom: MediaQuery.of(context).padding.bottom + 8 + height,
), ),
end: EdgeInsets.only( end: EdgeInsets.only(
top: MediaQuery.of(context).padding.top,
bottom: MediaQuery.of(context).padding.bottom + 8 + height, bottom: MediaQuery.of(context).padding.bottom + 8 + height,
), ),
), ),

View File

@@ -440,12 +440,17 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
@override @override
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
final chatIdentity = ref.watch(chatroomIdentityProvider(id)); final chatIdentity = ref.watch(chatroomIdentityProvider(id));
final chatRoom = ref.watch(chatroomProvider(id));
final isManagable =
chatIdentity.value?.accountId == chatRoom.value?.accountId ||
chatRoom.value?.type == 1;
return PopupMenuButton( return PopupMenuButton(
icon: Icon(Icons.more_vert, shadows: [iconShadow]), icon: Icon(Icons.more_vert, shadows: [iconShadow]),
itemBuilder: itemBuilder:
(context) => [ (context) => [
if ((chatIdentity.value?.role ?? 0) >= 50) if (isManagable)
PopupMenuItem( PopupMenuItem(
onTap: () { onTap: () {
showModalBottomSheet( showModalBottomSheet(
@@ -471,7 +476,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
], ],
), ),
), ),
if ((chatIdentity.value?.role ?? 0) >= 100) if (isManagable)
PopupMenuItem( PopupMenuItem(
child: Row( child: Row(
children: [ children: [
@@ -644,6 +649,11 @@ class _ChatMemberListSheet extends HookConsumerWidget {
final memberNotifier = ref.read(chatMemberStateProvider(roomId).notifier); final memberNotifier = ref.read(chatMemberStateProvider(roomId).notifier);
final roomIdentity = ref.watch(chatroomIdentityProvider(roomId)); final roomIdentity = ref.watch(chatroomIdentityProvider(roomId));
final chatRoom = ref.watch(chatroomProvider(roomId));
final isManagable =
chatRoom.value?.accountId == roomIdentity.value?.accountId ||
chatRoom.value?.type == 1;
useEffect(() { useEffect(() {
Future(() { Future(() {
@@ -752,45 +762,11 @@ class _ChatMemberListSheet extends HookConsumerWidget {
const Icon(Symbols.pending_actions, size: 20), const Icon(Symbols.pending_actions, size: 20),
], ],
), ),
subtitle: Row( subtitle: Text("@${member.account.name}"),
children: [
Text(
member.role >= 100
? 'permissionOwner'
: member.role >= 50
? 'permissionModerator'
: 'permissionMember',
).tr(),
Text('·').bold().padding(horizontal: 6),
Expanded(child: Text("@${member.account.name}")),
],
),
trailing: Row( trailing: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
if ((roomIdentity.value?.role ?? 0) >= 50) if (isManagable)
IconButton(
icon: const Icon(Symbols.edit),
onPressed: () {
showModalBottomSheet(
isScrollControlled: true,
context: context,
builder:
(context) => _ChatMemberRoleSheet(
roomId: roomId,
member: member,
),
).then((value) {
if (value != null) {
// Refresh both providers
memberNotifier.reset();
memberNotifier.loadMore();
ref.invalidate(memberListProvider);
}
});
},
),
if ((roomIdentity.value?.role ?? 0) >= 50)
IconButton( IconButton(
icon: const Icon(Symbols.delete), icon: const Icon(Symbols.delete),
onPressed: () { onPressed: () {
@@ -829,120 +805,3 @@ class _ChatMemberListSheet extends HookConsumerWidget {
); );
} }
} }
class _ChatMemberRoleSheet extends HookConsumerWidget {
final String roomId;
final SnChatMember member;
const _ChatMemberRoleSheet({required this.roomId, required this.member});
@override
Widget build(BuildContext context, WidgetRef ref) {
final roleController = useTextEditingController(
text: member.role.toString(),
);
return Container(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: EdgeInsets.only(
top: 16,
left: 20,
right: 16,
bottom: 12,
),
child: Row(
children: [
Text(
'memberRoleEdit'.tr(args: [member.account.name]),
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
fontWeight: FontWeight.w600,
letterSpacing: -0.5,
),
),
const Spacer(),
IconButton(
icon: const Icon(Symbols.close),
onPressed: () => Navigator.pop(context),
style: IconButton.styleFrom(
minimumSize: const Size(36, 36),
),
),
],
),
),
const Divider(height: 1),
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Autocomplete<int>(
optionsBuilder: (TextEditingValue textEditingValue) {
if (textEditingValue.text.isEmpty) {
return const [100, 50, 0];
}
final int? value = int.tryParse(textEditingValue.text);
if (value == null) return const [100, 50, 0];
return [100, 50, 0].where(
(option) =>
option.toString().contains(textEditingValue.text),
);
},
onSelected: (int selection) {
roleController.text = selection.toString();
},
fieldViewBuilder: (
context,
controller,
focusNode,
onFieldSubmitted,
) {
return TextField(
controller: controller,
focusNode: focusNode,
keyboardType: TextInputType.number,
decoration: InputDecoration(
labelText: 'memberRole'.tr(),
helperText: 'memberRoleHint'.tr(),
),
onTapOutside: (event) => focusNode.unfocus(),
);
},
),
const Gap(16),
FilledButton.icon(
onPressed: () async {
try {
final newRole = int.parse(roleController.text);
if (newRole < 0 || newRole > 100) {
throw 'roleValidationHint'.tr();
}
final apiClient = ref.read(apiClientProvider);
await apiClient.patch(
'/sphere/chat/$roomId/members/${member.accountId}/role',
data: newRole,
);
if (context.mounted) Navigator.pop(context, true);
} catch (err) {
showErrorAlert(err);
}
},
icon: const Icon(Symbols.save),
label: const Text('saveChanges').tr(),
),
],
).padding(vertical: 16, horizontal: 24),
],
),
),
);
}
}

View File

@@ -6,6 +6,7 @@ import 'package:go_router/go_router.dart';
import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:gap/gap.dart'; import 'package:gap/gap.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:island/models/account.dart';
import 'package:island/models/activity.dart'; import 'package:island/models/activity.dart';
import 'package:island/models/publisher.dart'; import 'package:island/models/publisher.dart';
import 'package:island/models/realm.dart'; import 'package:island/models/realm.dart';
@@ -15,6 +16,7 @@ import 'package:island/pods/userinfo.dart';
import 'package:island/screens/auth/login_modal.dart'; import 'package:island/screens/auth/login_modal.dart';
import 'package:island/screens/notification.dart'; import 'package:island/screens/notification.dart';
import 'package:island/services/responsive.dart'; import 'package:island/services/responsive.dart';
import 'package:island/widgets/account/account_name.dart';
import 'package:island/widgets/account/friends_overview.dart'; import 'package:island/widgets/account/friends_overview.dart';
import 'package:island/widgets/app_scaffold.dart'; import 'package:island/widgets/app_scaffold.dart';
import 'package:island/models/post.dart'; import 'package:island/models/post.dart';
@@ -343,7 +345,7 @@ class ExploreScreen extends HookConsumerWidget {
BuildContext context, BuildContext context,
WidgetRef ref, WidgetRef ref,
Widget filterBar, Widget filterBar,
AsyncValue<dynamic> user, AsyncValue<SnAccount?> user,
AsyncValue<int?> notificationCount, AsyncValue<int?> notificationCount,
ValueNotifier<EventCalendarQuery> query, ValueNotifier<EventCalendarQuery> query,
AsyncValue<List<dynamic>> events, AsyncValue<List<dynamic>> events,
@@ -382,8 +384,11 @@ class ExploreScreen extends HookConsumerWidget {
child: Column( child: Column(
spacing: 8, spacing: 8,
children: [ children: [
const Gap(4),
if (user.value?.activatedAt == null)
AccountUnactivatedCard(),
CheckInWidget( CheckInWidget(
margin: EdgeInsets.only(top: 12), margin: EdgeInsets.zero,
onChecked: () { onChecked: () {
ref.invalidate(eventCalendarProvider(query.value)); ref.invalidate(eventCalendarProvider(query.value));
}, },
@@ -584,6 +589,10 @@ class ExploreScreen extends HookConsumerWidget {
child: CustomScrollView( child: CustomScrollView(
slivers: [ slivers: [
const SliverGap(8), const SliverGap(8),
if (user.value?.activatedAt == null)
SliverToBoxAdapter(
child: AccountUnactivatedCard().padding(bottom: 8),
),
if (user.value != null) if (user.value != null)
SliverToBoxAdapter( SliverToBoxAdapter(
child: CheckInWidget( child: CheckInWidget(

View File

@@ -7,7 +7,7 @@ part of 'notification.dart';
// ************************************************************************** // **************************************************************************
String _$notificationUnreadCountNotifierHash() => String _$notificationUnreadCountNotifierHash() =>
r'08c773809958d96a7ce82acf04af1f9e0b23e119'; r'8bff5ad3b65389589b4112add3246afd9b8e38f9';
/// See also [NotificationUnreadCountNotifier]. /// See also [NotificationUnreadCountNotifier].
@ProviderFor(NotificationUnreadCountNotifier) @ProviderFor(NotificationUnreadCountNotifier)

View File

@@ -1,8 +1,11 @@
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gap/gap.dart'; import 'package:gap/gap.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:island/models/account.dart'; import 'package:island/models/account.dart';
import 'package:island/models/wallet.dart'; import 'package:island/models/wallet.dart';
import 'package:island/pods/network.dart';
import 'package:island/widgets/alert.dart';
import 'package:material_symbols_icons/symbols.dart'; import 'package:material_symbols_icons/symbols.dart';
import 'package:styled_widget/styled_widget.dart'; import 'package:styled_widget/styled_widget.dart';
@@ -428,3 +431,47 @@ class VerificationStatusCard extends StatelessWidget {
).padding(horizontal: 24, vertical: 16); ).padding(horizontal: 24, vertical: 16);
} }
} }
class AccountUnactivatedCard extends HookConsumerWidget {
const AccountUnactivatedCard({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
return Card(
margin: EdgeInsets.zero,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Icon(
Symbols.warning_amber_rounded,
size: 40,
fill: 1,
color: Colors.amber,
),
const Gap(4),
Text('accountActivationAlert').tr().fontSize(16).bold(),
Text('accountActivationAlertHint').tr(),
const Gap(4),
Text('accountActivationResendHint').tr().opacity(0.8),
const Gap(16),
FilledButton.icon(
icon: const Icon(Symbols.email),
label: Text('accountActivationResend').tr(),
onPressed: () async {
final client = ref.watch(apiClientProvider);
try {
showLoadingModal(context);
await client.post('/pass/spells/activation/resend');
showSnackBar("Activation magic spell has been resend");
} catch (err) {
showErrorAlert(err);
} finally {
if (context.mounted) hideLoadingModal(context);
}
},
).width(double.infinity),
],
).padding(horizontal: 24, vertical: 16),
);
}
}

View File

@@ -431,6 +431,9 @@ class _ActivityPresenceWidgetState extends State<ActivityPresenceWidget>
if (activity.titleUrl != null && if (activity.titleUrl != null &&
activity.titleUrl!.isNotEmpty) activity.titleUrl!.isNotEmpty)
IconButton( IconButton(
visualDensity: const VisualDensity(
vertical: -4,
),
onPressed: () { onPressed: () {
launchUrlString(activity.titleUrl!); launchUrlString(activity.titleUrl!);
}, },
@@ -583,6 +586,9 @@ class _ActivityPresenceWidgetState extends State<ActivityPresenceWidget>
if (activity.titleUrl != null && if (activity.titleUrl != null &&
activity.titleUrl!.isNotEmpty) activity.titleUrl!.isNotEmpty)
IconButton( IconButton(
visualDensity: const VisualDensity(
vertical: -4,
),
onPressed: () { onPressed: () {
launchUrlString( launchUrlString(
activity.titleUrl!, activity.titleUrl!,
@@ -616,6 +622,8 @@ class _ActivityPresenceWidgetState extends State<ActivityPresenceWidget>
'assets/images/oidc/spotify.png', 'assets/images/oidc/spotify.png',
width: 24, width: 24,
height: 24, height: 24,
color:
Theme.of(context).colorScheme.onSurface,
), ),
), ),
), ),

View File

@@ -31,7 +31,11 @@ void showSnackBar(String message, {SnackBarAction? action}) {
), ),
), ),
), ),
curve: Curves.easeInOut, displayDuration: const Duration(milliseconds: 1500),
animationDuration: const Duration(milliseconds: 300),
reverseAnimationDuration: const Duration(milliseconds: 300),
curve: Curves.fastLinearToSlowEaseIn,
dismissType: DismissType.onTap,
snackBarPosition: SnackBarPosition.bottom, snackBarPosition: SnackBarPosition.bottom,
); );
} }
@@ -271,6 +275,7 @@ void showErrorAlert(dynamic err, {IconData? icon}) {
), ),
const Gap(8), const Gap(8),
Text(text), Text(text),
const Gap(8),
], ],
), ),
actions: [ actions: [

View File

@@ -5,10 +5,12 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:protocol_handler/protocol_handler.dart'; import 'package:protocol_handler/protocol_handler.dart';
import 'package:island/pods/activity/activity_rpc.dart'; import 'package:island/pods/activity/activity_rpc.dart';
import 'package:island/pods/config.dart';
import 'package:island/pods/network.dart';
import 'package:island/pods/websocket.dart'; import 'package:island/pods/websocket.dart';
import 'package:island/route.dart'; import 'package:island/route.dart';
import 'package:island/screens/auth/login_content.dart';
import 'package:island/screens/tray_manager.dart'; import 'package:island/screens/tray_manager.dart';
import 'package:island/services/event_bus.dart';
import 'package:island/pods/web_auth/web_auth_providers.dart'; import 'package:island/pods/web_auth/web_auth_providers.dart';
import 'package:island/services/notify.dart'; import 'package:island/services/notify.dart';
import 'package:island/services/sharing_intent.dart'; import 'package:island/services/sharing_intent.dart';
@@ -117,14 +119,20 @@ class _AppWrapperState extends ConsumerState<AppWrapper>
TrayService.instance.handleAction(menuItem); TrayService.instance.handleAction(menuItem);
} }
void _handleDeepLink(Uri uri, WidgetRef ref) { void _handleDeepLink(Uri uri, WidgetRef ref) async {
String path = '/${uri.host}${uri.path}'; String path = '/${uri.host}${uri.path}';
// Special handling for OIDC auth callback // Special handling for OIDC auth callback
if (path == '/auth/callback' && if (path == '/auth/callback' && uri.queryParameters.containsKey('token')) {
uri.queryParameters.containsKey('challenge')) { final token = uri.queryParameters['token']!;
final challenge = uri.queryParameters['challenge']!; setToken(ref.read(sharedPreferencesProvider), token);
eventBus.fire(OidcAuthCallbackEvent(challenge)); ref.invalidate(tokenProvider);
// Do post login tasks
if (mounted) {
await performPostLogin(context, ref);
}
if (!kIsWeb && if (!kIsWeb &&
(Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
windowManager.show(); windowManager.show();

View File

@@ -115,26 +115,10 @@ class MessageSenderInfo extends StatelessWidget {
spacing: 2, spacing: 2,
children: [ children: [
Text(timestamp, style: TextStyle(fontSize: 10, color: textColor)), Text(timestamp, style: TextStyle(fontSize: 10, color: textColor)),
Row(
mainAxisSize: MainAxisSize.min,
spacing: 5,
children: [
AccountName( AccountName(
account: sender.account, account: sender.account,
style: Theme.of(context).textTheme.bodySmall, style: Theme.of(context).textTheme.bodySmall,
), ),
Badge(
label:
Text(
sender.role >= 100
? 'permissionOwner'
: sender.role >= 50
? 'permissionModerator'
: 'permissionMember',
).tr(),
),
],
),
], ],
), ),
], ],

View File

@@ -15,6 +15,9 @@ import 'package:island/widgets/content/sheet.dart';
import 'package:material_symbols_icons/symbols.dart'; import 'package:material_symbols_icons/symbols.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:styled_widget/styled_widget.dart'; import 'package:styled_widget/styled_widget.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:photo_view/photo_view.dart';
import 'package:island/pods/config.dart';
class FileItem extends HookConsumerWidget { class FileItem extends HookConsumerWidget {
final SnSiteFileEntry file; final SnSiteFileEntry file;
@@ -66,6 +69,64 @@ class FileItem extends HookConsumerWidget {
} }
} }
Future<void> _showImageViewer(BuildContext context, WidgetRef ref) async {
final serverUrl = ref.read(serverUrlProvider);
final token = await getToken(ref.read(tokenProvider));
final imageUrl =
'$serverUrl/zone/sites/${site.id}/files/content/${file.relativePath}';
if (context.mounted) {
await Navigator.of(context).push(
MaterialPageRoute(
builder:
(context) => Scaffold(
appBar: AppBar(
title: Text(file.relativePath),
backgroundColor: Colors.transparent,
elevation: 0,
),
extendBodyBehindAppBar: true,
backgroundColor: Colors.black,
body: PhotoView(
imageProvider: CachedNetworkImageProvider(
imageUrl,
headers:
token != null
? {'Authorization': 'AtField $token'}
: null,
),
heroAttributes: PhotoViewHeroAttributes(
tag: file.relativePath,
),
),
),
),
);
}
}
Future<void> _openFile(BuildContext context, WidgetRef ref) async {
final ext = file.relativePath.split('.').last.toLowerCase();
final isImage = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'].contains(ext);
if (isImage) {
await _showImageViewer(context, ref);
return;
}
// Check for large files (> 1MB)
if (file.size > 1024 * 1024) {
final confirmed = await showConfirmAlert(
'This file is large (${(file.size / 1024 / 1024).toStringAsFixed(2)} MB). Opening it might cause performance issues. Do you want to continue?',
'Large File',
);
if (confirmed != true) return;
}
await _showEditSheet(context, ref);
}
Future<void> _showEditSheet(BuildContext context, WidgetRef ref) async { Future<void> _showEditSheet(BuildContext context, WidgetRef ref) async {
try { try {
final fileContent = await ref.read( final fileContent = await ref.read(
@@ -140,7 +201,7 @@ class FileItem extends HookConsumerWidget {
children: [ children: [
const Icon(Symbols.edit), const Icon(Symbols.edit),
const Gap(16), const Gap(16),
Text('Edit Content'), Text('Open'),
], ],
), ),
), ),
@@ -162,7 +223,7 @@ class FileItem extends HookConsumerWidget {
await _downloadFile(context, ref); await _downloadFile(context, ref);
break; break;
case 'edit': case 'edit':
await _showEditSheet(context, ref); await _openFile(context, ref);
break; break;
case 'delete': case 'delete':
final confirmed = await showDialog<bool>( final confirmed = await showDialog<bool>(
@@ -209,7 +270,7 @@ class FileItem extends HookConsumerWidget {
if (file.isDirectory) { if (file.isDirectory) {
onNavigateDirectory?.call(file.relativePath); onNavigateDirectory?.call(file.relativePath);
} else { } else {
_showEditSheet(context, ref); _openFile(context, ref);
} }
}, },
), ),

View File

@@ -11,6 +11,7 @@ import 'package:island/widgets/alert.dart';
import 'package:island/widgets/sites/file_upload_dialog.dart'; import 'package:island/widgets/sites/file_upload_dialog.dart';
import 'package:island/widgets/sites/file_item.dart'; import 'package:island/widgets/sites/file_item.dart';
import 'package:material_symbols_icons/symbols.dart'; import 'package:material_symbols_icons/symbols.dart';
import 'package:path/path.dart' as p;
class FileManagementSection extends HookConsumerWidget { class FileManagementSection extends HookConsumerWidget {
final SnPublicationSite site; final SnPublicationSite site;
@@ -293,10 +294,10 @@ class FileManagementSection extends HookConsumerWidget {
try { try {
await for (final entity in Directory(dirPath).list(recursive: true)) { await for (final entity in Directory(dirPath).list(recursive: true)) {
if (entity is File) { if (entity is File) {
String relativePath = entity.path.substring(dirPath.length); String relativePath = p.relative(entity.path, from: dirPath);
if (relativePath.startsWith('/')) { // Normalize to forward slashes for consistency (e.g. for API uploads)
relativePath = relativePath.substring(1); relativePath = relativePath.replaceAll(r'\', '/');
}
if (relativePath.isEmpty) continue; if (relativePath.isEmpty) continue;
results.add({ results.add({
'file': File(entity.path), 'file': File(entity.path),

View File

@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 3.4.0+149 version: 3.5.0+150
environment: environment:
sdk: ^3.7.2 sdk: ^3.7.2