@structured-id/ui-core 0.1.5

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.
Files changed (156) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +47 -0
  3. package/dist/browser-vp/index.cjs +349 -0
  4. package/dist/browser-vp/index.d.cts +287 -0
  5. package/dist/browser-vp/index.d.ts +287 -0
  6. package/dist/browser-vp/index.js +349 -0
  7. package/dist/chunk-C3Q766CY.cjs +125 -0
  8. package/dist/chunk-J5YXRXB5.js +125 -0
  9. package/dist/index.cjs +19360 -0
  10. package/dist/index.d.cts +9536 -0
  11. package/dist/index.d.ts +9536 -0
  12. package/dist/index.js +19360 -0
  13. package/dist/storage-4CB2JTLW.cjs +22 -0
  14. package/dist/storage-THRWREZP.js +22 -0
  15. package/package.json +93 -0
  16. package/src/browser-vp/crypto.ts +254 -0
  17. package/src/browser-vp/index.test.ts +10 -0
  18. package/src/browser-vp/index.ts +118 -0
  19. package/src/browser-vp/prf.ts +181 -0
  20. package/src/browser-vp/storage.test.ts +9 -0
  21. package/src/browser-vp/storage.ts +165 -0
  22. package/src/browser-vp/types.ts +97 -0
  23. package/src/browser-vp/vp.test.ts +43 -0
  24. package/src/browser-vp/vp.ts +113 -0
  25. package/src/components/SidAvatar.vue +106 -0
  26. package/src/components/SidConfirmDialog.vue +125 -0
  27. package/src/components/SidStatusBadge.vue +71 -0
  28. package/src/components/index.ts +5 -0
  29. package/src/composables/index.ts +10 -0
  30. package/src/composables/useAuth.ts +40 -0
  31. package/src/composables/useBffAuth.ts +147 -0
  32. package/src/composables/useGrpc.test.ts +196 -0
  33. package/src/composables/useGrpc.ts +120 -0
  34. package/src/composables/useSession.ts +80 -0
  35. package/src/generated/google/api/http.ts +687 -0
  36. package/src/generated/google/protobuf/descriptor.ts +4865 -0
  37. package/src/generated/google/protobuf/duration.ts +230 -0
  38. package/src/generated/google/protobuf/empty.ts +94 -0
  39. package/src/generated/google/protobuf/struct.ts +484 -0
  40. package/src/generated/google/protobuf/timestamp.ts +287 -0
  41. package/src/generated/sid/v1/account/account.client.ts +527 -0
  42. package/src/generated/sid/v1/account/account.ts +3261 -0
  43. package/src/generated/sid/v1/admin/admin.client.ts +136 -0
  44. package/src/generated/sid/v1/admin/admin.ts +846 -0
  45. package/src/generated/sid/v1/admin/admin_roles.client.ts +181 -0
  46. package/src/generated/sid/v1/admin/admin_roles.ts +1606 -0
  47. package/src/generated/sid/v1/admin/analytics.client.ts +106 -0
  48. package/src/generated/sid/v1/admin/analytics.ts +1017 -0
  49. package/src/generated/sid/v1/admin/branding.client.ts +166 -0
  50. package/src/generated/sid/v1/admin/branding.ts +1906 -0
  51. package/src/generated/sid/v1/admin/enrollment.client.ts +165 -0
  52. package/src/generated/sid/v1/admin/enrollment.ts +1704 -0
  53. package/src/generated/sid/v1/admin/events.client.ts +195 -0
  54. package/src/generated/sid/v1/admin/events.ts +1900 -0
  55. package/src/generated/sid/v1/admin/flow.client.ts +183 -0
  56. package/src/generated/sid/v1/admin/flow.ts +1552 -0
  57. package/src/generated/sid/v1/admin/keys.client.ts +107 -0
  58. package/src/generated/sid/v1/admin/keys.ts +931 -0
  59. package/src/generated/sid/v1/admin/login_experience.client.ts +160 -0
  60. package/src/generated/sid/v1/admin/login_experience.ts +1061 -0
  61. package/src/generated/sid/v1/admin/migration.client.ts +127 -0
  62. package/src/generated/sid/v1/admin/migration.ts +1948 -0
  63. package/src/generated/sid/v1/admin/notifications.client.ts +128 -0
  64. package/src/generated/sid/v1/admin/notifications.ts +1332 -0
  65. package/src/generated/sid/v1/admin/operations.client.ts +241 -0
  66. package/src/generated/sid/v1/admin/operations.ts +2648 -0
  67. package/src/generated/sid/v1/admin/organizations.client.ts +57 -0
  68. package/src/generated/sid/v1/admin/organizations.ts +349 -0
  69. package/src/generated/sid/v1/admin/scopes.client.ts +171 -0
  70. package/src/generated/sid/v1/admin/scopes.ts +1324 -0
  71. package/src/generated/sid/v1/admin/security.client.ts +412 -0
  72. package/src/generated/sid/v1/admin/security.ts +4086 -0
  73. package/src/generated/sid/v1/admin/sessions.client.ts +114 -0
  74. package/src/generated/sid/v1/admin/sessions.ts +923 -0
  75. package/src/generated/sid/v1/admin/settings.client.ts +340 -0
  76. package/src/generated/sid/v1/admin/settings.ts +2395 -0
  77. package/src/generated/sid/v1/admin/user_profile.client.ts +57 -0
  78. package/src/generated/sid/v1/admin/user_profile.ts +730 -0
  79. package/src/generated/sid/v1/admin/webhooks.client.ts +269 -0
  80. package/src/generated/sid/v1/admin/webhooks.ts +2804 -0
  81. package/src/generated/sid/v1/attestation/attestation.client.ts +115 -0
  82. package/src/generated/sid/v1/attestation/attestation.ts +813 -0
  83. package/src/generated/sid/v1/authn/auth.client.ts +900 -0
  84. package/src/generated/sid/v1/authn/auth.ts +9287 -0
  85. package/src/generated/sid/v1/authn/flows.client.ts +413 -0
  86. package/src/generated/sid/v1/authn/flows.ts +3217 -0
  87. package/src/generated/sid/v1/authz/authz.client.ts +459 -0
  88. package/src/generated/sid/v1/authz/authz.ts +5343 -0
  89. package/src/generated/sid/v1/authz/governance.client.ts +102 -0
  90. package/src/generated/sid/v1/authz/governance.ts +818 -0
  91. package/src/generated/sid/v1/common/errors.ts +184 -0
  92. package/src/generated/sid/v1/common/pagination.ts +152 -0
  93. package/src/generated/sid/v1/common/transport.ts +227 -0
  94. package/src/generated/sid/v1/common/types.ts +151 -0
  95. package/src/generated/sid/v1/events/event_stream.client.ts +67 -0
  96. package/src/generated/sid/v1/events/event_stream.ts +374 -0
  97. package/src/generated/sid/v1/federation/upstream.client.ts +142 -0
  98. package/src/generated/sid/v1/federation/upstream.ts +1736 -0
  99. package/src/generated/sid/v1/identity/identity.client.ts +467 -0
  100. package/src/generated/sid/v1/identity/identity.ts +5613 -0
  101. package/src/generated/sid/v1/machine/machine_user.client.ts +219 -0
  102. package/src/generated/sid/v1/machine/machine_user.ts +2400 -0
  103. package/src/generated/sid/v1/machine/pat.client.ts +147 -0
  104. package/src/generated/sid/v1/machine/pat.ts +1268 -0
  105. package/src/generated/sid/v1/projects/projects.client.ts +286 -0
  106. package/src/generated/sid/v1/projects/projects.ts +2714 -0
  107. package/src/generated/sid/v1/scim/scim.client.ts +274 -0
  108. package/src/generated/sid/v1/scim/scim.ts +3043 -0
  109. package/src/generated/sid/v1/test/test.client.ts +232 -0
  110. package/src/generated/sid/v1/test/test.ts +1136 -0
  111. package/src/i18n/index.ts +40 -0
  112. package/src/index.ts +157 -0
  113. package/src/profile/auth.ts +15 -0
  114. package/src/profile/components/ConsentManager.vue +88 -0
  115. package/src/profile/components/ProfileEditor.vue +146 -0
  116. package/src/profile/components/SecuritySettings.vue +170 -0
  117. package/src/profile/components/SessionList.vue +100 -0
  118. package/src/profile/components/SidLoginForm.test.ts +80 -0
  119. package/src/profile/components/SidLoginForm.vue +230 -0
  120. package/src/profile/components/SidMfaChallenge.test.ts +127 -0
  121. package/src/profile/components/SidMfaChallenge.vue +243 -0
  122. package/src/profile/components/SidRegistrationForm.test.ts +79 -0
  123. package/src/profile/components/SidRegistrationForm.vue +317 -0
  124. package/src/profile/components/index.ts +11 -0
  125. package/src/profile/composables/index.ts +6 -0
  126. package/src/profile/composables/useAccountApi.ts +203 -0
  127. package/src/profile/composables/useAuthApi.opaque.test.ts +140 -0
  128. package/src/profile/composables/useAuthApi.ts +617 -0
  129. package/src/profile/composables/useIdentityApi.ts +123 -0
  130. package/src/profile/composables/useLoginSuccess.test.ts +112 -0
  131. package/src/profile/composables/useLoginSuccess.ts +65 -0
  132. package/src/profile/composables/useOpaqueAuth.test.ts +290 -0
  133. package/src/profile/composables/useOpaqueAuth.ts +191 -0
  134. package/src/profile/composables/useSecurityLevel.test.ts +198 -0
  135. package/src/profile/composables/useSecurityLevel.ts +324 -0
  136. package/src/profile/index.ts +18 -0
  137. package/src/quasar/SidPrincipalInput.vue +209 -0
  138. package/src/quasar/index.ts +8 -0
  139. package/src/stores/auth.test.ts +83 -0
  140. package/src/stores/auth.ts +92 -0
  141. package/src/stores/index.ts +1 -0
  142. package/src/transport/adaptive.test.ts +728 -0
  143. package/src/transport/adaptive.ts +308 -0
  144. package/src/transport/framing.test.ts +227 -0
  145. package/src/transport/framing.ts +98 -0
  146. package/src/transport/webtransport.test.ts +728 -0
  147. package/src/transport/webtransport.ts +323 -0
  148. package/src/types/auth.ts +58 -0
  149. package/src/types/index.ts +1 -0
  150. package/src/utils/formatters.test.ts +26 -0
  151. package/src/utils/formatters.ts +69 -0
  152. package/src/utils/index.ts +16 -0
  153. package/src/utils/normalizePrincipal.test.ts +188 -0
  154. package/src/utils/normalizePrincipal.ts +159 -0
  155. package/src/utils/validators.test.ts +75 -0
  156. package/src/utils/validators.ts +36 -0
@@ -0,0 +1,813 @@
1
+ // @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
2
+ // @generated from protobuf file "sid/v1/attestation/attestation.proto" (package "sid.v1.attestation", syntax proto3)
3
+ // tslint:disable
4
+ import { Empty } from "../../../google/protobuf/empty";
5
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
6
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
7
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
8
+ import { WireType } from "@protobuf-ts/runtime";
9
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
10
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
11
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
12
+ import type { PartialMessage } from "@protobuf-ts/runtime";
13
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
+ import { MessageType } from "@protobuf-ts/runtime";
15
+ import { Timestamp } from "../../../google/protobuf/timestamp";
16
+ /**
17
+ * Device attestation record — cryptographic identity of a device.
18
+ *
19
+ * @generated from protobuf message sid.v1.attestation.DeviceAttestation
20
+ */
21
+ export interface DeviceAttestation {
22
+ /**
23
+ * @generated from protobuf field: string id = 1
24
+ */
25
+ id: string; // Attestation record ID (UUIDv7)
26
+ /**
27
+ * @generated from protobuf field: string device_id = 2
28
+ */
29
+ deviceId: string; // References Device in sid-identity
30
+ /**
31
+ * @generated from protobuf field: string profile_id = 3
32
+ */
33
+ profileId: string; // Owner profile
34
+ /**
35
+ * @generated from protobuf field: sid.v1.attestation.AttestationFormat format = 4
36
+ */
37
+ format: AttestationFormat; // Attestation format
38
+ /**
39
+ * @generated from protobuf field: sid.v1.attestation.KeyStorageType key_storage = 5
40
+ */
41
+ keyStorage: KeyStorageType; // Hardware key type
42
+ /**
43
+ * @generated from protobuf field: sid.v1.attestation.AttestationStatus status = 6
44
+ */
45
+ status: AttestationStatus; // Verification status
46
+ /**
47
+ * @generated from protobuf field: bytes device_public_key = 7
48
+ */
49
+ devicePublicKey: Uint8Array; // Device public key (DER-encoded)
50
+ /**
51
+ * @generated from protobuf field: optional bytes attestation_object = 8
52
+ */
53
+ attestationObject?: Uint8Array; // Raw attestation blob (platform-specific)
54
+ /**
55
+ * @generated from protobuf field: optional bytes attestation_certificate = 9
56
+ */
57
+ attestationCertificate?: Uint8Array; // Leaf certificate from attestation chain
58
+ /**
59
+ * @generated from protobuf field: optional string aaguid = 10
60
+ */
61
+ aaguid?: string; // Authenticator Attestation GUID (WebAuthn)
62
+ /**
63
+ * @generated from protobuf field: optional string credential_id = 11
64
+ */
65
+ credentialId?: string; // Bound credential ID (WebAuthn/OPAQUE)
66
+ /**
67
+ * @generated from protobuf field: google.protobuf.Timestamp created_at = 12
68
+ */
69
+ createdAt?: Timestamp;
70
+ /**
71
+ * @generated from protobuf field: google.protobuf.Timestamp updated_at = 13
72
+ */
73
+ updatedAt?: Timestamp;
74
+ /**
75
+ * @generated from protobuf field: optional google.protobuf.Timestamp revoked_at = 14
76
+ */
77
+ revokedAt?: Timestamp;
78
+ }
79
+ // ── Request/Response Messages ──
80
+
81
+ /**
82
+ * @generated from protobuf message sid.v1.attestation.RegisterDeviceKeyRequest
83
+ */
84
+ export interface RegisterDeviceKeyRequest {
85
+ /**
86
+ * @generated from protobuf field: string device_id = 1
87
+ */
88
+ deviceId: string; // Device to register key for
89
+ /**
90
+ * @generated from protobuf field: sid.v1.attestation.AttestationFormat format = 2
91
+ */
92
+ format: AttestationFormat; // Attestation format
93
+ /**
94
+ * @generated from protobuf field: sid.v1.attestation.KeyStorageType key_storage = 3
95
+ */
96
+ keyStorage: KeyStorageType; // Hardware key type
97
+ /**
98
+ * @generated from protobuf field: bytes device_public_key = 4
99
+ */
100
+ devicePublicKey: Uint8Array; // Device public key (DER-encoded)
101
+ /**
102
+ * @generated from protobuf field: optional bytes attestation_object = 5
103
+ */
104
+ attestationObject?: Uint8Array; // Raw attestation blob
105
+ /**
106
+ * @generated from protobuf field: optional bytes attestation_certificate = 6
107
+ */
108
+ attestationCertificate?: Uint8Array; // Leaf certificate
109
+ /**
110
+ * @generated from protobuf field: optional string aaguid = 7
111
+ */
112
+ aaguid?: string; // Authenticator AAGUID
113
+ /**
114
+ * @generated from protobuf field: optional string credential_id = 8
115
+ */
116
+ credentialId?: string; // Bound credential ID
117
+ }
118
+ /**
119
+ * @generated from protobuf message sid.v1.attestation.GetDeviceAttestationRequest
120
+ */
121
+ export interface GetDeviceAttestationRequest {
122
+ /**
123
+ * @generated from protobuf field: string device_id = 1
124
+ */
125
+ deviceId: string;
126
+ }
127
+ /**
128
+ * @generated from protobuf message sid.v1.attestation.RotateDeviceKeyRequest
129
+ */
130
+ export interface RotateDeviceKeyRequest {
131
+ /**
132
+ * @generated from protobuf field: string device_id = 1
133
+ */
134
+ deviceId: string;
135
+ /**
136
+ * @generated from protobuf field: bytes new_device_public_key = 2
137
+ */
138
+ newDevicePublicKey: Uint8Array; // New public key
139
+ /**
140
+ * @generated from protobuf field: optional bytes new_attestation_object = 3
141
+ */
142
+ newAttestationObject?: Uint8Array; // New attestation blob
143
+ /**
144
+ * @generated from protobuf field: optional bytes new_attestation_certificate = 4
145
+ */
146
+ newAttestationCertificate?: Uint8Array; // New leaf certificate
147
+ }
148
+ /**
149
+ * @generated from protobuf message sid.v1.attestation.RevokeDeviceKeyRequest
150
+ */
151
+ export interface RevokeDeviceKeyRequest {
152
+ /**
153
+ * @generated from protobuf field: string device_id = 1
154
+ */
155
+ deviceId: string;
156
+ }
157
+ /**
158
+ * @generated from protobuf message sid.v1.attestation.ListDeviceAttestationsRequest
159
+ */
160
+ export interface ListDeviceAttestationsRequest {
161
+ /**
162
+ * @generated from protobuf field: string profile_id = 1
163
+ */
164
+ profileId: string;
165
+ }
166
+ /**
167
+ * @generated from protobuf message sid.v1.attestation.ListDeviceAttestationsResponse
168
+ */
169
+ export interface ListDeviceAttestationsResponse {
170
+ /**
171
+ * @generated from protobuf field: repeated sid.v1.attestation.DeviceAttestation attestations = 1
172
+ */
173
+ attestations: DeviceAttestation[];
174
+ }
175
+ /**
176
+ * Attestation format reported by the device.
177
+ *
178
+ * @generated from protobuf enum sid.v1.attestation.AttestationFormat
179
+ */
180
+ export enum AttestationFormat {
181
+ /**
182
+ * @generated from protobuf enum value: ATTESTATION_FORMAT_UNSPECIFIED = 0;
183
+ */
184
+ UNSPECIFIED = 0,
185
+ /**
186
+ * No attestation provided
187
+ *
188
+ * @generated from protobuf enum value: ATTESTATION_FORMAT_NONE = 1;
189
+ */
190
+ NONE = 1,
191
+ /**
192
+ * FIDO2 packed attestation
193
+ *
194
+ * @generated from protobuf enum value: ATTESTATION_FORMAT_PACKED = 2;
195
+ */
196
+ PACKED = 2,
197
+ /**
198
+ * TPM 2.0 attestation
199
+ *
200
+ * @generated from protobuf enum value: ATTESTATION_FORMAT_TPM = 3;
201
+ */
202
+ TPM = 3,
203
+ /**
204
+ * Android Keystore attestation
205
+ *
206
+ * @generated from protobuf enum value: ATTESTATION_FORMAT_ANDROID_KEY = 4;
207
+ */
208
+ ANDROID_KEY = 4,
209
+ /**
210
+ * Apple App Attest / Secure Enclave
211
+ *
212
+ * @generated from protobuf enum value: ATTESTATION_FORMAT_APPLE = 5;
213
+ */
214
+ APPLE = 5,
215
+ /**
216
+ * FIDO U2F attestation
217
+ *
218
+ * @generated from protobuf enum value: ATTESTATION_FORMAT_FIDO_U2F = 6;
219
+ */
220
+ FIDO_U2F = 6
221
+ }
222
+ /**
223
+ * Type of hardware key storage on the device.
224
+ *
225
+ * @generated from protobuf enum sid.v1.attestation.KeyStorageType
226
+ */
227
+ export enum KeyStorageType {
228
+ /**
229
+ * @generated from protobuf enum value: KEY_STORAGE_TYPE_UNSPECIFIED = 0;
230
+ */
231
+ UNSPECIFIED = 0,
232
+ /**
233
+ * Software-only key (no hardware backing)
234
+ *
235
+ * @generated from protobuf enum value: KEY_STORAGE_TYPE_SOFTWARE = 1;
236
+ */
237
+ SOFTWARE = 1,
238
+ /**
239
+ * Trusted Platform Module
240
+ *
241
+ * @generated from protobuf enum value: KEY_STORAGE_TYPE_TPM = 2;
242
+ */
243
+ TPM = 2,
244
+ /**
245
+ * Apple Secure Enclave
246
+ *
247
+ * @generated from protobuf enum value: KEY_STORAGE_TYPE_SECURE_ENCLAVE = 3;
248
+ */
249
+ SECURE_ENCLAVE = 3,
250
+ /**
251
+ * Android StrongBox
252
+ *
253
+ * @generated from protobuf enum value: KEY_STORAGE_TYPE_STRONGBOX = 4;
254
+ */
255
+ STRONGBOX = 4,
256
+ /**
257
+ * ARM TrustZone or similar TEE
258
+ *
259
+ * @generated from protobuf enum value: KEY_STORAGE_TYPE_TEE = 5;
260
+ */
261
+ TEE = 5
262
+ }
263
+ /**
264
+ * Attestation verification status.
265
+ *
266
+ * @generated from protobuf enum sid.v1.attestation.AttestationStatus
267
+ */
268
+ export enum AttestationStatus {
269
+ /**
270
+ * @generated from protobuf enum value: ATTESTATION_STATUS_UNSPECIFIED = 0;
271
+ */
272
+ UNSPECIFIED = 0,
273
+ /**
274
+ * Received, not yet verified
275
+ *
276
+ * @generated from protobuf enum value: ATTESTATION_STATUS_PENDING = 1;
277
+ */
278
+ PENDING = 1,
279
+ /**
280
+ * Attestation chain verified (EE)
281
+ *
282
+ * @generated from protobuf enum value: ATTESTATION_STATUS_VERIFIED = 2;
283
+ */
284
+ VERIFIED = 2,
285
+ /**
286
+ * Stored but not verified (CE default)
287
+ *
288
+ * @generated from protobuf enum value: ATTESTATION_STATUS_UNVERIFIED = 3;
289
+ */
290
+ UNVERIFIED = 3,
291
+ /**
292
+ * Verification failed (EE)
293
+ *
294
+ * @generated from protobuf enum value: ATTESTATION_STATUS_REJECTED = 4;
295
+ */
296
+ REJECTED = 4,
297
+ /**
298
+ * Key has been revoked
299
+ *
300
+ * @generated from protobuf enum value: ATTESTATION_STATUS_REVOKED = 5;
301
+ */
302
+ REVOKED = 5
303
+ }
304
+ // @generated message type with reflection information, may provide speed optimized methods
305
+ class DeviceAttestation$Type extends MessageType<DeviceAttestation> {
306
+ constructor() {
307
+ super("sid.v1.attestation.DeviceAttestation", [
308
+ { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
309
+ { no: 2, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
310
+ { no: 3, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
311
+ { no: 4, name: "format", kind: "enum", T: () => ["sid.v1.attestation.AttestationFormat", AttestationFormat, "ATTESTATION_FORMAT_"] },
312
+ { no: 5, name: "key_storage", kind: "enum", T: () => ["sid.v1.attestation.KeyStorageType", KeyStorageType, "KEY_STORAGE_TYPE_"] },
313
+ { no: 6, name: "status", kind: "enum", T: () => ["sid.v1.attestation.AttestationStatus", AttestationStatus, "ATTESTATION_STATUS_"] },
314
+ { no: 7, name: "device_public_key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
315
+ { no: 8, name: "attestation_object", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
316
+ { no: 9, name: "attestation_certificate", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
317
+ { no: 10, name: "aaguid", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
318
+ { no: 11, name: "credential_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
319
+ { no: 12, name: "created_at", kind: "message", T: () => Timestamp },
320
+ { no: 13, name: "updated_at", kind: "message", T: () => Timestamp },
321
+ { no: 14, name: "revoked_at", kind: "message", T: () => Timestamp }
322
+ ]);
323
+ }
324
+ create(value?: PartialMessage<DeviceAttestation>): DeviceAttestation {
325
+ const message = globalThis.Object.create((this.messagePrototype!));
326
+ message.id = "";
327
+ message.deviceId = "";
328
+ message.profileId = "";
329
+ message.format = 0;
330
+ message.keyStorage = 0;
331
+ message.status = 0;
332
+ message.devicePublicKey = new Uint8Array(0);
333
+ if (value !== undefined)
334
+ reflectionMergePartial<DeviceAttestation>(this, message, value);
335
+ return message;
336
+ }
337
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeviceAttestation): DeviceAttestation {
338
+ let message = target ?? this.create(), end = reader.pos + length;
339
+ while (reader.pos < end) {
340
+ let [fieldNo, wireType] = reader.tag();
341
+ switch (fieldNo) {
342
+ case /* string id */ 1:
343
+ message.id = reader.string();
344
+ break;
345
+ case /* string device_id */ 2:
346
+ message.deviceId = reader.string();
347
+ break;
348
+ case /* string profile_id */ 3:
349
+ message.profileId = reader.string();
350
+ break;
351
+ case /* sid.v1.attestation.AttestationFormat format */ 4:
352
+ message.format = reader.int32();
353
+ break;
354
+ case /* sid.v1.attestation.KeyStorageType key_storage */ 5:
355
+ message.keyStorage = reader.int32();
356
+ break;
357
+ case /* sid.v1.attestation.AttestationStatus status */ 6:
358
+ message.status = reader.int32();
359
+ break;
360
+ case /* bytes device_public_key */ 7:
361
+ message.devicePublicKey = reader.bytes();
362
+ break;
363
+ case /* optional bytes attestation_object */ 8:
364
+ message.attestationObject = reader.bytes();
365
+ break;
366
+ case /* optional bytes attestation_certificate */ 9:
367
+ message.attestationCertificate = reader.bytes();
368
+ break;
369
+ case /* optional string aaguid */ 10:
370
+ message.aaguid = reader.string();
371
+ break;
372
+ case /* optional string credential_id */ 11:
373
+ message.credentialId = reader.string();
374
+ break;
375
+ case /* google.protobuf.Timestamp created_at */ 12:
376
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
377
+ break;
378
+ case /* google.protobuf.Timestamp updated_at */ 13:
379
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
380
+ break;
381
+ case /* optional google.protobuf.Timestamp revoked_at */ 14:
382
+ message.revokedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.revokedAt);
383
+ break;
384
+ default:
385
+ let u = options.readUnknownField;
386
+ if (u === "throw")
387
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
388
+ let d = reader.skip(wireType);
389
+ if (u !== false)
390
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
391
+ }
392
+ }
393
+ return message;
394
+ }
395
+ internalBinaryWrite(message: DeviceAttestation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
396
+ /* string id = 1; */
397
+ if (message.id !== "")
398
+ writer.tag(1, WireType.LengthDelimited).string(message.id);
399
+ /* string device_id = 2; */
400
+ if (message.deviceId !== "")
401
+ writer.tag(2, WireType.LengthDelimited).string(message.deviceId);
402
+ /* string profile_id = 3; */
403
+ if (message.profileId !== "")
404
+ writer.tag(3, WireType.LengthDelimited).string(message.profileId);
405
+ /* sid.v1.attestation.AttestationFormat format = 4; */
406
+ if (message.format !== 0)
407
+ writer.tag(4, WireType.Varint).int32(message.format);
408
+ /* sid.v1.attestation.KeyStorageType key_storage = 5; */
409
+ if (message.keyStorage !== 0)
410
+ writer.tag(5, WireType.Varint).int32(message.keyStorage);
411
+ /* sid.v1.attestation.AttestationStatus status = 6; */
412
+ if (message.status !== 0)
413
+ writer.tag(6, WireType.Varint).int32(message.status);
414
+ /* bytes device_public_key = 7; */
415
+ if (message.devicePublicKey.length)
416
+ writer.tag(7, WireType.LengthDelimited).bytes(message.devicePublicKey);
417
+ /* optional bytes attestation_object = 8; */
418
+ if (message.attestationObject !== undefined)
419
+ writer.tag(8, WireType.LengthDelimited).bytes(message.attestationObject);
420
+ /* optional bytes attestation_certificate = 9; */
421
+ if (message.attestationCertificate !== undefined)
422
+ writer.tag(9, WireType.LengthDelimited).bytes(message.attestationCertificate);
423
+ /* optional string aaguid = 10; */
424
+ if (message.aaguid !== undefined)
425
+ writer.tag(10, WireType.LengthDelimited).string(message.aaguid);
426
+ /* optional string credential_id = 11; */
427
+ if (message.credentialId !== undefined)
428
+ writer.tag(11, WireType.LengthDelimited).string(message.credentialId);
429
+ /* google.protobuf.Timestamp created_at = 12; */
430
+ if (message.createdAt)
431
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
432
+ /* google.protobuf.Timestamp updated_at = 13; */
433
+ if (message.updatedAt)
434
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
435
+ /* optional google.protobuf.Timestamp revoked_at = 14; */
436
+ if (message.revokedAt)
437
+ Timestamp.internalBinaryWrite(message.revokedAt, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
438
+ let u = options.writeUnknownFields;
439
+ if (u !== false)
440
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
441
+ return writer;
442
+ }
443
+ }
444
+ /**
445
+ * @generated MessageType for protobuf message sid.v1.attestation.DeviceAttestation
446
+ */
447
+ export const DeviceAttestation = new DeviceAttestation$Type();
448
+ // @generated message type with reflection information, may provide speed optimized methods
449
+ class RegisterDeviceKeyRequest$Type extends MessageType<RegisterDeviceKeyRequest> {
450
+ constructor() {
451
+ super("sid.v1.attestation.RegisterDeviceKeyRequest", [
452
+ { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
453
+ { no: 2, name: "format", kind: "enum", T: () => ["sid.v1.attestation.AttestationFormat", AttestationFormat, "ATTESTATION_FORMAT_"] },
454
+ { no: 3, name: "key_storage", kind: "enum", T: () => ["sid.v1.attestation.KeyStorageType", KeyStorageType, "KEY_STORAGE_TYPE_"] },
455
+ { no: 4, name: "device_public_key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
456
+ { no: 5, name: "attestation_object", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
457
+ { no: 6, name: "attestation_certificate", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
458
+ { no: 7, name: "aaguid", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
459
+ { no: 8, name: "credential_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
460
+ ]);
461
+ }
462
+ create(value?: PartialMessage<RegisterDeviceKeyRequest>): RegisterDeviceKeyRequest {
463
+ const message = globalThis.Object.create((this.messagePrototype!));
464
+ message.deviceId = "";
465
+ message.format = 0;
466
+ message.keyStorage = 0;
467
+ message.devicePublicKey = new Uint8Array(0);
468
+ if (value !== undefined)
469
+ reflectionMergePartial<RegisterDeviceKeyRequest>(this, message, value);
470
+ return message;
471
+ }
472
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RegisterDeviceKeyRequest): RegisterDeviceKeyRequest {
473
+ let message = target ?? this.create(), end = reader.pos + length;
474
+ while (reader.pos < end) {
475
+ let [fieldNo, wireType] = reader.tag();
476
+ switch (fieldNo) {
477
+ case /* string device_id */ 1:
478
+ message.deviceId = reader.string();
479
+ break;
480
+ case /* sid.v1.attestation.AttestationFormat format */ 2:
481
+ message.format = reader.int32();
482
+ break;
483
+ case /* sid.v1.attestation.KeyStorageType key_storage */ 3:
484
+ message.keyStorage = reader.int32();
485
+ break;
486
+ case /* bytes device_public_key */ 4:
487
+ message.devicePublicKey = reader.bytes();
488
+ break;
489
+ case /* optional bytes attestation_object */ 5:
490
+ message.attestationObject = reader.bytes();
491
+ break;
492
+ case /* optional bytes attestation_certificate */ 6:
493
+ message.attestationCertificate = reader.bytes();
494
+ break;
495
+ case /* optional string aaguid */ 7:
496
+ message.aaguid = reader.string();
497
+ break;
498
+ case /* optional string credential_id */ 8:
499
+ message.credentialId = reader.string();
500
+ break;
501
+ default:
502
+ let u = options.readUnknownField;
503
+ if (u === "throw")
504
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
505
+ let d = reader.skip(wireType);
506
+ if (u !== false)
507
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
508
+ }
509
+ }
510
+ return message;
511
+ }
512
+ internalBinaryWrite(message: RegisterDeviceKeyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
513
+ /* string device_id = 1; */
514
+ if (message.deviceId !== "")
515
+ writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
516
+ /* sid.v1.attestation.AttestationFormat format = 2; */
517
+ if (message.format !== 0)
518
+ writer.tag(2, WireType.Varint).int32(message.format);
519
+ /* sid.v1.attestation.KeyStorageType key_storage = 3; */
520
+ if (message.keyStorage !== 0)
521
+ writer.tag(3, WireType.Varint).int32(message.keyStorage);
522
+ /* bytes device_public_key = 4; */
523
+ if (message.devicePublicKey.length)
524
+ writer.tag(4, WireType.LengthDelimited).bytes(message.devicePublicKey);
525
+ /* optional bytes attestation_object = 5; */
526
+ if (message.attestationObject !== undefined)
527
+ writer.tag(5, WireType.LengthDelimited).bytes(message.attestationObject);
528
+ /* optional bytes attestation_certificate = 6; */
529
+ if (message.attestationCertificate !== undefined)
530
+ writer.tag(6, WireType.LengthDelimited).bytes(message.attestationCertificate);
531
+ /* optional string aaguid = 7; */
532
+ if (message.aaguid !== undefined)
533
+ writer.tag(7, WireType.LengthDelimited).string(message.aaguid);
534
+ /* optional string credential_id = 8; */
535
+ if (message.credentialId !== undefined)
536
+ writer.tag(8, WireType.LengthDelimited).string(message.credentialId);
537
+ let u = options.writeUnknownFields;
538
+ if (u !== false)
539
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
540
+ return writer;
541
+ }
542
+ }
543
+ /**
544
+ * @generated MessageType for protobuf message sid.v1.attestation.RegisterDeviceKeyRequest
545
+ */
546
+ export const RegisterDeviceKeyRequest = new RegisterDeviceKeyRequest$Type();
547
+ // @generated message type with reflection information, may provide speed optimized methods
548
+ class GetDeviceAttestationRequest$Type extends MessageType<GetDeviceAttestationRequest> {
549
+ constructor() {
550
+ super("sid.v1.attestation.GetDeviceAttestationRequest", [
551
+ { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
552
+ ]);
553
+ }
554
+ create(value?: PartialMessage<GetDeviceAttestationRequest>): GetDeviceAttestationRequest {
555
+ const message = globalThis.Object.create((this.messagePrototype!));
556
+ message.deviceId = "";
557
+ if (value !== undefined)
558
+ reflectionMergePartial<GetDeviceAttestationRequest>(this, message, value);
559
+ return message;
560
+ }
561
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDeviceAttestationRequest): GetDeviceAttestationRequest {
562
+ let message = target ?? this.create(), end = reader.pos + length;
563
+ while (reader.pos < end) {
564
+ let [fieldNo, wireType] = reader.tag();
565
+ switch (fieldNo) {
566
+ case /* string device_id */ 1:
567
+ message.deviceId = reader.string();
568
+ break;
569
+ default:
570
+ let u = options.readUnknownField;
571
+ if (u === "throw")
572
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
573
+ let d = reader.skip(wireType);
574
+ if (u !== false)
575
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
576
+ }
577
+ }
578
+ return message;
579
+ }
580
+ internalBinaryWrite(message: GetDeviceAttestationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
581
+ /* string device_id = 1; */
582
+ if (message.deviceId !== "")
583
+ writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
584
+ let u = options.writeUnknownFields;
585
+ if (u !== false)
586
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
587
+ return writer;
588
+ }
589
+ }
590
+ /**
591
+ * @generated MessageType for protobuf message sid.v1.attestation.GetDeviceAttestationRequest
592
+ */
593
+ export const GetDeviceAttestationRequest = new GetDeviceAttestationRequest$Type();
594
+ // @generated message type with reflection information, may provide speed optimized methods
595
+ class RotateDeviceKeyRequest$Type extends MessageType<RotateDeviceKeyRequest> {
596
+ constructor() {
597
+ super("sid.v1.attestation.RotateDeviceKeyRequest", [
598
+ { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
599
+ { no: 2, name: "new_device_public_key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
600
+ { no: 3, name: "new_attestation_object", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
601
+ { no: 4, name: "new_attestation_certificate", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }
602
+ ]);
603
+ }
604
+ create(value?: PartialMessage<RotateDeviceKeyRequest>): RotateDeviceKeyRequest {
605
+ const message = globalThis.Object.create((this.messagePrototype!));
606
+ message.deviceId = "";
607
+ message.newDevicePublicKey = new Uint8Array(0);
608
+ if (value !== undefined)
609
+ reflectionMergePartial<RotateDeviceKeyRequest>(this, message, value);
610
+ return message;
611
+ }
612
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RotateDeviceKeyRequest): RotateDeviceKeyRequest {
613
+ let message = target ?? this.create(), end = reader.pos + length;
614
+ while (reader.pos < end) {
615
+ let [fieldNo, wireType] = reader.tag();
616
+ switch (fieldNo) {
617
+ case /* string device_id */ 1:
618
+ message.deviceId = reader.string();
619
+ break;
620
+ case /* bytes new_device_public_key */ 2:
621
+ message.newDevicePublicKey = reader.bytes();
622
+ break;
623
+ case /* optional bytes new_attestation_object */ 3:
624
+ message.newAttestationObject = reader.bytes();
625
+ break;
626
+ case /* optional bytes new_attestation_certificate */ 4:
627
+ message.newAttestationCertificate = reader.bytes();
628
+ break;
629
+ default:
630
+ let u = options.readUnknownField;
631
+ if (u === "throw")
632
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
633
+ let d = reader.skip(wireType);
634
+ if (u !== false)
635
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
636
+ }
637
+ }
638
+ return message;
639
+ }
640
+ internalBinaryWrite(message: RotateDeviceKeyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
641
+ /* string device_id = 1; */
642
+ if (message.deviceId !== "")
643
+ writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
644
+ /* bytes new_device_public_key = 2; */
645
+ if (message.newDevicePublicKey.length)
646
+ writer.tag(2, WireType.LengthDelimited).bytes(message.newDevicePublicKey);
647
+ /* optional bytes new_attestation_object = 3; */
648
+ if (message.newAttestationObject !== undefined)
649
+ writer.tag(3, WireType.LengthDelimited).bytes(message.newAttestationObject);
650
+ /* optional bytes new_attestation_certificate = 4; */
651
+ if (message.newAttestationCertificate !== undefined)
652
+ writer.tag(4, WireType.LengthDelimited).bytes(message.newAttestationCertificate);
653
+ let u = options.writeUnknownFields;
654
+ if (u !== false)
655
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
656
+ return writer;
657
+ }
658
+ }
659
+ /**
660
+ * @generated MessageType for protobuf message sid.v1.attestation.RotateDeviceKeyRequest
661
+ */
662
+ export const RotateDeviceKeyRequest = new RotateDeviceKeyRequest$Type();
663
+ // @generated message type with reflection information, may provide speed optimized methods
664
+ class RevokeDeviceKeyRequest$Type extends MessageType<RevokeDeviceKeyRequest> {
665
+ constructor() {
666
+ super("sid.v1.attestation.RevokeDeviceKeyRequest", [
667
+ { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
668
+ ]);
669
+ }
670
+ create(value?: PartialMessage<RevokeDeviceKeyRequest>): RevokeDeviceKeyRequest {
671
+ const message = globalThis.Object.create((this.messagePrototype!));
672
+ message.deviceId = "";
673
+ if (value !== undefined)
674
+ reflectionMergePartial<RevokeDeviceKeyRequest>(this, message, value);
675
+ return message;
676
+ }
677
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RevokeDeviceKeyRequest): RevokeDeviceKeyRequest {
678
+ let message = target ?? this.create(), end = reader.pos + length;
679
+ while (reader.pos < end) {
680
+ let [fieldNo, wireType] = reader.tag();
681
+ switch (fieldNo) {
682
+ case /* string device_id */ 1:
683
+ message.deviceId = reader.string();
684
+ break;
685
+ default:
686
+ let u = options.readUnknownField;
687
+ if (u === "throw")
688
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
689
+ let d = reader.skip(wireType);
690
+ if (u !== false)
691
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
692
+ }
693
+ }
694
+ return message;
695
+ }
696
+ internalBinaryWrite(message: RevokeDeviceKeyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
697
+ /* string device_id = 1; */
698
+ if (message.deviceId !== "")
699
+ writer.tag(1, WireType.LengthDelimited).string(message.deviceId);
700
+ let u = options.writeUnknownFields;
701
+ if (u !== false)
702
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
703
+ return writer;
704
+ }
705
+ }
706
+ /**
707
+ * @generated MessageType for protobuf message sid.v1.attestation.RevokeDeviceKeyRequest
708
+ */
709
+ export const RevokeDeviceKeyRequest = new RevokeDeviceKeyRequest$Type();
710
+ // @generated message type with reflection information, may provide speed optimized methods
711
+ class ListDeviceAttestationsRequest$Type extends MessageType<ListDeviceAttestationsRequest> {
712
+ constructor() {
713
+ super("sid.v1.attestation.ListDeviceAttestationsRequest", [
714
+ { no: 1, name: "profile_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
715
+ ]);
716
+ }
717
+ create(value?: PartialMessage<ListDeviceAttestationsRequest>): ListDeviceAttestationsRequest {
718
+ const message = globalThis.Object.create((this.messagePrototype!));
719
+ message.profileId = "";
720
+ if (value !== undefined)
721
+ reflectionMergePartial<ListDeviceAttestationsRequest>(this, message, value);
722
+ return message;
723
+ }
724
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDeviceAttestationsRequest): ListDeviceAttestationsRequest {
725
+ let message = target ?? this.create(), end = reader.pos + length;
726
+ while (reader.pos < end) {
727
+ let [fieldNo, wireType] = reader.tag();
728
+ switch (fieldNo) {
729
+ case /* string profile_id */ 1:
730
+ message.profileId = reader.string();
731
+ break;
732
+ default:
733
+ let u = options.readUnknownField;
734
+ if (u === "throw")
735
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
736
+ let d = reader.skip(wireType);
737
+ if (u !== false)
738
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
739
+ }
740
+ }
741
+ return message;
742
+ }
743
+ internalBinaryWrite(message: ListDeviceAttestationsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
744
+ /* string profile_id = 1; */
745
+ if (message.profileId !== "")
746
+ writer.tag(1, WireType.LengthDelimited).string(message.profileId);
747
+ let u = options.writeUnknownFields;
748
+ if (u !== false)
749
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
750
+ return writer;
751
+ }
752
+ }
753
+ /**
754
+ * @generated MessageType for protobuf message sid.v1.attestation.ListDeviceAttestationsRequest
755
+ */
756
+ export const ListDeviceAttestationsRequest = new ListDeviceAttestationsRequest$Type();
757
+ // @generated message type with reflection information, may provide speed optimized methods
758
+ class ListDeviceAttestationsResponse$Type extends MessageType<ListDeviceAttestationsResponse> {
759
+ constructor() {
760
+ super("sid.v1.attestation.ListDeviceAttestationsResponse", [
761
+ { no: 1, name: "attestations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DeviceAttestation }
762
+ ]);
763
+ }
764
+ create(value?: PartialMessage<ListDeviceAttestationsResponse>): ListDeviceAttestationsResponse {
765
+ const message = globalThis.Object.create((this.messagePrototype!));
766
+ message.attestations = [];
767
+ if (value !== undefined)
768
+ reflectionMergePartial<ListDeviceAttestationsResponse>(this, message, value);
769
+ return message;
770
+ }
771
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDeviceAttestationsResponse): ListDeviceAttestationsResponse {
772
+ let message = target ?? this.create(), end = reader.pos + length;
773
+ while (reader.pos < end) {
774
+ let [fieldNo, wireType] = reader.tag();
775
+ switch (fieldNo) {
776
+ case /* repeated sid.v1.attestation.DeviceAttestation attestations */ 1:
777
+ message.attestations.push(DeviceAttestation.internalBinaryRead(reader, reader.uint32(), options));
778
+ break;
779
+ default:
780
+ let u = options.readUnknownField;
781
+ if (u === "throw")
782
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
783
+ let d = reader.skip(wireType);
784
+ if (u !== false)
785
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
786
+ }
787
+ }
788
+ return message;
789
+ }
790
+ internalBinaryWrite(message: ListDeviceAttestationsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
791
+ /* repeated sid.v1.attestation.DeviceAttestation attestations = 1; */
792
+ for (let i = 0; i < message.attestations.length; i++)
793
+ DeviceAttestation.internalBinaryWrite(message.attestations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
794
+ let u = options.writeUnknownFields;
795
+ if (u !== false)
796
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
797
+ return writer;
798
+ }
799
+ }
800
+ /**
801
+ * @generated MessageType for protobuf message sid.v1.attestation.ListDeviceAttestationsResponse
802
+ */
803
+ export const ListDeviceAttestationsResponse = new ListDeviceAttestationsResponse$Type();
804
+ /**
805
+ * @generated ServiceType for protobuf service sid.v1.attestation.AttestationService
806
+ */
807
+ export const AttestationService = new ServiceType("sid.v1.attestation.AttestationService", [
808
+ { name: "RegisterDeviceKey", options: { "google.api.http": { post: "/v1/attestation/devices/{device_id}/keys", body: "*" } }, I: RegisterDeviceKeyRequest, O: DeviceAttestation },
809
+ { name: "GetDeviceAttestation", options: { "google.api.http": { get: "/v1/attestation/devices/{device_id}" } }, I: GetDeviceAttestationRequest, O: DeviceAttestation },
810
+ { name: "RotateDeviceKey", options: { "google.api.http": { post: "/v1/attestation/devices/{device_id}/rotate", body: "*" } }, I: RotateDeviceKeyRequest, O: DeviceAttestation },
811
+ { name: "RevokeDeviceKey", options: { "google.api.http": { post: "/v1/attestation/devices/{device_id}/revoke", body: "*" } }, I: RevokeDeviceKeyRequest, O: Empty },
812
+ { name: "ListDeviceAttestations", options: { "google.api.http": { get: "/v1/attestation/profiles/{profile_id}/devices" } }, I: ListDeviceAttestationsRequest, O: ListDeviceAttestationsResponse }
813
+ ]);