2 // @generated by protobuf-ts 2.9.4
3 // @generated from protobuf file "item-v1.proto" (package "proton_pass_item_v1", syntax proto3)
11 } from '@protobuf-ts/runtime';
12 import { MessageType, UnknownFieldHandler, WireType, reflectionMergePartial } from '@protobuf-ts/runtime';
17 * @generated from protobuf message proton_pass_item_v1.ItemNote
19 export interface ItemNote {}
21 * @generated from protobuf message proton_pass_item_v1.PasskeyCreationData
23 export interface PasskeyCreationData {
25 * @generated from protobuf field: string os_name = 1;
29 * @generated from protobuf field: string os_version = 2;
33 * @generated from protobuf field: string device_name = 3;
37 * @generated from protobuf field: string app_version = 4;
42 * @generated from protobuf message proton_pass_item_v1.Passkey
44 export interface Passkey {
46 * @generated from protobuf field: string key_id = 1;
50 * @generated from protobuf field: bytes content = 2;
54 * @generated from protobuf field: string domain = 3;
58 * @generated from protobuf field: string rp_id = 4;
62 * @generated from protobuf field: string rp_name = 5;
66 * @generated from protobuf field: string user_name = 6;
70 * @generated from protobuf field: string user_display_name = 7;
72 userDisplayName: string;
74 * @generated from protobuf field: bytes user_id = 8;
78 * @generated from protobuf field: uint32 create_time = 9;
82 * @generated from protobuf field: string note = 10;
86 * @generated from protobuf field: bytes credential_id = 11;
88 credentialId: Uint8Array;
90 * @generated from protobuf field: bytes user_handle = 12;
92 userHandle: Uint8Array;
94 * @generated from protobuf field: proton_pass_item_v1.PasskeyCreationData creation_data = 13;
96 creationData?: PasskeyCreationData;
99 * @generated from protobuf message proton_pass_item_v1.ItemLogin
101 export interface ItemLogin {
103 * @generated from protobuf field: string item_email = 1;
107 * @generated from protobuf field: string password = 2;
111 * @generated from protobuf field: repeated string urls = 3;
115 * @generated from protobuf field: string totp_uri = 4;
119 * @generated from protobuf field: repeated proton_pass_item_v1.Passkey passkeys = 5;
123 * @generated from protobuf field: string item_username = 6;
125 itemUsername: string;
128 * @generated from protobuf message proton_pass_item_v1.ItemAlias
130 export interface ItemAlias {}
132 * @generated from protobuf message proton_pass_item_v1.ItemCreditCard
134 export interface ItemCreditCard {
136 * @generated from protobuf field: string cardholder_name = 1;
138 cardholderName: string;
140 * @generated from protobuf field: proton_pass_item_v1.CardType card_type = 2;
144 * @generated from protobuf field: string number = 3;
148 * @generated from protobuf field: string verification_number = 4;
150 verificationNumber: string;
152 * Expected format: YYYY-MM, always containing two numbers for the month, even if is 01
154 * @generated from protobuf field: string expiration_date = 5;
156 expirationDate: string;
158 * @generated from protobuf field: string pin = 6;
163 * @generated from protobuf message proton_pass_item_v1.ItemIdentity
165 export interface ItemIdentity {
170 * @generated from protobuf field: string full_name = 1;
174 * @generated from protobuf field: string email = 2;
178 * @generated from protobuf field: string phone_number = 3;
184 * @generated from protobuf field: string first_name = 4;
188 * @generated from protobuf field: string middle_name = 5;
192 * @generated from protobuf field: string last_name = 6;
196 * @generated from protobuf field: string birthdate = 7;
200 * @generated from protobuf field: string gender = 8;
204 * @generated from protobuf field: repeated proton_pass_item_v1.ExtraField extra_personal_details = 9;
206 extraPersonalDetails: ExtraField[];
211 * @generated from protobuf field: string organization = 10;
213 organization: string;
215 * @generated from protobuf field: string street_address = 11;
217 streetAddress: string;
219 * @generated from protobuf field: string zip_or_postal_code = 12;
221 zipOrPostalCode: string;
223 * @generated from protobuf field: string city = 13;
227 * @generated from protobuf field: string state_or_province = 14;
229 stateOrProvince: string;
231 * @generated from protobuf field: string country_or_region = 15;
233 countryOrRegion: string;
237 * @generated from protobuf field: string floor = 16;
241 * @generated from protobuf field: string county = 17;
245 * @generated from protobuf field: repeated proton_pass_item_v1.ExtraField extra_address_details = 18;
247 extraAddressDetails: ExtraField[];
252 * @generated from protobuf field: string social_security_number = 19;
254 socialSecurityNumber: string;
256 * @generated from protobuf field: string passport_number = 20;
258 passportNumber: string;
260 * @generated from protobuf field: string license_number = 21;
262 licenseNumber: string;
264 * @generated from protobuf field: string website = 22;
268 * @generated from protobuf field: string x_handle = 23;
272 * @generated from protobuf field: string second_phone_number = 24;
274 secondPhoneNumber: string;
278 * @generated from protobuf field: string linkedin = 25;
282 * @generated from protobuf field: string reddit = 26;
286 * @generated from protobuf field: string facebook = 27;
290 * @generated from protobuf field: string yahoo = 28;
294 * @generated from protobuf field: string instagram = 29;
298 * @generated from protobuf field: repeated proton_pass_item_v1.ExtraField extra_contact_details = 30;
300 extraContactDetails: ExtraField[];
305 * @generated from protobuf field: string company = 31;
309 * @generated from protobuf field: string job_title = 32;
315 * @generated from protobuf field: string personal_website = 33;
317 personalWebsite: string;
319 * @generated from protobuf field: string work_phone_number = 34;
321 workPhoneNumber: string;
323 * @generated from protobuf field: string work_email = 35;
327 * @generated from protobuf field: repeated proton_pass_item_v1.ExtraField extra_work_details = 36;
329 extraWorkDetails: ExtraField[];
333 * @generated from protobuf field: repeated proton_pass_item_v1.ExtraIdentitySection extra_sections = 37;
335 extraSections: ExtraIdentitySection[];
338 * @generated from protobuf message proton_pass_item_v1.ExtraIdentitySection
340 export interface ExtraIdentitySection {
342 * @generated from protobuf field: string section_name = 1;
346 * @generated from protobuf field: repeated proton_pass_item_v1.ExtraField section_fields = 2;
348 sectionFields: ExtraField[];
353 * @generated from protobuf message proton_pass_item_v1.AllowedAndroidApp
355 export interface AllowedAndroidApp {
357 * @generated from protobuf field: string package_name = 1;
361 * @generated from protobuf field: repeated string hashes = 2;
365 * @generated from protobuf field: string app_name = 3;
370 * @generated from protobuf message proton_pass_item_v1.AndroidSpecific
372 export interface AndroidSpecific {
374 * @generated from protobuf field: repeated proton_pass_item_v1.AllowedAndroidApp allowed_apps = 1;
376 allowedApps: AllowedAndroidApp[];
379 * @generated from protobuf message proton_pass_item_v1.PlatformSpecific
381 export interface PlatformSpecific {
383 * @generated from protobuf field: proton_pass_item_v1.AndroidSpecific android = 1;
385 android?: AndroidSpecific;
390 * @generated from protobuf message proton_pass_item_v1.ExtraTotp
392 export interface ExtraTotp {
394 * @generated from protobuf field: string totp_uri = 1;
399 * @generated from protobuf message proton_pass_item_v1.ExtraTextField
401 export interface ExtraTextField {
403 * @generated from protobuf field: string content = 1;
408 * @generated from protobuf message proton_pass_item_v1.ExtraHiddenField
410 export interface ExtraHiddenField {
412 * @generated from protobuf field: string content = 1;
417 * @generated from protobuf message proton_pass_item_v1.ExtraField
419 export interface ExtraField {
421 * @generated from protobuf field: string field_name = 1;
425 * @generated from protobuf oneof: content
431 * @generated from protobuf field: proton_pass_item_v1.ExtraTotp totp = 2;
438 * @generated from protobuf field: proton_pass_item_v1.ExtraTextField text = 3;
440 text: ExtraTextField;
445 * @generated from protobuf field: proton_pass_item_v1.ExtraHiddenField hidden = 4;
447 hidden: ExtraHiddenField;
450 oneofKind: undefined;
454 * @generated from protobuf message proton_pass_item_v1.Metadata
456 export interface Metadata {
458 * @generated from protobuf field: string name = 1;
462 * @generated from protobuf field: string note = 2;
466 * @generated from protobuf field: string item_uuid = 3;
471 * @generated from protobuf message proton_pass_item_v1.Content
473 export interface Content {
475 * @generated from protobuf oneof: content
481 * @generated from protobuf field: proton_pass_item_v1.ItemNote note = 2;
488 * @generated from protobuf field: proton_pass_item_v1.ItemLogin login = 3;
495 * @generated from protobuf field: proton_pass_item_v1.ItemAlias alias = 4;
500 oneofKind: 'creditCard';
502 * @generated from protobuf field: proton_pass_item_v1.ItemCreditCard credit_card = 5;
504 creditCard: ItemCreditCard;
507 oneofKind: 'identity';
509 * @generated from protobuf field: proton_pass_item_v1.ItemIdentity identity = 6;
511 identity: ItemIdentity;
514 oneofKind: undefined;
518 * @generated from protobuf message proton_pass_item_v1.Item
520 export interface Item {
522 * @generated from protobuf field: proton_pass_item_v1.Metadata metadata = 1;
526 * @generated from protobuf field: proton_pass_item_v1.Content content = 2;
530 * @generated from protobuf field: proton_pass_item_v1.PlatformSpecific platform_specific = 3;
532 platformSpecific?: PlatformSpecific;
534 * @generated from protobuf field: repeated proton_pass_item_v1.ExtraField extra_fields = 4;
536 extraFields: ExtraField[];
541 * @generated from protobuf enum proton_pass_item_v1.CardType
543 export enum CardType {
545 * @generated from protobuf enum value: Unspecified = 0;
549 * @generated from protobuf enum value: Other = 1;
553 * @generated from protobuf enum value: Visa = 2;
557 * @generated from protobuf enum value: Mastercard = 3;
561 * @generated from protobuf enum value: AmericanExpress = 4;
565 // @generated message type with reflection information, may provide speed optimized methods
566 class ItemNote$Type extends MessageType<ItemNote> {
568 super('proton_pass_item_v1.ItemNote', []);
570 create(value?: PartialMessage<ItemNote>): ItemNote {
571 const message = globalThis.Object.create(this.messagePrototype!);
572 if (value !== undefined) reflectionMergePartial<ItemNote>(this, message, value);
575 internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemNote): ItemNote {
576 return target ?? this.create();
578 internalBinaryWrite(message: ItemNote, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
579 let u = options.writeUnknownFields;
580 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
585 * @generated MessageType for protobuf message proton_pass_item_v1.ItemNote
587 export const ItemNote = new ItemNote$Type();
588 // @generated message type with reflection information, may provide speed optimized methods
589 class PasskeyCreationData$Type extends MessageType<PasskeyCreationData> {
591 super('proton_pass_item_v1.PasskeyCreationData', [
592 { no: 1, name: 'os_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
593 { no: 2, name: 'os_version', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
594 { no: 3, name: 'device_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
595 { no: 4, name: 'app_version', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
598 create(value?: PartialMessage<PasskeyCreationData>): PasskeyCreationData {
599 const message = globalThis.Object.create(this.messagePrototype!);
601 message.osVersion = '';
602 message.deviceName = '';
603 message.appVersion = '';
604 if (value !== undefined) reflectionMergePartial<PasskeyCreationData>(this, message, value);
608 reader: IBinaryReader,
610 options: BinaryReadOptions,
611 target?: PasskeyCreationData
612 ): PasskeyCreationData {
613 let message = target ?? this.create(),
614 end = reader.pos + length;
615 while (reader.pos < end) {
616 let [fieldNo, wireType] = reader.tag();
618 case /* string os_name */ 1:
619 message.osName = reader.string();
621 case /* string os_version */ 2:
622 message.osVersion = reader.string();
624 case /* string device_name */ 3:
625 message.deviceName = reader.string();
627 case /* string app_version */ 4:
628 message.appVersion = reader.string();
631 let u = options.readUnknownField;
633 throw new globalThis.Error(
634 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
636 let d = reader.skip(wireType);
638 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
644 message: PasskeyCreationData,
645 writer: IBinaryWriter,
646 options: BinaryWriteOptions
648 /* string os_name = 1; */
649 if (message.osName !== '') writer.tag(1, WireType.LengthDelimited).string(message.osName);
650 /* string os_version = 2; */
651 if (message.osVersion !== '') writer.tag(2, WireType.LengthDelimited).string(message.osVersion);
652 /* string device_name = 3; */
653 if (message.deviceName !== '') writer.tag(3, WireType.LengthDelimited).string(message.deviceName);
654 /* string app_version = 4; */
655 if (message.appVersion !== '') writer.tag(4, WireType.LengthDelimited).string(message.appVersion);
656 let u = options.writeUnknownFields;
657 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
662 * @generated MessageType for protobuf message proton_pass_item_v1.PasskeyCreationData
664 export const PasskeyCreationData = new PasskeyCreationData$Type();
665 // @generated message type with reflection information, may provide speed optimized methods
666 class Passkey$Type extends MessageType<Passkey> {
668 super('proton_pass_item_v1.Passkey', [
669 { no: 1, name: 'key_id', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
670 { no: 2, name: 'content', kind: 'scalar', T: 12 /*ScalarType.BYTES*/ },
671 { no: 3, name: 'domain', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
672 { no: 4, name: 'rp_id', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
673 { no: 5, name: 'rp_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
674 { no: 6, name: 'user_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
675 { no: 7, name: 'user_display_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
676 { no: 8, name: 'user_id', kind: 'scalar', T: 12 /*ScalarType.BYTES*/ },
677 { no: 9, name: 'create_time', kind: 'scalar', T: 13 /*ScalarType.UINT32*/ },
678 { no: 10, name: 'note', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
679 { no: 11, name: 'credential_id', kind: 'scalar', T: 12 /*ScalarType.BYTES*/ },
680 { no: 12, name: 'user_handle', kind: 'scalar', T: 12 /*ScalarType.BYTES*/ },
681 { no: 13, name: 'creation_data', kind: 'message', T: () => PasskeyCreationData },
684 create(value?: PartialMessage<Passkey>): Passkey {
685 const message = globalThis.Object.create(this.messagePrototype!);
687 message.content = new Uint8Array(0);
691 message.userName = '';
692 message.userDisplayName = '';
693 message.userId = new Uint8Array(0);
694 message.createTime = 0;
696 message.credentialId = new Uint8Array(0);
697 message.userHandle = new Uint8Array(0);
698 if (value !== undefined) reflectionMergePartial<Passkey>(this, message, value);
701 internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Passkey): Passkey {
702 let message = target ?? this.create(),
703 end = reader.pos + length;
704 while (reader.pos < end) {
705 let [fieldNo, wireType] = reader.tag();
707 case /* string key_id */ 1:
708 message.keyId = reader.string();
710 case /* bytes content */ 2:
711 message.content = reader.bytes();
713 case /* string domain */ 3:
714 message.domain = reader.string();
716 case /* string rp_id */ 4:
717 message.rpId = reader.string();
719 case /* string rp_name */ 5:
720 message.rpName = reader.string();
722 case /* string user_name */ 6:
723 message.userName = reader.string();
725 case /* string user_display_name */ 7:
726 message.userDisplayName = reader.string();
728 case /* bytes user_id */ 8:
729 message.userId = reader.bytes();
731 case /* uint32 create_time */ 9:
732 message.createTime = reader.uint32();
734 case /* string note */ 10:
735 message.note = reader.string();
737 case /* bytes credential_id */ 11:
738 message.credentialId = reader.bytes();
740 case /* bytes user_handle */ 12:
741 message.userHandle = reader.bytes();
743 case /* proton_pass_item_v1.PasskeyCreationData creation_data */ 13:
744 message.creationData = PasskeyCreationData.internalBinaryRead(
752 let u = options.readUnknownField;
754 throw new globalThis.Error(
755 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
757 let d = reader.skip(wireType);
759 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
764 internalBinaryWrite(message: Passkey, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
765 /* string key_id = 1; */
766 if (message.keyId !== '') writer.tag(1, WireType.LengthDelimited).string(message.keyId);
767 /* bytes content = 2; */
768 if (message.content.length) writer.tag(2, WireType.LengthDelimited).bytes(message.content);
769 /* string domain = 3; */
770 if (message.domain !== '') writer.tag(3, WireType.LengthDelimited).string(message.domain);
771 /* string rp_id = 4; */
772 if (message.rpId !== '') writer.tag(4, WireType.LengthDelimited).string(message.rpId);
773 /* string rp_name = 5; */
774 if (message.rpName !== '') writer.tag(5, WireType.LengthDelimited).string(message.rpName);
775 /* string user_name = 6; */
776 if (message.userName !== '') writer.tag(6, WireType.LengthDelimited).string(message.userName);
777 /* string user_display_name = 7; */
778 if (message.userDisplayName !== '') writer.tag(7, WireType.LengthDelimited).string(message.userDisplayName);
779 /* bytes user_id = 8; */
780 if (message.userId.length) writer.tag(8, WireType.LengthDelimited).bytes(message.userId);
781 /* uint32 create_time = 9; */
782 if (message.createTime !== 0) writer.tag(9, WireType.Varint).uint32(message.createTime);
783 /* string note = 10; */
784 if (message.note !== '') writer.tag(10, WireType.LengthDelimited).string(message.note);
785 /* bytes credential_id = 11; */
786 if (message.credentialId.length) writer.tag(11, WireType.LengthDelimited).bytes(message.credentialId);
787 /* bytes user_handle = 12; */
788 if (message.userHandle.length) writer.tag(12, WireType.LengthDelimited).bytes(message.userHandle);
789 /* proton_pass_item_v1.PasskeyCreationData creation_data = 13; */
790 if (message.creationData)
791 PasskeyCreationData.internalBinaryWrite(
792 message.creationData,
793 writer.tag(13, WireType.LengthDelimited).fork(),
796 let u = options.writeUnknownFields;
797 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
802 * @generated MessageType for protobuf message proton_pass_item_v1.Passkey
804 export const Passkey = new Passkey$Type();
805 // @generated message type with reflection information, may provide speed optimized methods
806 class ItemLogin$Type extends MessageType<ItemLogin> {
808 super('proton_pass_item_v1.ItemLogin', [
809 { no: 1, name: 'item_email', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
810 { no: 2, name: 'password', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
811 { no: 3, name: 'urls', kind: 'scalar', repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
812 { no: 4, name: 'totp_uri', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
813 { no: 5, name: 'passkeys', kind: 'message', repeat: 1 /*RepeatType.PACKED*/, T: () => Passkey },
814 { no: 6, name: 'item_username', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
817 create(value?: PartialMessage<ItemLogin>): ItemLogin {
818 const message = globalThis.Object.create(this.messagePrototype!);
819 message.itemEmail = '';
820 message.password = '';
822 message.totpUri = '';
823 message.passkeys = [];
824 message.itemUsername = '';
825 if (value !== undefined) reflectionMergePartial<ItemLogin>(this, message, value);
829 reader: IBinaryReader,
831 options: BinaryReadOptions,
834 let message = target ?? this.create(),
835 end = reader.pos + length;
836 while (reader.pos < end) {
837 let [fieldNo, wireType] = reader.tag();
839 case /* string item_email */ 1:
840 message.itemEmail = reader.string();
842 case /* string password */ 2:
843 message.password = reader.string();
845 case /* repeated string urls */ 3:
846 message.urls.push(reader.string());
848 case /* string totp_uri */ 4:
849 message.totpUri = reader.string();
851 case /* repeated proton_pass_item_v1.Passkey passkeys */ 5:
852 message.passkeys.push(Passkey.internalBinaryRead(reader, reader.uint32(), options));
854 case /* string item_username */ 6:
855 message.itemUsername = reader.string();
858 let u = options.readUnknownField;
860 throw new globalThis.Error(
861 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
863 let d = reader.skip(wireType);
865 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
870 internalBinaryWrite(message: ItemLogin, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
871 /* string item_email = 1; */
872 if (message.itemEmail !== '') writer.tag(1, WireType.LengthDelimited).string(message.itemEmail);
873 /* string password = 2; */
874 if (message.password !== '') writer.tag(2, WireType.LengthDelimited).string(message.password);
875 /* repeated string urls = 3; */
876 for (let i = 0; i < message.urls.length; i++) writer.tag(3, WireType.LengthDelimited).string(message.urls[i]);
877 /* string totp_uri = 4; */
878 if (message.totpUri !== '') writer.tag(4, WireType.LengthDelimited).string(message.totpUri);
879 /* repeated proton_pass_item_v1.Passkey passkeys = 5; */
880 for (let i = 0; i < message.passkeys.length; i++)
881 Passkey.internalBinaryWrite(
883 writer.tag(5, WireType.LengthDelimited).fork(),
886 /* string item_username = 6; */
887 if (message.itemUsername !== '') writer.tag(6, WireType.LengthDelimited).string(message.itemUsername);
888 let u = options.writeUnknownFields;
889 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
894 * @generated MessageType for protobuf message proton_pass_item_v1.ItemLogin
896 export const ItemLogin = new ItemLogin$Type();
897 // @generated message type with reflection information, may provide speed optimized methods
898 class ItemAlias$Type extends MessageType<ItemAlias> {
900 super('proton_pass_item_v1.ItemAlias', []);
902 create(value?: PartialMessage<ItemAlias>): ItemAlias {
903 const message = globalThis.Object.create(this.messagePrototype!);
904 if (value !== undefined) reflectionMergePartial<ItemAlias>(this, message, value);
908 reader: IBinaryReader,
910 options: BinaryReadOptions,
913 return target ?? this.create();
915 internalBinaryWrite(message: ItemAlias, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
916 let u = options.writeUnknownFields;
917 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
922 * @generated MessageType for protobuf message proton_pass_item_v1.ItemAlias
924 export const ItemAlias = new ItemAlias$Type();
925 // @generated message type with reflection information, may provide speed optimized methods
926 class ItemCreditCard$Type extends MessageType<ItemCreditCard> {
928 super('proton_pass_item_v1.ItemCreditCard', [
929 { no: 1, name: 'cardholder_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
930 { no: 2, name: 'card_type', kind: 'enum', T: () => ['proton_pass_item_v1.CardType', CardType] },
931 { no: 3, name: 'number', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
932 { no: 4, name: 'verification_number', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
933 { no: 5, name: 'expiration_date', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
934 { no: 6, name: 'pin', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
937 create(value?: PartialMessage<ItemCreditCard>): ItemCreditCard {
938 const message = globalThis.Object.create(this.messagePrototype!);
939 message.cardholderName = '';
940 message.cardType = 0;
942 message.verificationNumber = '';
943 message.expirationDate = '';
945 if (value !== undefined) reflectionMergePartial<ItemCreditCard>(this, message, value);
949 reader: IBinaryReader,
951 options: BinaryReadOptions,
952 target?: ItemCreditCard
954 let message = target ?? this.create(),
955 end = reader.pos + length;
956 while (reader.pos < end) {
957 let [fieldNo, wireType] = reader.tag();
959 case /* string cardholder_name */ 1:
960 message.cardholderName = reader.string();
962 case /* proton_pass_item_v1.CardType card_type */ 2:
963 message.cardType = reader.int32();
965 case /* string number */ 3:
966 message.number = reader.string();
968 case /* string verification_number */ 4:
969 message.verificationNumber = reader.string();
971 case /* string expiration_date */ 5:
972 message.expirationDate = reader.string();
974 case /* string pin */ 6:
975 message.pin = reader.string();
978 let u = options.readUnknownField;
980 throw new globalThis.Error(
981 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
983 let d = reader.skip(wireType);
985 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
990 internalBinaryWrite(message: ItemCreditCard, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
991 /* string cardholder_name = 1; */
992 if (message.cardholderName !== '') writer.tag(1, WireType.LengthDelimited).string(message.cardholderName);
993 /* proton_pass_item_v1.CardType card_type = 2; */
994 if (message.cardType !== 0) writer.tag(2, WireType.Varint).int32(message.cardType);
995 /* string number = 3; */
996 if (message.number !== '') writer.tag(3, WireType.LengthDelimited).string(message.number);
997 /* string verification_number = 4; */
998 if (message.verificationNumber !== '')
999 writer.tag(4, WireType.LengthDelimited).string(message.verificationNumber);
1000 /* string expiration_date = 5; */
1001 if (message.expirationDate !== '') writer.tag(5, WireType.LengthDelimited).string(message.expirationDate);
1002 /* string pin = 6; */
1003 if (message.pin !== '') writer.tag(6, WireType.LengthDelimited).string(message.pin);
1004 let u = options.writeUnknownFields;
1005 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1010 * @generated MessageType for protobuf message proton_pass_item_v1.ItemCreditCard
1012 export const ItemCreditCard = new ItemCreditCard$Type();
1013 // @generated message type with reflection information, may provide speed optimized methods
1014 class ItemIdentity$Type extends MessageType<ItemIdentity> {
1016 super('proton_pass_item_v1.ItemIdentity', [
1017 { no: 1, name: 'full_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1018 { no: 2, name: 'email', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1019 { no: 3, name: 'phone_number', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1020 { no: 4, name: 'first_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1021 { no: 5, name: 'middle_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1022 { no: 6, name: 'last_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1023 { no: 7, name: 'birthdate', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1024 { no: 8, name: 'gender', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1027 name: 'extra_personal_details',
1029 repeat: 1 /*RepeatType.PACKED*/,
1030 T: () => ExtraField,
1032 { no: 10, name: 'organization', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1033 { no: 11, name: 'street_address', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1034 { no: 12, name: 'zip_or_postal_code', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1035 { no: 13, name: 'city', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1036 { no: 14, name: 'state_or_province', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1037 { no: 15, name: 'country_or_region', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1038 { no: 16, name: 'floor', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1039 { no: 17, name: 'county', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1042 name: 'extra_address_details',
1044 repeat: 1 /*RepeatType.PACKED*/,
1045 T: () => ExtraField,
1047 { no: 19, name: 'social_security_number', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1048 { no: 20, name: 'passport_number', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1049 { no: 21, name: 'license_number', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1050 { no: 22, name: 'website', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1051 { no: 23, name: 'x_handle', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1052 { no: 24, name: 'second_phone_number', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1053 { no: 25, name: 'linkedin', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1054 { no: 26, name: 'reddit', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1055 { no: 27, name: 'facebook', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1056 { no: 28, name: 'yahoo', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1057 { no: 29, name: 'instagram', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1060 name: 'extra_contact_details',
1062 repeat: 1 /*RepeatType.PACKED*/,
1063 T: () => ExtraField,
1065 { no: 31, name: 'company', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1066 { no: 32, name: 'job_title', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1067 { no: 33, name: 'personal_website', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1068 { no: 34, name: 'work_phone_number', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1069 { no: 35, name: 'work_email', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1072 name: 'extra_work_details',
1074 repeat: 1 /*RepeatType.PACKED*/,
1075 T: () => ExtraField,
1079 name: 'extra_sections',
1081 repeat: 1 /*RepeatType.PACKED*/,
1082 T: () => ExtraIdentitySection,
1086 create(value?: PartialMessage<ItemIdentity>): ItemIdentity {
1087 const message = globalThis.Object.create(this.messagePrototype!);
1088 message.fullName = '';
1090 message.phoneNumber = '';
1091 message.firstName = '';
1092 message.middleName = '';
1093 message.lastName = '';
1094 message.birthdate = '';
1095 message.gender = '';
1096 message.extraPersonalDetails = [];
1097 message.organization = '';
1098 message.streetAddress = '';
1099 message.zipOrPostalCode = '';
1101 message.stateOrProvince = '';
1102 message.countryOrRegion = '';
1104 message.county = '';
1105 message.extraAddressDetails = [];
1106 message.socialSecurityNumber = '';
1107 message.passportNumber = '';
1108 message.licenseNumber = '';
1109 message.website = '';
1110 message.xHandle = '';
1111 message.secondPhoneNumber = '';
1112 message.linkedin = '';
1113 message.reddit = '';
1114 message.facebook = '';
1116 message.instagram = '';
1117 message.extraContactDetails = [];
1118 message.company = '';
1119 message.jobTitle = '';
1120 message.personalWebsite = '';
1121 message.workPhoneNumber = '';
1122 message.workEmail = '';
1123 message.extraWorkDetails = [];
1124 message.extraSections = [];
1125 if (value !== undefined) reflectionMergePartial<ItemIdentity>(this, message, value);
1129 reader: IBinaryReader,
1131 options: BinaryReadOptions,
1132 target?: ItemIdentity
1134 let message = target ?? this.create(),
1135 end = reader.pos + length;
1136 while (reader.pos < end) {
1137 let [fieldNo, wireType] = reader.tag();
1139 case /* string full_name */ 1:
1140 message.fullName = reader.string();
1142 case /* string email */ 2:
1143 message.email = reader.string();
1145 case /* string phone_number */ 3:
1146 message.phoneNumber = reader.string();
1148 case /* string first_name */ 4:
1149 message.firstName = reader.string();
1151 case /* string middle_name */ 5:
1152 message.middleName = reader.string();
1154 case /* string last_name */ 6:
1155 message.lastName = reader.string();
1157 case /* string birthdate */ 7:
1158 message.birthdate = reader.string();
1160 case /* string gender */ 8:
1161 message.gender = reader.string();
1163 case /* repeated proton_pass_item_v1.ExtraField extra_personal_details */ 9:
1164 message.extraPersonalDetails.push(ExtraField.internalBinaryRead(reader, reader.uint32(), options));
1166 case /* string organization */ 10:
1167 message.organization = reader.string();
1169 case /* string street_address */ 11:
1170 message.streetAddress = reader.string();
1172 case /* string zip_or_postal_code */ 12:
1173 message.zipOrPostalCode = reader.string();
1175 case /* string city */ 13:
1176 message.city = reader.string();
1178 case /* string state_or_province */ 14:
1179 message.stateOrProvince = reader.string();
1181 case /* string country_or_region */ 15:
1182 message.countryOrRegion = reader.string();
1184 case /* string floor */ 16:
1185 message.floor = reader.string();
1187 case /* string county */ 17:
1188 message.county = reader.string();
1190 case /* repeated proton_pass_item_v1.ExtraField extra_address_details */ 18:
1191 message.extraAddressDetails.push(ExtraField.internalBinaryRead(reader, reader.uint32(), options));
1193 case /* string social_security_number */ 19:
1194 message.socialSecurityNumber = reader.string();
1196 case /* string passport_number */ 20:
1197 message.passportNumber = reader.string();
1199 case /* string license_number */ 21:
1200 message.licenseNumber = reader.string();
1202 case /* string website */ 22:
1203 message.website = reader.string();
1205 case /* string x_handle */ 23:
1206 message.xHandle = reader.string();
1208 case /* string second_phone_number */ 24:
1209 message.secondPhoneNumber = reader.string();
1211 case /* string linkedin */ 25:
1212 message.linkedin = reader.string();
1214 case /* string reddit */ 26:
1215 message.reddit = reader.string();
1217 case /* string facebook */ 27:
1218 message.facebook = reader.string();
1220 case /* string yahoo */ 28:
1221 message.yahoo = reader.string();
1223 case /* string instagram */ 29:
1224 message.instagram = reader.string();
1226 case /* repeated proton_pass_item_v1.ExtraField extra_contact_details */ 30:
1227 message.extraContactDetails.push(ExtraField.internalBinaryRead(reader, reader.uint32(), options));
1229 case /* string company */ 31:
1230 message.company = reader.string();
1232 case /* string job_title */ 32:
1233 message.jobTitle = reader.string();
1235 case /* string personal_website */ 33:
1236 message.personalWebsite = reader.string();
1238 case /* string work_phone_number */ 34:
1239 message.workPhoneNumber = reader.string();
1241 case /* string work_email */ 35:
1242 message.workEmail = reader.string();
1244 case /* repeated proton_pass_item_v1.ExtraField extra_work_details */ 36:
1245 message.extraWorkDetails.push(ExtraField.internalBinaryRead(reader, reader.uint32(), options));
1247 case /* repeated proton_pass_item_v1.ExtraIdentitySection extra_sections */ 37:
1248 message.extraSections.push(
1249 ExtraIdentitySection.internalBinaryRead(reader, reader.uint32(), options)
1253 let u = options.readUnknownField;
1255 throw new globalThis.Error(
1256 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1258 let d = reader.skip(wireType);
1260 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1265 internalBinaryWrite(message: ItemIdentity, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1266 /* string full_name = 1; */
1267 if (message.fullName !== '') writer.tag(1, WireType.LengthDelimited).string(message.fullName);
1268 /* string email = 2; */
1269 if (message.email !== '') writer.tag(2, WireType.LengthDelimited).string(message.email);
1270 /* string phone_number = 3; */
1271 if (message.phoneNumber !== '') writer.tag(3, WireType.LengthDelimited).string(message.phoneNumber);
1272 /* string first_name = 4; */
1273 if (message.firstName !== '') writer.tag(4, WireType.LengthDelimited).string(message.firstName);
1274 /* string middle_name = 5; */
1275 if (message.middleName !== '') writer.tag(5, WireType.LengthDelimited).string(message.middleName);
1276 /* string last_name = 6; */
1277 if (message.lastName !== '') writer.tag(6, WireType.LengthDelimited).string(message.lastName);
1278 /* string birthdate = 7; */
1279 if (message.birthdate !== '') writer.tag(7, WireType.LengthDelimited).string(message.birthdate);
1280 /* string gender = 8; */
1281 if (message.gender !== '') writer.tag(8, WireType.LengthDelimited).string(message.gender);
1282 /* repeated proton_pass_item_v1.ExtraField extra_personal_details = 9; */
1283 for (let i = 0; i < message.extraPersonalDetails.length; i++)
1284 ExtraField.internalBinaryWrite(
1285 message.extraPersonalDetails[i],
1286 writer.tag(9, WireType.LengthDelimited).fork(),
1289 /* string organization = 10; */
1290 if (message.organization !== '') writer.tag(10, WireType.LengthDelimited).string(message.organization);
1291 /* string street_address = 11; */
1292 if (message.streetAddress !== '') writer.tag(11, WireType.LengthDelimited).string(message.streetAddress);
1293 /* string zip_or_postal_code = 12; */
1294 if (message.zipOrPostalCode !== '') writer.tag(12, WireType.LengthDelimited).string(message.zipOrPostalCode);
1295 /* string city = 13; */
1296 if (message.city !== '') writer.tag(13, WireType.LengthDelimited).string(message.city);
1297 /* string state_or_province = 14; */
1298 if (message.stateOrProvince !== '') writer.tag(14, WireType.LengthDelimited).string(message.stateOrProvince);
1299 /* string country_or_region = 15; */
1300 if (message.countryOrRegion !== '') writer.tag(15, WireType.LengthDelimited).string(message.countryOrRegion);
1301 /* string floor = 16; */
1302 if (message.floor !== '') writer.tag(16, WireType.LengthDelimited).string(message.floor);
1303 /* string county = 17; */
1304 if (message.county !== '') writer.tag(17, WireType.LengthDelimited).string(message.county);
1305 /* repeated proton_pass_item_v1.ExtraField extra_address_details = 18; */
1306 for (let i = 0; i < message.extraAddressDetails.length; i++)
1307 ExtraField.internalBinaryWrite(
1308 message.extraAddressDetails[i],
1309 writer.tag(18, WireType.LengthDelimited).fork(),
1312 /* string social_security_number = 19; */
1313 if (message.socialSecurityNumber !== '')
1314 writer.tag(19, WireType.LengthDelimited).string(message.socialSecurityNumber);
1315 /* string passport_number = 20; */
1316 if (message.passportNumber !== '') writer.tag(20, WireType.LengthDelimited).string(message.passportNumber);
1317 /* string license_number = 21; */
1318 if (message.licenseNumber !== '') writer.tag(21, WireType.LengthDelimited).string(message.licenseNumber);
1319 /* string website = 22; */
1320 if (message.website !== '') writer.tag(22, WireType.LengthDelimited).string(message.website);
1321 /* string x_handle = 23; */
1322 if (message.xHandle !== '') writer.tag(23, WireType.LengthDelimited).string(message.xHandle);
1323 /* string second_phone_number = 24; */
1324 if (message.secondPhoneNumber !== '')
1325 writer.tag(24, WireType.LengthDelimited).string(message.secondPhoneNumber);
1326 /* string linkedin = 25; */
1327 if (message.linkedin !== '') writer.tag(25, WireType.LengthDelimited).string(message.linkedin);
1328 /* string reddit = 26; */
1329 if (message.reddit !== '') writer.tag(26, WireType.LengthDelimited).string(message.reddit);
1330 /* string facebook = 27; */
1331 if (message.facebook !== '') writer.tag(27, WireType.LengthDelimited).string(message.facebook);
1332 /* string yahoo = 28; */
1333 if (message.yahoo !== '') writer.tag(28, WireType.LengthDelimited).string(message.yahoo);
1334 /* string instagram = 29; */
1335 if (message.instagram !== '') writer.tag(29, WireType.LengthDelimited).string(message.instagram);
1336 /* repeated proton_pass_item_v1.ExtraField extra_contact_details = 30; */
1337 for (let i = 0; i < message.extraContactDetails.length; i++)
1338 ExtraField.internalBinaryWrite(
1339 message.extraContactDetails[i],
1340 writer.tag(30, WireType.LengthDelimited).fork(),
1343 /* string company = 31; */
1344 if (message.company !== '') writer.tag(31, WireType.LengthDelimited).string(message.company);
1345 /* string job_title = 32; */
1346 if (message.jobTitle !== '') writer.tag(32, WireType.LengthDelimited).string(message.jobTitle);
1347 /* string personal_website = 33; */
1348 if (message.personalWebsite !== '') writer.tag(33, WireType.LengthDelimited).string(message.personalWebsite);
1349 /* string work_phone_number = 34; */
1350 if (message.workPhoneNumber !== '') writer.tag(34, WireType.LengthDelimited).string(message.workPhoneNumber);
1351 /* string work_email = 35; */
1352 if (message.workEmail !== '') writer.tag(35, WireType.LengthDelimited).string(message.workEmail);
1353 /* repeated proton_pass_item_v1.ExtraField extra_work_details = 36; */
1354 for (let i = 0; i < message.extraWorkDetails.length; i++)
1355 ExtraField.internalBinaryWrite(
1356 message.extraWorkDetails[i],
1357 writer.tag(36, WireType.LengthDelimited).fork(),
1360 /* repeated proton_pass_item_v1.ExtraIdentitySection extra_sections = 37; */
1361 for (let i = 0; i < message.extraSections.length; i++)
1362 ExtraIdentitySection.internalBinaryWrite(
1363 message.extraSections[i],
1364 writer.tag(37, WireType.LengthDelimited).fork(),
1367 let u = options.writeUnknownFields;
1368 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1373 * @generated MessageType for protobuf message proton_pass_item_v1.ItemIdentity
1375 export const ItemIdentity = new ItemIdentity$Type();
1376 // @generated message type with reflection information, may provide speed optimized methods
1377 class ExtraIdentitySection$Type extends MessageType<ExtraIdentitySection> {
1379 super('proton_pass_item_v1.ExtraIdentitySection', [
1380 { no: 1, name: 'section_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1381 { no: 2, name: 'section_fields', kind: 'message', repeat: 1 /*RepeatType.PACKED*/, T: () => ExtraField },
1384 create(value?: PartialMessage<ExtraIdentitySection>): ExtraIdentitySection {
1385 const message = globalThis.Object.create(this.messagePrototype!);
1386 message.sectionName = '';
1387 message.sectionFields = [];
1388 if (value !== undefined) reflectionMergePartial<ExtraIdentitySection>(this, message, value);
1392 reader: IBinaryReader,
1394 options: BinaryReadOptions,
1395 target?: ExtraIdentitySection
1396 ): ExtraIdentitySection {
1397 let message = target ?? this.create(),
1398 end = reader.pos + length;
1399 while (reader.pos < end) {
1400 let [fieldNo, wireType] = reader.tag();
1402 case /* string section_name */ 1:
1403 message.sectionName = reader.string();
1405 case /* repeated proton_pass_item_v1.ExtraField section_fields */ 2:
1406 message.sectionFields.push(ExtraField.internalBinaryRead(reader, reader.uint32(), options));
1409 let u = options.readUnknownField;
1411 throw new globalThis.Error(
1412 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1414 let d = reader.skip(wireType);
1416 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1421 internalBinaryWrite(
1422 message: ExtraIdentitySection,
1423 writer: IBinaryWriter,
1424 options: BinaryWriteOptions
1426 /* string section_name = 1; */
1427 if (message.sectionName !== '') writer.tag(1, WireType.LengthDelimited).string(message.sectionName);
1428 /* repeated proton_pass_item_v1.ExtraField section_fields = 2; */
1429 for (let i = 0; i < message.sectionFields.length; i++)
1430 ExtraField.internalBinaryWrite(
1431 message.sectionFields[i],
1432 writer.tag(2, WireType.LengthDelimited).fork(),
1435 let u = options.writeUnknownFields;
1436 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1441 * @generated MessageType for protobuf message proton_pass_item_v1.ExtraIdentitySection
1443 export const ExtraIdentitySection = new ExtraIdentitySection$Type();
1444 // @generated message type with reflection information, may provide speed optimized methods
1445 class AllowedAndroidApp$Type extends MessageType<AllowedAndroidApp> {
1447 super('proton_pass_item_v1.AllowedAndroidApp', [
1448 { no: 1, name: 'package_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1449 { no: 2, name: 'hashes', kind: 'scalar', repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
1450 { no: 3, name: 'app_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1453 create(value?: PartialMessage<AllowedAndroidApp>): AllowedAndroidApp {
1454 const message = globalThis.Object.create(this.messagePrototype!);
1455 message.packageName = '';
1456 message.hashes = [];
1457 message.appName = '';
1458 if (value !== undefined) reflectionMergePartial<AllowedAndroidApp>(this, message, value);
1462 reader: IBinaryReader,
1464 options: BinaryReadOptions,
1465 target?: AllowedAndroidApp
1466 ): AllowedAndroidApp {
1467 let message = target ?? this.create(),
1468 end = reader.pos + length;
1469 while (reader.pos < end) {
1470 let [fieldNo, wireType] = reader.tag();
1472 case /* string package_name */ 1:
1473 message.packageName = reader.string();
1475 case /* repeated string hashes */ 2:
1476 message.hashes.push(reader.string());
1478 case /* string app_name */ 3:
1479 message.appName = reader.string();
1482 let u = options.readUnknownField;
1484 throw new globalThis.Error(
1485 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1487 let d = reader.skip(wireType);
1489 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1494 internalBinaryWrite(message: AllowedAndroidApp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1495 /* string package_name = 1; */
1496 if (message.packageName !== '') writer.tag(1, WireType.LengthDelimited).string(message.packageName);
1497 /* repeated string hashes = 2; */
1498 for (let i = 0; i < message.hashes.length; i++)
1499 writer.tag(2, WireType.LengthDelimited).string(message.hashes[i]);
1500 /* string app_name = 3; */
1501 if (message.appName !== '') writer.tag(3, WireType.LengthDelimited).string(message.appName);
1502 let u = options.writeUnknownFields;
1503 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1508 * @generated MessageType for protobuf message proton_pass_item_v1.AllowedAndroidApp
1510 export const AllowedAndroidApp = new AllowedAndroidApp$Type();
1511 // @generated message type with reflection information, may provide speed optimized methods
1512 class AndroidSpecific$Type extends MessageType<AndroidSpecific> {
1514 super('proton_pass_item_v1.AndroidSpecific', [
1517 name: 'allowed_apps',
1519 repeat: 1 /*RepeatType.PACKED*/,
1520 T: () => AllowedAndroidApp,
1524 create(value?: PartialMessage<AndroidSpecific>): AndroidSpecific {
1525 const message = globalThis.Object.create(this.messagePrototype!);
1526 message.allowedApps = [];
1527 if (value !== undefined) reflectionMergePartial<AndroidSpecific>(this, message, value);
1531 reader: IBinaryReader,
1533 options: BinaryReadOptions,
1534 target?: AndroidSpecific
1535 ): AndroidSpecific {
1536 let message = target ?? this.create(),
1537 end = reader.pos + length;
1538 while (reader.pos < end) {
1539 let [fieldNo, wireType] = reader.tag();
1541 case /* repeated proton_pass_item_v1.AllowedAndroidApp allowed_apps */ 1:
1542 message.allowedApps.push(AllowedAndroidApp.internalBinaryRead(reader, reader.uint32(), options));
1545 let u = options.readUnknownField;
1547 throw new globalThis.Error(
1548 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1550 let d = reader.skip(wireType);
1552 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1557 internalBinaryWrite(message: AndroidSpecific, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1558 /* repeated proton_pass_item_v1.AllowedAndroidApp allowed_apps = 1; */
1559 for (let i = 0; i < message.allowedApps.length; i++)
1560 AllowedAndroidApp.internalBinaryWrite(
1561 message.allowedApps[i],
1562 writer.tag(1, WireType.LengthDelimited).fork(),
1565 let u = options.writeUnknownFields;
1566 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1571 * @generated MessageType for protobuf message proton_pass_item_v1.AndroidSpecific
1573 export const AndroidSpecific = new AndroidSpecific$Type();
1574 // @generated message type with reflection information, may provide speed optimized methods
1575 class PlatformSpecific$Type extends MessageType<PlatformSpecific> {
1577 super('proton_pass_item_v1.PlatformSpecific', [
1578 { no: 1, name: 'android', kind: 'message', T: () => AndroidSpecific },
1581 create(value?: PartialMessage<PlatformSpecific>): PlatformSpecific {
1582 const message = globalThis.Object.create(this.messagePrototype!);
1583 if (value !== undefined) reflectionMergePartial<PlatformSpecific>(this, message, value);
1587 reader: IBinaryReader,
1589 options: BinaryReadOptions,
1590 target?: PlatformSpecific
1591 ): PlatformSpecific {
1592 let message = target ?? this.create(),
1593 end = reader.pos + length;
1594 while (reader.pos < end) {
1595 let [fieldNo, wireType] = reader.tag();
1597 case /* proton_pass_item_v1.AndroidSpecific android */ 1:
1598 message.android = AndroidSpecific.internalBinaryRead(
1606 let u = options.readUnknownField;
1608 throw new globalThis.Error(
1609 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1611 let d = reader.skip(wireType);
1613 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1618 internalBinaryWrite(message: PlatformSpecific, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1619 /* proton_pass_item_v1.AndroidSpecific android = 1; */
1620 if (message.android)
1621 AndroidSpecific.internalBinaryWrite(
1623 writer.tag(1, WireType.LengthDelimited).fork(),
1626 let u = options.writeUnknownFields;
1627 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1632 * @generated MessageType for protobuf message proton_pass_item_v1.PlatformSpecific
1634 export const PlatformSpecific = new PlatformSpecific$Type();
1635 // @generated message type with reflection information, may provide speed optimized methods
1636 class ExtraTotp$Type extends MessageType<ExtraTotp> {
1638 super('proton_pass_item_v1.ExtraTotp', [
1639 { no: 1, name: 'totp_uri', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1642 create(value?: PartialMessage<ExtraTotp>): ExtraTotp {
1643 const message = globalThis.Object.create(this.messagePrototype!);
1644 message.totpUri = '';
1645 if (value !== undefined) reflectionMergePartial<ExtraTotp>(this, message, value);
1649 reader: IBinaryReader,
1651 options: BinaryReadOptions,
1654 let message = target ?? this.create(),
1655 end = reader.pos + length;
1656 while (reader.pos < end) {
1657 let [fieldNo, wireType] = reader.tag();
1659 case /* string totp_uri */ 1:
1660 message.totpUri = reader.string();
1663 let u = options.readUnknownField;
1665 throw new globalThis.Error(
1666 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1668 let d = reader.skip(wireType);
1670 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1675 internalBinaryWrite(message: ExtraTotp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1676 /* string totp_uri = 1; */
1677 if (message.totpUri !== '') writer.tag(1, WireType.LengthDelimited).string(message.totpUri);
1678 let u = options.writeUnknownFields;
1679 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1684 * @generated MessageType for protobuf message proton_pass_item_v1.ExtraTotp
1686 export const ExtraTotp = new ExtraTotp$Type();
1687 // @generated message type with reflection information, may provide speed optimized methods
1688 class ExtraTextField$Type extends MessageType<ExtraTextField> {
1690 super('proton_pass_item_v1.ExtraTextField', [
1691 { no: 1, name: 'content', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1694 create(value?: PartialMessage<ExtraTextField>): ExtraTextField {
1695 const message = globalThis.Object.create(this.messagePrototype!);
1696 message.content = '';
1697 if (value !== undefined) reflectionMergePartial<ExtraTextField>(this, message, value);
1701 reader: IBinaryReader,
1703 options: BinaryReadOptions,
1704 target?: ExtraTextField
1706 let message = target ?? this.create(),
1707 end = reader.pos + length;
1708 while (reader.pos < end) {
1709 let [fieldNo, wireType] = reader.tag();
1711 case /* string content */ 1:
1712 message.content = reader.string();
1715 let u = options.readUnknownField;
1717 throw new globalThis.Error(
1718 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1720 let d = reader.skip(wireType);
1722 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1727 internalBinaryWrite(message: ExtraTextField, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1728 /* string content = 1; */
1729 if (message.content !== '') writer.tag(1, WireType.LengthDelimited).string(message.content);
1730 let u = options.writeUnknownFields;
1731 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1736 * @generated MessageType for protobuf message proton_pass_item_v1.ExtraTextField
1738 export const ExtraTextField = new ExtraTextField$Type();
1739 // @generated message type with reflection information, may provide speed optimized methods
1740 class ExtraHiddenField$Type extends MessageType<ExtraHiddenField> {
1742 super('proton_pass_item_v1.ExtraHiddenField', [
1743 { no: 1, name: 'content', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1746 create(value?: PartialMessage<ExtraHiddenField>): ExtraHiddenField {
1747 const message = globalThis.Object.create(this.messagePrototype!);
1748 message.content = '';
1749 if (value !== undefined) reflectionMergePartial<ExtraHiddenField>(this, message, value);
1753 reader: IBinaryReader,
1755 options: BinaryReadOptions,
1756 target?: ExtraHiddenField
1757 ): ExtraHiddenField {
1758 let message = target ?? this.create(),
1759 end = reader.pos + length;
1760 while (reader.pos < end) {
1761 let [fieldNo, wireType] = reader.tag();
1763 case /* string content */ 1:
1764 message.content = reader.string();
1767 let u = options.readUnknownField;
1769 throw new globalThis.Error(
1770 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1772 let d = reader.skip(wireType);
1774 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1779 internalBinaryWrite(message: ExtraHiddenField, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1780 /* string content = 1; */
1781 if (message.content !== '') writer.tag(1, WireType.LengthDelimited).string(message.content);
1782 let u = options.writeUnknownFields;
1783 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1788 * @generated MessageType for protobuf message proton_pass_item_v1.ExtraHiddenField
1790 export const ExtraHiddenField = new ExtraHiddenField$Type();
1791 // @generated message type with reflection information, may provide speed optimized methods
1792 class ExtraField$Type extends MessageType<ExtraField> {
1794 super('proton_pass_item_v1.ExtraField', [
1795 { no: 1, name: 'field_name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1796 { no: 2, name: 'totp', kind: 'message', oneof: 'content', T: () => ExtraTotp },
1797 { no: 3, name: 'text', kind: 'message', oneof: 'content', T: () => ExtraTextField },
1798 { no: 4, name: 'hidden', kind: 'message', oneof: 'content', T: () => ExtraHiddenField },
1801 create(value?: PartialMessage<ExtraField>): ExtraField {
1802 const message = globalThis.Object.create(this.messagePrototype!);
1803 message.fieldName = '';
1804 message.content = { oneofKind: undefined };
1805 if (value !== undefined) reflectionMergePartial<ExtraField>(this, message, value);
1809 reader: IBinaryReader,
1811 options: BinaryReadOptions,
1814 let message = target ?? this.create(),
1815 end = reader.pos + length;
1816 while (reader.pos < end) {
1817 let [fieldNo, wireType] = reader.tag();
1819 case /* string field_name */ 1:
1820 message.fieldName = reader.string();
1822 case /* proton_pass_item_v1.ExtraTotp totp */ 2:
1825 totp: ExtraTotp.internalBinaryRead(
1829 (message.content as any).totp
1833 case /* proton_pass_item_v1.ExtraTextField text */ 3:
1836 text: ExtraTextField.internalBinaryRead(
1840 (message.content as any).text
1844 case /* proton_pass_item_v1.ExtraHiddenField hidden */ 4:
1846 oneofKind: 'hidden',
1847 hidden: ExtraHiddenField.internalBinaryRead(
1851 (message.content as any).hidden
1856 let u = options.readUnknownField;
1858 throw new globalThis.Error(
1859 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1861 let d = reader.skip(wireType);
1863 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1868 internalBinaryWrite(message: ExtraField, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1869 /* string field_name = 1; */
1870 if (message.fieldName !== '') writer.tag(1, WireType.LengthDelimited).string(message.fieldName);
1871 /* proton_pass_item_v1.ExtraTotp totp = 2; */
1872 if (message.content.oneofKind === 'totp')
1873 ExtraTotp.internalBinaryWrite(
1874 message.content.totp,
1875 writer.tag(2, WireType.LengthDelimited).fork(),
1878 /* proton_pass_item_v1.ExtraTextField text = 3; */
1879 if (message.content.oneofKind === 'text')
1880 ExtraTextField.internalBinaryWrite(
1881 message.content.text,
1882 writer.tag(3, WireType.LengthDelimited).fork(),
1885 /* proton_pass_item_v1.ExtraHiddenField hidden = 4; */
1886 if (message.content.oneofKind === 'hidden')
1887 ExtraHiddenField.internalBinaryWrite(
1888 message.content.hidden,
1889 writer.tag(4, WireType.LengthDelimited).fork(),
1892 let u = options.writeUnknownFields;
1893 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1898 * @generated MessageType for protobuf message proton_pass_item_v1.ExtraField
1900 export const ExtraField = new ExtraField$Type();
1901 // @generated message type with reflection information, may provide speed optimized methods
1902 class Metadata$Type extends MessageType<Metadata> {
1904 super('proton_pass_item_v1.Metadata', [
1905 { no: 1, name: 'name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1906 { no: 2, name: 'note', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1907 { no: 3, name: 'item_uuid', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
1910 create(value?: PartialMessage<Metadata>): Metadata {
1911 const message = globalThis.Object.create(this.messagePrototype!);
1914 message.itemUuid = '';
1915 if (value !== undefined) reflectionMergePartial<Metadata>(this, message, value);
1918 internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Metadata): Metadata {
1919 let message = target ?? this.create(),
1920 end = reader.pos + length;
1921 while (reader.pos < end) {
1922 let [fieldNo, wireType] = reader.tag();
1924 case /* string name */ 1:
1925 message.name = reader.string();
1927 case /* string note */ 2:
1928 message.note = reader.string();
1930 case /* string item_uuid */ 3:
1931 message.itemUuid = reader.string();
1934 let u = options.readUnknownField;
1936 throw new globalThis.Error(
1937 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
1939 let d = reader.skip(wireType);
1941 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1946 internalBinaryWrite(message: Metadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1947 /* string name = 1; */
1948 if (message.name !== '') writer.tag(1, WireType.LengthDelimited).string(message.name);
1949 /* string note = 2; */
1950 if (message.note !== '') writer.tag(2, WireType.LengthDelimited).string(message.note);
1951 /* string item_uuid = 3; */
1952 if (message.itemUuid !== '') writer.tag(3, WireType.LengthDelimited).string(message.itemUuid);
1953 let u = options.writeUnknownFields;
1954 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1959 * @generated MessageType for protobuf message proton_pass_item_v1.Metadata
1961 export const Metadata = new Metadata$Type();
1962 // @generated message type with reflection information, may provide speed optimized methods
1963 class Content$Type extends MessageType<Content> {
1965 super('proton_pass_item_v1.Content', [
1966 { no: 2, name: 'note', kind: 'message', oneof: 'content', T: () => ItemNote },
1967 { no: 3, name: 'login', kind: 'message', oneof: 'content', T: () => ItemLogin },
1968 { no: 4, name: 'alias', kind: 'message', oneof: 'content', T: () => ItemAlias },
1969 { no: 5, name: 'credit_card', kind: 'message', oneof: 'content', T: () => ItemCreditCard },
1970 { no: 6, name: 'identity', kind: 'message', oneof: 'content', T: () => ItemIdentity },
1973 create(value?: PartialMessage<Content>): Content {
1974 const message = globalThis.Object.create(this.messagePrototype!);
1975 message.content = { oneofKind: undefined };
1976 if (value !== undefined) reflectionMergePartial<Content>(this, message, value);
1979 internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Content): Content {
1980 let message = target ?? this.create(),
1981 end = reader.pos + length;
1982 while (reader.pos < end) {
1983 let [fieldNo, wireType] = reader.tag();
1985 case /* proton_pass_item_v1.ItemNote note */ 2:
1988 note: ItemNote.internalBinaryRead(
1992 (message.content as any).note
1996 case /* proton_pass_item_v1.ItemLogin login */ 3:
1999 login: ItemLogin.internalBinaryRead(
2003 (message.content as any).login
2007 case /* proton_pass_item_v1.ItemAlias alias */ 4:
2010 alias: ItemAlias.internalBinaryRead(
2014 (message.content as any).alias
2018 case /* proton_pass_item_v1.ItemCreditCard credit_card */ 5:
2020 oneofKind: 'creditCard',
2021 creditCard: ItemCreditCard.internalBinaryRead(
2025 (message.content as any).creditCard
2029 case /* proton_pass_item_v1.ItemIdentity identity */ 6:
2031 oneofKind: 'identity',
2032 identity: ItemIdentity.internalBinaryRead(
2036 (message.content as any).identity
2041 let u = options.readUnknownField;
2043 throw new globalThis.Error(
2044 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
2046 let d = reader.skip(wireType);
2048 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2053 internalBinaryWrite(message: Content, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2054 /* proton_pass_item_v1.ItemNote note = 2; */
2055 if (message.content.oneofKind === 'note')
2056 ItemNote.internalBinaryWrite(
2057 message.content.note,
2058 writer.tag(2, WireType.LengthDelimited).fork(),
2061 /* proton_pass_item_v1.ItemLogin login = 3; */
2062 if (message.content.oneofKind === 'login')
2063 ItemLogin.internalBinaryWrite(
2064 message.content.login,
2065 writer.tag(3, WireType.LengthDelimited).fork(),
2068 /* proton_pass_item_v1.ItemAlias alias = 4; */
2069 if (message.content.oneofKind === 'alias')
2070 ItemAlias.internalBinaryWrite(
2071 message.content.alias,
2072 writer.tag(4, WireType.LengthDelimited).fork(),
2075 /* proton_pass_item_v1.ItemCreditCard credit_card = 5; */
2076 if (message.content.oneofKind === 'creditCard')
2077 ItemCreditCard.internalBinaryWrite(
2078 message.content.creditCard,
2079 writer.tag(5, WireType.LengthDelimited).fork(),
2082 /* proton_pass_item_v1.ItemIdentity identity = 6; */
2083 if (message.content.oneofKind === 'identity')
2084 ItemIdentity.internalBinaryWrite(
2085 message.content.identity,
2086 writer.tag(6, WireType.LengthDelimited).fork(),
2089 let u = options.writeUnknownFields;
2090 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2095 * @generated MessageType for protobuf message proton_pass_item_v1.Content
2097 export const Content = new Content$Type();
2098 // @generated message type with reflection information, may provide speed optimized methods
2099 class Item$Type extends MessageType<Item> {
2101 super('proton_pass_item_v1.Item', [
2102 { no: 1, name: 'metadata', kind: 'message', T: () => Metadata },
2103 { no: 2, name: 'content', kind: 'message', T: () => Content },
2104 { no: 3, name: 'platform_specific', kind: 'message', T: () => PlatformSpecific },
2105 { no: 4, name: 'extra_fields', kind: 'message', repeat: 1 /*RepeatType.PACKED*/, T: () => ExtraField },
2108 create(value?: PartialMessage<Item>): Item {
2109 const message = globalThis.Object.create(this.messagePrototype!);
2110 message.extraFields = [];
2111 if (value !== undefined) reflectionMergePartial<Item>(this, message, value);
2114 internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Item): Item {
2115 let message = target ?? this.create(),
2116 end = reader.pos + length;
2117 while (reader.pos < end) {
2118 let [fieldNo, wireType] = reader.tag();
2120 case /* proton_pass_item_v1.Metadata metadata */ 1:
2121 message.metadata = Metadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata);
2123 case /* proton_pass_item_v1.Content content */ 2:
2124 message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
2126 case /* proton_pass_item_v1.PlatformSpecific platform_specific */ 3:
2127 message.platformSpecific = PlatformSpecific.internalBinaryRead(
2131 message.platformSpecific
2134 case /* repeated proton_pass_item_v1.ExtraField extra_fields */ 4:
2135 message.extraFields.push(ExtraField.internalBinaryRead(reader, reader.uint32(), options));
2138 let u = options.readUnknownField;
2140 throw new globalThis.Error(
2141 `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
2143 let d = reader.skip(wireType);
2145 (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2150 internalBinaryWrite(message: Item, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2151 /* proton_pass_item_v1.Metadata metadata = 1; */
2152 if (message.metadata)
2153 Metadata.internalBinaryWrite(
2155 writer.tag(1, WireType.LengthDelimited).fork(),
2158 /* proton_pass_item_v1.Content content = 2; */
2159 if (message.content)
2160 Content.internalBinaryWrite(
2162 writer.tag(2, WireType.LengthDelimited).fork(),
2165 /* proton_pass_item_v1.PlatformSpecific platform_specific = 3; */
2166 if (message.platformSpecific)
2167 PlatformSpecific.internalBinaryWrite(
2168 message.platformSpecific,
2169 writer.tag(3, WireType.LengthDelimited).fork(),
2172 /* repeated proton_pass_item_v1.ExtraField extra_fields = 4; */
2173 for (let i = 0; i < message.extraFields.length; i++)
2174 ExtraField.internalBinaryWrite(
2175 message.extraFields[i],
2176 writer.tag(4, WireType.LengthDelimited).fork(),
2179 let u = options.writeUnknownFields;
2180 if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2185 * @generated MessageType for protobuf message proton_pass_item_v1.Item
2187 export const Item = new Item$Type();