diff --git a/dart/passport/account.pb.dart b/dart/passport/account.pb.dart index 761a384..e66808d 100644 --- a/dart/passport/account.pb.dart +++ b/dart/passport/account.pb.dart @@ -15,6 +15,8 @@ import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; +import 'blocks.pb.dart' as $0; + export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; /// 获取会员的完整信息 @@ -29,15 +31,15 @@ class GetFullReply extends $pb.GeneratedMessage { $core.String? avatar, $core.String? birthday, $core.int? sex, - $core.int? country, - $core.int? province, - $core.int? city, - $core.int? area, + $core.String? country, + $core.String? province, + $core.String? city, + $core.String? area, $core.String? sign, $core.String? cover, $core.int? score, $core.int? level, - $core.Iterable<$core.MapEntry<$core.String, $core.bool>>? verify, + $0.VerifyStatus? verifyStatus, $core.Iterable? tags, }) { final result = create(); @@ -58,7 +60,7 @@ class GetFullReply extends $pb.GeneratedMessage { if (cover != null) result.cover = cover; if (score != null) result.score = score; if (level != null) result.level = level; - if (verify != null) result.verify.addEntries(verify); + if (verifyStatus != null) result.verifyStatus = verifyStatus; if (tags != null) result.tags.addAll(tags); return result; } @@ -85,19 +87,16 @@ class GetFullReply extends $pb.GeneratedMessage { ..aOS(7, _omitFieldNames ? '' : 'avatar') ..aOS(8, _omitFieldNames ? '' : 'birthday') ..a<$core.int>(9, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.O3) - ..a<$core.int>(10, _omitFieldNames ? '' : 'country', $pb.PbFieldType.O3) - ..a<$core.int>(11, _omitFieldNames ? '' : 'province', $pb.PbFieldType.O3) - ..a<$core.int>(12, _omitFieldNames ? '' : 'city', $pb.PbFieldType.O3) - ..a<$core.int>(13, _omitFieldNames ? '' : 'area', $pb.PbFieldType.O3) + ..aOS(10, _omitFieldNames ? '' : 'country') + ..aOS(11, _omitFieldNames ? '' : 'province') + ..aOS(12, _omitFieldNames ? '' : 'city') + ..aOS(13, _omitFieldNames ? '' : 'area') ..aOS(14, _omitFieldNames ? '' : 'sign') ..aOS(15, _omitFieldNames ? '' : 'cover') ..a<$core.int>(16, _omitFieldNames ? '' : 'score', $pb.PbFieldType.O3) ..a<$core.int>(17, _omitFieldNames ? '' : 'level', $pb.PbFieldType.O3) - ..m<$core.String, $core.bool>(18, _omitFieldNames ? '' : 'verify', - entryClassName: 'GetFullReply.VerifyEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OB, - packageName: const $pb.PackageName('passport')) + ..aOM<$0.VerifyStatus>(18, _omitFieldNames ? '' : 'verifyStatus', + subBuilder: $0.VerifyStatus.create) ..pc(19, _omitFieldNames ? '' : 'tags', $pb.PbFieldType.PM, subBuilder: TagItem.create) ..hasRequiredFields = false; @@ -205,36 +204,36 @@ class GetFullReply extends $pb.GeneratedMessage { void clearSex() => $_clearField(9); @$pb.TagNumber(10) - $core.int get country => $_getIZ(9); + $core.String get country => $_getSZ(9); @$pb.TagNumber(10) - set country($core.int value) => $_setSignedInt32(9, value); + set country($core.String value) => $_setString(9, value); @$pb.TagNumber(10) $core.bool hasCountry() => $_has(9); @$pb.TagNumber(10) void clearCountry() => $_clearField(10); @$pb.TagNumber(11) - $core.int get province => $_getIZ(10); + $core.String get province => $_getSZ(10); @$pb.TagNumber(11) - set province($core.int value) => $_setSignedInt32(10, value); + set province($core.String value) => $_setString(10, value); @$pb.TagNumber(11) $core.bool hasProvince() => $_has(10); @$pb.TagNumber(11) void clearProvince() => $_clearField(11); @$pb.TagNumber(12) - $core.int get city => $_getIZ(11); + $core.String get city => $_getSZ(11); @$pb.TagNumber(12) - set city($core.int value) => $_setSignedInt32(11, value); + set city($core.String value) => $_setString(11, value); @$pb.TagNumber(12) $core.bool hasCity() => $_has(11); @$pb.TagNumber(12) void clearCity() => $_clearField(12); @$pb.TagNumber(13) - $core.int get area => $_getIZ(12); + $core.String get area => $_getSZ(12); @$pb.TagNumber(13) - set area($core.int value) => $_setSignedInt32(12, value); + set area($core.String value) => $_setString(12, value); @$pb.TagNumber(13) $core.bool hasArea() => $_has(12); @$pb.TagNumber(13) @@ -277,7 +276,15 @@ class GetFullReply extends $pb.GeneratedMessage { void clearLevel() => $_clearField(17); @$pb.TagNumber(18) - $pb.PbMap<$core.String, $core.bool> get verify => $_getMap(17); + $0.VerifyStatus get verifyStatus => $_getN(17); + @$pb.TagNumber(18) + set verifyStatus($0.VerifyStatus value) => $_setField(18, value); + @$pb.TagNumber(18) + $core.bool hasVerifyStatus() => $_has(17); + @$pb.TagNumber(18) + void clearVerifyStatus() => $_clearField(18); + @$pb.TagNumber(18) + $0.VerifyStatus ensureVerifyStatus() => $_ensure(17); @$pb.TagNumber(19) $pb.PbList get tags => $_getList(18); @@ -355,10 +362,10 @@ class SetDataRequest extends $pb.GeneratedMessage { $core.String? avatar, $core.String? birthday, $core.int? sex, - $core.int? country, - $core.int? province, - $core.int? city, - $core.int? area, + $core.String? country, + $core.String? province, + $core.String? city, + $core.String? area, $core.String? sign, $core.String? cover, $core.int? score, @@ -397,10 +404,10 @@ class SetDataRequest extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'avatar') ..aOS(3, _omitFieldNames ? '' : 'birthday') ..a<$core.int>(4, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.O3) - ..a<$core.int>(5, _omitFieldNames ? '' : 'country', $pb.PbFieldType.O3) - ..a<$core.int>(6, _omitFieldNames ? '' : 'province', $pb.PbFieldType.O3) - ..a<$core.int>(7, _omitFieldNames ? '' : 'city', $pb.PbFieldType.O3) - ..a<$core.int>(8, _omitFieldNames ? '' : 'area', $pb.PbFieldType.O3) + ..aOS(5, _omitFieldNames ? '' : 'country') + ..aOS(6, _omitFieldNames ? '' : 'province') + ..aOS(7, _omitFieldNames ? '' : 'city') + ..aOS(8, _omitFieldNames ? '' : 'area') ..aOS(9, _omitFieldNames ? '' : 'sign') ..aOS(10, _omitFieldNames ? '' : 'cover') ..a<$core.int>(11, _omitFieldNames ? '' : 'score', $pb.PbFieldType.O3) @@ -465,36 +472,36 @@ class SetDataRequest extends $pb.GeneratedMessage { void clearSex() => $_clearField(4); @$pb.TagNumber(5) - $core.int get country => $_getIZ(4); + $core.String get country => $_getSZ(4); @$pb.TagNumber(5) - set country($core.int value) => $_setSignedInt32(4, value); + set country($core.String value) => $_setString(4, value); @$pb.TagNumber(5) $core.bool hasCountry() => $_has(4); @$pb.TagNumber(5) void clearCountry() => $_clearField(5); @$pb.TagNumber(6) - $core.int get province => $_getIZ(5); + $core.String get province => $_getSZ(5); @$pb.TagNumber(6) - set province($core.int value) => $_setSignedInt32(5, value); + set province($core.String value) => $_setString(5, value); @$pb.TagNumber(6) $core.bool hasProvince() => $_has(5); @$pb.TagNumber(6) void clearProvince() => $_clearField(6); @$pb.TagNumber(7) - $core.int get city => $_getIZ(6); + $core.String get city => $_getSZ(6); @$pb.TagNumber(7) - set city($core.int value) => $_setSignedInt32(6, value); + set city($core.String value) => $_setString(6, value); @$pb.TagNumber(7) $core.bool hasCity() => $_has(6); @$pb.TagNumber(7) void clearCity() => $_clearField(7); @$pb.TagNumber(8) - $core.int get area => $_getIZ(7); + $core.String get area => $_getSZ(7); @$pb.TagNumber(8) - set area($core.int value) => $_setSignedInt32(7, value); + set area($core.String value) => $_setString(7, value); @$pb.TagNumber(8) $core.bool hasArea() => $_has(7); @$pb.TagNumber(8) diff --git a/dart/passport/account.pbjson.dart b/dart/passport/account.pbjson.dart index db3ee35..8d5ba8e 100644 --- a/dart/passport/account.pbjson.dart +++ b/dart/passport/account.pbjson.dart @@ -27,21 +27,21 @@ const GetFullReply$json = { {'1': 'avatar', '3': 7, '4': 1, '5': 9, '10': 'avatar'}, {'1': 'birthday', '3': 8, '4': 1, '5': 9, '10': 'birthday'}, {'1': 'sex', '3': 9, '4': 1, '5': 5, '10': 'sex'}, - {'1': 'country', '3': 10, '4': 1, '5': 5, '10': 'country'}, - {'1': 'province', '3': 11, '4': 1, '5': 5, '10': 'province'}, - {'1': 'city', '3': 12, '4': 1, '5': 5, '10': 'city'}, - {'1': 'area', '3': 13, '4': 1, '5': 5, '10': 'area'}, + {'1': 'country', '3': 10, '4': 1, '5': 9, '10': 'country'}, + {'1': 'province', '3': 11, '4': 1, '5': 9, '10': 'province'}, + {'1': 'city', '3': 12, '4': 1, '5': 9, '10': 'city'}, + {'1': 'area', '3': 13, '4': 1, '5': 9, '10': 'area'}, {'1': 'sign', '3': 14, '4': 1, '5': 9, '10': 'sign'}, {'1': 'cover', '3': 15, '4': 1, '5': 9, '10': 'cover'}, {'1': 'score', '3': 16, '4': 1, '5': 5, '10': 'score'}, {'1': 'level', '3': 17, '4': 1, '5': 5, '10': 'level'}, { - '1': 'verify', + '1': 'verify_status', '3': 18, - '4': 3, + '4': 1, '5': 11, - '6': '.passport.GetFullReply.VerifyEntry', - '10': 'verify' + '6': '.passport.VerifyStatus', + '10': 'verifyStatus' }, { '1': 'tags', @@ -52,17 +52,6 @@ const GetFullReply$json = { '10': 'tags' }, ], - '3': [GetFullReply_VerifyEntry$json], -}; - -@$core.Deprecated('Use getFullReplyDescriptor instead') -const GetFullReply_VerifyEntry$json = { - '1': 'VerifyEntry', - '2': [ - {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - {'1': 'value', '3': 2, '4': 1, '5': 8, '10': 'value'}, - ], - '7': {'7': true}, }; /// Descriptor for `GetFullReply`. Decode as a `google.protobuf.DescriptorProto`. @@ -71,13 +60,12 @@ final $typed_data.Uint8List getFullReplyDescriptor = $convert.base64Decode( 'ABKAlSB2FjY291bnQSFAoFcGhvbmUYAyABKAlSBXBob25lEhQKBWVtYWlsGAQgASgJUgVlbWFp' 'bBIWCgZyaWdodHMYBSABKAlSBnJpZ2h0cxIaCghuaWNrbmFtZRgGIAEoCVIIbmlja25hbWUSFg' 'oGYXZhdGFyGAcgASgJUgZhdmF0YXISGgoIYmlydGhkYXkYCCABKAlSCGJpcnRoZGF5EhAKA3Nl' - 'eBgJIAEoBVIDc2V4EhgKB2NvdW50cnkYCiABKAVSB2NvdW50cnkSGgoIcHJvdmluY2UYCyABKA' - 'VSCHByb3ZpbmNlEhIKBGNpdHkYDCABKAVSBGNpdHkSEgoEYXJlYRgNIAEoBVIEYXJlYRISCgRz' + 'eBgJIAEoBVIDc2V4EhgKB2NvdW50cnkYCiABKAlSB2NvdW50cnkSGgoIcHJvdmluY2UYCyABKA' + 'lSCHByb3ZpbmNlEhIKBGNpdHkYDCABKAlSBGNpdHkSEgoEYXJlYRgNIAEoCVIEYXJlYRISCgRz' 'aWduGA4gASgJUgRzaWduEhQKBWNvdmVyGA8gASgJUgVjb3ZlchIUCgVzY29yZRgQIAEoBVIFc2' - 'NvcmUSFAoFbGV2ZWwYESABKAVSBWxldmVsEjoKBnZlcmlmeRgSIAMoCzIiLnBhc3Nwb3J0Lkdl' - 'dEZ1bGxSZXBseS5WZXJpZnlFbnRyeVIGdmVyaWZ5EiUKBHRhZ3MYEyADKAsyES5wYXNzcG9ydC' - '5UYWdJdGVtUgR0YWdzGjkKC1ZlcmlmeUVudHJ5EhAKA2tleRgBIAEoCVIDa2V5EhQKBXZhbHVl' - 'GAIgASgIUgV2YWx1ZToCOAE='); + 'NvcmUSFAoFbGV2ZWwYESABKAVSBWxldmVsEjsKDXZlcmlmeV9zdGF0dXMYEiABKAsyFi5wYXNz' + 'cG9ydC5WZXJpZnlTdGF0dXNSDHZlcmlmeVN0YXR1cxIlCgR0YWdzGBMgAygLMhEucGFzc3Bvcn' + 'QuVGFnSXRlbVIEdGFncw=='); @$core.Deprecated('Use tagItemDescriptor instead') const TagItem$json = { @@ -100,10 +88,10 @@ const SetDataRequest$json = { {'1': 'avatar', '3': 2, '4': 1, '5': 9, '10': 'avatar'}, {'1': 'birthday', '3': 3, '4': 1, '5': 9, '10': 'birthday'}, {'1': 'sex', '3': 4, '4': 1, '5': 5, '10': 'sex'}, - {'1': 'country', '3': 5, '4': 1, '5': 5, '10': 'country'}, - {'1': 'province', '3': 6, '4': 1, '5': 5, '10': 'province'}, - {'1': 'city', '3': 7, '4': 1, '5': 5, '10': 'city'}, - {'1': 'area', '3': 8, '4': 1, '5': 5, '10': 'area'}, + {'1': 'country', '3': 5, '4': 1, '5': 9, '10': 'country'}, + {'1': 'province', '3': 6, '4': 1, '5': 9, '10': 'province'}, + {'1': 'city', '3': 7, '4': 1, '5': 9, '10': 'city'}, + {'1': 'area', '3': 8, '4': 1, '5': 9, '10': 'area'}, {'1': 'sign', '3': 9, '4': 1, '5': 9, '10': 'sign'}, {'1': 'cover', '3': 10, '4': 1, '5': 9, '10': 'cover'}, {'1': 'score', '3': 11, '4': 1, '5': 5, '10': 'score'}, @@ -115,8 +103,8 @@ const SetDataRequest$json = { final $typed_data.Uint8List setDataRequestDescriptor = $convert.base64Decode( 'Cg5TZXREYXRhUmVxdWVzdBIaCghuaWNrbmFtZRgBIAEoCVIIbmlja25hbWUSFgoGYXZhdGFyGA' 'IgASgJUgZhdmF0YXISGgoIYmlydGhkYXkYAyABKAlSCGJpcnRoZGF5EhAKA3NleBgEIAEoBVID' - 'c2V4EhgKB2NvdW50cnkYBSABKAVSB2NvdW50cnkSGgoIcHJvdmluY2UYBiABKAVSCHByb3Zpbm' - 'NlEhIKBGNpdHkYByABKAVSBGNpdHkSEgoEYXJlYRgIIAEoBVIEYXJlYRISCgRzaWduGAkgASgJ' + 'c2V4EhgKB2NvdW50cnkYBSABKAlSB2NvdW50cnkSGgoIcHJvdmluY2UYBiABKAlSCHByb3Zpbm' + 'NlEhIKBGNpdHkYByABKAlSBGNpdHkSEgoEYXJlYRgIIAEoCVIEYXJlYRISCgRzaWduGAkgASgJ' 'UgRzaWduEhQKBWNvdmVyGAogASgJUgVjb3ZlchIUCgVzY29yZRgLIAEoBVIFc2NvcmUSFAoFbG' 'V2ZWwYDCABKAVSBWxldmVs'); diff --git a/dart/passport/blocks.pb.dart b/dart/passport/blocks.pb.dart index 163b4db..1f85be7 100644 --- a/dart/passport/blocks.pb.dart +++ b/dart/passport/blocks.pb.dart @@ -368,15 +368,17 @@ class StatusReply extends $pb.GeneratedMessage { class VerifyStatus extends $pb.GeneratedMessage { factory VerifyStatus({ - $core.bool? emailVerify, - $core.bool? phoneVerify, - $core.bool? photoVerify, - $core.bool? kycVerify, + $core.int? emailVerify, + $core.int? phoneVerify, + $core.int? faceVerify, + $core.int? documentVerify, + $core.int? kycVerify, }) { final result = create(); if (emailVerify != null) result.emailVerify = emailVerify; if (phoneVerify != null) result.phoneVerify = phoneVerify; - if (photoVerify != null) result.photoVerify = photoVerify; + if (faceVerify != null) result.faceVerify = faceVerify; + if (documentVerify != null) result.documentVerify = documentVerify; if (kycVerify != null) result.kycVerify = kycVerify; return result; } @@ -394,10 +396,12 @@ class VerifyStatus extends $pb.GeneratedMessage { _omitMessageNames ? '' : 'VerifyStatus', package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), createEmptyInstance: create) - ..aOB(1, _omitFieldNames ? '' : 'emailVerify') - ..aOB(2, _omitFieldNames ? '' : 'phoneVerify') - ..aOB(3, _omitFieldNames ? '' : 'photoVerify') - ..aOB(4, _omitFieldNames ? '' : 'kycVerify') + ..a<$core.int>(1, _omitFieldNames ? '' : 'emailVerify', $pb.PbFieldType.O3) + ..a<$core.int>(2, _omitFieldNames ? '' : 'phoneVerify', $pb.PbFieldType.O3) + ..a<$core.int>(3, _omitFieldNames ? '' : 'faceVerify', $pb.PbFieldType.O3) + ..a<$core.int>( + 4, _omitFieldNames ? '' : 'documentVerify', $pb.PbFieldType.O3) + ..a<$core.int>(5, _omitFieldNames ? '' : 'kycVerify', $pb.PbFieldType.O3) ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -422,40 +426,49 @@ class VerifyStatus extends $pb.GeneratedMessage { static VerifyStatus? _defaultInstance; @$pb.TagNumber(1) - $core.bool get emailVerify => $_getBF(0); + $core.int get emailVerify => $_getIZ(0); @$pb.TagNumber(1) - set emailVerify($core.bool value) => $_setBool(0, value); + set emailVerify($core.int value) => $_setSignedInt32(0, value); @$pb.TagNumber(1) $core.bool hasEmailVerify() => $_has(0); @$pb.TagNumber(1) void clearEmailVerify() => $_clearField(1); @$pb.TagNumber(2) - $core.bool get phoneVerify => $_getBF(1); + $core.int get phoneVerify => $_getIZ(1); @$pb.TagNumber(2) - set phoneVerify($core.bool value) => $_setBool(1, value); + set phoneVerify($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasPhoneVerify() => $_has(1); @$pb.TagNumber(2) void clearPhoneVerify() => $_clearField(2); @$pb.TagNumber(3) - $core.bool get photoVerify => $_getBF(2); + $core.int get faceVerify => $_getIZ(2); @$pb.TagNumber(3) - set photoVerify($core.bool value) => $_setBool(2, value); + set faceVerify($core.int value) => $_setSignedInt32(2, value); @$pb.TagNumber(3) - $core.bool hasPhotoVerify() => $_has(2); + $core.bool hasFaceVerify() => $_has(2); @$pb.TagNumber(3) - void clearPhotoVerify() => $_clearField(3); + void clearFaceVerify() => $_clearField(3); @$pb.TagNumber(4) - $core.bool get kycVerify => $_getBF(3); + $core.int get documentVerify => $_getIZ(3); @$pb.TagNumber(4) - set kycVerify($core.bool value) => $_setBool(3, value); + set documentVerify($core.int value) => $_setSignedInt32(3, value); @$pb.TagNumber(4) - $core.bool hasKycVerify() => $_has(3); + $core.bool hasDocumentVerify() => $_has(3); @$pb.TagNumber(4) - void clearKycVerify() => $_clearField(4); + void clearDocumentVerify() => $_clearField(4); + + @$pb.TagNumber(5) + $core.int get kycVerify => $_getIZ(4); + @$pb.TagNumber(5) + set kycVerify($core.int value) => $_setSignedInt32(4, value); + @$pb.TagNumber(5) + $core.bool hasKycVerify() => $_has(4); + @$pb.TagNumber(5) + void clearKycVerify() => $_clearField(5); } class Empty extends $pb.GeneratedMessage { diff --git a/dart/passport/blocks.pbjson.dart b/dart/passport/blocks.pbjson.dart index 042718b..523fb12 100644 --- a/dart/passport/blocks.pbjson.dart +++ b/dart/passport/blocks.pbjson.dart @@ -107,18 +107,20 @@ final $typed_data.Uint8List statusReplyDescriptor = $convert.base64Decode( const VerifyStatus$json = { '1': 'VerifyStatus', '2': [ - {'1': 'email_verify', '3': 1, '4': 1, '5': 8, '10': 'emailVerify'}, - {'1': 'phone_verify', '3': 2, '4': 1, '5': 8, '10': 'phoneVerify'}, - {'1': 'photo_verify', '3': 3, '4': 1, '5': 8, '10': 'photoVerify'}, - {'1': 'kyc_verify', '3': 4, '4': 1, '5': 8, '10': 'kycVerify'}, + {'1': 'email_verify', '3': 1, '4': 1, '5': 5, '10': 'emailVerify'}, + {'1': 'phone_verify', '3': 2, '4': 1, '5': 5, '10': 'phoneVerify'}, + {'1': 'face_verify', '3': 3, '4': 1, '5': 5, '10': 'faceVerify'}, + {'1': 'document_verify', '3': 4, '4': 1, '5': 5, '10': 'documentVerify'}, + {'1': 'kyc_verify', '3': 5, '4': 1, '5': 5, '10': 'kycVerify'}, ], }; /// Descriptor for `VerifyStatus`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List verifyStatusDescriptor = $convert.base64Decode( - 'CgxWZXJpZnlTdGF0dXMSIQoMZW1haWxfdmVyaWZ5GAEgASgIUgtlbWFpbFZlcmlmeRIhCgxwaG' - '9uZV92ZXJpZnkYAiABKAhSC3Bob25lVmVyaWZ5EiEKDHBob3RvX3ZlcmlmeRgDIAEoCFILcGhv' - 'dG9WZXJpZnkSHQoKa3ljX3ZlcmlmeRgEIAEoCFIJa3ljVmVyaWZ5'); + 'CgxWZXJpZnlTdGF0dXMSIQoMZW1haWxfdmVyaWZ5GAEgASgFUgtlbWFpbFZlcmlmeRIhCgxwaG' + '9uZV92ZXJpZnkYAiABKAVSC3Bob25lVmVyaWZ5Eh8KC2ZhY2VfdmVyaWZ5GAMgASgFUgpmYWNl' + 'VmVyaWZ5EicKD2RvY3VtZW50X3ZlcmlmeRgEIAEoBVIOZG9jdW1lbnRWZXJpZnkSHQoKa3ljX3' + 'ZlcmlmeRgFIAEoBVIJa3ljVmVyaWZ5'); @$core.Deprecated('Use emptyDescriptor instead') const Empty$json = { diff --git a/dart/passport/forget.pb.dart b/dart/passport/forget.pb.dart index 47b0dda..822c8a3 100644 --- a/dart/passport/forget.pb.dart +++ b/dart/passport/forget.pb.dart @@ -16,8 +16,8 @@ import 'package:protobuf/protobuf.dart' as $pb; export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; -class VerifyRequest extends $pb.GeneratedMessage { - factory VerifyRequest({ +class ForgetVerifyRequest extends $pb.GeneratedMessage { + factory ForgetVerifyRequest({ $core.String? phone, $core.String? code, }) { @@ -27,17 +27,17 @@ class VerifyRequest extends $pb.GeneratedMessage { return result; } - VerifyRequest._(); + ForgetVerifyRequest._(); - factory VerifyRequest.fromBuffer($core.List<$core.int> data, + factory ForgetVerifyRequest.fromBuffer($core.List<$core.int> data, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(data, registry); - factory VerifyRequest.fromJson($core.String json, + factory ForgetVerifyRequest.fromJson($core.String json, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'VerifyRequest', + _omitMessageNames ? '' : 'ForgetVerifyRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'phone') @@ -45,25 +45,25 @@ class VerifyRequest extends $pb.GeneratedMessage { ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - VerifyRequest clone() => VerifyRequest()..mergeFromMessage(this); + ForgetVerifyRequest clone() => ForgetVerifyRequest()..mergeFromMessage(this); @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - VerifyRequest copyWith(void Function(VerifyRequest) updates) => - super.copyWith((message) => updates(message as VerifyRequest)) - as VerifyRequest; + ForgetVerifyRequest copyWith(void Function(ForgetVerifyRequest) updates) => + super.copyWith((message) => updates(message as ForgetVerifyRequest)) + as ForgetVerifyRequest; @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static VerifyRequest create() => VerifyRequest._(); + static ForgetVerifyRequest create() => ForgetVerifyRequest._(); @$core.override - VerifyRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + ForgetVerifyRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static VerifyRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static VerifyRequest? _defaultInstance; + static ForgetVerifyRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ForgetVerifyRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get phone => $_getSZ(0); @@ -152,95 +152,6 @@ class ForgetResetRequest extends $pb.GeneratedMessage { void clearPassword() => $_clearField(2); } -class ForgetReply extends $pb.GeneratedMessage { - factory ForgetReply({ - $core.String? identity, - $core.String? dataBind, - $core.String? token, - $core.Iterable<$core.MapEntry<$core.String, $core.String>>? extend, - }) { - final result = create(); - if (identity != null) result.identity = identity; - if (dataBind != null) result.dataBind = dataBind; - if (token != null) result.token = token; - if (extend != null) result.extend.addEntries(extend); - return result; - } - - ForgetReply._(); - - factory ForgetReply.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ForgetReply.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ForgetReply', - package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'identity') - ..aOS(2, _omitFieldNames ? '' : 'dataBind') - ..aOS(3, _omitFieldNames ? '' : 'token') - ..m<$core.String, $core.String>(4, _omitFieldNames ? '' : 'extend', - entryClassName: 'ForgetReply.ExtendEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OS, - packageName: const $pb.PackageName('passport')) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ForgetReply clone() => ForgetReply()..mergeFromMessage(this); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ForgetReply copyWith(void Function(ForgetReply) updates) => - super.copyWith((message) => updates(message as ForgetReply)) - as ForgetReply; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ForgetReply create() => ForgetReply._(); - @$core.override - ForgetReply createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static ForgetReply getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ForgetReply? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get identity => $_getSZ(0); - @$pb.TagNumber(1) - set identity($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasIdentity() => $_has(0); - @$pb.TagNumber(1) - void clearIdentity() => $_clearField(1); - - @$pb.TagNumber(2) - $core.String get dataBind => $_getSZ(1); - @$pb.TagNumber(2) - set dataBind($core.String value) => $_setString(1, value); - @$pb.TagNumber(2) - $core.bool hasDataBind() => $_has(1); - @$pb.TagNumber(2) - void clearDataBind() => $_clearField(2); - - @$pb.TagNumber(3) - $core.String get token => $_getSZ(2); - @$pb.TagNumber(3) - set token($core.String value) => $_setString(2, value); - @$pb.TagNumber(3) - $core.bool hasToken() => $_has(2); - @$pb.TagNumber(3) - void clearToken() => $_clearField(3); - - @$pb.TagNumber(4) - $pb.PbMap<$core.String, $core.String> get extend => $_getMap(3); -} - const $core.bool _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const $core.bool _omitMessageNames = diff --git a/dart/passport/forget.pbgrpc.dart b/dart/passport/forget.pbgrpc.dart index dd9dcb1..b212530 100644 --- a/dart/passport/forget.pbgrpc.dart +++ b/dart/passport/forget.pbgrpc.dart @@ -36,14 +36,14 @@ class ForgetClient extends $grpc.Client { /// 验证手机号和验证码 $grpc.ResponseFuture<$1.StatusReply> verify( - $0.VerifyRequest request, { + $0.ForgetVerifyRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$verify, request, options: options); } /// 重罢密码 - $grpc.ResponseFuture<$0.ForgetReply> reset( + $grpc.ResponseFuture<$1.StatusReply> reset( $0.ForgetResetRequest request, { $grpc.CallOptions? options, }) { @@ -52,15 +52,16 @@ class ForgetClient extends $grpc.Client { // method descriptors - static final _$verify = $grpc.ClientMethod<$0.VerifyRequest, $1.StatusReply>( - '/passport.Forget/Verify', - ($0.VerifyRequest value) => value.writeToBuffer(), - $1.StatusReply.fromBuffer); + static final _$verify = + $grpc.ClientMethod<$0.ForgetVerifyRequest, $1.StatusReply>( + '/passport.Forget/Verify', + ($0.ForgetVerifyRequest value) => value.writeToBuffer(), + $1.StatusReply.fromBuffer); static final _$reset = - $grpc.ClientMethod<$0.ForgetResetRequest, $0.ForgetReply>( + $grpc.ClientMethod<$0.ForgetResetRequest, $1.StatusReply>( '/passport.Forget/Reset', ($0.ForgetResetRequest value) => value.writeToBuffer(), - $0.ForgetReply.fromBuffer); + $1.StatusReply.fromBuffer); } @$pb.GrpcServiceName('passport.Forget') @@ -68,36 +69,37 @@ abstract class ForgetServiceBase extends $grpc.Service { $core.String get $name => 'passport.Forget'; ForgetServiceBase() { - $addMethod($grpc.ServiceMethod<$0.VerifyRequest, $1.StatusReply>( + $addMethod($grpc.ServiceMethod<$0.ForgetVerifyRequest, $1.StatusReply>( 'Verify', verify_Pre, false, false, - ($core.List<$core.int> value) => $0.VerifyRequest.fromBuffer(value), + ($core.List<$core.int> value) => + $0.ForgetVerifyRequest.fromBuffer(value), ($1.StatusReply value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$0.ForgetResetRequest, $0.ForgetReply>( + $addMethod($grpc.ServiceMethod<$0.ForgetResetRequest, $1.StatusReply>( 'Reset', reset_Pre, false, false, ($core.List<$core.int> value) => $0.ForgetResetRequest.fromBuffer(value), - ($0.ForgetReply value) => value.writeToBuffer())); + ($1.StatusReply value) => value.writeToBuffer())); } - $async.Future<$1.StatusReply> verify_Pre( - $grpc.ServiceCall $call, $async.Future<$0.VerifyRequest> $request) async { + $async.Future<$1.StatusReply> verify_Pre($grpc.ServiceCall $call, + $async.Future<$0.ForgetVerifyRequest> $request) async { return verify($call, await $request); } $async.Future<$1.StatusReply> verify( - $grpc.ServiceCall call, $0.VerifyRequest request); + $grpc.ServiceCall call, $0.ForgetVerifyRequest request); - $async.Future<$0.ForgetReply> reset_Pre($grpc.ServiceCall $call, + $async.Future<$1.StatusReply> reset_Pre($grpc.ServiceCall $call, $async.Future<$0.ForgetResetRequest> $request) async { return reset($call, await $request); } - $async.Future<$0.ForgetReply> reset( + $async.Future<$1.StatusReply> reset( $grpc.ServiceCall call, $0.ForgetResetRequest request); } diff --git a/dart/passport/forget.pbjson.dart b/dart/passport/forget.pbjson.dart index ebede4e..006bbc7 100644 --- a/dart/passport/forget.pbjson.dart +++ b/dart/passport/forget.pbjson.dart @@ -14,19 +14,19 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use verifyRequestDescriptor instead') -const VerifyRequest$json = { - '1': 'VerifyRequest', +@$core.Deprecated('Use forgetVerifyRequestDescriptor instead') +const ForgetVerifyRequest$json = { + '1': 'ForgetVerifyRequest', '2': [ {'1': 'phone', '3': 1, '4': 1, '5': 9, '10': 'phone'}, {'1': 'code', '3': 2, '4': 1, '5': 9, '10': 'code'}, ], }; -/// Descriptor for `VerifyRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List verifyRequestDescriptor = $convert.base64Decode( - 'Cg1WZXJpZnlSZXF1ZXN0EhQKBXBob25lGAEgASgJUgVwaG9uZRISCgRjb2RlGAIgASgJUgRjb2' - 'Rl'); +/// Descriptor for `ForgetVerifyRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List forgetVerifyRequestDescriptor = $convert.base64Decode( + 'ChNGb3JnZXRWZXJpZnlSZXF1ZXN0EhQKBXBob25lGAEgASgJUgVwaG9uZRISCgRjb2RlGAIgAS' + 'gJUgRjb2Rl'); @$core.Deprecated('Use forgetResetRequestDescriptor instead') const ForgetResetRequest$json = { @@ -41,39 +41,3 @@ const ForgetResetRequest$json = { final $typed_data.Uint8List forgetResetRequestDescriptor = $convert.base64Decode( 'ChJGb3JnZXRSZXNldFJlcXVlc3QSGgoIaWRlbnRpdHkYASABKAlSCGlkZW50aXR5EhoKCHBhc3' 'N3b3JkGAIgASgJUghwYXNzd29yZA=='); - -@$core.Deprecated('Use forgetReplyDescriptor instead') -const ForgetReply$json = { - '1': 'ForgetReply', - '2': [ - {'1': 'identity', '3': 1, '4': 1, '5': 9, '10': 'identity'}, - {'1': 'data_bind', '3': 2, '4': 1, '5': 9, '10': 'dataBind'}, - {'1': 'token', '3': 3, '4': 1, '5': 9, '10': 'token'}, - { - '1': 'extend', - '3': 4, - '4': 3, - '5': 11, - '6': '.passport.ForgetReply.ExtendEntry', - '10': 'extend' - }, - ], - '3': [ForgetReply_ExtendEntry$json], -}; - -@$core.Deprecated('Use forgetReplyDescriptor instead') -const ForgetReply_ExtendEntry$json = { - '1': 'ExtendEntry', - '2': [ - {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, - ], - '7': {'7': true}, -}; - -/// Descriptor for `ForgetReply`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List forgetReplyDescriptor = $convert.base64Decode( - 'CgtGb3JnZXRSZXBseRIaCghpZGVudGl0eRgBIAEoCVIIaWRlbnRpdHkSGwoJZGF0YV9iaW5kGA' - 'IgASgJUghkYXRhQmluZBIUCgV0b2tlbhgDIAEoCVIFdG9rZW4SOQoGZXh0ZW5kGAQgAygLMiEu' - 'cGFzc3BvcnQuRm9yZ2V0UmVwbHkuRXh0ZW5kRW50cnlSBmV4dGVuZBo5CgtFeHRlbmRFbnRyeR' - 'IQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgCIAEoCVIFdmFsdWU6AjgB'); diff --git a/dart/passport/login.pb.dart b/dart/passport/login.pb.dart index b55cdb3..5f1d788 100644 --- a/dart/passport/login.pb.dart +++ b/dart/passport/login.pb.dart @@ -92,11 +92,19 @@ class LoginByCodeRequest extends $pb.GeneratedMessage { $core.String? country, $core.String? phone, $core.String? code, + $fixnum.Int64? agencyId, + $fixnum.Int64? staffId, + $fixnum.Int64? ownerId, + $core.String? ownerIdentity, }) { final result = create(); if (country != null) result.country = country; if (phone != null) result.phone = phone; if (code != null) result.code = code; + if (agencyId != null) result.agencyId = agencyId; + if (staffId != null) result.staffId = staffId; + if (ownerId != null) result.ownerId = ownerId; + if (ownerIdentity != null) result.ownerIdentity = ownerIdentity; return result; } @@ -116,6 +124,10 @@ class LoginByCodeRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'country') ..aOS(2, _omitFieldNames ? '' : 'phone') ..aOS(3, _omitFieldNames ? '' : 'code') + ..aInt64(4, _omitFieldNames ? '' : 'agencyId') + ..aInt64(5, _omitFieldNames ? '' : 'staffId') + ..aInt64(6, _omitFieldNames ? '' : 'owner_id') + ..aOS(7, _omitFieldNames ? '' : 'owner_identity') ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -165,6 +177,42 @@ class LoginByCodeRequest extends $pb.GeneratedMessage { $core.bool hasCode() => $_has(2); @$pb.TagNumber(3) void clearCode() => $_clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get agencyId => $_getI64(3); + @$pb.TagNumber(4) + set agencyId($fixnum.Int64 value) => $_setInt64(3, value); + @$pb.TagNumber(4) + $core.bool hasAgencyId() => $_has(3); + @$pb.TagNumber(4) + void clearAgencyId() => $_clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get staffId => $_getI64(4); + @$pb.TagNumber(5) + set staffId($fixnum.Int64 value) => $_setInt64(4, value); + @$pb.TagNumber(5) + $core.bool hasStaffId() => $_has(4); + @$pb.TagNumber(5) + void clearStaffId() => $_clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get ownerId => $_getI64(5); + @$pb.TagNumber(6) + set ownerId($fixnum.Int64 value) => $_setInt64(5, value); + @$pb.TagNumber(6) + $core.bool hasOwnerId() => $_has(5); + @$pb.TagNumber(6) + void clearOwnerId() => $_clearField(6); + + @$pb.TagNumber(7) + $core.String get ownerIdentity => $_getSZ(6); + @$pb.TagNumber(7) + set ownerIdentity($core.String value) => $_setString(6, value); + @$pb.TagNumber(7) + $core.bool hasOwnerIdentity() => $_has(6); + @$pb.TagNumber(7) + void clearOwnerIdentity() => $_clearField(7); } class LoginReply extends $pb.GeneratedMessage { diff --git a/dart/passport/login.pbjson.dart b/dart/passport/login.pbjson.dart index e137ab5..cd9a577 100644 --- a/dart/passport/login.pbjson.dart +++ b/dart/passport/login.pbjson.dart @@ -35,13 +35,19 @@ const LoginByCodeRequest$json = { {'1': 'country', '3': 1, '4': 1, '5': 9, '10': 'country'}, {'1': 'phone', '3': 2, '4': 1, '5': 9, '10': 'phone'}, {'1': 'code', '3': 3, '4': 1, '5': 9, '10': 'code'}, + {'1': 'agency_id', '3': 4, '4': 1, '5': 3, '10': 'agencyId'}, + {'1': 'staff_id', '3': 5, '4': 1, '5': 3, '10': 'staffId'}, + {'1': 'owner_id', '3': 6, '4': 1, '5': 3, '10': 'owner_id'}, + {'1': 'owner_identity', '3': 7, '4': 1, '5': 9, '10': 'owner_identity'}, ], }; /// Descriptor for `LoginByCodeRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List loginByCodeRequestDescriptor = $convert.base64Decode( 'ChJMb2dpbkJ5Q29kZVJlcXVlc3QSGAoHY291bnRyeRgBIAEoCVIHY291bnRyeRIUCgVwaG9uZR' - 'gCIAEoCVIFcGhvbmUSEgoEY29kZRgDIAEoCVIEY29kZQ=='); + 'gCIAEoCVIFcGhvbmUSEgoEY29kZRgDIAEoCVIEY29kZRIbCglhZ2VuY3lfaWQYBCABKANSCGFn' + 'ZW5jeUlkEhkKCHN0YWZmX2lkGAUgASgDUgdzdGFmZklkEhoKCG93bmVyX2lkGAYgASgDUghvd2' + '5lcl9pZBImCg5vd25lcl9pZGVudGl0eRgHIAEoCVIOb3duZXJfaWRlbnRpdHk='); @$core.Deprecated('Use loginReplyDescriptor instead') const LoginReply$json = { diff --git a/dart/passport/register.pb.dart b/dart/passport/register.pb.dart index 54f859d..26565d3 100644 --- a/dart/passport/register.pb.dart +++ b/dart/passport/register.pb.dart @@ -21,6 +21,7 @@ export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; class RegisterRequest extends $pb.GeneratedMessage { factory RegisterRequest({ + $core.String? country, $core.String? email, $core.String? account, $core.String? phone, @@ -32,6 +33,7 @@ class RegisterRequest extends $pb.GeneratedMessage { $core.String? ownerIdentity, }) { final result = create(); + if (country != null) result.country = country; if (email != null) result.email = email; if (account != null) result.account = account; if (phone != null) result.phone = phone; @@ -57,15 +59,16 @@ class RegisterRequest extends $pb.GeneratedMessage { _omitMessageNames ? '' : 'RegisterRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'email') - ..aOS(2, _omitFieldNames ? '' : 'account') - ..aOS(3, _omitFieldNames ? '' : 'phone') - ..aOS(4, _omitFieldNames ? '' : 'password') - ..aOS(5, _omitFieldNames ? '' : 'code') - ..aInt64(6, _omitFieldNames ? '' : 'agencyId') - ..aInt64(7, _omitFieldNames ? '' : 'staffId') - ..aInt64(8, _omitFieldNames ? '' : 'owner_id') - ..aOS(9, _omitFieldNames ? '' : 'owner_identity') + ..aOS(1, _omitFieldNames ? '' : 'country') + ..aOS(2, _omitFieldNames ? '' : 'email') + ..aOS(3, _omitFieldNames ? '' : 'account') + ..aOS(4, _omitFieldNames ? '' : 'phone') + ..aOS(5, _omitFieldNames ? '' : 'password') + ..aOS(6, _omitFieldNames ? '' : 'code') + ..aInt64(7, _omitFieldNames ? '' : 'agencyId') + ..aInt64(8, _omitFieldNames ? '' : 'staffId') + ..aInt64(9, _omitFieldNames ? '' : 'owner_id') + ..aOS(10, _omitFieldNames ? '' : 'owner_identity') ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -90,85 +93,94 @@ class RegisterRequest extends $pb.GeneratedMessage { static RegisterRequest? _defaultInstance; @$pb.TagNumber(1) - $core.String get email => $_getSZ(0); + $core.String get country => $_getSZ(0); @$pb.TagNumber(1) - set email($core.String value) => $_setString(0, value); + set country($core.String value) => $_setString(0, value); @$pb.TagNumber(1) - $core.bool hasEmail() => $_has(0); + $core.bool hasCountry() => $_has(0); @$pb.TagNumber(1) - void clearEmail() => $_clearField(1); + void clearCountry() => $_clearField(1); @$pb.TagNumber(2) - $core.String get account => $_getSZ(1); + $core.String get email => $_getSZ(1); @$pb.TagNumber(2) - set account($core.String value) => $_setString(1, value); + set email($core.String value) => $_setString(1, value); @$pb.TagNumber(2) - $core.bool hasAccount() => $_has(1); + $core.bool hasEmail() => $_has(1); @$pb.TagNumber(2) - void clearAccount() => $_clearField(2); + void clearEmail() => $_clearField(2); @$pb.TagNumber(3) - $core.String get phone => $_getSZ(2); + $core.String get account => $_getSZ(2); @$pb.TagNumber(3) - set phone($core.String value) => $_setString(2, value); + set account($core.String value) => $_setString(2, value); @$pb.TagNumber(3) - $core.bool hasPhone() => $_has(2); + $core.bool hasAccount() => $_has(2); @$pb.TagNumber(3) - void clearPhone() => $_clearField(3); + void clearAccount() => $_clearField(3); @$pb.TagNumber(4) - $core.String get password => $_getSZ(3); + $core.String get phone => $_getSZ(3); @$pb.TagNumber(4) - set password($core.String value) => $_setString(3, value); + set phone($core.String value) => $_setString(3, value); @$pb.TagNumber(4) - $core.bool hasPassword() => $_has(3); + $core.bool hasPhone() => $_has(3); @$pb.TagNumber(4) - void clearPassword() => $_clearField(4); + void clearPhone() => $_clearField(4); @$pb.TagNumber(5) - $core.String get code => $_getSZ(4); + $core.String get password => $_getSZ(4); @$pb.TagNumber(5) - set code($core.String value) => $_setString(4, value); + set password($core.String value) => $_setString(4, value); @$pb.TagNumber(5) - $core.bool hasCode() => $_has(4); + $core.bool hasPassword() => $_has(4); @$pb.TagNumber(5) - void clearCode() => $_clearField(5); + void clearPassword() => $_clearField(5); @$pb.TagNumber(6) - $fixnum.Int64 get agencyId => $_getI64(5); + $core.String get code => $_getSZ(5); @$pb.TagNumber(6) - set agencyId($fixnum.Int64 value) => $_setInt64(5, value); + set code($core.String value) => $_setString(5, value); @$pb.TagNumber(6) - $core.bool hasAgencyId() => $_has(5); + $core.bool hasCode() => $_has(5); @$pb.TagNumber(6) - void clearAgencyId() => $_clearField(6); + void clearCode() => $_clearField(6); @$pb.TagNumber(7) - $fixnum.Int64 get staffId => $_getI64(6); + $fixnum.Int64 get agencyId => $_getI64(6); @$pb.TagNumber(7) - set staffId($fixnum.Int64 value) => $_setInt64(6, value); + set agencyId($fixnum.Int64 value) => $_setInt64(6, value); @$pb.TagNumber(7) - $core.bool hasStaffId() => $_has(6); + $core.bool hasAgencyId() => $_has(6); @$pb.TagNumber(7) - void clearStaffId() => $_clearField(7); + void clearAgencyId() => $_clearField(7); @$pb.TagNumber(8) - $fixnum.Int64 get ownerId => $_getI64(7); + $fixnum.Int64 get staffId => $_getI64(7); @$pb.TagNumber(8) - set ownerId($fixnum.Int64 value) => $_setInt64(7, value); + set staffId($fixnum.Int64 value) => $_setInt64(7, value); @$pb.TagNumber(8) - $core.bool hasOwnerId() => $_has(7); + $core.bool hasStaffId() => $_has(7); @$pb.TagNumber(8) - void clearOwnerId() => $_clearField(8); + void clearStaffId() => $_clearField(8); @$pb.TagNumber(9) - $core.String get ownerIdentity => $_getSZ(8); + $fixnum.Int64 get ownerId => $_getI64(8); @$pb.TagNumber(9) - set ownerIdentity($core.String value) => $_setString(8, value); + set ownerId($fixnum.Int64 value) => $_setInt64(8, value); @$pb.TagNumber(9) - $core.bool hasOwnerIdentity() => $_has(8); + $core.bool hasOwnerId() => $_has(8); @$pb.TagNumber(9) - void clearOwnerIdentity() => $_clearField(9); + void clearOwnerId() => $_clearField(9); + + @$pb.TagNumber(10) + $core.String get ownerIdentity => $_getSZ(9); + @$pb.TagNumber(10) + set ownerIdentity($core.String value) => $_setString(9, value); + @$pb.TagNumber(10) + $core.bool hasOwnerIdentity() => $_has(9); + @$pb.TagNumber(10) + void clearOwnerIdentity() => $_clearField(10); } class RegisterReply extends $pb.GeneratedMessage { diff --git a/dart/passport/register.pbjson.dart b/dart/passport/register.pbjson.dart index 68966d8..083f5a9 100644 --- a/dart/passport/register.pbjson.dart +++ b/dart/passport/register.pbjson.dart @@ -18,25 +18,27 @@ import 'dart:typed_data' as $typed_data; const RegisterRequest$json = { '1': 'RegisterRequest', '2': [ - {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'}, - {'1': 'account', '3': 2, '4': 1, '5': 9, '10': 'account'}, - {'1': 'phone', '3': 3, '4': 1, '5': 9, '10': 'phone'}, - {'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'}, - {'1': 'code', '3': 5, '4': 1, '5': 9, '10': 'code'}, - {'1': 'agency_id', '3': 6, '4': 1, '5': 3, '10': 'agencyId'}, - {'1': 'staff_id', '3': 7, '4': 1, '5': 3, '10': 'staffId'}, - {'1': 'owner_id', '3': 8, '4': 1, '5': 3, '10': 'owner_id'}, - {'1': 'owner_identity', '3': 9, '4': 1, '5': 9, '10': 'owner_identity'}, + {'1': 'country', '3': 1, '4': 1, '5': 9, '10': 'country'}, + {'1': 'email', '3': 2, '4': 1, '5': 9, '10': 'email'}, + {'1': 'account', '3': 3, '4': 1, '5': 9, '10': 'account'}, + {'1': 'phone', '3': 4, '4': 1, '5': 9, '10': 'phone'}, + {'1': 'password', '3': 5, '4': 1, '5': 9, '10': 'password'}, + {'1': 'code', '3': 6, '4': 1, '5': 9, '10': 'code'}, + {'1': 'agency_id', '3': 7, '4': 1, '5': 3, '10': 'agencyId'}, + {'1': 'staff_id', '3': 8, '4': 1, '5': 3, '10': 'staffId'}, + {'1': 'owner_id', '3': 9, '4': 1, '5': 3, '10': 'owner_id'}, + {'1': 'owner_identity', '3': 10, '4': 1, '5': 9, '10': 'owner_identity'}, ], }; /// Descriptor for `RegisterRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List registerRequestDescriptor = $convert.base64Decode( - 'Cg9SZWdpc3RlclJlcXVlc3QSFAoFZW1haWwYASABKAlSBWVtYWlsEhgKB2FjY291bnQYAiABKA' - 'lSB2FjY291bnQSFAoFcGhvbmUYAyABKAlSBXBob25lEhoKCHBhc3N3b3JkGAQgASgJUghwYXNz' - 'd29yZBISCgRjb2RlGAUgASgJUgRjb2RlEhsKCWFnZW5jeV9pZBgGIAEoA1IIYWdlbmN5SWQSGQ' - 'oIc3RhZmZfaWQYByABKANSB3N0YWZmSWQSGgoIb3duZXJfaWQYCCABKANSCG93bmVyX2lkEiYK' - 'Dm93bmVyX2lkZW50aXR5GAkgASgJUg5vd25lcl9pZGVudGl0eQ=='); + 'Cg9SZWdpc3RlclJlcXVlc3QSGAoHY291bnRyeRgBIAEoCVIHY291bnRyeRIUCgVlbWFpbBgCIA' + 'EoCVIFZW1haWwSGAoHYWNjb3VudBgDIAEoCVIHYWNjb3VudBIUCgVwaG9uZRgEIAEoCVIFcGhv' + 'bmUSGgoIcGFzc3dvcmQYBSABKAlSCHBhc3N3b3JkEhIKBGNvZGUYBiABKAlSBGNvZGUSGwoJYW' + 'dlbmN5X2lkGAcgASgDUghhZ2VuY3lJZBIZCghzdGFmZl9pZBgIIAEoA1IHc3RhZmZJZBIaCghv' + 'd25lcl9pZBgJIAEoA1IIb3duZXJfaWQSJgoOb3duZXJfaWRlbnRpdHkYCiABKAlSDm93bmVyX2' + 'lkZW50aXR5'); @$core.Deprecated('Use registerReplyDescriptor instead') const RegisterReply$json = { diff --git a/dart/passport/verify.pb.dart b/dart/passport/verify.pb.dart new file mode 100644 index 0000000..a16d777 --- /dev/null +++ b/dart/passport/verify.pb.dart @@ -0,0 +1,562 @@ +// This is a generated file - do not edit. +// +// Generated from verify.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +class VerifyRequest extends $pb.GeneratedMessage { + factory VerifyRequest({ + $core.String? provider, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? args, + }) { + final result = create(); + if (provider != null) result.provider = provider; + if (args != null) result.args.addEntries(args); + return result; + } + + VerifyRequest._(); + + factory VerifyRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory VerifyRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'VerifyRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'provider') + ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'args', + entryClassName: 'VerifyRequest.ArgsEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OS, + packageName: const $pb.PackageName('passport')) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + VerifyRequest clone() => VerifyRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + VerifyRequest copyWith(void Function(VerifyRequest) updates) => + super.copyWith((message) => updates(message as VerifyRequest)) + as VerifyRequest; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static VerifyRequest create() => VerifyRequest._(); + @$core.override + VerifyRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => + $pb.PbList(); + @$core.pragma('dart2js:noInline') + static VerifyRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static VerifyRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get provider => $_getSZ(0); + @$pb.TagNumber(1) + set provider($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasProvider() => $_has(0); + @$pb.TagNumber(1) + void clearProvider() => $_clearField(1); + + @$pb.TagNumber(2) + $pb.PbMap<$core.String, $core.String> get args => $_getMap(1); +} + +class JumioCallbackPayload extends $pb.GeneratedMessage { + factory JumioCallbackPayload({ + $core.String? scanReference, + $core.String? customerInternalReference, + VerificationStatus? verificationStatus, + Document? document, + PersonalInformation? personalInformation, + FaceMap? faceMap, + $core.String? callbackDate, + $core.String? clientIp, + }) { + final result = create(); + if (scanReference != null) result.scanReference = scanReference; + if (customerInternalReference != null) + result.customerInternalReference = customerInternalReference; + if (verificationStatus != null) + result.verificationStatus = verificationStatus; + if (document != null) result.document = document; + if (personalInformation != null) + result.personalInformation = personalInformation; + if (faceMap != null) result.faceMap = faceMap; + if (callbackDate != null) result.callbackDate = callbackDate; + if (clientIp != null) result.clientIp = clientIp; + return result; + } + + JumioCallbackPayload._(); + + factory JumioCallbackPayload.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory JumioCallbackPayload.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'JumioCallbackPayload', + package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'scanReference') + ..aOS(2, _omitFieldNames ? '' : 'customerInternalReference') + ..aOM(3, _omitFieldNames ? '' : 'verificationStatus', + subBuilder: VerificationStatus.create) + ..aOM(4, _omitFieldNames ? '' : 'document', + subBuilder: Document.create) + ..aOM(5, _omitFieldNames ? '' : 'personalInformation', + subBuilder: PersonalInformation.create) + ..aOM(6, _omitFieldNames ? '' : 'faceMap', + subBuilder: FaceMap.create) + ..aOS(7, _omitFieldNames ? '' : 'callbackDate') + ..aOS(8, _omitFieldNames ? '' : 'clientIp') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + JumioCallbackPayload clone() => + JumioCallbackPayload()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + JumioCallbackPayload copyWith(void Function(JumioCallbackPayload) updates) => + super.copyWith((message) => updates(message as JumioCallbackPayload)) + as JumioCallbackPayload; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static JumioCallbackPayload create() => JumioCallbackPayload._(); + @$core.override + JumioCallbackPayload createEmptyInstance() => create(); + static $pb.PbList createRepeated() => + $pb.PbList(); + @$core.pragma('dart2js:noInline') + static JumioCallbackPayload getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static JumioCallbackPayload? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get scanReference => $_getSZ(0); + @$pb.TagNumber(1) + set scanReference($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasScanReference() => $_has(0); + @$pb.TagNumber(1) + void clearScanReference() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get customerInternalReference => $_getSZ(1); + @$pb.TagNumber(2) + set customerInternalReference($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasCustomerInternalReference() => $_has(1); + @$pb.TagNumber(2) + void clearCustomerInternalReference() => $_clearField(2); + + @$pb.TagNumber(3) + VerificationStatus get verificationStatus => $_getN(2); + @$pb.TagNumber(3) + set verificationStatus(VerificationStatus value) => $_setField(3, value); + @$pb.TagNumber(3) + $core.bool hasVerificationStatus() => $_has(2); + @$pb.TagNumber(3) + void clearVerificationStatus() => $_clearField(3); + @$pb.TagNumber(3) + VerificationStatus ensureVerificationStatus() => $_ensure(2); + + @$pb.TagNumber(4) + Document get document => $_getN(3); + @$pb.TagNumber(4) + set document(Document value) => $_setField(4, value); + @$pb.TagNumber(4) + $core.bool hasDocument() => $_has(3); + @$pb.TagNumber(4) + void clearDocument() => $_clearField(4); + @$pb.TagNumber(4) + Document ensureDocument() => $_ensure(3); + + /// 其他可选字段 + @$pb.TagNumber(5) + PersonalInformation get personalInformation => $_getN(4); + @$pb.TagNumber(5) + set personalInformation(PersonalInformation value) => $_setField(5, value); + @$pb.TagNumber(5) + $core.bool hasPersonalInformation() => $_has(4); + @$pb.TagNumber(5) + void clearPersonalInformation() => $_clearField(5); + @$pb.TagNumber(5) + PersonalInformation ensurePersonalInformation() => $_ensure(4); + + @$pb.TagNumber(6) + FaceMap get faceMap => $_getN(5); + @$pb.TagNumber(6) + set faceMap(FaceMap value) => $_setField(6, value); + @$pb.TagNumber(6) + $core.bool hasFaceMap() => $_has(5); + @$pb.TagNumber(6) + void clearFaceMap() => $_clearField(6); + @$pb.TagNumber(6) + FaceMap ensureFaceMap() => $_ensure(5); + + @$pb.TagNumber(7) + $core.String get callbackDate => $_getSZ(6); + @$pb.TagNumber(7) + set callbackDate($core.String value) => $_setString(6, value); + @$pb.TagNumber(7) + $core.bool hasCallbackDate() => $_has(6); + @$pb.TagNumber(7) + void clearCallbackDate() => $_clearField(7); + + @$pb.TagNumber(8) + $core.String get clientIp => $_getSZ(7); + @$pb.TagNumber(8) + set clientIp($core.String value) => $_setString(7, value); + @$pb.TagNumber(8) + $core.bool hasClientIp() => $_has(7); + @$pb.TagNumber(8) + void clearClientIp() => $_clearField(8); +} + +class VerificationStatus extends $pb.GeneratedMessage { + factory VerificationStatus({ + $core.String? state, + $core.String? reason, + }) { + final result = create(); + if (state != null) result.state = state; + if (reason != null) result.reason = reason; + return result; + } + + VerificationStatus._(); + + factory VerificationStatus.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory VerificationStatus.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'VerificationStatus', + package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'state') + ..aOS(2, _omitFieldNames ? '' : 'reason') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + VerificationStatus clone() => VerificationStatus()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + VerificationStatus copyWith(void Function(VerificationStatus) updates) => + super.copyWith((message) => updates(message as VerificationStatus)) + as VerificationStatus; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static VerificationStatus create() => VerificationStatus._(); + @$core.override + VerificationStatus createEmptyInstance() => create(); + static $pb.PbList createRepeated() => + $pb.PbList(); + @$core.pragma('dart2js:noInline') + static VerificationStatus getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static VerificationStatus? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get state => $_getSZ(0); + @$pb.TagNumber(1) + set state($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasState() => $_has(0); + @$pb.TagNumber(1) + void clearState() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get reason => $_getSZ(1); + @$pb.TagNumber(2) + set reason($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasReason() => $_has(1); + @$pb.TagNumber(2) + void clearReason() => $_clearField(2); +} + +class Document extends $pb.GeneratedMessage { + factory Document({ + $core.String? status, + $core.String? type, + $core.String? issuingCountry, + $core.String? number, + }) { + final result = create(); + if (status != null) result.status = status; + if (type != null) result.type = type; + if (issuingCountry != null) result.issuingCountry = issuingCountry; + if (number != null) result.number = number; + return result; + } + + Document._(); + + factory Document.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Document.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Document', + package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'status') + ..aOS(2, _omitFieldNames ? '' : 'type') + ..aOS(3, _omitFieldNames ? '' : 'issuingCountry') + ..aOS(4, _omitFieldNames ? '' : 'number') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Document clone() => Document()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Document copyWith(void Function(Document) updates) => + super.copyWith((message) => updates(message as Document)) as Document; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Document create() => Document._(); + @$core.override + Document createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Document getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Document? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get status => $_getSZ(0); + @$pb.TagNumber(1) + set status($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get type => $_getSZ(1); + @$pb.TagNumber(2) + set type($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasType() => $_has(1); + @$pb.TagNumber(2) + void clearType() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get issuingCountry => $_getSZ(2); + @$pb.TagNumber(3) + set issuingCountry($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasIssuingCountry() => $_has(2); + @$pb.TagNumber(3) + void clearIssuingCountry() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get number => $_getSZ(3); + @$pb.TagNumber(4) + set number($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasNumber() => $_has(3); + @$pb.TagNumber(4) + void clearNumber() => $_clearField(4); +} + +class PersonalInformation extends $pb.GeneratedMessage { + factory PersonalInformation({ + $core.String? firstName, + $core.String? lastName, + $core.String? dateOfBirth, + $core.String? nationality, + }) { + final result = create(); + if (firstName != null) result.firstName = firstName; + if (lastName != null) result.lastName = lastName; + if (dateOfBirth != null) result.dateOfBirth = dateOfBirth; + if (nationality != null) result.nationality = nationality; + return result; + } + + PersonalInformation._(); + + factory PersonalInformation.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory PersonalInformation.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'PersonalInformation', + package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'firstName') + ..aOS(2, _omitFieldNames ? '' : 'lastName') + ..aOS(3, _omitFieldNames ? '' : 'dateOfBirth') + ..aOS(4, _omitFieldNames ? '' : 'nationality') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PersonalInformation clone() => PersonalInformation()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PersonalInformation copyWith(void Function(PersonalInformation) updates) => + super.copyWith((message) => updates(message as PersonalInformation)) + as PersonalInformation; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PersonalInformation create() => PersonalInformation._(); + @$core.override + PersonalInformation createEmptyInstance() => create(); + static $pb.PbList createRepeated() => + $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PersonalInformation getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static PersonalInformation? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get firstName => $_getSZ(0); + @$pb.TagNumber(1) + set firstName($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasFirstName() => $_has(0); + @$pb.TagNumber(1) + void clearFirstName() => $_clearField(1); + + @$pb.TagNumber(2) + $core.String get lastName => $_getSZ(1); + @$pb.TagNumber(2) + set lastName($core.String value) => $_setString(1, value); + @$pb.TagNumber(2) + $core.bool hasLastName() => $_has(1); + @$pb.TagNumber(2) + void clearLastName() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get dateOfBirth => $_getSZ(2); + @$pb.TagNumber(3) + set dateOfBirth($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasDateOfBirth() => $_has(2); + @$pb.TagNumber(3) + void clearDateOfBirth() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get nationality => $_getSZ(3); + @$pb.TagNumber(4) + set nationality($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasNationality() => $_has(3); + @$pb.TagNumber(4) + void clearNationality() => $_clearField(4); +} + +class FaceMap extends $pb.GeneratedMessage { + factory FaceMap({ + $core.String? status, + $core.double? similarity, + }) { + final result = create(); + if (status != null) result.status = status; + if (similarity != null) result.similarity = similarity; + return result; + } + + FaceMap._(); + + factory FaceMap.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory FaceMap.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'FaceMap', + package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'status') + ..a<$core.double>( + 2, _omitFieldNames ? '' : 'similarity', $pb.PbFieldType.OF) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FaceMap clone() => FaceMap()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FaceMap copyWith(void Function(FaceMap) updates) => + super.copyWith((message) => updates(message as FaceMap)) as FaceMap; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FaceMap create() => FaceMap._(); + @$core.override + FaceMap createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FaceMap getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FaceMap? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get status => $_getSZ(0); + @$pb.TagNumber(1) + set status($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); + + @$pb.TagNumber(2) + $core.double get similarity => $_getN(1); + @$pb.TagNumber(2) + set similarity($core.double value) => $_setFloat(1, value); + @$pb.TagNumber(2) + $core.bool hasSimilarity() => $_has(1); + @$pb.TagNumber(2) + void clearSimilarity() => $_clearField(2); +} + +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/dart/passport/verify.pbenum.dart b/dart/passport/verify.pbenum.dart new file mode 100644 index 0000000..04f2f54 --- /dev/null +++ b/dart/passport/verify.pbenum.dart @@ -0,0 +1,11 @@ +// This is a generated file - do not edit. +// +// Generated from verify.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/dart/passport/verify.pbgrpc.dart b/dart/passport/verify.pbgrpc.dart new file mode 100644 index 0000000..e3784e1 --- /dev/null +++ b/dart/passport/verify.pbgrpc.dart @@ -0,0 +1,103 @@ +// This is a generated file - do not edit. +// +// Generated from verify.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'blocks.pb.dart' as $1; +import 'verify.pb.dart' as $0; + +export 'verify.pb.dart'; + +/// Passport(会员通行证)-验证 +@$pb.GrpcServiceName('passport.Verify') +class VerifyClient extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = ''; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; + + VerifyClient(super.channel, {super.options, super.interceptors}); + + /// 认证请求 + $grpc.ResponseFuture<$1.StatusReply> request( + $0.VerifyRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$request, request, options: options); + } + + /// KYC 认证回调 + $grpc.ResponseFuture<$1.StatusReply> jumioCallback( + $0.JumioCallbackPayload request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$jumioCallback, request, options: options); + } + + // method descriptors + + static final _$request = $grpc.ClientMethod<$0.VerifyRequest, $1.StatusReply>( + '/passport.Verify/Request', + ($0.VerifyRequest value) => value.writeToBuffer(), + $1.StatusReply.fromBuffer); + static final _$jumioCallback = + $grpc.ClientMethod<$0.JumioCallbackPayload, $1.StatusReply>( + '/passport.Verify/JumioCallback', + ($0.JumioCallbackPayload value) => value.writeToBuffer(), + $1.StatusReply.fromBuffer); +} + +@$pb.GrpcServiceName('passport.Verify') +abstract class VerifyServiceBase extends $grpc.Service { + $core.String get $name => 'passport.Verify'; + + VerifyServiceBase() { + $addMethod($grpc.ServiceMethod<$0.VerifyRequest, $1.StatusReply>( + 'Request', + request_Pre, + false, + false, + ($core.List<$core.int> value) => $0.VerifyRequest.fromBuffer(value), + ($1.StatusReply value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.JumioCallbackPayload, $1.StatusReply>( + 'JumioCallback', + jumioCallback_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.JumioCallbackPayload.fromBuffer(value), + ($1.StatusReply value) => value.writeToBuffer())); + } + + $async.Future<$1.StatusReply> request_Pre( + $grpc.ServiceCall $call, $async.Future<$0.VerifyRequest> $request) async { + return request($call, await $request); + } + + $async.Future<$1.StatusReply> request( + $grpc.ServiceCall call, $0.VerifyRequest request); + + $async.Future<$1.StatusReply> jumioCallback_Pre($grpc.ServiceCall $call, + $async.Future<$0.JumioCallbackPayload> $request) async { + return jumioCallback($call, await $request); + } + + $async.Future<$1.StatusReply> jumioCallback( + $grpc.ServiceCall call, $0.JumioCallbackPayload request); +} diff --git a/dart/passport/verify.pbjson.dart b/dart/passport/verify.pbjson.dart new file mode 100644 index 0000000..0fdb914 --- /dev/null +++ b/dart/passport/verify.pbjson.dart @@ -0,0 +1,171 @@ +// This is a generated file - do not edit. +// +// Generated from verify.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use verifyRequestDescriptor instead') +const VerifyRequest$json = { + '1': 'VerifyRequest', + '2': [ + {'1': 'provider', '3': 1, '4': 1, '5': 9, '10': 'provider'}, + { + '1': 'args', + '3': 2, + '4': 3, + '5': 11, + '6': '.passport.VerifyRequest.ArgsEntry', + '10': 'args' + }, + ], + '3': [VerifyRequest_ArgsEntry$json], +}; + +@$core.Deprecated('Use verifyRequestDescriptor instead') +const VerifyRequest_ArgsEntry$json = { + '1': 'ArgsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `VerifyRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List verifyRequestDescriptor = $convert.base64Decode( + 'Cg1WZXJpZnlSZXF1ZXN0EhoKCHByb3ZpZGVyGAEgASgJUghwcm92aWRlchI1CgRhcmdzGAIgAy' + 'gLMiEucGFzc3BvcnQuVmVyaWZ5UmVxdWVzdC5BcmdzRW50cnlSBGFyZ3MaNwoJQXJnc0VudHJ5' + 'EhAKA2tleRgBIAEoCVIDa2V5EhQKBXZhbHVlGAIgASgJUgV2YWx1ZToCOAE='); + +@$core.Deprecated('Use jumioCallbackPayloadDescriptor instead') +const JumioCallbackPayload$json = { + '1': 'JumioCallbackPayload', + '2': [ + {'1': 'scan_reference', '3': 1, '4': 1, '5': 9, '10': 'scanReference'}, + { + '1': 'customer_internal_reference', + '3': 2, + '4': 1, + '5': 9, + '10': 'customerInternalReference' + }, + { + '1': 'verification_status', + '3': 3, + '4': 1, + '5': 11, + '6': '.passport.VerificationStatus', + '10': 'verificationStatus' + }, + { + '1': 'document', + '3': 4, + '4': 1, + '5': 11, + '6': '.passport.Document', + '10': 'document' + }, + { + '1': 'personal_information', + '3': 5, + '4': 1, + '5': 11, + '6': '.passport.PersonalInformation', + '10': 'personalInformation' + }, + { + '1': 'face_map', + '3': 6, + '4': 1, + '5': 11, + '6': '.passport.FaceMap', + '10': 'faceMap' + }, + {'1': 'callback_date', '3': 7, '4': 1, '5': 9, '10': 'callbackDate'}, + {'1': 'client_ip', '3': 8, '4': 1, '5': 9, '10': 'clientIp'}, + ], +}; + +/// Descriptor for `JumioCallbackPayload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List jumioCallbackPayloadDescriptor = $convert.base64Decode( + 'ChRKdW1pb0NhbGxiYWNrUGF5bG9hZBIlCg5zY2FuX3JlZmVyZW5jZRgBIAEoCVINc2NhblJlZm' + 'VyZW5jZRI+ChtjdXN0b21lcl9pbnRlcm5hbF9yZWZlcmVuY2UYAiABKAlSGWN1c3RvbWVySW50' + 'ZXJuYWxSZWZlcmVuY2USTQoTdmVyaWZpY2F0aW9uX3N0YXR1cxgDIAEoCzIcLnBhc3Nwb3J0Ll' + 'ZlcmlmaWNhdGlvblN0YXR1c1ISdmVyaWZpY2F0aW9uU3RhdHVzEi4KCGRvY3VtZW50GAQgASgL' + 'MhIucGFzc3BvcnQuRG9jdW1lbnRSCGRvY3VtZW50ElAKFHBlcnNvbmFsX2luZm9ybWF0aW9uGA' + 'UgASgLMh0ucGFzc3BvcnQuUGVyc29uYWxJbmZvcm1hdGlvblITcGVyc29uYWxJbmZvcm1hdGlv' + 'bhIsCghmYWNlX21hcBgGIAEoCzIRLnBhc3Nwb3J0LkZhY2VNYXBSB2ZhY2VNYXASIwoNY2FsbG' + 'JhY2tfZGF0ZRgHIAEoCVIMY2FsbGJhY2tEYXRlEhsKCWNsaWVudF9pcBgIIAEoCVIIY2xpZW50' + 'SXA='); + +@$core.Deprecated('Use verificationStatusDescriptor instead') +const VerificationStatus$json = { + '1': 'VerificationStatus', + '2': [ + {'1': 'state', '3': 1, '4': 1, '5': 9, '10': 'state'}, + {'1': 'reason', '3': 2, '4': 1, '5': 9, '10': 'reason'}, + ], +}; + +/// Descriptor for `VerificationStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List verificationStatusDescriptor = $convert.base64Decode( + 'ChJWZXJpZmljYXRpb25TdGF0dXMSFAoFc3RhdGUYASABKAlSBXN0YXRlEhYKBnJlYXNvbhgCIA' + 'EoCVIGcmVhc29u'); + +@$core.Deprecated('Use documentDescriptor instead') +const Document$json = { + '1': 'Document', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 9, '10': 'status'}, + {'1': 'type', '3': 2, '4': 1, '5': 9, '10': 'type'}, + {'1': 'issuing_country', '3': 3, '4': 1, '5': 9, '10': 'issuingCountry'}, + {'1': 'number', '3': 4, '4': 1, '5': 9, '10': 'number'}, + ], +}; + +/// Descriptor for `Document`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List documentDescriptor = $convert.base64Decode( + 'CghEb2N1bWVudBIWCgZzdGF0dXMYASABKAlSBnN0YXR1cxISCgR0eXBlGAIgASgJUgR0eXBlEi' + 'cKD2lzc3VpbmdfY291bnRyeRgDIAEoCVIOaXNzdWluZ0NvdW50cnkSFgoGbnVtYmVyGAQgASgJ' + 'UgZudW1iZXI='); + +@$core.Deprecated('Use personalInformationDescriptor instead') +const PersonalInformation$json = { + '1': 'PersonalInformation', + '2': [ + {'1': 'first_name', '3': 1, '4': 1, '5': 9, '10': 'firstName'}, + {'1': 'last_name', '3': 2, '4': 1, '5': 9, '10': 'lastName'}, + {'1': 'date_of_birth', '3': 3, '4': 1, '5': 9, '10': 'dateOfBirth'}, + {'1': 'nationality', '3': 4, '4': 1, '5': 9, '10': 'nationality'}, + ], +}; + +/// Descriptor for `PersonalInformation`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List personalInformationDescriptor = $convert.base64Decode( + 'ChNQZXJzb25hbEluZm9ybWF0aW9uEh0KCmZpcnN0X25hbWUYASABKAlSCWZpcnN0TmFtZRIbCg' + 'lsYXN0X25hbWUYAiABKAlSCGxhc3ROYW1lEiIKDWRhdGVfb2ZfYmlydGgYAyABKAlSC2RhdGVP' + 'ZkJpcnRoEiAKC25hdGlvbmFsaXR5GAQgASgJUgtuYXRpb25hbGl0eQ=='); + +@$core.Deprecated('Use faceMapDescriptor instead') +const FaceMap$json = { + '1': 'FaceMap', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 9, '10': 'status'}, + {'1': 'similarity', '3': 2, '4': 1, '5': 2, '10': 'similarity'}, + ], +}; + +/// Descriptor for `FaceMap`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List faceMapDescriptor = $convert.base64Decode( + 'CgdGYWNlTWFwEhYKBnN0YXR1cxgBIAEoCVIGc3RhdHVzEh4KCnNpbWlsYXJpdHkYAiABKAJSCn' + 'NpbWlsYXJpdHk='); diff --git a/docs/passport/account.md b/docs/passport/account.md index 58e06f4..8d4b681 100644 --- a/docs/passport/account.md +++ b/docs/passport/account.md @@ -31,21 +31,25 @@ avatar: "", // type, 头像 birthday: "", // type, 生日 sex: 0, // type, 性别,1为男性,2为女性 - country: 0, // type, 国家 - province: 0, // type, 省 - city: 0, // type, 市 - area: 0, // type, 区 + country: "", // type, 国家 + province: "", // type, 省 + city: "", // type, 市 + area: "", // type, 区 sign: "", // type, 签名 cover: "", // type, 背景&封面 score: 0, // type, 积分 level: 0, // type, 等级 - verify: { - "": false - }, // map, 数据 + verify_status: { + email_verify: 0, // type, 邮箱是否已验证 + phone_verify: 0, // type, 手机是否已验证 + face_verify: 0, // type, 人脸或照片是否已验证 + document_verify: 0, // type, 证件是否已验证 + kyc_verify: 0, // type, 实名是否已验证 + }, // type, 用户验证状态 tags: [{ name: "", // type icon: "", // type - }], // list + }], // list, 用户标签 } ``` ## /passport.Account/SetData @@ -60,10 +64,10 @@ avatar: "", // type, 头像 birthday: "", // type, 生日 sex: 0, // type, 性别,1为男性,2为女性 - country: 0, // type, 国家 - province: 0, // type, 省 - city: 0, // type, 市 - area: 0, // type, 区 + country: "", // type, 国家 + province: "", // type, 省 + city: "", // type, 市 + area: "", // type, 区 sign: "", // type, 签名 cover: "", // type, 背景&封面 score: 0, // type, 积分 diff --git a/docs/passport/forget.md b/docs/passport/forget.md index 45d6bfd..22d485a 100644 --- a/docs/passport/forget.md +++ b/docs/passport/forget.md @@ -43,12 +43,10 @@ ### Reply ```javascript { - identity: "", // type, 用户唯一码 - data_bind: "", // type, 数据绑定的相关说明,PASS通过,NOPHONE没有绑定手机号,NOPWD没有设置密码,NOBIND没有手机号同时没有密码 - token: "", // type, 用户凭证 - extend: { - "": "" - }, // map, 扩展字段 + code: 0, // type, 状态码 + message: "", // type, 状态说明 + details: "", // type, 数据 + timeseq: "0", // type, 响应时间序列 } ``` diff --git a/docs/passport/login.md b/docs/passport/login.md index 392188b..ce7b8f5 100644 --- a/docs/passport/login.md +++ b/docs/passport/login.md @@ -29,10 +29,11 @@ "": "" }, // map, 扩展字段 verify_status: { - email_verify: false, // type, 邮箱是否已验证 - phone_verify: false, // type, 手机是否已验证 - photo_verify: false, // type, 头像是否已验证 - kyc_verify: false, // type, 实名是否已验证 + email_verify: 0, // type, 邮箱是否已验证 + phone_verify: 0, // type, 手机是否已验证 + face_verify: 0, // type, 人脸或照片是否已验证 + document_verify: 0, // type, 证件是否已验证 + kyc_verify: 0, // type, 实名是否已验证 }, // type, 用户验证状态 } ``` @@ -47,6 +48,10 @@ country: "", // type, 国家 phone: "", // type, 手机号码 code: "", // type, 验证码 + agency_id: "0", // type, 代理ID + staff_id: "0", // type, 工作人员ID + owner_id: "0", // type, 所属ID + owner_identity: "", // type, 所属唯一码 } ``` @@ -60,10 +65,11 @@ "": "" }, // map, 扩展字段 verify_status: { - email_verify: false, // type, 邮箱是否已验证 - phone_verify: false, // type, 手机是否已验证 - photo_verify: false, // type, 头像是否已验证 - kyc_verify: false, // type, 实名是否已验证 + email_verify: 0, // type, 邮箱是否已验证 + phone_verify: 0, // type, 手机是否已验证 + face_verify: 0, // type, 人脸或照片是否已验证 + document_verify: 0, // type, 证件是否已验证 + kyc_verify: 0, // type, 实名是否已验证 }, // type, 用户验证状态 } ``` @@ -78,6 +84,10 @@ country: "", // type, 国家 phone: "", // type, 手机号码 code: "", // type, 验证码 + agency_id: "0", // type, 代理ID + staff_id: "0", // type, 工作人员ID + owner_id: "0", // type, 所属ID + owner_identity: "", // type, 所属唯一码 } ``` @@ -91,10 +101,11 @@ "": "" }, // map, 扩展字段 verify_status: { - email_verify: false, // type, 邮箱是否已验证 - phone_verify: false, // type, 手机是否已验证 - photo_verify: false, // type, 头像是否已验证 - kyc_verify: false, // type, 实名是否已验证 + email_verify: 0, // type, 邮箱是否已验证 + phone_verify: 0, // type, 手机是否已验证 + face_verify: 0, // type, 人脸或照片是否已验证 + document_verify: 0, // type, 证件是否已验证 + kyc_verify: 0, // type, 实名是否已验证 }, // type, 用户验证状态 } ``` diff --git a/docs/passport/passport.swagger.json b/docs/passport/passport.swagger.json index 81a488d..eb4ab6b 100644 --- a/docs/passport/passport.swagger.json +++ b/docs/passport/passport.swagger.json @@ -11,14 +11,14 @@ { "name": "Forget" }, - { - "name": "Kyc" - }, { "name": "Login" }, { "name": "Register" + }, + { + "name": "Verify" } ], "consumes": [ @@ -61,30 +61,6 @@ } } }, - "passportForgetReply": { - "type": "object", - "properties": { - "identity": { - "type": "string", - "title": "用户唯一码" - }, - "dataBind": { - "type": "string", - "title": "数据绑定的相关说明,PASS通过,NOPHONE没有绑定手机号,NOPWD没有设置密码,NOBIND没有手机号同时没有密码" - }, - "token": { - "type": "string", - "title": "用户凭证" - }, - "extend": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "扩展字段" - } - } - }, "passportGetFullReply": { "type": "object", "properties": { @@ -126,23 +102,19 @@ "title": "性别,1为男性,2为女性" }, "country": { - "type": "integer", - "format": "int32", + "type": "string", "title": "国家" }, "province": { - "type": "integer", - "format": "int32", + "type": "string", "title": "省" }, "city": { - "type": "integer", - "format": "int32", + "type": "string", "title": "市" }, "area": { - "type": "integer", - "format": "int32", + "type": "string", "title": "区" }, "sign": { @@ -163,19 +135,17 @@ "format": "int32", "title": "等级" }, - "verify": { - "type": "object", - "additionalProperties": { - "type": "boolean" - }, - "title": "数据" + "verifyStatus": { + "$ref": "#/definitions/passportVerifyStatus", + "title": "用户验证状态" }, "tags": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/passportTagItem" - } + }, + "title": "用户标签" } }, "title": "获取会员的完整信息" @@ -317,19 +287,28 @@ "type": "object", "properties": { "emailVerify": { - "type": "boolean", + "type": "integer", + "format": "int32", "title": "邮箱是否已验证" }, "phoneVerify": { - "type": "boolean", + "type": "integer", + "format": "int32", "title": "手机是否已验证" }, - "photoVerify": { - "type": "boolean", - "title": "头像是否已验证" + "faceVerify": { + "type": "integer", + "format": "int32", + "title": "人脸或照片是否已验证" + }, + "documentVerify": { + "type": "integer", + "format": "int32", + "title": "证件是否已验证" }, "kycVerify": { - "type": "boolean", + "type": "integer", + "format": "int32", "title": "实名是否已验证" } } diff --git a/docs/passport/register.md b/docs/passport/register.md index f298eea..eb5e913 100644 --- a/docs/passport/register.md +++ b/docs/passport/register.md @@ -13,6 +13,7 @@ ### Request ```javascript { + country: "", // type, 国家码,eg CN US email: "", // type, 邮箱 account: "", // type, 帐号 phone: "", // type, 手机号 @@ -35,10 +36,11 @@ "": "" }, // map, 扩展字段 verify_status: { - email_verify: false, // type, 邮箱是否已验证 - phone_verify: false, // type, 手机是否已验证 - photo_verify: false, // type, 头像是否已验证 - kyc_verify: false, // type, 实名是否已验证 + email_verify: 0, // type, 邮箱是否已验证 + phone_verify: 0, // type, 手机是否已验证 + face_verify: 0, // type, 人脸或照片是否已验证 + document_verify: 0, // type, 证件是否已验证 + kyc_verify: 0, // type, 实名是否已验证 }, // type, 用户验证状态 } ``` @@ -50,6 +52,7 @@ ### Request ```javascript { + country: "", // type, 国家码,eg CN US email: "", // type, 邮箱 account: "", // type, 帐号 phone: "", // type, 手机号 @@ -72,10 +75,11 @@ "": "" }, // map, 扩展字段 verify_status: { - email_verify: false, // type, 邮箱是否已验证 - phone_verify: false, // type, 手机是否已验证 - photo_verify: false, // type, 头像是否已验证 - kyc_verify: false, // type, 实名是否已验证 + email_verify: 0, // type, 邮箱是否已验证 + phone_verify: 0, // type, 手机是否已验证 + face_verify: 0, // type, 人脸或照片是否已验证 + document_verify: 0, // type, 证件是否已验证 + kyc_verify: 0, // type, 实名是否已验证 }, // type, 用户验证状态 } ``` diff --git a/docs/passport/verify.md b/docs/passport/verify.md new file mode 100644 index 0000000..7eec1dd --- /dev/null +++ b/docs/passport/verify.md @@ -0,0 +1,77 @@ +# Verify + + Passport(会员通行证)-验证 + +- [/passport.Verify/Request](#passportverifyrequest) +- [/passport.Verify/JumioCallback](#passportverifyjumiocallback) + +## /passport.Verify/Request + + 认证请求 + + +### Request +```javascript +{ + provider: "", // type, 服务提供商 + args: { + "": "" + }, // map, 参数 +} +``` + +### Reply +```javascript +{ + code: 0, // type, 状态码 + message: "", // type, 状态说明 + details: "", // type, 数据 + timeseq: "0", // type, 响应时间序列 +} +``` +## /passport.Verify/JumioCallback + + KYC 认证回调 + + +### Request +```javascript +{ + scan_reference: "", // type + customer_internal_reference: "", // type + verification_status: { + state: "", // type, "PENDING", "DONE", "FAILED" + reason: "", // type, 可选字段,失败原因 + }, // type + document: { + status: "", // type, "APPROVED_VERIFIED", "DENIED_FRAUD", etc. + type: "", // type, "PASSPORT", "DRIVER_LICENSE", etc. + issuing_country: "", // type + number: "", // type + }, // type + // 其他可选字段 + personal_information: { + first_name: "", // type + last_name: "", // type + date_of_birth: "", // type + nationality: "", // type + }, // type + face_map: { + status: "", // type + similarity: 0.0, // type, 人脸比对相似度 + }, // type + callback_date: "", // type + client_ip: "", // type +} +``` + +### Reply +```javascript +{ + code: 0, // type, 状态码 + message: "", // type, 状态说明 + details: "", // type, 数据 + timeseq: "0", // type, 响应时间序列 +} +``` + diff --git a/golang/passport/account.pb.go b/golang/passport/account.pb.go index 63cba01..b0781aa 100644 --- a/golang/passport/account.pb.go +++ b/golang/passport/account.pb.go @@ -24,25 +24,25 @@ const ( // 获取会员的完整信息 type GetFullReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // 帐号 - Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` // 手机号码 必填 - Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // 验证码 - Rights string `protobuf:"bytes,5,opt,name=rights,proto3" json:"rights,omitempty"` // 权限 - Nickname string `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname,omitempty"` // 昵称 - Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` // 头像 - Birthday string `protobuf:"bytes,8,opt,name=birthday,proto3" json:"birthday,omitempty"` // 生日 - Sex int32 `protobuf:"varint,9,opt,name=sex,proto3" json:"sex,omitempty"` // 性别,1为男性,2为女性 - Country int32 `protobuf:"varint,10,opt,name=country,proto3" json:"country,omitempty"` // 国家 - Province int32 `protobuf:"varint,11,opt,name=province,proto3" json:"province,omitempty"` // 省 - City int32 `protobuf:"varint,12,opt,name=city,proto3" json:"city,omitempty"` // 市 - Area int32 `protobuf:"varint,13,opt,name=area,proto3" json:"area,omitempty"` // 区 - Sign string `protobuf:"bytes,14,opt,name=sign,proto3" json:"sign,omitempty"` // 签名 - Cover string `protobuf:"bytes,15,opt,name=cover,proto3" json:"cover,omitempty"` // 背景&封面 - Score int32 `protobuf:"varint,16,opt,name=score,proto3" json:"score,omitempty"` // 积分 - Level int32 `protobuf:"varint,17,opt,name=level,proto3" json:"level,omitempty"` // 等级 - Verify map[string]bool `protobuf:"bytes,18,rep,name=verify,proto3" json:"verify,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` // 数据 - Tags []*TagItem `protobuf:"bytes,19,rep,name=tags,proto3" json:"tags,omitempty"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 + Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // 帐号 + Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` // 手机号码 必填 + Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // 验证码 + Rights string `protobuf:"bytes,5,opt,name=rights,proto3" json:"rights,omitempty"` // 权限 + Nickname string `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname,omitempty"` // 昵称 + Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` // 头像 + Birthday string `protobuf:"bytes,8,opt,name=birthday,proto3" json:"birthday,omitempty"` // 生日 + Sex int32 `protobuf:"varint,9,opt,name=sex,proto3" json:"sex,omitempty"` // 性别,1为男性,2为女性 + Country string `protobuf:"bytes,10,opt,name=country,proto3" json:"country,omitempty"` // 国家 + Province string `protobuf:"bytes,11,opt,name=province,proto3" json:"province,omitempty"` // 省 + City string `protobuf:"bytes,12,opt,name=city,proto3" json:"city,omitempty"` // 市 + Area string `protobuf:"bytes,13,opt,name=area,proto3" json:"area,omitempty"` // 区 + Sign string `protobuf:"bytes,14,opt,name=sign,proto3" json:"sign,omitempty"` // 签名 + Cover string `protobuf:"bytes,15,opt,name=cover,proto3" json:"cover,omitempty"` // 背景&封面 + Score int32 `protobuf:"varint,16,opt,name=score,proto3" json:"score,omitempty"` // 积分 + Level int32 `protobuf:"varint,17,opt,name=level,proto3" json:"level,omitempty"` // 等级 + VerifyStatus *VerifyStatus `protobuf:"bytes,18,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态 + Tags []*TagItem `protobuf:"bytes,19,rep,name=tags,proto3" json:"tags,omitempty"` // 用户标签 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -140,32 +140,32 @@ func (x *GetFullReply) GetSex() int32 { return 0 } -func (x *GetFullReply) GetCountry() int32 { +func (x *GetFullReply) GetCountry() string { if x != nil { return x.Country } - return 0 + return "" } -func (x *GetFullReply) GetProvince() int32 { +func (x *GetFullReply) GetProvince() string { if x != nil { return x.Province } - return 0 + return "" } -func (x *GetFullReply) GetCity() int32 { +func (x *GetFullReply) GetCity() string { if x != nil { return x.City } - return 0 + return "" } -func (x *GetFullReply) GetArea() int32 { +func (x *GetFullReply) GetArea() string { if x != nil { return x.Area } - return 0 + return "" } func (x *GetFullReply) GetSign() string { @@ -196,9 +196,9 @@ func (x *GetFullReply) GetLevel() int32 { return 0 } -func (x *GetFullReply) GetVerify() map[string]bool { +func (x *GetFullReply) GetVerifyStatus() *VerifyStatus { if x != nil { - return x.Verify + return x.VerifyStatus } return nil } @@ -264,18 +264,18 @@ func (x *TagItem) GetIcon() string { type SetDataRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` //昵称 - Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` //头像 - Birthday string `protobuf:"bytes,3,opt,name=birthday,proto3" json:"birthday,omitempty"` //生日 - Sex int32 `protobuf:"varint,4,opt,name=sex,proto3" json:"sex,omitempty"` //性别,1为男性,2为女性 - Country int32 `protobuf:"varint,5,opt,name=country,proto3" json:"country,omitempty"` // 国家 - Province int32 `protobuf:"varint,6,opt,name=province,proto3" json:"province,omitempty"` //省 - City int32 `protobuf:"varint,7,opt,name=city,proto3" json:"city,omitempty"` //市 - Area int32 `protobuf:"varint,8,opt,name=area,proto3" json:"area,omitempty"` //区 - Sign string `protobuf:"bytes,9,opt,name=sign,proto3" json:"sign,omitempty"` //签名 - Cover string `protobuf:"bytes,10,opt,name=cover,proto3" json:"cover,omitempty"` // 背景&封面 - Score int32 `protobuf:"varint,11,opt,name=score,proto3" json:"score,omitempty"` // 积分 - Level int32 `protobuf:"varint,12,opt,name=level,proto3" json:"level,omitempty"` // 等级 + Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` //昵称 + Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` //头像 + Birthday string `protobuf:"bytes,3,opt,name=birthday,proto3" json:"birthday,omitempty"` //生日 + Sex int32 `protobuf:"varint,4,opt,name=sex,proto3" json:"sex,omitempty"` //性别,1为男性,2为女性 + Country string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"` // 国家 + Province string `protobuf:"bytes,6,opt,name=province,proto3" json:"province,omitempty"` //省 + City string `protobuf:"bytes,7,opt,name=city,proto3" json:"city,omitempty"` //市 + Area string `protobuf:"bytes,8,opt,name=area,proto3" json:"area,omitempty"` //区 + Sign string `protobuf:"bytes,9,opt,name=sign,proto3" json:"sign,omitempty"` //签名 + Cover string `protobuf:"bytes,10,opt,name=cover,proto3" json:"cover,omitempty"` // 背景&封面 + Score int32 `protobuf:"varint,11,opt,name=score,proto3" json:"score,omitempty"` // 积分 + Level int32 `protobuf:"varint,12,opt,name=level,proto3" json:"level,omitempty"` // 等级 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -338,32 +338,32 @@ func (x *SetDataRequest) GetSex() int32 { return 0 } -func (x *SetDataRequest) GetCountry() int32 { +func (x *SetDataRequest) GetCountry() string { if x != nil { return x.Country } - return 0 + return "" } -func (x *SetDataRequest) GetProvince() int32 { +func (x *SetDataRequest) GetProvince() string { if x != nil { return x.Province } - return 0 + return "" } -func (x *SetDataRequest) GetCity() int32 { +func (x *SetDataRequest) GetCity() string { if x != nil { return x.City } - return 0 + return "" } -func (x *SetDataRequest) GetArea() int32 { +func (x *SetDataRequest) GetArea() string { if x != nil { return x.Area } - return 0 + return "" } func (x *SetDataRequest) GetSign() string { @@ -538,7 +538,7 @@ var File_account_proto protoreflect.FileDescriptor const file_account_proto_rawDesc = "" + "\n" + - "\raccount.proto\x12\bpassport\x1a\fblocks.proto\"\xbc\x04\n" + + "\raccount.proto\x12\bpassport\x1a\fblocks.proto\"\x82\x04\n" + "\fGetFullReply\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" + "\aaccount\x18\x02 \x01(\tR\aaccount\x12\x14\n" + @@ -550,19 +550,16 @@ const file_account_proto_rawDesc = "" + "\bbirthday\x18\b \x01(\tR\bbirthday\x12\x10\n" + "\x03sex\x18\t \x01(\x05R\x03sex\x12\x18\n" + "\acountry\x18\n" + - " \x01(\x05R\acountry\x12\x1a\n" + - "\bprovince\x18\v \x01(\x05R\bprovince\x12\x12\n" + - "\x04city\x18\f \x01(\x05R\x04city\x12\x12\n" + - "\x04area\x18\r \x01(\x05R\x04area\x12\x12\n" + + " \x01(\tR\acountry\x12\x1a\n" + + "\bprovince\x18\v \x01(\tR\bprovince\x12\x12\n" + + "\x04city\x18\f \x01(\tR\x04city\x12\x12\n" + + "\x04area\x18\r \x01(\tR\x04area\x12\x12\n" + "\x04sign\x18\x0e \x01(\tR\x04sign\x12\x14\n" + "\x05cover\x18\x0f \x01(\tR\x05cover\x12\x14\n" + "\x05score\x18\x10 \x01(\x05R\x05score\x12\x14\n" + - "\x05level\x18\x11 \x01(\x05R\x05level\x12:\n" + - "\x06verify\x18\x12 \x03(\v2\".passport.GetFullReply.VerifyEntryR\x06verify\x12%\n" + - "\x04tags\x18\x13 \x03(\v2\x11.passport.TagItemR\x04tags\x1a9\n" + - "\vVerifyEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\"1\n" + + "\x05level\x18\x11 \x01(\x05R\x05level\x12;\n" + + "\rverify_status\x18\x12 \x01(\v2\x16.passport.VerifyStatusR\fverifyStatus\x12%\n" + + "\x04tags\x18\x13 \x03(\v2\x11.passport.TagItemR\x04tags\"1\n" + "\aTagItem\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + "\x04icon\x18\x02 \x01(\tR\x04icon\"\xa6\x02\n" + @@ -571,10 +568,10 @@ const file_account_proto_rawDesc = "" + "\x06avatar\x18\x02 \x01(\tR\x06avatar\x12\x1a\n" + "\bbirthday\x18\x03 \x01(\tR\bbirthday\x12\x10\n" + "\x03sex\x18\x04 \x01(\x05R\x03sex\x12\x18\n" + - "\acountry\x18\x05 \x01(\x05R\acountry\x12\x1a\n" + - "\bprovince\x18\x06 \x01(\x05R\bprovince\x12\x12\n" + - "\x04city\x18\a \x01(\x05R\x04city\x12\x12\n" + - "\x04area\x18\b \x01(\x05R\x04area\x12\x12\n" + + "\acountry\x18\x05 \x01(\tR\acountry\x12\x1a\n" + + "\bprovince\x18\x06 \x01(\tR\bprovince\x12\x12\n" + + "\x04city\x18\a \x01(\tR\x04city\x12\x12\n" + + "\x04area\x18\b \x01(\tR\x04area\x12\x12\n" + "\x04sign\x18\t \x01(\tR\x04sign\x12\x14\n" + "\x05cover\x18\n" + " \x01(\tR\x05cover\x12\x14\n" + @@ -612,7 +609,7 @@ func file_account_proto_rawDescGZIP() []byte { return file_account_proto_rawDescData } -var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_account_proto_goTypes = []any{ (*GetFullReply)(nil), // 0: passport.GetFullReply (*TagItem)(nil), // 1: passport.TagItem @@ -620,16 +617,16 @@ var file_account_proto_goTypes = []any{ (*SetPasswordRequest)(nil), // 3: passport.SetPasswordRequest (*StatisticsRequest)(nil), // 4: passport.StatisticsRequest (*StatisticsReply)(nil), // 5: passport.StatisticsReply - nil, // 6: passport.GetFullReply.VerifyEntry - nil, // 7: passport.StatisticsReply.DataEntry + nil, // 6: passport.StatisticsReply.DataEntry + (*VerifyStatus)(nil), // 7: passport.VerifyStatus (*Empty)(nil), // 8: passport.Empty (*IdentRequest)(nil), // 9: passport.IdentRequest (*StatusReply)(nil), // 10: passport.StatusReply } var file_account_proto_depIdxs = []int32{ - 6, // 0: passport.GetFullReply.verify:type_name -> passport.GetFullReply.VerifyEntry + 7, // 0: passport.GetFullReply.verify_status:type_name -> passport.VerifyStatus 1, // 1: passport.GetFullReply.tags:type_name -> passport.TagItem - 7, // 2: passport.StatisticsReply.Data:type_name -> passport.StatisticsReply.DataEntry + 6, // 2: passport.StatisticsReply.Data:type_name -> passport.StatisticsReply.DataEntry 8, // 3: passport.Account.Get:input_type -> passport.Empty 2, // 4: passport.Account.SetData:input_type -> passport.SetDataRequest 3, // 5: passport.Account.SetPassword:input_type -> passport.SetPasswordRequest @@ -661,7 +658,7 @@ func file_account_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc)), NumEnums: 0, - NumMessages: 8, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/golang/passport/blocks.pb.go b/golang/passport/blocks.pb.go index cbbd4f0..1557bfd 100644 --- a/golang/passport/blocks.pb.go +++ b/golang/passport/blocks.pb.go @@ -290,13 +290,14 @@ func (x *StatusReply) GetTimeseq() int64 { } type VerifyStatus struct { - state protoimpl.MessageState `protogen:"open.v1"` - EmailVerify bool `protobuf:"varint,1,opt,name=email_verify,json=emailVerify,proto3" json:"email_verify,omitempty"` // 邮箱是否已验证 - PhoneVerify bool `protobuf:"varint,2,opt,name=phone_verify,json=phoneVerify,proto3" json:"phone_verify,omitempty"` // 手机是否已验证 - PhotoVerify bool `protobuf:"varint,3,opt,name=photo_verify,json=photoVerify,proto3" json:"photo_verify,omitempty"` // 头像是否已验证 - KycVerify bool `protobuf:"varint,4,opt,name=kyc_verify,json=kycVerify,proto3" json:"kyc_verify,omitempty"` // 实名是否已验证 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + EmailVerify int32 `protobuf:"varint,1,opt,name=email_verify,json=emailVerify,proto3" json:"email_verify,omitempty"` // 邮箱是否已验证 + PhoneVerify int32 `protobuf:"varint,2,opt,name=phone_verify,json=phoneVerify,proto3" json:"phone_verify,omitempty"` // 手机是否已验证 + FaceVerify int32 `protobuf:"varint,3,opt,name=face_verify,json=faceVerify,proto3" json:"face_verify,omitempty"` // 人脸或照片是否已验证 + DocumentVerify int32 `protobuf:"varint,4,opt,name=document_verify,json=documentVerify,proto3" json:"document_verify,omitempty"` // 证件是否已验证 + KycVerify int32 `protobuf:"varint,5,opt,name=kyc_verify,json=kycVerify,proto3" json:"kyc_verify,omitempty"` // 实名是否已验证 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *VerifyStatus) Reset() { @@ -329,32 +330,39 @@ func (*VerifyStatus) Descriptor() ([]byte, []int) { return file_blocks_proto_rawDescGZIP(), []int{5} } -func (x *VerifyStatus) GetEmailVerify() bool { +func (x *VerifyStatus) GetEmailVerify() int32 { if x != nil { return x.EmailVerify } - return false + return 0 } -func (x *VerifyStatus) GetPhoneVerify() bool { +func (x *VerifyStatus) GetPhoneVerify() int32 { if x != nil { return x.PhoneVerify } - return false + return 0 } -func (x *VerifyStatus) GetPhotoVerify() bool { +func (x *VerifyStatus) GetFaceVerify() int32 { if x != nil { - return x.PhotoVerify + return x.FaceVerify } - return false + return 0 } -func (x *VerifyStatus) GetKycVerify() bool { +func (x *VerifyStatus) GetDocumentVerify() int32 { + if x != nil { + return x.DocumentVerify + } + return 0 +} + +func (x *VerifyStatus) GetKycVerify() int32 { if x != nil { return x.KycVerify } - return false + return 0 } type Empty struct { @@ -416,13 +424,15 @@ const file_blocks_proto_rawDesc = "" + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" + "\amessage\x18\x02 \x01(\tR\amessage\x12\x18\n" + "\adetails\x18\x03 \x01(\tR\adetails\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\x96\x01\n" + + "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\xbd\x01\n" + "\fVerifyStatus\x12!\n" + - "\femail_verify\x18\x01 \x01(\bR\vemailVerify\x12!\n" + - "\fphone_verify\x18\x02 \x01(\bR\vphoneVerify\x12!\n" + - "\fphoto_verify\x18\x03 \x01(\bR\vphotoVerify\x12\x1d\n" + + "\femail_verify\x18\x01 \x01(\x05R\vemailVerify\x12!\n" + + "\fphone_verify\x18\x02 \x01(\x05R\vphoneVerify\x12\x1f\n" + + "\vface_verify\x18\x03 \x01(\x05R\n" + + "faceVerify\x12'\n" + + "\x0fdocument_verify\x18\x04 \x01(\x05R\x0edocumentVerify\x12\x1d\n" + "\n" + - "kyc_verify\x18\x04 \x01(\bR\tkycVerify\"\a\n" + + "kyc_verify\x18\x05 \x01(\x05R\tkycVerify\"\a\n" + "\x05EmptyB\fZ\n" + ".;passportb\x06proto3" diff --git a/golang/passport/forget.pb.go b/golang/passport/forget.pb.go index 9ffe16c..ff91f87 100644 --- a/golang/passport/forget.pb.go +++ b/golang/passport/forget.pb.go @@ -21,7 +21,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type VerifyRequest struct { +type ForgetVerifyRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` //手机号 Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // 验证码 @@ -29,20 +29,20 @@ type VerifyRequest struct { sizeCache protoimpl.SizeCache } -func (x *VerifyRequest) Reset() { - *x = VerifyRequest{} +func (x *ForgetVerifyRequest) Reset() { + *x = ForgetVerifyRequest{} mi := &file_forget_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *VerifyRequest) String() string { +func (x *ForgetVerifyRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VerifyRequest) ProtoMessage() {} +func (*ForgetVerifyRequest) ProtoMessage() {} -func (x *VerifyRequest) ProtoReflect() protoreflect.Message { +func (x *ForgetVerifyRequest) ProtoReflect() protoreflect.Message { mi := &file_forget_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54,19 +54,19 @@ func (x *VerifyRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead. -func (*VerifyRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ForgetVerifyRequest.ProtoReflect.Descriptor instead. +func (*ForgetVerifyRequest) Descriptor() ([]byte, []int) { return file_forget_proto_rawDescGZIP(), []int{0} } -func (x *VerifyRequest) GetPhone() string { +func (x *ForgetVerifyRequest) GetPhone() string { if x != nil { return x.Phone } return "" } -func (x *VerifyRequest) GetCode() string { +func (x *ForgetVerifyRequest) GetCode() string { if x != nil { return x.Code } @@ -125,96 +125,20 @@ func (x *ForgetResetRequest) GetPassword() string { return "" } -type ForgetReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` //用户唯一码 - DataBind string `protobuf:"bytes,2,opt,name=data_bind,json=dataBind,proto3" json:"data_bind,omitempty"` // 数据绑定的相关说明,PASS通过,NOPHONE没有绑定手机号,NOPWD没有设置密码,NOBIND没有手机号同时没有密码 - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` //用户凭证 - Extend map[string]string `protobuf:"bytes,4,rep,name=extend,proto3" json:"extend,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //扩展字段 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ForgetReply) Reset() { - *x = ForgetReply{} - mi := &file_forget_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ForgetReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ForgetReply) ProtoMessage() {} - -func (x *ForgetReply) ProtoReflect() protoreflect.Message { - mi := &file_forget_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ForgetReply.ProtoReflect.Descriptor instead. -func (*ForgetReply) Descriptor() ([]byte, []int) { - return file_forget_proto_rawDescGZIP(), []int{2} -} - -func (x *ForgetReply) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *ForgetReply) GetDataBind() string { - if x != nil { - return x.DataBind - } - return "" -} - -func (x *ForgetReply) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *ForgetReply) GetExtend() map[string]string { - if x != nil { - return x.Extend - } - return nil -} - var File_forget_proto protoreflect.FileDescriptor const file_forget_proto_rawDesc = "" + "\n" + - "\fforget.proto\x12\bpassport\x1a\fblocks.proto\"9\n" + - "\rVerifyRequest\x12\x14\n" + + "\fforget.proto\x12\bpassport\x1a\fblocks.proto\"?\n" + + "\x13ForgetVerifyRequest\x12\x14\n" + "\x05phone\x18\x01 \x01(\tR\x05phone\x12\x12\n" + "\x04code\x18\x02 \x01(\tR\x04code\"L\n" + "\x12ForgetResetRequest\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1a\n" + - "\bpassword\x18\x02 \x01(\tR\bpassword\"\xd2\x01\n" + - "\vForgetReply\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1b\n" + - "\tdata_bind\x18\x02 \x01(\tR\bdataBind\x12\x14\n" + - "\x05token\x18\x03 \x01(\tR\x05token\x129\n" + - "\x06extend\x18\x04 \x03(\v2!.passport.ForgetReply.ExtendEntryR\x06extend\x1a9\n" + - "\vExtendEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\x84\x01\n" + - "\x06Forget\x12:\n" + - "\x06Verify\x12\x17.passport.VerifyRequest\x1a\x15.passport.StatusReply\"\x00\x12>\n" + - "\x05Reset\x12\x1c.passport.ForgetResetRequest\x1a\x15.passport.ForgetReply\"\x00B\fZ\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword2\x8a\x01\n" + + "\x06Forget\x12@\n" + + "\x06Verify\x12\x1d.passport.ForgetVerifyRequest\x1a\x15.passport.StatusReply\"\x00\x12>\n" + + "\x05Reset\x12\x1c.passport.ForgetResetRequest\x1a\x15.passport.StatusReply\"\x00B\fZ\n" + ".;passportb\x06proto3" var ( @@ -229,25 +153,22 @@ func file_forget_proto_rawDescGZIP() []byte { return file_forget_proto_rawDescData } -var file_forget_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_forget_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_forget_proto_goTypes = []any{ - (*VerifyRequest)(nil), // 0: passport.VerifyRequest - (*ForgetResetRequest)(nil), // 1: passport.ForgetResetRequest - (*ForgetReply)(nil), // 2: passport.ForgetReply - nil, // 3: passport.ForgetReply.ExtendEntry - (*StatusReply)(nil), // 4: passport.StatusReply + (*ForgetVerifyRequest)(nil), // 0: passport.ForgetVerifyRequest + (*ForgetResetRequest)(nil), // 1: passport.ForgetResetRequest + (*StatusReply)(nil), // 2: passport.StatusReply } var file_forget_proto_depIdxs = []int32{ - 3, // 0: passport.ForgetReply.extend:type_name -> passport.ForgetReply.ExtendEntry - 0, // 1: passport.Forget.Verify:input_type -> passport.VerifyRequest - 1, // 2: passport.Forget.Reset:input_type -> passport.ForgetResetRequest - 4, // 3: passport.Forget.Verify:output_type -> passport.StatusReply - 2, // 4: passport.Forget.Reset:output_type -> passport.ForgetReply - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 0: passport.Forget.Verify:input_type -> passport.ForgetVerifyRequest + 1, // 1: passport.Forget.Reset:input_type -> passport.ForgetResetRequest + 2, // 2: passport.Forget.Verify:output_type -> passport.StatusReply + 2, // 3: passport.Forget.Reset:output_type -> passport.StatusReply + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_forget_proto_init() } @@ -262,7 +183,7 @@ func file_forget_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_forget_proto_rawDesc), len(file_forget_proto_rawDesc)), NumEnums: 0, - NumMessages: 4, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/golang/passport/forget_grpc.pb.go b/golang/passport/forget_grpc.pb.go index 53801a0..ebe371d 100644 --- a/golang/passport/forget_grpc.pb.go +++ b/golang/passport/forget_grpc.pb.go @@ -30,9 +30,9 @@ const ( // Passport-通行证模块 type ForgetClient interface { // 验证手机号和验证码 - Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) + Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) // 重罢密码 - Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*ForgetReply, error) + Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*StatusReply, error) } type forgetClient struct { @@ -43,7 +43,7 @@ func NewForgetClient(cc grpc.ClientConnInterface) ForgetClient { return &forgetClient{cc} } -func (c *forgetClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *forgetClient) Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusReply) err := c.cc.Invoke(ctx, Forget_Verify_FullMethodName, in, out, cOpts...) @@ -53,9 +53,9 @@ func (c *forgetClient) Verify(ctx context.Context, in *VerifyRequest, opts ...gr return out, nil } -func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*ForgetReply, error) { +func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ForgetReply) + out := new(StatusReply) err := c.cc.Invoke(ctx, Forget_Reset_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -70,9 +70,9 @@ func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts . // Passport-通行证模块 type ForgetServer interface { // 验证手机号和验证码 - Verify(context.Context, *VerifyRequest) (*StatusReply, error) + Verify(context.Context, *ForgetVerifyRequest) (*StatusReply, error) // 重罢密码 - Reset(context.Context, *ForgetResetRequest) (*ForgetReply, error) + Reset(context.Context, *ForgetResetRequest) (*StatusReply, error) mustEmbedUnimplementedForgetServer() } @@ -83,10 +83,10 @@ type ForgetServer interface { // pointer dereference when methods are called. type UnimplementedForgetServer struct{} -func (UnimplementedForgetServer) Verify(context.Context, *VerifyRequest) (*StatusReply, error) { +func (UnimplementedForgetServer) Verify(context.Context, *ForgetVerifyRequest) (*StatusReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") } -func (UnimplementedForgetServer) Reset(context.Context, *ForgetResetRequest) (*ForgetReply, error) { +func (UnimplementedForgetServer) Reset(context.Context, *ForgetResetRequest) (*StatusReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Reset not implemented") } func (UnimplementedForgetServer) mustEmbedUnimplementedForgetServer() {} @@ -111,7 +111,7 @@ func RegisterForgetServer(s grpc.ServiceRegistrar, srv ForgetServer) { } func _Forget_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyRequest) + in := new(ForgetVerifyRequest) if err := dec(in); err != nil { return nil, err } @@ -123,7 +123,7 @@ func _Forget_Verify_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Forget_Verify_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ForgetServer).Verify(ctx, req.(*VerifyRequest)) + return srv.(ForgetServer).Verify(ctx, req.(*ForgetVerifyRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/golang/passport/login.pb.go b/golang/passport/login.pb.go index 9bf06b9..61c661a 100644 --- a/golang/passport/login.pb.go +++ b/golang/passport/login.pb.go @@ -75,9 +75,13 @@ func (x *LoginByPwdRequest) GetPassword() string { type LoginByCodeRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"` // 国家 - Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` // 手机号码 - Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // 验证码 + Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"` // 国家 + Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` // 手机号码 + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // 验证码 + AgencyId int64 `protobuf:"varint,4,opt,name=agency_id,json=agencyId,proto3" json:"agency_id,omitempty"` // 代理ID + StaffId int64 `protobuf:"varint,5,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"` // 工作人员ID + OwnerId int64 `protobuf:"varint,6,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 所属ID + OwnerIdentity string `protobuf:"bytes,7,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 所属唯一码 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -133,6 +137,34 @@ func (x *LoginByCodeRequest) GetCode() string { return "" } +func (x *LoginByCodeRequest) GetAgencyId() int64 { + if x != nil { + return x.AgencyId + } + return 0 +} + +func (x *LoginByCodeRequest) GetStaffId() int64 { + if x != nil { + return x.StaffId + } + return 0 +} + +func (x *LoginByCodeRequest) GetOwnerId() int64 { + if x != nil { + return x.OwnerId + } + return 0 +} + +func (x *LoginByCodeRequest) GetOwnerIdentity() string { + if x != nil { + return x.OwnerIdentity + } + return "" +} + type LoginReply struct { state protoimpl.MessageState `protogen:"open.v1"` Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` @@ -216,11 +248,15 @@ const file_login_proto_rawDesc = "" + "\vlogin.proto\x12\bpassport\x1a\fblocks.proto\"I\n" + "\x11LoginByPwdRequest\x12\x18\n" + "\aaccount\x18\x01 \x01(\tR\aaccount\x12\x1a\n" + - "\bpassword\x18\x02 \x01(\tR\bpassword\"X\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\"\xd4\x01\n" + "\x12LoginByCodeRequest\x12\x18\n" + "\acountry\x18\x01 \x01(\tR\acountry\x12\x14\n" + "\x05phone\x18\x02 \x01(\tR\x05phone\x12\x12\n" + - "\x04code\x18\x03 \x01(\tR\x04code\"\x80\x02\n" + + "\x04code\x18\x03 \x01(\tR\x04code\x12\x1b\n" + + "\tagency_id\x18\x04 \x01(\x03R\bagencyId\x12\x19\n" + + "\bstaff_id\x18\x05 \x01(\x03R\astaffId\x12\x1a\n" + + "\bowner_id\x18\x06 \x01(\x03R\bowner_id\x12&\n" + + "\x0eowner_identity\x18\a \x01(\tR\x0eowner_identity\"\x80\x02\n" + "\n" + "LoginReply\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + diff --git a/golang/passport/register.pb.go b/golang/passport/register.pb.go index d2805ba..2910aae 100644 --- a/golang/passport/register.pb.go +++ b/golang/passport/register.pb.go @@ -23,15 +23,16 @@ const ( type RegisterRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` //邮箱 - Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` //帐号 - Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` //手机号 - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` //密码 - Code string `protobuf:"bytes,5,opt,name=code,proto3" json:"code,omitempty"` //验证码 - AgencyId int64 `protobuf:"varint,6,opt,name=agency_id,json=agencyId,proto3" json:"agency_id,omitempty"` // 代理ID - StaffId int64 `protobuf:"varint,7,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"` // 工作人员ID - OwnerId int64 `protobuf:"varint,8,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 所属ID - OwnerIdentity string `protobuf:"bytes,9,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 所属唯一码 + Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"` // 国家码,eg CN US + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` //邮箱 + Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` //帐号 + Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` //手机号 + Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` //密码 + Code string `protobuf:"bytes,6,opt,name=code,proto3" json:"code,omitempty"` //验证码 + AgencyId int64 `protobuf:"varint,7,opt,name=agency_id,json=agencyId,proto3" json:"agency_id,omitempty"` // 代理ID + StaffId int64 `protobuf:"varint,8,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"` // 工作人员ID + OwnerId int64 `protobuf:"varint,9,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 所属ID + OwnerIdentity string `protobuf:"bytes,10,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 所属唯一码 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -66,6 +67,13 @@ func (*RegisterRequest) Descriptor() ([]byte, []int) { return file_register_proto_rawDescGZIP(), []int{0} } +func (x *RegisterRequest) GetCountry() string { + if x != nil { + return x.Country + } + return "" +} + func (x *RegisterRequest) GetEmail() string { if x != nil { return x.Email @@ -209,17 +217,19 @@ var File_register_proto protoreflect.FileDescriptor const file_register_proto_rawDesc = "" + "\n" + - "\x0eregister.proto\x12\bpassport\x1a\fblocks.proto\"\x83\x02\n" + - "\x0fRegisterRequest\x12\x14\n" + - "\x05email\x18\x01 \x01(\tR\x05email\x12\x18\n" + - "\aaccount\x18\x02 \x01(\tR\aaccount\x12\x14\n" + - "\x05phone\x18\x03 \x01(\tR\x05phone\x12\x1a\n" + - "\bpassword\x18\x04 \x01(\tR\bpassword\x12\x12\n" + - "\x04code\x18\x05 \x01(\tR\x04code\x12\x1b\n" + - "\tagency_id\x18\x06 \x01(\x03R\bagencyId\x12\x19\n" + - "\bstaff_id\x18\a \x01(\x03R\astaffId\x12\x1a\n" + - "\bowner_id\x18\b \x01(\x03R\bowner_id\x12&\n" + - "\x0eowner_identity\x18\t \x01(\tR\x0eowner_identity\"\x86\x02\n" + + "\x0eregister.proto\x12\bpassport\x1a\fblocks.proto\"\x9d\x02\n" + + "\x0fRegisterRequest\x12\x18\n" + + "\acountry\x18\x01 \x01(\tR\acountry\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\x12\x18\n" + + "\aaccount\x18\x03 \x01(\tR\aaccount\x12\x14\n" + + "\x05phone\x18\x04 \x01(\tR\x05phone\x12\x1a\n" + + "\bpassword\x18\x05 \x01(\tR\bpassword\x12\x12\n" + + "\x04code\x18\x06 \x01(\tR\x04code\x12\x1b\n" + + "\tagency_id\x18\a \x01(\x03R\bagencyId\x12\x19\n" + + "\bstaff_id\x18\b \x01(\x03R\astaffId\x12\x1a\n" + + "\bowner_id\x18\t \x01(\x03R\bowner_id\x12&\n" + + "\x0eowner_identity\x18\n" + + " \x01(\tR\x0eowner_identity\"\x86\x02\n" + "\rRegisterReply\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" + diff --git a/golang/passport/verify.pb.go b/golang/passport/verify.pb.go new file mode 100644 index 0000000..da723e8 --- /dev/null +++ b/golang/passport/verify.pb.go @@ -0,0 +1,524 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.8 +// protoc (unknown) +// source: verify.proto + +package passport + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type VerifyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` // 服务提供商 + Args map[string]string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 参数 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VerifyRequest) Reset() { + *x = VerifyRequest{} + mi := &file_verify_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyRequest) ProtoMessage() {} + +func (x *VerifyRequest) ProtoReflect() protoreflect.Message { + mi := &file_verify_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead. +func (*VerifyRequest) Descriptor() ([]byte, []int) { + return file_verify_proto_rawDescGZIP(), []int{0} +} + +func (x *VerifyRequest) GetProvider() string { + if x != nil { + return x.Provider + } + return "" +} + +func (x *VerifyRequest) GetArgs() map[string]string { + if x != nil { + return x.Args + } + return nil +} + +type JumioCallbackPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + ScanReference string `protobuf:"bytes,1,opt,name=scan_reference,json=scanReference,proto3" json:"scan_reference,omitempty"` + CustomerInternalReference string `protobuf:"bytes,2,opt,name=customer_internal_reference,json=customerInternalReference,proto3" json:"customer_internal_reference,omitempty"` + VerificationStatus *VerificationStatus `protobuf:"bytes,3,opt,name=verification_status,json=verificationStatus,proto3" json:"verification_status,omitempty"` + Document *Document `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` + // 其他可选字段 + PersonalInformation *PersonalInformation `protobuf:"bytes,5,opt,name=personal_information,json=personalInformation,proto3" json:"personal_information,omitempty"` + FaceMap *FaceMap `protobuf:"bytes,6,opt,name=face_map,json=faceMap,proto3" json:"face_map,omitempty"` + CallbackDate string `protobuf:"bytes,7,opt,name=callback_date,json=callbackDate,proto3" json:"callback_date,omitempty"` + ClientIp string `protobuf:"bytes,8,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JumioCallbackPayload) Reset() { + *x = JumioCallbackPayload{} + mi := &file_verify_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JumioCallbackPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JumioCallbackPayload) ProtoMessage() {} + +func (x *JumioCallbackPayload) ProtoReflect() protoreflect.Message { + mi := &file_verify_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JumioCallbackPayload.ProtoReflect.Descriptor instead. +func (*JumioCallbackPayload) Descriptor() ([]byte, []int) { + return file_verify_proto_rawDescGZIP(), []int{1} +} + +func (x *JumioCallbackPayload) GetScanReference() string { + if x != nil { + return x.ScanReference + } + return "" +} + +func (x *JumioCallbackPayload) GetCustomerInternalReference() string { + if x != nil { + return x.CustomerInternalReference + } + return "" +} + +func (x *JumioCallbackPayload) GetVerificationStatus() *VerificationStatus { + if x != nil { + return x.VerificationStatus + } + return nil +} + +func (x *JumioCallbackPayload) GetDocument() *Document { + if x != nil { + return x.Document + } + return nil +} + +func (x *JumioCallbackPayload) GetPersonalInformation() *PersonalInformation { + if x != nil { + return x.PersonalInformation + } + return nil +} + +func (x *JumioCallbackPayload) GetFaceMap() *FaceMap { + if x != nil { + return x.FaceMap + } + return nil +} + +func (x *JumioCallbackPayload) GetCallbackDate() string { + if x != nil { + return x.CallbackDate + } + return "" +} + +func (x *JumioCallbackPayload) GetClientIp() string { + if x != nil { + return x.ClientIp + } + return "" +} + +type VerificationStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` // "PENDING", "DONE", "FAILED" + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` // 可选字段,失败原因 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VerificationStatus) Reset() { + *x = VerificationStatus{} + mi := &file_verify_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerificationStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerificationStatus) ProtoMessage() {} + +func (x *VerificationStatus) ProtoReflect() protoreflect.Message { + mi := &file_verify_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerificationStatus.ProtoReflect.Descriptor instead. +func (*VerificationStatus) Descriptor() ([]byte, []int) { + return file_verify_proto_rawDescGZIP(), []int{2} +} + +func (x *VerificationStatus) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *VerificationStatus) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type Document struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // "APPROVED_VERIFIED", "DENIED_FRAUD", etc. + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // "PASSPORT", "DRIVER_LICENSE", etc. + IssuingCountry string `protobuf:"bytes,3,opt,name=issuing_country,json=issuingCountry,proto3" json:"issuing_country,omitempty"` + Number string `protobuf:"bytes,4,opt,name=number,proto3" json:"number,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Document) Reset() { + *x = Document{} + mi := &file_verify_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Document) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Document) ProtoMessage() {} + +func (x *Document) ProtoReflect() protoreflect.Message { + mi := &file_verify_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_verify_proto_rawDescGZIP(), []int{3} +} + +func (x *Document) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Document) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Document) GetIssuingCountry() string { + if x != nil { + return x.IssuingCountry + } + return "" +} + +func (x *Document) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +type PersonalInformation struct { + state protoimpl.MessageState `protogen:"open.v1"` + FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` + LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` + DateOfBirth string `protobuf:"bytes,3,opt,name=date_of_birth,json=dateOfBirth,proto3" json:"date_of_birth,omitempty"` + Nationality string `protobuf:"bytes,4,opt,name=nationality,proto3" json:"nationality,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PersonalInformation) Reset() { + *x = PersonalInformation{} + mi := &file_verify_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PersonalInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PersonalInformation) ProtoMessage() {} + +func (x *PersonalInformation) ProtoReflect() protoreflect.Message { + mi := &file_verify_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PersonalInformation.ProtoReflect.Descriptor instead. +func (*PersonalInformation) Descriptor() ([]byte, []int) { + return file_verify_proto_rawDescGZIP(), []int{4} +} + +func (x *PersonalInformation) GetFirstName() string { + if x != nil { + return x.FirstName + } + return "" +} + +func (x *PersonalInformation) GetLastName() string { + if x != nil { + return x.LastName + } + return "" +} + +func (x *PersonalInformation) GetDateOfBirth() string { + if x != nil { + return x.DateOfBirth + } + return "" +} + +func (x *PersonalInformation) GetNationality() string { + if x != nil { + return x.Nationality + } + return "" +} + +type FaceMap struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Similarity float32 `protobuf:"fixed32,2,opt,name=similarity,proto3" json:"similarity,omitempty"` // 人脸比对相似度 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FaceMap) Reset() { + *x = FaceMap{} + mi := &file_verify_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FaceMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FaceMap) ProtoMessage() {} + +func (x *FaceMap) ProtoReflect() protoreflect.Message { + mi := &file_verify_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FaceMap.ProtoReflect.Descriptor instead. +func (*FaceMap) Descriptor() ([]byte, []int) { + return file_verify_proto_rawDescGZIP(), []int{5} +} + +func (x *FaceMap) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *FaceMap) GetSimilarity() float32 { + if x != nil { + return x.Similarity + } + return 0 +} + +var File_verify_proto protoreflect.FileDescriptor + +const file_verify_proto_rawDesc = "" + + "\n" + + "\fverify.proto\x12\bpassport\x1a\fblocks.proto\"\x9b\x01\n" + + "\rVerifyRequest\x12\x1a\n" + + "\bprovider\x18\x01 \x01(\tR\bprovider\x125\n" + + "\x04args\x18\x02 \x03(\v2!.passport.VerifyRequest.ArgsEntryR\x04args\x1a7\n" + + "\tArgsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xbe\x03\n" + + "\x14JumioCallbackPayload\x12%\n" + + "\x0escan_reference\x18\x01 \x01(\tR\rscanReference\x12>\n" + + "\x1bcustomer_internal_reference\x18\x02 \x01(\tR\x19customerInternalReference\x12M\n" + + "\x13verification_status\x18\x03 \x01(\v2\x1c.passport.VerificationStatusR\x12verificationStatus\x12.\n" + + "\bdocument\x18\x04 \x01(\v2\x12.passport.DocumentR\bdocument\x12P\n" + + "\x14personal_information\x18\x05 \x01(\v2\x1d.passport.PersonalInformationR\x13personalInformation\x12,\n" + + "\bface_map\x18\x06 \x01(\v2\x11.passport.FaceMapR\afaceMap\x12#\n" + + "\rcallback_date\x18\a \x01(\tR\fcallbackDate\x12\x1b\n" + + "\tclient_ip\x18\b \x01(\tR\bclientIp\"B\n" + + "\x12VerificationStatus\x12\x14\n" + + "\x05state\x18\x01 \x01(\tR\x05state\x12\x16\n" + + "\x06reason\x18\x02 \x01(\tR\x06reason\"w\n" + + "\bDocument\x12\x16\n" + + "\x06status\x18\x01 \x01(\tR\x06status\x12\x12\n" + + "\x04type\x18\x02 \x01(\tR\x04type\x12'\n" + + "\x0fissuing_country\x18\x03 \x01(\tR\x0eissuingCountry\x12\x16\n" + + "\x06number\x18\x04 \x01(\tR\x06number\"\x97\x01\n" + + "\x13PersonalInformation\x12\x1d\n" + + "\n" + + "first_name\x18\x01 \x01(\tR\tfirstName\x12\x1b\n" + + "\tlast_name\x18\x02 \x01(\tR\blastName\x12\"\n" + + "\rdate_of_birth\x18\x03 \x01(\tR\vdateOfBirth\x12 \n" + + "\vnationality\x18\x04 \x01(\tR\vnationality\"A\n" + + "\aFaceMap\x12\x16\n" + + "\x06status\x18\x01 \x01(\tR\x06status\x12\x1e\n" + + "\n" + + "similarity\x18\x02 \x01(\x02R\n" + + "similarity2\x8f\x01\n" + + "\x06Verify\x12;\n" + + "\aRequest\x12\x17.passport.VerifyRequest\x1a\x15.passport.StatusReply\"\x00\x12H\n" + + "\rJumioCallback\x12\x1e.passport.JumioCallbackPayload\x1a\x15.passport.StatusReply\"\x00B\fZ\n" + + ".;passportb\x06proto3" + +var ( + file_verify_proto_rawDescOnce sync.Once + file_verify_proto_rawDescData []byte +) + +func file_verify_proto_rawDescGZIP() []byte { + file_verify_proto_rawDescOnce.Do(func() { + file_verify_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_verify_proto_rawDesc), len(file_verify_proto_rawDesc))) + }) + return file_verify_proto_rawDescData +} + +var file_verify_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_verify_proto_goTypes = []any{ + (*VerifyRequest)(nil), // 0: passport.VerifyRequest + (*JumioCallbackPayload)(nil), // 1: passport.JumioCallbackPayload + (*VerificationStatus)(nil), // 2: passport.VerificationStatus + (*Document)(nil), // 3: passport.Document + (*PersonalInformation)(nil), // 4: passport.PersonalInformation + (*FaceMap)(nil), // 5: passport.FaceMap + nil, // 6: passport.VerifyRequest.ArgsEntry + (*StatusReply)(nil), // 7: passport.StatusReply +} +var file_verify_proto_depIdxs = []int32{ + 6, // 0: passport.VerifyRequest.args:type_name -> passport.VerifyRequest.ArgsEntry + 2, // 1: passport.JumioCallbackPayload.verification_status:type_name -> passport.VerificationStatus + 3, // 2: passport.JumioCallbackPayload.document:type_name -> passport.Document + 4, // 3: passport.JumioCallbackPayload.personal_information:type_name -> passport.PersonalInformation + 5, // 4: passport.JumioCallbackPayload.face_map:type_name -> passport.FaceMap + 0, // 5: passport.Verify.Request:input_type -> passport.VerifyRequest + 1, // 6: passport.Verify.JumioCallback:input_type -> passport.JumioCallbackPayload + 7, // 7: passport.Verify.Request:output_type -> passport.StatusReply + 7, // 8: passport.Verify.JumioCallback:output_type -> passport.StatusReply + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_verify_proto_init() } +func file_verify_proto_init() { + if File_verify_proto != nil { + return + } + file_blocks_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_verify_proto_rawDesc), len(file_verify_proto_rawDesc)), + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_verify_proto_goTypes, + DependencyIndexes: file_verify_proto_depIdxs, + MessageInfos: file_verify_proto_msgTypes, + }.Build() + File_verify_proto = out.File + file_verify_proto_goTypes = nil + file_verify_proto_depIdxs = nil +} diff --git a/golang/passport/verify_grpc.pb.go b/golang/passport/verify_grpc.pb.go new file mode 100644 index 0000000..5093bde --- /dev/null +++ b/golang/passport/verify_grpc.pb.go @@ -0,0 +1,167 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: verify.proto + +package passport + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Verify_Request_FullMethodName = "/passport.Verify/Request" + Verify_JumioCallback_FullMethodName = "/passport.Verify/JumioCallback" +) + +// VerifyClient is the client API for Verify service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Passport(会员通行证)-验证 +type VerifyClient interface { + // 认证请求 + Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) + // KYC 认证回调 + JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*StatusReply, error) +} + +type verifyClient struct { + cc grpc.ClientConnInterface +} + +func NewVerifyClient(cc grpc.ClientConnInterface) VerifyClient { + return &verifyClient{cc} +} + +func (c *verifyClient) Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StatusReply) + err := c.cc.Invoke(ctx, Verify_Request_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *verifyClient) JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*StatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StatusReply) + err := c.cc.Invoke(ctx, Verify_JumioCallback_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VerifyServer is the server API for Verify service. +// All implementations must embed UnimplementedVerifyServer +// for forward compatibility. +// +// Passport(会员通行证)-验证 +type VerifyServer interface { + // 认证请求 + Request(context.Context, *VerifyRequest) (*StatusReply, error) + // KYC 认证回调 + JumioCallback(context.Context, *JumioCallbackPayload) (*StatusReply, error) + mustEmbedUnimplementedVerifyServer() +} + +// UnimplementedVerifyServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedVerifyServer struct{} + +func (UnimplementedVerifyServer) Request(context.Context, *VerifyRequest) (*StatusReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Request not implemented") +} +func (UnimplementedVerifyServer) JumioCallback(context.Context, *JumioCallbackPayload) (*StatusReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method JumioCallback not implemented") +} +func (UnimplementedVerifyServer) mustEmbedUnimplementedVerifyServer() {} +func (UnimplementedVerifyServer) testEmbeddedByValue() {} + +// UnsafeVerifyServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to VerifyServer will +// result in compilation errors. +type UnsafeVerifyServer interface { + mustEmbedUnimplementedVerifyServer() +} + +func RegisterVerifyServer(s grpc.ServiceRegistrar, srv VerifyServer) { + // If the following call pancis, it indicates UnimplementedVerifyServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Verify_ServiceDesc, srv) +} + +func _Verify_Request_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VerifyServer).Request(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Verify_Request_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VerifyServer).Request(ctx, req.(*VerifyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Verify_JumioCallback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JumioCallbackPayload) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VerifyServer).JumioCallback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Verify_JumioCallback_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VerifyServer).JumioCallback(ctx, req.(*JumioCallbackPayload)) + } + return interceptor(ctx, in, info, handler) +} + +// Verify_ServiceDesc is the grpc.ServiceDesc for Verify service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Verify_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "passport.Verify", + HandlerType: (*VerifyServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Request", + Handler: _Verify_Request_Handler, + }, + { + MethodName: "JumioCallback", + Handler: _Verify_JumioCallback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "verify.proto", +} diff --git a/typescript/passport/index.ts b/typescript/passport/index.ts index ce49133..af4c62d 100644 --- a/typescript/passport/index.ts +++ b/typescript/passport/index.ts @@ -41,13 +41,15 @@ export type StatusReply = { export type VerifyStatus = { /** 邮箱是否已验证 */ - emailVerify?: boolean; + emailVerify?: number; /** 手机是否已验证 */ - phoneVerify?: boolean; - /** 头像是否已验证 */ - photoVerify?: boolean; + phoneVerify?: number; + /** 人脸或照片是否已验证 */ + faceVerify?: number; + /** 证件是否已验证 */ + documentVerify?: number; /** 实名是否已验证 */ - kycVerify?: boolean; + kycVerify?: number; }; export type Empty = { @@ -74,13 +76,13 @@ export type GetFullReply = { /** 性别,1为男性,2为女性 */ sex?: number; /** 国家 */ - country?: number; + country?: string; /** 省 */ - province?: number; + province?: string; /** 市 */ - city?: number; + city?: string; /** 区 */ - area?: number; + area?: string; /** 签名 */ sign?: string; /** 背景&封面 */ @@ -89,8 +91,9 @@ export type GetFullReply = { score?: number; /** 等级 */ level?: number; - /** 数据 */ - verify?: { [key: string]: boolean }; + /** 用户验证状态 */ + verifyStatus?: VerifyStatus; + /** 用户标签 */ tags?: TagItem[]; }; @@ -109,13 +112,13 @@ export type SetDataRequest = { /** 性别,1为男性,2为女性 */ sex?: number; /** 国家 */ - country?: number; + country?: string; /** 省 */ - province?: number; + province?: string; /** 市 */ - city?: number; + city?: string; /** 区 */ - area?: number; + area?: string; /** 签名 */ sign?: string; /** 背景&封面 */ @@ -161,7 +164,7 @@ export function createAccountClient( return { }; } -export type VerifyRequest = { +export type ForgetVerifyRequest = { /** 手机号 */ phone?: string; /** 验证码 */ @@ -175,17 +178,6 @@ export type ForgetResetRequest = { password?: string; }; -export type ForgetReply = { - /** 用户唯一码 */ - identity?: string; - /** 数据绑定的相关说明,PASS通过,NOPHONE没有绑定手机号,NOPWD没有设置密码,NOBIND没有手机号同时没有密码 */ - dataBind?: string; - /** 用户凭证 */ - token?: string; - /** 扩展字段 */ - extend?: { [key: string]: string }; -}; - /** Passport-通行证模块 */ export interface Forget { } @@ -196,11 +188,102 @@ export function createForgetClient( return { }; } -export type KycRequest = { +export type LoginByPwdRequest = { + /** 账号 必填 */ + account?: string; + /** 密码 必填 */ + password?: string; +}; + +export type LoginByCodeRequest = { + /** 国家 */ + country?: string; + /** 手机号码 */ + phone?: string; + /** 验证码 */ + code?: string; + /** 代理ID */ + agencyId?: number; + /** 工作人员ID */ + staffId?: number; + /** 所属ID */ + owner_id?: number; + /** 所属唯一码 */ + owner_identity?: string; +}; + +export type LoginReply = { + id?: number; + /** 用户唯一码 */ + identity?: string; + /** 用户凭证 */ + token?: string; + /** 扩展字段 */ + extend?: { [key: string]: string }; + /** 用户验证状态 */ + verifyStatus?: VerifyStatus; +}; + +/** Passport-通行证模块-登录 */ +export interface Login { +} + +export function createLoginClient( + handler: RequestHandler +): Login { + return { + }; +} +export type RegisterRequest = { + /** 国家码,eg CN US */ + country?: string; + /** 邮箱 */ + email?: string; + /** 帐号 */ + account?: string; + /** 手机号 */ + phone?: string; + /** 密码 */ + password?: string; + /** 验证码 */ + code?: string; + /** 代理ID */ + agencyId?: number; + /** 工作人员ID */ + staffId?: number; + /** 所属ID */ + owner_id?: number; + /** 所属唯一码 */ + owner_identity?: string; +}; + +export type RegisterReply = { + id?: number; + /** 用户唯一码 */ + identity?: string; + /** 用户Header所需Token */ + token?: string; + /** 扩展字段 */ + extend?: { [key: string]: string }; + /** 用户验证状态 */ + verifyStatus?: VerifyStatus; +}; + +/** Passport-通行证模块-注册 */ +export interface Register { +} + +export function createRegisterClient( + handler: RequestHandler +): Register { + return { + }; +} +export type VerifyRequest = { /** 服务提供商 */ provider?: string; /** 参数 */ - args?: string; + args?: { [key: string]: string }; }; export type JumioCallbackPayload = { @@ -244,94 +327,13 @@ export type FaceMap = { similarity?: number; }; -/** Passport(会员通行证)模块-Kyc */ -export interface Kyc { +/** Passport(会员通行证)-验证 */ +export interface Verify { } -export function createKycClient( +export function createVerifyClient( handler: RequestHandler -): Kyc { - return { - }; -} -export type LoginByPwdRequest = { - /** 账号 必填 */ - account?: string; - /** 密码 必填 */ - password?: string; -}; - -export type LoginByCodeRequest = { - /** 国家 */ - country?: string; - /** 手机号码 */ - phone?: string; - /** 验证码 */ - code?: string; -}; - -export type LoginReply = { - id?: number; - /** 用户唯一码 */ - identity?: string; - /** 用户凭证 */ - token?: string; - /** 扩展字段 */ - extend?: { [key: string]: string }; - /** 用户验证状态 */ - verifyStatus?: VerifyStatus; -}; - -/** Passport-通行证模块-登录 */ -export interface Login { -} - -export function createLoginClient( - handler: RequestHandler -): Login { - return { - }; -} -export type RegisterRequest = { - /** 邮箱 */ - email?: string; - /** 帐号 */ - account?: string; - /** 手机号 */ - phone?: string; - /** 密码 */ - password?: string; - /** 验证码 */ - code?: string; - /** 代理ID */ - agencyId?: number; - /** 工作人员ID */ - staffId?: number; - /** 所属ID */ - owner_id?: number; - /** 所属唯一码 */ - owner_identity?: string; -}; - -export type RegisterReply = { - id?: number; - /** 用户唯一码 */ - identity?: string; - /** 用户Header所需Token */ - token?: string; - /** 扩展字段 */ - extend?: { [key: string]: string }; - /** 用户验证状态 */ - verifyStatus?: VerifyStatus; -}; - -/** Passport-通行证模块-注册 */ -export interface Register { -} - -export function createRegisterClient( - handler: RequestHandler -): Register { +): Verify { return { }; }