@structured-id/proto 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,14 @@ import { WireType } from "@protobuf-ts/runtime";
8
8
  import { UnknownFieldHandler } from "@protobuf-ts/runtime";
9
9
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
10
10
  import { MessageType } from "@protobuf-ts/runtime";
11
+ import { DeviceId } from "../ids/ids.js";
12
+ import { SessionId } from "../ids/ids.js";
13
+ import { CredentialId } from "../ids/ids.js";
14
+ import { ProfilePhoneId } from "../ids/ids.js";
15
+ import { ProfileEmailId } from "../ids/ids.js";
16
+ import { PrincipalId } from "../ids/ids.js";
11
17
  import { Timestamp } from "../../../google/protobuf/timestamp.js";
18
+ import { ProfileId } from "../ids/ids.js";
12
19
  /**
13
20
  * @generated from protobuf enum sid.v1.identity.PrincipalType
14
21
  */
@@ -557,7 +564,7 @@ export var DeviceAssurance;
557
564
  class Profile$Type extends MessageType {
558
565
  constructor() {
559
566
  super("sid.v1.identity.Profile", [
560
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
567
+ { no: 21, name: "id", kind: "message", T: () => ProfileId },
561
568
  { no: 2, name: "profile_type", kind: "enum", T: () => ["sid.v1.identity.ProfileType", ProfileType, "PROFILE_TYPE_"] },
562
569
  { no: 3, name: "username", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
563
570
  { no: 4, name: "email", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
@@ -581,7 +588,6 @@ class Profile$Type extends MessageType {
581
588
  }
582
589
  create(value) {
583
590
  const message = globalThis.Object.create((this.messagePrototype));
584
- message.id = "";
585
591
  message.profileType = 0;
586
592
  message.emailVerified = false;
587
593
  message.phoneVerified = false;
@@ -597,8 +603,8 @@ class Profile$Type extends MessageType {
597
603
  while (reader.pos < end) {
598
604
  let [fieldNo, wireType] = reader.tag();
599
605
  switch (fieldNo) {
600
- case /* string id */ 1:
601
- message.id = reader.string();
606
+ case /* sid.v1.ids.ProfileId id */ 21:
607
+ message.id = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.id);
602
608
  break;
603
609
  case /* sid.v1.identity.ProfileType profile_type */ 2:
604
610
  message.profileType = reader.int32();
@@ -669,9 +675,6 @@ class Profile$Type extends MessageType {
669
675
  return message;
670
676
  }
671
677
  internalBinaryWrite(message, writer, options) {
672
- /* string id = 1; */
673
- if (message.id !== "")
674
- writer.tag(1, WireType.LengthDelimited).string(message.id);
675
678
  /* sid.v1.identity.ProfileType profile_type = 2; */
676
679
  if (message.profileType !== 0)
677
680
  writer.tag(2, WireType.Varint).int32(message.profileType);
@@ -729,6 +732,9 @@ class Profile$Type extends MessageType {
729
732
  /* bool phone_verified = 20; */
730
733
  if (message.phoneVerified !== false)
731
734
  writer.tag(20, WireType.Varint).bool(message.phoneVerified);
735
+ /* sid.v1.ids.ProfileId id = 21; */
736
+ if (message.id)
737
+ ProfileId.internalBinaryWrite(message.id, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
732
738
  let u = options.writeUnknownFields;
733
739
  if (u !== false)
734
740
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -743,7 +749,7 @@ export const Profile = new Profile$Type();
743
749
  class Principal$Type extends MessageType {
744
750
  constructor() {
745
751
  super("sid.v1.identity.Principal", [
746
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
752
+ { no: 13, name: "id", kind: "message", T: () => PrincipalId },
747
753
  { no: 2, name: "type", kind: "enum", T: () => ["sid.v1.identity.PrincipalType", PrincipalType, "PRINCIPAL_TYPE_"] },
748
754
  { no: 3, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
749
755
  { no: 4, name: "verified", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
@@ -751,13 +757,12 @@ class Principal$Type extends MessageType {
751
757
  { no: 6, name: "created_at", kind: "message", T: () => Timestamp },
752
758
  { no: 7, name: "updated_at", kind: "message", T: () => Timestamp },
753
759
  { no: 8, name: "source_field", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
754
- { no: 11, name: "source_email_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
760
+ { no: 14, name: "source_email_id", kind: "message", T: () => ProfileEmailId },
755
761
  { no: 12, name: "needs_address_confirmation", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
756
762
  ]);
757
763
  }
758
764
  create(value) {
759
765
  const message = globalThis.Object.create((this.messagePrototype));
760
- message.id = "";
761
766
  message.type = 0;
762
767
  message.value = "";
763
768
  message.verified = false;
@@ -772,8 +777,8 @@ class Principal$Type extends MessageType {
772
777
  while (reader.pos < end) {
773
778
  let [fieldNo, wireType] = reader.tag();
774
779
  switch (fieldNo) {
775
- case /* string id */ 1:
776
- message.id = reader.string();
780
+ case /* sid.v1.ids.PrincipalId id */ 13:
781
+ message.id = PrincipalId.internalBinaryRead(reader, reader.uint32(), options, message.id);
777
782
  break;
778
783
  case /* sid.v1.identity.PrincipalType type */ 2:
779
784
  message.type = reader.int32();
@@ -796,8 +801,8 @@ class Principal$Type extends MessageType {
796
801
  case /* optional string source_field */ 8:
797
802
  message.sourceField = reader.string();
798
803
  break;
799
- case /* optional string source_email_id */ 11:
800
- message.sourceEmailId = reader.string();
804
+ case /* sid.v1.ids.ProfileEmailId source_email_id */ 14:
805
+ message.sourceEmailId = ProfileEmailId.internalBinaryRead(reader, reader.uint32(), options, message.sourceEmailId);
801
806
  break;
802
807
  case /* bool needs_address_confirmation */ 12:
803
808
  message.needsAddressConfirmation = reader.bool();
@@ -814,9 +819,6 @@ class Principal$Type extends MessageType {
814
819
  return message;
815
820
  }
816
821
  internalBinaryWrite(message, writer, options) {
817
- /* string id = 1; */
818
- if (message.id !== "")
819
- writer.tag(1, WireType.LengthDelimited).string(message.id);
820
822
  /* sid.v1.identity.PrincipalType type = 2; */
821
823
  if (message.type !== 0)
822
824
  writer.tag(2, WireType.Varint).int32(message.type);
@@ -838,12 +840,15 @@ class Principal$Type extends MessageType {
838
840
  /* optional string source_field = 8; */
839
841
  if (message.sourceField !== undefined)
840
842
  writer.tag(8, WireType.LengthDelimited).string(message.sourceField);
841
- /* optional string source_email_id = 11; */
842
- if (message.sourceEmailId !== undefined)
843
- writer.tag(11, WireType.LengthDelimited).string(message.sourceEmailId);
844
843
  /* bool needs_address_confirmation = 12; */
845
844
  if (message.needsAddressConfirmation !== false)
846
845
  writer.tag(12, WireType.Varint).bool(message.needsAddressConfirmation);
846
+ /* sid.v1.ids.PrincipalId id = 13; */
847
+ if (message.id)
848
+ PrincipalId.internalBinaryWrite(message.id, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
849
+ /* sid.v1.ids.ProfileEmailId source_email_id = 14; */
850
+ if (message.sourceEmailId)
851
+ ProfileEmailId.internalBinaryWrite(message.sourceEmailId, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
847
852
  let u = options.writeUnknownFields;
848
853
  if (u !== false)
849
854
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -858,7 +863,7 @@ export const Principal = new Principal$Type();
858
863
  class ProfilePhone$Type extends MessageType {
859
864
  constructor() {
860
865
  super("sid.v1.identity.ProfilePhone", [
861
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
866
+ { no: 12, name: "id", kind: "message", T: () => ProfilePhoneId },
862
867
  { no: 2, name: "e164", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
863
868
  { no: 3, name: "extension", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
864
869
  { no: 4, name: "label", kind: "enum", T: () => ["sid.v1.identity.PhoneLabel", PhoneLabel, "PHONE_LABEL_"] },
@@ -873,7 +878,6 @@ class ProfilePhone$Type extends MessageType {
873
878
  }
874
879
  create(value) {
875
880
  const message = globalThis.Object.create((this.messagePrototype));
876
- message.id = "";
877
881
  message.e164 = 0n;
878
882
  message.label = 0;
879
883
  message.isPrimary = false;
@@ -890,8 +894,8 @@ class ProfilePhone$Type extends MessageType {
890
894
  while (reader.pos < end) {
891
895
  let [fieldNo, wireType] = reader.tag();
892
896
  switch (fieldNo) {
893
- case /* string id */ 1:
894
- message.id = reader.string();
897
+ case /* sid.v1.ids.ProfilePhoneId id */ 12:
898
+ message.id = ProfilePhoneId.internalBinaryRead(reader, reader.uint32(), options, message.id);
895
899
  break;
896
900
  case /* uint64 e164 */ 2:
897
901
  message.e164 = reader.uint64().toBigInt();
@@ -935,9 +939,6 @@ class ProfilePhone$Type extends MessageType {
935
939
  return message;
936
940
  }
937
941
  internalBinaryWrite(message, writer, options) {
938
- /* string id = 1; */
939
- if (message.id !== "")
940
- writer.tag(1, WireType.LengthDelimited).string(message.id);
941
942
  /* uint64 e164 = 2; */
942
943
  if (message.e164 !== 0n)
943
944
  writer.tag(2, WireType.Varint).uint64(message.e164);
@@ -968,6 +969,9 @@ class ProfilePhone$Type extends MessageType {
968
969
  /* optional google.protobuf.Timestamp verified_at = 11; */
969
970
  if (message.verifiedAt)
970
971
  Timestamp.internalBinaryWrite(message.verifiedAt, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
972
+ /* sid.v1.ids.ProfilePhoneId id = 12; */
973
+ if (message.id)
974
+ ProfilePhoneId.internalBinaryWrite(message.id, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
971
975
  let u = options.writeUnknownFields;
972
976
  if (u !== false)
973
977
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -982,7 +986,7 @@ export const ProfilePhone = new ProfilePhone$Type();
982
986
  class ProfileEmail$Type extends MessageType {
983
987
  constructor() {
984
988
  super("sid.v1.identity.ProfileEmail", [
985
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
989
+ { no: 8, name: "id", kind: "message", T: () => ProfileEmailId },
986
990
  { no: 2, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
987
991
  { no: 3, name: "label", kind: "enum", T: () => ["sid.v1.identity.EmailLabel", EmailLabel, "EMAIL_LABEL_"] },
988
992
  { no: 4, name: "custom_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
@@ -993,7 +997,6 @@ class ProfileEmail$Type extends MessageType {
993
997
  }
994
998
  create(value) {
995
999
  const message = globalThis.Object.create((this.messagePrototype));
996
- message.id = "";
997
1000
  message.email = "";
998
1001
  message.label = 0;
999
1002
  message.isPrimary = false;
@@ -1007,8 +1010,8 @@ class ProfileEmail$Type extends MessageType {
1007
1010
  while (reader.pos < end) {
1008
1011
  let [fieldNo, wireType] = reader.tag();
1009
1012
  switch (fieldNo) {
1010
- case /* string id */ 1:
1011
- message.id = reader.string();
1013
+ case /* sid.v1.ids.ProfileEmailId id */ 8:
1014
+ message.id = ProfileEmailId.internalBinaryRead(reader, reader.uint32(), options, message.id);
1012
1015
  break;
1013
1016
  case /* string email */ 2:
1014
1017
  message.email = reader.string();
@@ -1040,9 +1043,6 @@ class ProfileEmail$Type extends MessageType {
1040
1043
  return message;
1041
1044
  }
1042
1045
  internalBinaryWrite(message, writer, options) {
1043
- /* string id = 1; */
1044
- if (message.id !== "")
1045
- writer.tag(1, WireType.LengthDelimited).string(message.id);
1046
1046
  /* string email = 2; */
1047
1047
  if (message.email !== "")
1048
1048
  writer.tag(2, WireType.LengthDelimited).string(message.email);
@@ -1061,6 +1061,9 @@ class ProfileEmail$Type extends MessageType {
1061
1061
  /* optional google.protobuf.Timestamp verified_at = 7; */
1062
1062
  if (message.verifiedAt)
1063
1063
  Timestamp.internalBinaryWrite(message.verifiedAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1064
+ /* sid.v1.ids.ProfileEmailId id = 8; */
1065
+ if (message.id)
1066
+ ProfileEmailId.internalBinaryWrite(message.id, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
1064
1067
  let u = options.writeUnknownFields;
1065
1068
  if (u !== false)
1066
1069
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1075,8 +1078,7 @@ export const ProfileEmail = new ProfileEmail$Type();
1075
1078
  class Credential$Type extends MessageType {
1076
1079
  constructor() {
1077
1080
  super("sid.v1.identity.Credential", [
1078
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1079
- { no: 2, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1081
+ { no: 10, name: "id", kind: "message", T: () => CredentialId },
1080
1082
  { no: 3, name: "type", kind: "enum", T: () => ["sid.v1.identity.CredentialType", CredentialType, "CREDENTIAL_TYPE_"] },
1081
1083
  { no: 4, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
1082
1084
  { no: 5, name: "label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
@@ -1088,8 +1090,6 @@ class Credential$Type extends MessageType {
1088
1090
  }
1089
1091
  create(value) {
1090
1092
  const message = globalThis.Object.create((this.messagePrototype));
1091
- message.id = "";
1092
- message.profileId = "";
1093
1093
  message.type = 0;
1094
1094
  message.data = new Uint8Array(0);
1095
1095
  message.info = { oneofKind: undefined };
@@ -1102,11 +1102,8 @@ class Credential$Type extends MessageType {
1102
1102
  while (reader.pos < end) {
1103
1103
  let [fieldNo, wireType] = reader.tag();
1104
1104
  switch (fieldNo) {
1105
- case /* string id */ 1:
1106
- message.id = reader.string();
1107
- break;
1108
- case /* string profile_id */ 2:
1109
- message.profileId = reader.string();
1105
+ case /* sid.v1.ids.CredentialId id */ 10:
1106
+ message.id = CredentialId.internalBinaryRead(reader, reader.uint32(), options, message.id);
1110
1107
  break;
1111
1108
  case /* sid.v1.identity.CredentialType type */ 3:
1112
1109
  message.type = reader.int32();
@@ -1147,12 +1144,6 @@ class Credential$Type extends MessageType {
1147
1144
  return message;
1148
1145
  }
1149
1146
  internalBinaryWrite(message, writer, options) {
1150
- /* string id = 1; */
1151
- if (message.id !== "")
1152
- writer.tag(1, WireType.LengthDelimited).string(message.id);
1153
- /* string profile_id = 2; */
1154
- if (message.profileId !== "")
1155
- writer.tag(2, WireType.LengthDelimited).string(message.profileId);
1156
1147
  /* sid.v1.identity.CredentialType type = 3; */
1157
1148
  if (message.type !== 0)
1158
1149
  writer.tag(3, WireType.Varint).int32(message.type);
@@ -1174,6 +1165,9 @@ class Credential$Type extends MessageType {
1174
1165
  /* sid.v1.identity.OpaqueCredentialInfo opaque_info = 9; */
1175
1166
  if (message.info.oneofKind === "opaqueInfo")
1176
1167
  OpaqueCredentialInfo.internalBinaryWrite(message.info.opaqueInfo, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
1168
+ /* sid.v1.ids.CredentialId id = 10; */
1169
+ if (message.id)
1170
+ CredentialId.internalBinaryWrite(message.id, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
1177
1171
  let u = options.writeUnknownFields;
1178
1172
  if (u !== false)
1179
1173
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1330,10 +1324,9 @@ export const WebAuthnCredentialInfo = new WebAuthnCredentialInfo$Type();
1330
1324
  class Session$Type extends MessageType {
1331
1325
  constructor() {
1332
1326
  super("sid.v1.identity.Session", [
1333
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1334
- { no: 2, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1327
+ { no: 11, name: "id", kind: "message", T: () => SessionId },
1335
1328
  { no: 3, name: "client_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1336
- { no: 4, name: "device_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1329
+ { no: 12, name: "device_id", kind: "message", T: () => DeviceId },
1337
1330
  { no: 5, name: "ip_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1338
1331
  { no: 6, name: "user_agent", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1339
1332
  { no: 7, name: "created_at", kind: "message", T: () => Timestamp },
@@ -1344,8 +1337,6 @@ class Session$Type extends MessageType {
1344
1337
  }
1345
1338
  create(value) {
1346
1339
  const message = globalThis.Object.create((this.messagePrototype));
1347
- message.id = "";
1348
- message.profileId = "";
1349
1340
  message.clientId = "";
1350
1341
  message.ipAddress = "";
1351
1342
  message.scopes = [];
@@ -1358,17 +1349,14 @@ class Session$Type extends MessageType {
1358
1349
  while (reader.pos < end) {
1359
1350
  let [fieldNo, wireType] = reader.tag();
1360
1351
  switch (fieldNo) {
1361
- case /* string id */ 1:
1362
- message.id = reader.string();
1363
- break;
1364
- case /* string profile_id */ 2:
1365
- message.profileId = reader.string();
1352
+ case /* sid.v1.ids.SessionId id */ 11:
1353
+ message.id = SessionId.internalBinaryRead(reader, reader.uint32(), options, message.id);
1366
1354
  break;
1367
1355
  case /* string client_id */ 3:
1368
1356
  message.clientId = reader.string();
1369
1357
  break;
1370
- case /* optional string device_id */ 4:
1371
- message.deviceId = reader.string();
1358
+ case /* sid.v1.ids.DeviceId device_id */ 12:
1359
+ message.deviceId = DeviceId.internalBinaryRead(reader, reader.uint32(), options, message.deviceId);
1372
1360
  break;
1373
1361
  case /* string ip_address */ 5:
1374
1362
  message.ipAddress = reader.string();
@@ -1400,18 +1388,9 @@ class Session$Type extends MessageType {
1400
1388
  return message;
1401
1389
  }
1402
1390
  internalBinaryWrite(message, writer, options) {
1403
- /* string id = 1; */
1404
- if (message.id !== "")
1405
- writer.tag(1, WireType.LengthDelimited).string(message.id);
1406
- /* string profile_id = 2; */
1407
- if (message.profileId !== "")
1408
- writer.tag(2, WireType.LengthDelimited).string(message.profileId);
1409
1391
  /* string client_id = 3; */
1410
1392
  if (message.clientId !== "")
1411
1393
  writer.tag(3, WireType.LengthDelimited).string(message.clientId);
1412
- /* optional string device_id = 4; */
1413
- if (message.deviceId !== undefined)
1414
- writer.tag(4, WireType.LengthDelimited).string(message.deviceId);
1415
1394
  /* string ip_address = 5; */
1416
1395
  if (message.ipAddress !== "")
1417
1396
  writer.tag(5, WireType.LengthDelimited).string(message.ipAddress);
@@ -1430,6 +1409,12 @@ class Session$Type extends MessageType {
1430
1409
  /* repeated string scopes = 10; */
1431
1410
  for (let i = 0; i < message.scopes.length; i++)
1432
1411
  writer.tag(10, WireType.LengthDelimited).string(message.scopes[i]);
1412
+ /* sid.v1.ids.SessionId id = 11; */
1413
+ if (message.id)
1414
+ SessionId.internalBinaryWrite(message.id, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
1415
+ /* sid.v1.ids.DeviceId device_id = 12; */
1416
+ if (message.deviceId)
1417
+ DeviceId.internalBinaryWrite(message.deviceId, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
1433
1418
  let u = options.writeUnknownFields;
1434
1419
  if (u !== false)
1435
1420
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1454,7 +1439,7 @@ class CreateProfileRequest$Type extends MessageType {
1454
1439
  { no: 16, name: "honorific_suffix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1455
1440
  { no: 4, name: "profile_type", kind: "enum", T: () => ["sid.v1.identity.ProfileType", ProfileType, "PROFILE_TYPE_"] },
1456
1441
  { no: 10, name: "invite_code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1457
- { no: 11, name: "referrer_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1442
+ { no: 18, name: "referrer_id", kind: "message", T: () => ProfileId },
1458
1443
  { no: 12, name: "utm", kind: "message", T: () => UtmParams }
1459
1444
  ]);
1460
1445
  }
@@ -1500,8 +1485,8 @@ class CreateProfileRequest$Type extends MessageType {
1500
1485
  case /* optional string invite_code */ 10:
1501
1486
  message.inviteCode = reader.string();
1502
1487
  break;
1503
- case /* optional string referrer_id */ 11:
1504
- message.referrerId = reader.string();
1488
+ case /* sid.v1.ids.ProfileId referrer_id */ 18:
1489
+ message.referrerId = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.referrerId);
1505
1490
  break;
1506
1491
  case /* optional sid.v1.identity.UtmParams utm */ 12:
1507
1492
  message.utm = UtmParams.internalBinaryRead(reader, reader.uint32(), options, message.utm);
@@ -1533,9 +1518,6 @@ class CreateProfileRequest$Type extends MessageType {
1533
1518
  /* optional string invite_code = 10; */
1534
1519
  if (message.inviteCode !== undefined)
1535
1520
  writer.tag(10, WireType.LengthDelimited).string(message.inviteCode);
1536
- /* optional string referrer_id = 11; */
1537
- if (message.referrerId !== undefined)
1538
- writer.tag(11, WireType.LengthDelimited).string(message.referrerId);
1539
1521
  /* optional sid.v1.identity.UtmParams utm = 12; */
1540
1522
  if (message.utm)
1541
1523
  UtmParams.internalBinaryWrite(message.utm, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
@@ -1554,6 +1536,9 @@ class CreateProfileRequest$Type extends MessageType {
1554
1536
  /* optional string phone = 17; */
1555
1537
  if (message.phone !== undefined)
1556
1538
  writer.tag(17, WireType.LengthDelimited).string(message.phone);
1539
+ /* sid.v1.ids.ProfileId referrer_id = 18; */
1540
+ if (message.referrerId)
1541
+ ProfileId.internalBinaryWrite(message.referrerId, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
1557
1542
  let u = options.writeUnknownFields;
1558
1543
  if (u !== false)
1559
1544
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1688,7 +1673,7 @@ export const CreateProfileResponse = new CreateProfileResponse$Type();
1688
1673
  class GetProfileRequest$Type extends MessageType {
1689
1674
  constructor() {
1690
1675
  super("sid.v1.identity.GetProfileRequest", [
1691
- { no: 1, name: "id", kind: "scalar", oneof: "identifier", T: 9 /*ScalarType.STRING*/ },
1676
+ { no: 4, name: "id", kind: "message", oneof: "identifier", T: () => ProfileId },
1692
1677
  { no: 2, name: "username", kind: "scalar", oneof: "identifier", T: 9 /*ScalarType.STRING*/ },
1693
1678
  { no: 3, name: "email", kind: "scalar", oneof: "identifier", T: 9 /*ScalarType.STRING*/ }
1694
1679
  ]);
@@ -1705,10 +1690,10 @@ class GetProfileRequest$Type extends MessageType {
1705
1690
  while (reader.pos < end) {
1706
1691
  let [fieldNo, wireType] = reader.tag();
1707
1692
  switch (fieldNo) {
1708
- case /* string id */ 1:
1693
+ case /* sid.v1.ids.ProfileId id */ 4:
1709
1694
  message.identifier = {
1710
1695
  oneofKind: "id",
1711
- id: reader.string()
1696
+ id: ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.identifier.id)
1712
1697
  };
1713
1698
  break;
1714
1699
  case /* string username */ 2:
@@ -1735,15 +1720,15 @@ class GetProfileRequest$Type extends MessageType {
1735
1720
  return message;
1736
1721
  }
1737
1722
  internalBinaryWrite(message, writer, options) {
1738
- /* string id = 1; */
1739
- if (message.identifier.oneofKind === "id")
1740
- writer.tag(1, WireType.LengthDelimited).string(message.identifier.id);
1741
1723
  /* string username = 2; */
1742
1724
  if (message.identifier.oneofKind === "username")
1743
1725
  writer.tag(2, WireType.LengthDelimited).string(message.identifier.username);
1744
1726
  /* string email = 3; */
1745
1727
  if (message.identifier.oneofKind === "email")
1746
1728
  writer.tag(3, WireType.LengthDelimited).string(message.identifier.email);
1729
+ /* sid.v1.ids.ProfileId id = 4; */
1730
+ if (message.identifier.oneofKind === "id")
1731
+ ProfileId.internalBinaryWrite(message.identifier.id, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1747
1732
  let u = options.writeUnknownFields;
1748
1733
  if (u !== false)
1749
1734
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1842,7 +1827,7 @@ export const GetProfileResponse = new GetProfileResponse$Type();
1842
1827
  class UpdateProfileRequest$Type extends MessageType {
1843
1828
  constructor() {
1844
1829
  super("sid.v1.identity.UpdateProfileRequest", [
1845
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1830
+ { no: 8, name: "id", kind: "message", T: () => ProfileId },
1846
1831
  { no: 2, name: "given_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1847
1832
  { no: 4, name: "family_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
1848
1833
  { no: 5, name: "middle_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
@@ -1853,7 +1838,6 @@ class UpdateProfileRequest$Type extends MessageType {
1853
1838
  }
1854
1839
  create(value) {
1855
1840
  const message = globalThis.Object.create((this.messagePrototype));
1856
- message.id = "";
1857
1841
  if (value !== undefined)
1858
1842
  reflectionMergePartial(this, message, value);
1859
1843
  return message;
@@ -1863,8 +1847,8 @@ class UpdateProfileRequest$Type extends MessageType {
1863
1847
  while (reader.pos < end) {
1864
1848
  let [fieldNo, wireType] = reader.tag();
1865
1849
  switch (fieldNo) {
1866
- case /* string id */ 1:
1867
- message.id = reader.string();
1850
+ case /* sid.v1.ids.ProfileId id */ 8:
1851
+ message.id = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.id);
1868
1852
  break;
1869
1853
  case /* optional string given_name */ 2:
1870
1854
  message.givenName = reader.string();
@@ -1896,9 +1880,6 @@ class UpdateProfileRequest$Type extends MessageType {
1896
1880
  return message;
1897
1881
  }
1898
1882
  internalBinaryWrite(message, writer, options) {
1899
- /* string id = 1; */
1900
- if (message.id !== "")
1901
- writer.tag(1, WireType.LengthDelimited).string(message.id);
1902
1883
  /* optional string given_name = 2; */
1903
1884
  if (message.givenName !== undefined)
1904
1885
  writer.tag(2, WireType.LengthDelimited).string(message.givenName);
@@ -1917,6 +1898,9 @@ class UpdateProfileRequest$Type extends MessageType {
1917
1898
  /* optional string honorific_suffix = 7; */
1918
1899
  if (message.honorificSuffix !== undefined)
1919
1900
  writer.tag(7, WireType.LengthDelimited).string(message.honorificSuffix);
1901
+ /* sid.v1.ids.ProfileId id = 8; */
1902
+ if (message.id)
1903
+ ProfileId.internalBinaryWrite(message.id, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
1920
1904
  let u = options.writeUnknownFields;
1921
1905
  if (u !== false)
1922
1906
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1977,12 +1961,11 @@ export const UpdateProfileResponse = new UpdateProfileResponse$Type();
1977
1961
  class DeleteProfileRequest$Type extends MessageType {
1978
1962
  constructor() {
1979
1963
  super("sid.v1.identity.DeleteProfileRequest", [
1980
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1964
+ { no: 2, name: "id", kind: "message", T: () => ProfileId }
1981
1965
  ]);
1982
1966
  }
1983
1967
  create(value) {
1984
1968
  const message = globalThis.Object.create((this.messagePrototype));
1985
- message.id = "";
1986
1969
  if (value !== undefined)
1987
1970
  reflectionMergePartial(this, message, value);
1988
1971
  return message;
@@ -1992,8 +1975,8 @@ class DeleteProfileRequest$Type extends MessageType {
1992
1975
  while (reader.pos < end) {
1993
1976
  let [fieldNo, wireType] = reader.tag();
1994
1977
  switch (fieldNo) {
1995
- case /* string id */ 1:
1996
- message.id = reader.string();
1978
+ case /* sid.v1.ids.ProfileId id */ 2:
1979
+ message.id = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.id);
1997
1980
  break;
1998
1981
  default:
1999
1982
  let u = options.readUnknownField;
@@ -2007,9 +1990,9 @@ class DeleteProfileRequest$Type extends MessageType {
2007
1990
  return message;
2008
1991
  }
2009
1992
  internalBinaryWrite(message, writer, options) {
2010
- /* string id = 1; */
2011
- if (message.id !== "")
2012
- writer.tag(1, WireType.LengthDelimited).string(message.id);
1993
+ /* sid.v1.ids.ProfileId id = 2; */
1994
+ if (message.id)
1995
+ ProfileId.internalBinaryWrite(message.id, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2013
1996
  let u = options.writeUnknownFields;
2014
1997
  if (u !== false)
2015
1998
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2172,7 +2155,7 @@ export const ListProfilesResponse = new ListProfilesResponse$Type();
2172
2155
  class AddCredentialRequest$Type extends MessageType {
2173
2156
  constructor() {
2174
2157
  super("sid.v1.identity.AddCredentialRequest", [
2175
- { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2158
+ { no: 5, name: "profile_id", kind: "message", T: () => ProfileId },
2176
2159
  { no: 2, name: "type", kind: "enum", T: () => ["sid.v1.identity.CredentialType", CredentialType, "CREDENTIAL_TYPE_"] },
2177
2160
  { no: 3, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
2178
2161
  { no: 4, name: "label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
@@ -2180,7 +2163,6 @@ class AddCredentialRequest$Type extends MessageType {
2180
2163
  }
2181
2164
  create(value) {
2182
2165
  const message = globalThis.Object.create((this.messagePrototype));
2183
- message.profileId = "";
2184
2166
  message.type = 0;
2185
2167
  message.data = new Uint8Array(0);
2186
2168
  if (value !== undefined)
@@ -2192,8 +2174,8 @@ class AddCredentialRequest$Type extends MessageType {
2192
2174
  while (reader.pos < end) {
2193
2175
  let [fieldNo, wireType] = reader.tag();
2194
2176
  switch (fieldNo) {
2195
- case /* string profile_id */ 1:
2196
- message.profileId = reader.string();
2177
+ case /* sid.v1.ids.ProfileId profile_id */ 5:
2178
+ message.profileId = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.profileId);
2197
2179
  break;
2198
2180
  case /* sid.v1.identity.CredentialType type */ 2:
2199
2181
  message.type = reader.int32();
@@ -2216,9 +2198,6 @@ class AddCredentialRequest$Type extends MessageType {
2216
2198
  return message;
2217
2199
  }
2218
2200
  internalBinaryWrite(message, writer, options) {
2219
- /* string profile_id = 1; */
2220
- if (message.profileId !== "")
2221
- writer.tag(1, WireType.LengthDelimited).string(message.profileId);
2222
2201
  /* sid.v1.identity.CredentialType type = 2; */
2223
2202
  if (message.type !== 0)
2224
2203
  writer.tag(2, WireType.Varint).int32(message.type);
@@ -2228,6 +2207,9 @@ class AddCredentialRequest$Type extends MessageType {
2228
2207
  /* optional string label = 4; */
2229
2208
  if (message.label !== undefined)
2230
2209
  writer.tag(4, WireType.LengthDelimited).string(message.label);
2210
+ /* sid.v1.ids.ProfileId profile_id = 5; */
2211
+ if (message.profileId)
2212
+ ProfileId.internalBinaryWrite(message.profileId, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
2231
2213
  let u = options.writeUnknownFields;
2232
2214
  if (u !== false)
2233
2215
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2288,12 +2270,11 @@ export const AddCredentialResponse = new AddCredentialResponse$Type();
2288
2270
  class ListCredentialsRequest$Type extends MessageType {
2289
2271
  constructor() {
2290
2272
  super("sid.v1.identity.ListCredentialsRequest", [
2291
- { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2273
+ { no: 2, name: "profile_id", kind: "message", T: () => ProfileId }
2292
2274
  ]);
2293
2275
  }
2294
2276
  create(value) {
2295
2277
  const message = globalThis.Object.create((this.messagePrototype));
2296
- message.profileId = "";
2297
2278
  if (value !== undefined)
2298
2279
  reflectionMergePartial(this, message, value);
2299
2280
  return message;
@@ -2303,8 +2284,8 @@ class ListCredentialsRequest$Type extends MessageType {
2303
2284
  while (reader.pos < end) {
2304
2285
  let [fieldNo, wireType] = reader.tag();
2305
2286
  switch (fieldNo) {
2306
- case /* string profile_id */ 1:
2307
- message.profileId = reader.string();
2287
+ case /* sid.v1.ids.ProfileId profile_id */ 2:
2288
+ message.profileId = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.profileId);
2308
2289
  break;
2309
2290
  default:
2310
2291
  let u = options.readUnknownField;
@@ -2318,9 +2299,9 @@ class ListCredentialsRequest$Type extends MessageType {
2318
2299
  return message;
2319
2300
  }
2320
2301
  internalBinaryWrite(message, writer, options) {
2321
- /* string profile_id = 1; */
2322
- if (message.profileId !== "")
2323
- writer.tag(1, WireType.LengthDelimited).string(message.profileId);
2302
+ /* sid.v1.ids.ProfileId profile_id = 2; */
2303
+ if (message.profileId)
2304
+ ProfileId.internalBinaryWrite(message.profileId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2324
2305
  let u = options.writeUnknownFields;
2325
2306
  if (u !== false)
2326
2307
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2382,13 +2363,12 @@ export const ListCredentialsResponse = new ListCredentialsResponse$Type();
2382
2363
  class UpdateCredentialRequest$Type extends MessageType {
2383
2364
  constructor() {
2384
2365
  super("sid.v1.identity.UpdateCredentialRequest", [
2385
- { no: 1, name: "credential_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2366
+ { no: 3, name: "credential_id", kind: "message", T: () => CredentialId },
2386
2367
  { no: 2, name: "label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
2387
2368
  ]);
2388
2369
  }
2389
2370
  create(value) {
2390
2371
  const message = globalThis.Object.create((this.messagePrototype));
2391
- message.credentialId = "";
2392
2372
  if (value !== undefined)
2393
2373
  reflectionMergePartial(this, message, value);
2394
2374
  return message;
@@ -2398,8 +2378,8 @@ class UpdateCredentialRequest$Type extends MessageType {
2398
2378
  while (reader.pos < end) {
2399
2379
  let [fieldNo, wireType] = reader.tag();
2400
2380
  switch (fieldNo) {
2401
- case /* string credential_id */ 1:
2402
- message.credentialId = reader.string();
2381
+ case /* sid.v1.ids.CredentialId credential_id */ 3:
2382
+ message.credentialId = CredentialId.internalBinaryRead(reader, reader.uint32(), options, message.credentialId);
2403
2383
  break;
2404
2384
  case /* optional string label */ 2:
2405
2385
  message.label = reader.string();
@@ -2416,12 +2396,12 @@ class UpdateCredentialRequest$Type extends MessageType {
2416
2396
  return message;
2417
2397
  }
2418
2398
  internalBinaryWrite(message, writer, options) {
2419
- /* string credential_id = 1; */
2420
- if (message.credentialId !== "")
2421
- writer.tag(1, WireType.LengthDelimited).string(message.credentialId);
2422
2399
  /* optional string label = 2; */
2423
2400
  if (message.label !== undefined)
2424
2401
  writer.tag(2, WireType.LengthDelimited).string(message.label);
2402
+ /* sid.v1.ids.CredentialId credential_id = 3; */
2403
+ if (message.credentialId)
2404
+ CredentialId.internalBinaryWrite(message.credentialId, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
2425
2405
  let u = options.writeUnknownFields;
2426
2406
  if (u !== false)
2427
2407
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2482,12 +2462,11 @@ export const UpdateCredentialResponse = new UpdateCredentialResponse$Type();
2482
2462
  class RevokeCredentialRequest$Type extends MessageType {
2483
2463
  constructor() {
2484
2464
  super("sid.v1.identity.RevokeCredentialRequest", [
2485
- { no: 1, name: "credential_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2465
+ { no: 2, name: "credential_id", kind: "message", T: () => CredentialId }
2486
2466
  ]);
2487
2467
  }
2488
2468
  create(value) {
2489
2469
  const message = globalThis.Object.create((this.messagePrototype));
2490
- message.credentialId = "";
2491
2470
  if (value !== undefined)
2492
2471
  reflectionMergePartial(this, message, value);
2493
2472
  return message;
@@ -2497,8 +2476,8 @@ class RevokeCredentialRequest$Type extends MessageType {
2497
2476
  while (reader.pos < end) {
2498
2477
  let [fieldNo, wireType] = reader.tag();
2499
2478
  switch (fieldNo) {
2500
- case /* string credential_id */ 1:
2501
- message.credentialId = reader.string();
2479
+ case /* sid.v1.ids.CredentialId credential_id */ 2:
2480
+ message.credentialId = CredentialId.internalBinaryRead(reader, reader.uint32(), options, message.credentialId);
2502
2481
  break;
2503
2482
  default:
2504
2483
  let u = options.readUnknownField;
@@ -2512,9 +2491,9 @@ class RevokeCredentialRequest$Type extends MessageType {
2512
2491
  return message;
2513
2492
  }
2514
2493
  internalBinaryWrite(message, writer, options) {
2515
- /* string credential_id = 1; */
2516
- if (message.credentialId !== "")
2517
- writer.tag(1, WireType.LengthDelimited).string(message.credentialId);
2494
+ /* sid.v1.ids.CredentialId credential_id = 2; */
2495
+ if (message.credentialId)
2496
+ CredentialId.internalBinaryWrite(message.credentialId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2518
2497
  let u = options.writeUnknownFields;
2519
2498
  if (u !== false)
2520
2499
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2567,12 +2546,11 @@ export const RevokeCredentialResponse = new RevokeCredentialResponse$Type();
2567
2546
  class ListSessionsRequest$Type extends MessageType {
2568
2547
  constructor() {
2569
2548
  super("sid.v1.identity.ListSessionsRequest", [
2570
- { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2549
+ { no: 2, name: "profile_id", kind: "message", T: () => ProfileId }
2571
2550
  ]);
2572
2551
  }
2573
2552
  create(value) {
2574
2553
  const message = globalThis.Object.create((this.messagePrototype));
2575
- message.profileId = "";
2576
2554
  if (value !== undefined)
2577
2555
  reflectionMergePartial(this, message, value);
2578
2556
  return message;
@@ -2582,8 +2560,8 @@ class ListSessionsRequest$Type extends MessageType {
2582
2560
  while (reader.pos < end) {
2583
2561
  let [fieldNo, wireType] = reader.tag();
2584
2562
  switch (fieldNo) {
2585
- case /* string profile_id */ 1:
2586
- message.profileId = reader.string();
2563
+ case /* sid.v1.ids.ProfileId profile_id */ 2:
2564
+ message.profileId = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.profileId);
2587
2565
  break;
2588
2566
  default:
2589
2567
  let u = options.readUnknownField;
@@ -2597,9 +2575,9 @@ class ListSessionsRequest$Type extends MessageType {
2597
2575
  return message;
2598
2576
  }
2599
2577
  internalBinaryWrite(message, writer, options) {
2600
- /* string profile_id = 1; */
2601
- if (message.profileId !== "")
2602
- writer.tag(1, WireType.LengthDelimited).string(message.profileId);
2578
+ /* sid.v1.ids.ProfileId profile_id = 2; */
2579
+ if (message.profileId)
2580
+ ProfileId.internalBinaryWrite(message.profileId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2603
2581
  let u = options.writeUnknownFields;
2604
2582
  if (u !== false)
2605
2583
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2661,12 +2639,11 @@ export const ListSessionsResponse = new ListSessionsResponse$Type();
2661
2639
  class RevokeSessionRequest$Type extends MessageType {
2662
2640
  constructor() {
2663
2641
  super("sid.v1.identity.RevokeSessionRequest", [
2664
- { no: 1, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2642
+ { no: 2, name: "session_id", kind: "message", T: () => SessionId }
2665
2643
  ]);
2666
2644
  }
2667
2645
  create(value) {
2668
2646
  const message = globalThis.Object.create((this.messagePrototype));
2669
- message.sessionId = "";
2670
2647
  if (value !== undefined)
2671
2648
  reflectionMergePartial(this, message, value);
2672
2649
  return message;
@@ -2676,8 +2653,8 @@ class RevokeSessionRequest$Type extends MessageType {
2676
2653
  while (reader.pos < end) {
2677
2654
  let [fieldNo, wireType] = reader.tag();
2678
2655
  switch (fieldNo) {
2679
- case /* string session_id */ 1:
2680
- message.sessionId = reader.string();
2656
+ case /* sid.v1.ids.SessionId session_id */ 2:
2657
+ message.sessionId = SessionId.internalBinaryRead(reader, reader.uint32(), options, message.sessionId);
2681
2658
  break;
2682
2659
  default:
2683
2660
  let u = options.readUnknownField;
@@ -2691,9 +2668,9 @@ class RevokeSessionRequest$Type extends MessageType {
2691
2668
  return message;
2692
2669
  }
2693
2670
  internalBinaryWrite(message, writer, options) {
2694
- /* string session_id = 1; */
2695
- if (message.sessionId !== "")
2696
- writer.tag(1, WireType.LengthDelimited).string(message.sessionId);
2671
+ /* sid.v1.ids.SessionId session_id = 2; */
2672
+ if (message.sessionId)
2673
+ SessionId.internalBinaryWrite(message.sessionId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2697
2674
  let u = options.writeUnknownFields;
2698
2675
  if (u !== false)
2699
2676
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2746,14 +2723,13 @@ export const RevokeSessionResponse = new RevokeSessionResponse$Type();
2746
2723
  class AddPrincipalRequest$Type extends MessageType {
2747
2724
  constructor() {
2748
2725
  super("sid.v1.identity.AddPrincipalRequest", [
2749
- { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2726
+ { no: 4, name: "profile_id", kind: "message", T: () => ProfileId },
2750
2727
  { no: 2, name: "type", kind: "enum", T: () => ["sid.v1.identity.PrincipalType", PrincipalType, "PRINCIPAL_TYPE_"] },
2751
2728
  { no: 3, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2752
2729
  ]);
2753
2730
  }
2754
2731
  create(value) {
2755
2732
  const message = globalThis.Object.create((this.messagePrototype));
2756
- message.profileId = "";
2757
2733
  message.type = 0;
2758
2734
  message.value = "";
2759
2735
  if (value !== undefined)
@@ -2765,8 +2741,8 @@ class AddPrincipalRequest$Type extends MessageType {
2765
2741
  while (reader.pos < end) {
2766
2742
  let [fieldNo, wireType] = reader.tag();
2767
2743
  switch (fieldNo) {
2768
- case /* string profile_id */ 1:
2769
- message.profileId = reader.string();
2744
+ case /* sid.v1.ids.ProfileId profile_id */ 4:
2745
+ message.profileId = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.profileId);
2770
2746
  break;
2771
2747
  case /* sid.v1.identity.PrincipalType type */ 2:
2772
2748
  message.type = reader.int32();
@@ -2786,15 +2762,15 @@ class AddPrincipalRequest$Type extends MessageType {
2786
2762
  return message;
2787
2763
  }
2788
2764
  internalBinaryWrite(message, writer, options) {
2789
- /* string profile_id = 1; */
2790
- if (message.profileId !== "")
2791
- writer.tag(1, WireType.LengthDelimited).string(message.profileId);
2792
2765
  /* sid.v1.identity.PrincipalType type = 2; */
2793
2766
  if (message.type !== 0)
2794
2767
  writer.tag(2, WireType.Varint).int32(message.type);
2795
2768
  /* string value = 3; */
2796
2769
  if (message.value !== "")
2797
2770
  writer.tag(3, WireType.LengthDelimited).string(message.value);
2771
+ /* sid.v1.ids.ProfileId profile_id = 4; */
2772
+ if (message.profileId)
2773
+ ProfileId.internalBinaryWrite(message.profileId, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
2798
2774
  let u = options.writeUnknownFields;
2799
2775
  if (u !== false)
2800
2776
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2855,12 +2831,11 @@ export const AddPrincipalResponse = new AddPrincipalResponse$Type();
2855
2831
  class ListPrincipalsRequest$Type extends MessageType {
2856
2832
  constructor() {
2857
2833
  super("sid.v1.identity.ListPrincipalsRequest", [
2858
- { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2834
+ { no: 2, name: "profile_id", kind: "message", T: () => ProfileId }
2859
2835
  ]);
2860
2836
  }
2861
2837
  create(value) {
2862
2838
  const message = globalThis.Object.create((this.messagePrototype));
2863
- message.profileId = "";
2864
2839
  if (value !== undefined)
2865
2840
  reflectionMergePartial(this, message, value);
2866
2841
  return message;
@@ -2870,8 +2845,8 @@ class ListPrincipalsRequest$Type extends MessageType {
2870
2845
  while (reader.pos < end) {
2871
2846
  let [fieldNo, wireType] = reader.tag();
2872
2847
  switch (fieldNo) {
2873
- case /* string profile_id */ 1:
2874
- message.profileId = reader.string();
2848
+ case /* sid.v1.ids.ProfileId profile_id */ 2:
2849
+ message.profileId = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.profileId);
2875
2850
  break;
2876
2851
  default:
2877
2852
  let u = options.readUnknownField;
@@ -2885,9 +2860,9 @@ class ListPrincipalsRequest$Type extends MessageType {
2885
2860
  return message;
2886
2861
  }
2887
2862
  internalBinaryWrite(message, writer, options) {
2888
- /* string profile_id = 1; */
2889
- if (message.profileId !== "")
2890
- writer.tag(1, WireType.LengthDelimited).string(message.profileId);
2863
+ /* sid.v1.ids.ProfileId profile_id = 2; */
2864
+ if (message.profileId)
2865
+ ProfileId.internalBinaryWrite(message.profileId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2891
2866
  let u = options.writeUnknownFields;
2892
2867
  if (u !== false)
2893
2868
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2949,12 +2924,11 @@ export const ListPrincipalsResponse = new ListPrincipalsResponse$Type();
2949
2924
  class RemovePrincipalRequest$Type extends MessageType {
2950
2925
  constructor() {
2951
2926
  super("sid.v1.identity.RemovePrincipalRequest", [
2952
- { no: 1, name: "principal_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2927
+ { no: 2, name: "principal_id", kind: "message", T: () => PrincipalId }
2953
2928
  ]);
2954
2929
  }
2955
2930
  create(value) {
2956
2931
  const message = globalThis.Object.create((this.messagePrototype));
2957
- message.principalId = "";
2958
2932
  if (value !== undefined)
2959
2933
  reflectionMergePartial(this, message, value);
2960
2934
  return message;
@@ -2964,8 +2938,8 @@ class RemovePrincipalRequest$Type extends MessageType {
2964
2938
  while (reader.pos < end) {
2965
2939
  let [fieldNo, wireType] = reader.tag();
2966
2940
  switch (fieldNo) {
2967
- case /* string principal_id */ 1:
2968
- message.principalId = reader.string();
2941
+ case /* sid.v1.ids.PrincipalId principal_id */ 2:
2942
+ message.principalId = PrincipalId.internalBinaryRead(reader, reader.uint32(), options, message.principalId);
2969
2943
  break;
2970
2944
  default:
2971
2945
  let u = options.readUnknownField;
@@ -2979,9 +2953,9 @@ class RemovePrincipalRequest$Type extends MessageType {
2979
2953
  return message;
2980
2954
  }
2981
2955
  internalBinaryWrite(message, writer, options) {
2982
- /* string principal_id = 1; */
2983
- if (message.principalId !== "")
2984
- writer.tag(1, WireType.LengthDelimited).string(message.principalId);
2956
+ /* sid.v1.ids.PrincipalId principal_id = 2; */
2957
+ if (message.principalId)
2958
+ PrincipalId.internalBinaryWrite(message.principalId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2985
2959
  let u = options.writeUnknownFields;
2986
2960
  if (u !== false)
2987
2961
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -3281,13 +3255,12 @@ export const RecordPasskeyPromptDismissalResponse = new RecordPasskeyPromptDismi
3281
3255
  class RevokeProfileRequest$Type extends MessageType {
3282
3256
  constructor() {
3283
3257
  super("sid.v1.identity.RevokeProfileRequest", [
3284
- { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
3258
+ { no: 3, name: "profile_id", kind: "message", T: () => ProfileId },
3285
3259
  { no: 2, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
3286
3260
  ]);
3287
3261
  }
3288
3262
  create(value) {
3289
3263
  const message = globalThis.Object.create((this.messagePrototype));
3290
- message.profileId = "";
3291
3264
  message.reason = "";
3292
3265
  if (value !== undefined)
3293
3266
  reflectionMergePartial(this, message, value);
@@ -3298,8 +3271,8 @@ class RevokeProfileRequest$Type extends MessageType {
3298
3271
  while (reader.pos < end) {
3299
3272
  let [fieldNo, wireType] = reader.tag();
3300
3273
  switch (fieldNo) {
3301
- case /* string profile_id */ 1:
3302
- message.profileId = reader.string();
3274
+ case /* sid.v1.ids.ProfileId profile_id */ 3:
3275
+ message.profileId = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.profileId);
3303
3276
  break;
3304
3277
  case /* string reason */ 2:
3305
3278
  message.reason = reader.string();
@@ -3316,12 +3289,12 @@ class RevokeProfileRequest$Type extends MessageType {
3316
3289
  return message;
3317
3290
  }
3318
3291
  internalBinaryWrite(message, writer, options) {
3319
- /* string profile_id = 1; */
3320
- if (message.profileId !== "")
3321
- writer.tag(1, WireType.LengthDelimited).string(message.profileId);
3322
3292
  /* string reason = 2; */
3323
3293
  if (message.reason !== "")
3324
3294
  writer.tag(2, WireType.LengthDelimited).string(message.reason);
3295
+ /* sid.v1.ids.ProfileId profile_id = 3; */
3296
+ if (message.profileId)
3297
+ ProfileId.internalBinaryWrite(message.profileId, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
3325
3298
  let u = options.writeUnknownFields;
3326
3299
  if (u !== false)
3327
3300
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -3445,14 +3418,12 @@ export const RequestClosureRequest = new RequestClosureRequest$Type();
3445
3418
  class RequestClosureResponse$Type extends MessageType {
3446
3419
  constructor() {
3447
3420
  super("sid.v1.identity.RequestClosureResponse", [
3448
- { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
3449
3421
  { no: 2, name: "mode", kind: "enum", T: () => ["sid.v1.identity.ClosureMode", ClosureMode, "CLOSURE_MODE_"] },
3450
3422
  { no: 3, name: "grace_period_end", kind: "message", T: () => Timestamp }
3451
3423
  ]);
3452
3424
  }
3453
3425
  create(value) {
3454
3426
  const message = globalThis.Object.create((this.messagePrototype));
3455
- message.profileId = "";
3456
3427
  message.mode = 0;
3457
3428
  if (value !== undefined)
3458
3429
  reflectionMergePartial(this, message, value);
@@ -3463,9 +3434,6 @@ class RequestClosureResponse$Type extends MessageType {
3463
3434
  while (reader.pos < end) {
3464
3435
  let [fieldNo, wireType] = reader.tag();
3465
3436
  switch (fieldNo) {
3466
- case /* string profile_id */ 1:
3467
- message.profileId = reader.string();
3468
- break;
3469
3437
  case /* sid.v1.identity.ClosureMode mode */ 2:
3470
3438
  message.mode = reader.int32();
3471
3439
  break;
@@ -3484,9 +3452,6 @@ class RequestClosureResponse$Type extends MessageType {
3484
3452
  return message;
3485
3453
  }
3486
3454
  internalBinaryWrite(message, writer, options) {
3487
- /* string profile_id = 1; */
3488
- if (message.profileId !== "")
3489
- writer.tag(1, WireType.LengthDelimited).string(message.profileId);
3490
3455
  /* sid.v1.identity.ClosureMode mode = 2; */
3491
3456
  if (message.mode !== 0)
3492
3457
  writer.tag(2, WireType.Varint).int32(message.mode);
@@ -3753,13 +3718,11 @@ export const PrepareExportRequest = new PrepareExportRequest$Type();
3753
3718
  class PrepareExportResponse$Type extends MessageType {
3754
3719
  constructor() {
3755
3720
  super("sid.v1.identity.PrepareExportResponse", [
3756
- { no: 1, name: "export_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
3757
3721
  { no: 2, name: "estimated_ready", kind: "message", T: () => Timestamp }
3758
3722
  ]);
3759
3723
  }
3760
3724
  create(value) {
3761
3725
  const message = globalThis.Object.create((this.messagePrototype));
3762
- message.exportId = "";
3763
3726
  if (value !== undefined)
3764
3727
  reflectionMergePartial(this, message, value);
3765
3728
  return message;
@@ -3769,9 +3732,6 @@ class PrepareExportResponse$Type extends MessageType {
3769
3732
  while (reader.pos < end) {
3770
3733
  let [fieldNo, wireType] = reader.tag();
3771
3734
  switch (fieldNo) {
3772
- case /* string export_id */ 1:
3773
- message.exportId = reader.string();
3774
- break;
3775
3735
  case /* google.protobuf.Timestamp estimated_ready */ 2:
3776
3736
  message.estimatedReady = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.estimatedReady);
3777
3737
  break;
@@ -3787,9 +3747,6 @@ class PrepareExportResponse$Type extends MessageType {
3787
3747
  return message;
3788
3748
  }
3789
3749
  internalBinaryWrite(message, writer, options) {
3790
- /* string export_id = 1; */
3791
- if (message.exportId !== "")
3792
- writer.tag(1, WireType.LengthDelimited).string(message.exportId);
3793
3750
  /* google.protobuf.Timestamp estimated_ready = 2; */
3794
3751
  if (message.estimatedReady)
3795
3752
  Timestamp.internalBinaryWrite(message.estimatedReady, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
@@ -3847,7 +3804,7 @@ class GetExportStatusResponse$Type extends MessageType {
3847
3804
  super("sid.v1.identity.GetExportStatusResponse", [
3848
3805
  { no: 1, name: "export_status", kind: "enum", T: () => ["sid.v1.identity.ExportStatus", ExportStatus, "EXPORT_STATUS_"] },
3849
3806
  { no: 2, name: "size_bytes", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
3850
- { no: 3, name: "checksum_sha256", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
3807
+ { no: 6, name: "checksum_sha256", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
3851
3808
  { no: 4, name: "ready_at", kind: "message", T: () => Timestamp },
3852
3809
  { no: 5, name: "expires_at", kind: "message", T: () => Timestamp }
3853
3810
  ]);
@@ -3870,8 +3827,8 @@ class GetExportStatusResponse$Type extends MessageType {
3870
3827
  case /* optional int64 size_bytes */ 2:
3871
3828
  message.sizeBytes = reader.int64().toBigInt();
3872
3829
  break;
3873
- case /* optional string checksum_sha256 */ 3:
3874
- message.checksumSha256 = reader.string();
3830
+ case /* optional bytes checksum_sha256 */ 6:
3831
+ message.checksumSha256 = reader.bytes();
3875
3832
  break;
3876
3833
  case /* optional google.protobuf.Timestamp ready_at */ 4:
3877
3834
  message.readyAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.readyAt);
@@ -3897,15 +3854,15 @@ class GetExportStatusResponse$Type extends MessageType {
3897
3854
  /* optional int64 size_bytes = 2; */
3898
3855
  if (message.sizeBytes !== undefined)
3899
3856
  writer.tag(2, WireType.Varint).int64(message.sizeBytes);
3900
- /* optional string checksum_sha256 = 3; */
3901
- if (message.checksumSha256 !== undefined)
3902
- writer.tag(3, WireType.LengthDelimited).string(message.checksumSha256);
3903
3857
  /* optional google.protobuf.Timestamp ready_at = 4; */
3904
3858
  if (message.readyAt)
3905
3859
  Timestamp.internalBinaryWrite(message.readyAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
3906
3860
  /* optional google.protobuf.Timestamp expires_at = 5; */
3907
3861
  if (message.expiresAt)
3908
3862
  Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
3863
+ /* optional bytes checksum_sha256 = 6; */
3864
+ if (message.checksumSha256 !== undefined)
3865
+ writer.tag(6, WireType.LengthDelimited).bytes(message.checksumSha256);
3909
3866
  let u = options.writeUnknownFields;
3910
3867
  if (u !== false)
3911
3868
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4059,8 +4016,7 @@ export const AcknowledgeExportRequest = new AcknowledgeExportRequest$Type();
4059
4016
  class Device$Type extends MessageType {
4060
4017
  constructor() {
4061
4018
  super("sid.v1.identity.Device", [
4062
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
4063
- { no: 2, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
4019
+ { no: 12, name: "id", kind: "message", T: () => DeviceId },
4064
4020
  { no: 3, name: "display_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
4065
4021
  { no: 4, name: "device_type", kind: "enum", T: () => ["sid.v1.identity.DeviceType", DeviceType, "DEVICE_TYPE_"] },
4066
4022
  { no: 5, name: "os_info", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
@@ -4074,8 +4030,6 @@ class Device$Type extends MessageType {
4074
4030
  }
4075
4031
  create(value) {
4076
4032
  const message = globalThis.Object.create((this.messagePrototype));
4077
- message.id = "";
4078
- message.profileId = "";
4079
4033
  message.deviceType = 0;
4080
4034
  message.assurance = 0;
4081
4035
  message.trusted = false;
@@ -4089,11 +4043,8 @@ class Device$Type extends MessageType {
4089
4043
  while (reader.pos < end) {
4090
4044
  let [fieldNo, wireType] = reader.tag();
4091
4045
  switch (fieldNo) {
4092
- case /* string id */ 1:
4093
- message.id = reader.string();
4094
- break;
4095
- case /* string profile_id */ 2:
4096
- message.profileId = reader.string();
4046
+ case /* sid.v1.ids.DeviceId id */ 12:
4047
+ message.id = DeviceId.internalBinaryRead(reader, reader.uint32(), options, message.id);
4097
4048
  break;
4098
4049
  case /* optional string display_name */ 3:
4099
4050
  message.displayName = reader.string();
@@ -4134,12 +4085,6 @@ class Device$Type extends MessageType {
4134
4085
  return message;
4135
4086
  }
4136
4087
  internalBinaryWrite(message, writer, options) {
4137
- /* string id = 1; */
4138
- if (message.id !== "")
4139
- writer.tag(1, WireType.LengthDelimited).string(message.id);
4140
- /* string profile_id = 2; */
4141
- if (message.profileId !== "")
4142
- writer.tag(2, WireType.LengthDelimited).string(message.profileId);
4143
4088
  /* optional string display_name = 3; */
4144
4089
  if (message.displayName !== undefined)
4145
4090
  writer.tag(3, WireType.LengthDelimited).string(message.displayName);
@@ -4167,6 +4112,9 @@ class Device$Type extends MessageType {
4167
4112
  /* google.protobuf.Timestamp last_seen_at = 11; */
4168
4113
  if (message.lastSeenAt)
4169
4114
  Timestamp.internalBinaryWrite(message.lastSeenAt, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
4115
+ /* sid.v1.ids.DeviceId id = 12; */
4116
+ if (message.id)
4117
+ DeviceId.internalBinaryWrite(message.id, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
4170
4118
  let u = options.writeUnknownFields;
4171
4119
  if (u !== false)
4172
4120
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4181,12 +4129,11 @@ export const Device = new Device$Type();
4181
4129
  class ListDevicesRequest$Type extends MessageType {
4182
4130
  constructor() {
4183
4131
  super("sid.v1.identity.ListDevicesRequest", [
4184
- { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
4132
+ { no: 2, name: "profile_id", kind: "message", T: () => ProfileId }
4185
4133
  ]);
4186
4134
  }
4187
4135
  create(value) {
4188
4136
  const message = globalThis.Object.create((this.messagePrototype));
4189
- message.profileId = "";
4190
4137
  if (value !== undefined)
4191
4138
  reflectionMergePartial(this, message, value);
4192
4139
  return message;
@@ -4196,8 +4143,8 @@ class ListDevicesRequest$Type extends MessageType {
4196
4143
  while (reader.pos < end) {
4197
4144
  let [fieldNo, wireType] = reader.tag();
4198
4145
  switch (fieldNo) {
4199
- case /* string profile_id */ 1:
4200
- message.profileId = reader.string();
4146
+ case /* sid.v1.ids.ProfileId profile_id */ 2:
4147
+ message.profileId = ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.profileId);
4201
4148
  break;
4202
4149
  default:
4203
4150
  let u = options.readUnknownField;
@@ -4211,9 +4158,9 @@ class ListDevicesRequest$Type extends MessageType {
4211
4158
  return message;
4212
4159
  }
4213
4160
  internalBinaryWrite(message, writer, options) {
4214
- /* string profile_id = 1; */
4215
- if (message.profileId !== "")
4216
- writer.tag(1, WireType.LengthDelimited).string(message.profileId);
4161
+ /* sid.v1.ids.ProfileId profile_id = 2; */
4162
+ if (message.profileId)
4163
+ ProfileId.internalBinaryWrite(message.profileId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
4217
4164
  let u = options.writeUnknownFields;
4218
4165
  if (u !== false)
4219
4166
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4275,12 +4222,11 @@ export const ListDevicesResponse = new ListDevicesResponse$Type();
4275
4222
  class GetDeviceRequest$Type extends MessageType {
4276
4223
  constructor() {
4277
4224
  super("sid.v1.identity.GetDeviceRequest", [
4278
- { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
4225
+ { no: 2, name: "device_id", kind: "message", T: () => DeviceId }
4279
4226
  ]);
4280
4227
  }
4281
4228
  create(value) {
4282
4229
  const message = globalThis.Object.create((this.messagePrototype));
4283
- message.deviceId = "";
4284
4230
  if (value !== undefined)
4285
4231
  reflectionMergePartial(this, message, value);
4286
4232
  return message;
@@ -4290,8 +4236,8 @@ class GetDeviceRequest$Type extends MessageType {
4290
4236
  while (reader.pos < end) {
4291
4237
  let [fieldNo, wireType] = reader.tag();
4292
4238
  switch (fieldNo) {
4293
- case /* string device_id */ 1:
4294
- message.deviceId = reader.string();
4239
+ case /* sid.v1.ids.DeviceId device_id */ 2:
4240
+ message.deviceId = DeviceId.internalBinaryRead(reader, reader.uint32(), options, message.deviceId);
4295
4241
  break;
4296
4242
  default:
4297
4243
  let u = options.readUnknownField;
@@ -4305,9 +4251,9 @@ class GetDeviceRequest$Type extends MessageType {
4305
4251
  return message;
4306
4252
  }
4307
4253
  internalBinaryWrite(message, writer, options) {
4308
- /* string device_id = 1; */
4309
- if (message.deviceId !== "")
4310
- writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
4254
+ /* sid.v1.ids.DeviceId device_id = 2; */
4255
+ if (message.deviceId)
4256
+ DeviceId.internalBinaryWrite(message.deviceId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
4311
4257
  let u = options.writeUnknownFields;
4312
4258
  if (u !== false)
4313
4259
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4322,13 +4268,12 @@ export const GetDeviceRequest = new GetDeviceRequest$Type();
4322
4268
  class UpdateDeviceRequest$Type extends MessageType {
4323
4269
  constructor() {
4324
4270
  super("sid.v1.identity.UpdateDeviceRequest", [
4325
- { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
4271
+ { no: 3, name: "device_id", kind: "message", T: () => DeviceId },
4326
4272
  { no: 2, name: "display_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
4327
4273
  ]);
4328
4274
  }
4329
4275
  create(value) {
4330
4276
  const message = globalThis.Object.create((this.messagePrototype));
4331
- message.deviceId = "";
4332
4277
  if (value !== undefined)
4333
4278
  reflectionMergePartial(this, message, value);
4334
4279
  return message;
@@ -4338,8 +4283,8 @@ class UpdateDeviceRequest$Type extends MessageType {
4338
4283
  while (reader.pos < end) {
4339
4284
  let [fieldNo, wireType] = reader.tag();
4340
4285
  switch (fieldNo) {
4341
- case /* string device_id */ 1:
4342
- message.deviceId = reader.string();
4286
+ case /* sid.v1.ids.DeviceId device_id */ 3:
4287
+ message.deviceId = DeviceId.internalBinaryRead(reader, reader.uint32(), options, message.deviceId);
4343
4288
  break;
4344
4289
  case /* optional string display_name */ 2:
4345
4290
  message.displayName = reader.string();
@@ -4356,12 +4301,12 @@ class UpdateDeviceRequest$Type extends MessageType {
4356
4301
  return message;
4357
4302
  }
4358
4303
  internalBinaryWrite(message, writer, options) {
4359
- /* string device_id = 1; */
4360
- if (message.deviceId !== "")
4361
- writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
4362
4304
  /* optional string display_name = 2; */
4363
4305
  if (message.displayName !== undefined)
4364
4306
  writer.tag(2, WireType.LengthDelimited).string(message.displayName);
4307
+ /* sid.v1.ids.DeviceId device_id = 3; */
4308
+ if (message.deviceId)
4309
+ DeviceId.internalBinaryWrite(message.deviceId, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
4365
4310
  let u = options.writeUnknownFields;
4366
4311
  if (u !== false)
4367
4312
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4376,12 +4321,11 @@ export const UpdateDeviceRequest = new UpdateDeviceRequest$Type();
4376
4321
  class RemoveDeviceRequest$Type extends MessageType {
4377
4322
  constructor() {
4378
4323
  super("sid.v1.identity.RemoveDeviceRequest", [
4379
- { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
4324
+ { no: 2, name: "device_id", kind: "message", T: () => DeviceId }
4380
4325
  ]);
4381
4326
  }
4382
4327
  create(value) {
4383
4328
  const message = globalThis.Object.create((this.messagePrototype));
4384
- message.deviceId = "";
4385
4329
  if (value !== undefined)
4386
4330
  reflectionMergePartial(this, message, value);
4387
4331
  return message;
@@ -4391,8 +4335,8 @@ class RemoveDeviceRequest$Type extends MessageType {
4391
4335
  while (reader.pos < end) {
4392
4336
  let [fieldNo, wireType] = reader.tag();
4393
4337
  switch (fieldNo) {
4394
- case /* string device_id */ 1:
4395
- message.deviceId = reader.string();
4338
+ case /* sid.v1.ids.DeviceId device_id */ 2:
4339
+ message.deviceId = DeviceId.internalBinaryRead(reader, reader.uint32(), options, message.deviceId);
4396
4340
  break;
4397
4341
  default:
4398
4342
  let u = options.readUnknownField;
@@ -4406,9 +4350,9 @@ class RemoveDeviceRequest$Type extends MessageType {
4406
4350
  return message;
4407
4351
  }
4408
4352
  internalBinaryWrite(message, writer, options) {
4409
- /* string device_id = 1; */
4410
- if (message.deviceId !== "")
4411
- writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
4353
+ /* sid.v1.ids.DeviceId device_id = 2; */
4354
+ if (message.deviceId)
4355
+ DeviceId.internalBinaryWrite(message.deviceId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
4412
4356
  let u = options.writeUnknownFields;
4413
4357
  if (u !== false)
4414
4358
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4423,12 +4367,11 @@ export const RemoveDeviceRequest = new RemoveDeviceRequest$Type();
4423
4367
  class TrustDeviceRequest$Type extends MessageType {
4424
4368
  constructor() {
4425
4369
  super("sid.v1.identity.TrustDeviceRequest", [
4426
- { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
4370
+ { no: 2, name: "device_id", kind: "message", T: () => DeviceId }
4427
4371
  ]);
4428
4372
  }
4429
4373
  create(value) {
4430
4374
  const message = globalThis.Object.create((this.messagePrototype));
4431
- message.deviceId = "";
4432
4375
  if (value !== undefined)
4433
4376
  reflectionMergePartial(this, message, value);
4434
4377
  return message;
@@ -4438,8 +4381,8 @@ class TrustDeviceRequest$Type extends MessageType {
4438
4381
  while (reader.pos < end) {
4439
4382
  let [fieldNo, wireType] = reader.tag();
4440
4383
  switch (fieldNo) {
4441
- case /* string device_id */ 1:
4442
- message.deviceId = reader.string();
4384
+ case /* sid.v1.ids.DeviceId device_id */ 2:
4385
+ message.deviceId = DeviceId.internalBinaryRead(reader, reader.uint32(), options, message.deviceId);
4443
4386
  break;
4444
4387
  default:
4445
4388
  let u = options.readUnknownField;
@@ -4453,9 +4396,9 @@ class TrustDeviceRequest$Type extends MessageType {
4453
4396
  return message;
4454
4397
  }
4455
4398
  internalBinaryWrite(message, writer, options) {
4456
- /* string device_id = 1; */
4457
- if (message.deviceId !== "")
4458
- writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
4399
+ /* sid.v1.ids.DeviceId device_id = 2; */
4400
+ if (message.deviceId)
4401
+ DeviceId.internalBinaryWrite(message.deviceId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
4459
4402
  let u = options.writeUnknownFields;
4460
4403
  if (u !== false)
4461
4404
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4470,12 +4413,11 @@ export const TrustDeviceRequest = new TrustDeviceRequest$Type();
4470
4413
  class RevokeDeviceTrustRequest$Type extends MessageType {
4471
4414
  constructor() {
4472
4415
  super("sid.v1.identity.RevokeDeviceTrustRequest", [
4473
- { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
4416
+ { no: 2, name: "device_id", kind: "message", T: () => DeviceId }
4474
4417
  ]);
4475
4418
  }
4476
4419
  create(value) {
4477
4420
  const message = globalThis.Object.create((this.messagePrototype));
4478
- message.deviceId = "";
4479
4421
  if (value !== undefined)
4480
4422
  reflectionMergePartial(this, message, value);
4481
4423
  return message;
@@ -4485,8 +4427,8 @@ class RevokeDeviceTrustRequest$Type extends MessageType {
4485
4427
  while (reader.pos < end) {
4486
4428
  let [fieldNo, wireType] = reader.tag();
4487
4429
  switch (fieldNo) {
4488
- case /* string device_id */ 1:
4489
- message.deviceId = reader.string();
4430
+ case /* sid.v1.ids.DeviceId device_id */ 2:
4431
+ message.deviceId = DeviceId.internalBinaryRead(reader, reader.uint32(), options, message.deviceId);
4490
4432
  break;
4491
4433
  default:
4492
4434
  let u = options.readUnknownField;
@@ -4500,9 +4442,9 @@ class RevokeDeviceTrustRequest$Type extends MessageType {
4500
4442
  return message;
4501
4443
  }
4502
4444
  internalBinaryWrite(message, writer, options) {
4503
- /* string device_id = 1; */
4504
- if (message.deviceId !== "")
4505
- writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
4445
+ /* sid.v1.ids.DeviceId device_id = 2; */
4446
+ if (message.deviceId)
4447
+ DeviceId.internalBinaryWrite(message.deviceId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
4506
4448
  let u = options.writeUnknownFields;
4507
4449
  if (u !== false)
4508
4450
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4518,22 +4460,22 @@ export const RevokeDeviceTrustRequest = new RevokeDeviceTrustRequest$Type();
4518
4460
  */
4519
4461
  export const IdentityService = new ServiceType("sid.v1.identity.IdentityService", [
4520
4462
  { name: "CreateProfile", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/profiles", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: CreateProfileRequest, O: CreateProfileResponse },
4521
- { name: "GetProfile", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/profiles/{id}" } }, I: GetProfileRequest, O: GetProfileResponse },
4522
- { name: "UpdateProfile", idempotency: "IDEMPOTENT", options: { "google.api.http": { patch: "/v1/identity/profiles/{id}", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: UpdateProfileRequest, O: UpdateProfileResponse },
4523
- { name: "DeleteProfile", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/profiles/{id}" }, "sid.v1.common.retry": { keyed: true } }, I: DeleteProfileRequest, O: DeleteProfileResponse },
4463
+ { name: "GetProfile", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/profiles/{id.value}" } }, I: GetProfileRequest, O: GetProfileResponse },
4464
+ { name: "UpdateProfile", idempotency: "IDEMPOTENT", options: { "google.api.http": { patch: "/v1/identity/profiles/{id.value}", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: UpdateProfileRequest, O: UpdateProfileResponse },
4465
+ { name: "DeleteProfile", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/profiles/{id.value}" }, "sid.v1.common.retry": { keyed: true } }, I: DeleteProfileRequest, O: DeleteProfileResponse },
4524
4466
  { name: "ListProfiles", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/profiles" } }, I: ListProfilesRequest, O: ListProfilesResponse },
4525
- { name: "AddCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/profiles/{profile_id}/credentials", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: AddCredentialRequest, O: AddCredentialResponse },
4526
- { name: "ListCredentials", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/profiles/{profile_id}/credentials" } }, I: ListCredentialsRequest, O: ListCredentialsResponse },
4527
- { name: "UpdateCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { patch: "/v1/identity/credentials/{credential_id}", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: UpdateCredentialRequest, O: UpdateCredentialResponse },
4528
- { name: "RevokeCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/credentials/{credential_id}" }, "sid.v1.common.retry": { keyed: true } }, I: RevokeCredentialRequest, O: RevokeCredentialResponse },
4529
- { name: "AddPrincipal", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/profiles/{profile_id}/principals", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: AddPrincipalRequest, O: AddPrincipalResponse },
4530
- { name: "ListPrincipals", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/profiles/{profile_id}/principals" } }, I: ListPrincipalsRequest, O: ListPrincipalsResponse },
4531
- { name: "RemovePrincipal", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/principals/{principal_id}" }, "sid.v1.common.retry": { keyed: true } }, I: RemovePrincipalRequest, O: RemovePrincipalResponse },
4532
- { name: "ListSessions", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/profiles/{profile_id}/sessions" } }, I: ListSessionsRequest, O: ListSessionsResponse },
4533
- { name: "RevokeSession", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/sessions/{session_id}" }, "sid.v1.common.retry": { natural: "an ended session stays ended and is never resumed: a repeat finds none and answers as the first, disclosing nothing" } }, I: RevokeSessionRequest, O: RevokeSessionResponse },
4467
+ { name: "AddCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/credentials", body: "*", additionalBindings: [{ post: "/v1/identity/profiles/{profile_id.value}/credentials", body: "*" }] }, "sid.v1.common.retry": { keyed: true } }, I: AddCredentialRequest, O: AddCredentialResponse },
4468
+ { name: "ListCredentials", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/credentials", additionalBindings: [{ get: "/v1/identity/profiles/{profile_id.value}/credentials" }] } }, I: ListCredentialsRequest, O: ListCredentialsResponse },
4469
+ { name: "UpdateCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { patch: "/v1/identity/credentials/{credential_id.value}", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: UpdateCredentialRequest, O: UpdateCredentialResponse },
4470
+ { name: "RevokeCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/credentials/{credential_id.value}" }, "sid.v1.common.retry": { keyed: true } }, I: RevokeCredentialRequest, O: RevokeCredentialResponse },
4471
+ { name: "AddPrincipal", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/principals", body: "*", additionalBindings: [{ post: "/v1/identity/profiles/{profile_id.value}/principals", body: "*" }] }, "sid.v1.common.retry": { keyed: true } }, I: AddPrincipalRequest, O: AddPrincipalResponse },
4472
+ { name: "ListPrincipals", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/principals", additionalBindings: [{ get: "/v1/identity/profiles/{profile_id.value}/principals" }] } }, I: ListPrincipalsRequest, O: ListPrincipalsResponse },
4473
+ { name: "RemovePrincipal", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/principals/{principal_id.value}" }, "sid.v1.common.retry": { keyed: true } }, I: RemovePrincipalRequest, O: RemovePrincipalResponse },
4474
+ { name: "ListSessions", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/sessions", additionalBindings: [{ get: "/v1/identity/profiles/{profile_id.value}/sessions" }] } }, I: ListSessionsRequest, O: ListSessionsResponse },
4475
+ { name: "RevokeSession", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/sessions/{session_id.value}" }, "sid.v1.common.retry": { natural: "an ended session stays ended and is never resumed: a repeat finds none and answers as the first, disclosing nothing" } }, I: RevokeSessionRequest, O: RevokeSessionResponse },
4534
4476
  { name: "GetPasskeyPromptState", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/passkey-prompt" } }, I: GetPasskeyPromptStateRequest, O: GetPasskeyPromptStateResponse },
4535
4477
  { name: "RecordPasskeyPromptDismissal", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/passkey-prompt/dismiss", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: RecordPasskeyPromptDismissalRequest, O: RecordPasskeyPromptDismissalResponse },
4536
- { name: "RevokeProfile", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/profiles/{profile_id}/revoke", body: "*" }, "sid.v1.common.retry": { natural: "every cascade step ends only what is still active and a revoked profile is never reactivated: a repeat ends what an interrupted attempt left and nothing else, and counts what it ended" } }, I: RevokeProfileRequest, O: RevokeProfileResponse },
4478
+ { name: "RevokeProfile", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/profiles/{profile_id.value}/revoke", body: "*" }, "sid.v1.common.retry": { natural: "every cascade step ends only what is still active and a revoked profile is never reactivated: a repeat ends what an interrupted attempt left and nothing else, and counts what it ended" } }, I: RevokeProfileRequest, O: RevokeProfileResponse },
4537
4479
  { name: "RequestClosure", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/closure", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: RequestClosureRequest, O: RequestClosureResponse },
4538
4480
  { name: "CancelClosure", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/closure/cancel", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: CancelClosureRequest, O: CancelClosureResponse },
4539
4481
  { name: "GetClosureStatus", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/closure" } }, I: GetClosureStatusRequest, O: GetClosureStatusResponse },
@@ -4542,11 +4484,11 @@ export const IdentityService = new ServiceType("sid.v1.identity.IdentityService"
4542
4484
  { name: "DownloadExport", idempotency: "NO_SIDE_EFFECTS", serverStreaming: true, options: { "google.api.http": { get: "/v1/identity/export/download" } }, I: DownloadExportRequest, O: DownloadExportChunk },
4543
4485
  { name: "AcknowledgeExport", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/export/acknowledge", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: AcknowledgeExportRequest, O: Empty },
4544
4486
  { name: "GetCurrentProfile", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/me" } }, I: GetCurrentProfileRequest, O: GetProfileResponse },
4545
- { name: "ListDevices", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/profiles/{profile_id}/devices" } }, I: ListDevicesRequest, O: ListDevicesResponse },
4546
- { name: "GetDevice", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/devices/{device_id}" } }, I: GetDeviceRequest, O: Device },
4547
- { name: "UpdateDevice", idempotency: "IDEMPOTENT", options: { "google.api.http": { patch: "/v1/identity/devices/{device_id}", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: UpdateDeviceRequest, O: Device },
4548
- { name: "RemoveDevice", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/devices/{device_id}" }, "sid.v1.common.retry": { keyed: true } }, I: RemoveDeviceRequest, O: Empty },
4549
- { name: "TrustDevice", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/devices/{device_id}/trust", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: TrustDeviceRequest, O: Device },
4550
- { name: "RevokeDeviceTrust", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/devices/{device_id}/revoke-trust", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: RevokeDeviceTrustRequest, O: Device }
4487
+ { name: "ListDevices", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/devices", additionalBindings: [{ get: "/v1/identity/profiles/{profile_id.value}/devices" }] } }, I: ListDevicesRequest, O: ListDevicesResponse },
4488
+ { name: "GetDevice", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/identity/devices/{device_id.value}" } }, I: GetDeviceRequest, O: Device },
4489
+ { name: "UpdateDevice", idempotency: "IDEMPOTENT", options: { "google.api.http": { patch: "/v1/identity/devices/{device_id.value}", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: UpdateDeviceRequest, O: Device },
4490
+ { name: "RemoveDevice", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/identity/devices/{device_id.value}" }, "sid.v1.common.retry": { keyed: true } }, I: RemoveDeviceRequest, O: Empty },
4491
+ { name: "TrustDevice", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/devices/{device_id.value}/trust", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: TrustDeviceRequest, O: Device },
4492
+ { name: "RevokeDeviceTrust", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/identity/devices/{device_id.value}/revoke-trust", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: RevokeDeviceTrustRequest, O: Device }
4551
4493
  ]);
4552
4494
  //# sourceMappingURL=identity.js.map