@structured-id/proto 0.15.0 → 0.17.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/generated/sid/v1/admin/admin.d.ts +48 -17
  3. package/dist/generated/sid/v1/admin/admin.js +55 -62
  4. package/dist/generated/sid/v1/admin/admin.js.map +1 -1
  5. package/dist/generated/sid/v1/admin/branding.d.ts +54 -26
  6. package/dist/generated/sid/v1/admin/branding.js +87 -98
  7. package/dist/generated/sid/v1/admin/branding.js.map +1 -1
  8. package/dist/generated/sid/v1/admin/enrollment.d.ts +63 -44
  9. package/dist/generated/sid/v1/admin/enrollment.js +109 -107
  10. package/dist/generated/sid/v1/admin/enrollment.js.map +1 -1
  11. package/dist/generated/sid/v1/admin/flow.d.ts +90 -42
  12. package/dist/generated/sid/v1/admin/flow.js +143 -155
  13. package/dist/generated/sid/v1/admin/flow.js.map +1 -1
  14. package/dist/generated/sid/v1/admin/security.d.ts +11 -4
  15. package/dist/generated/sid/v1/admin/security.js +14 -14
  16. package/dist/generated/sid/v1/admin/security.js.map +1 -1
  17. package/dist/generated/sid/v1/admin/sessions.d.ts +18 -8
  18. package/dist/generated/sid/v1/admin/sessions.js +27 -29
  19. package/dist/generated/sid/v1/admin/sessions.js.map +1 -1
  20. package/dist/generated/sid/v1/attestation/attestation.client.d.ts +51 -17
  21. package/dist/generated/sid/v1/attestation/attestation.client.js +50 -12
  22. package/dist/generated/sid/v1/attestation/attestation.client.js.map +1 -1
  23. package/dist/generated/sid/v1/attestation/attestation.d.ts +257 -51
  24. package/dist/generated/sid/v1/attestation/attestation.js +321 -135
  25. package/dist/generated/sid/v1/attestation/attestation.js.map +1 -1
  26. package/dist/generated/sid/v1/authn/auth.d.ts +13 -7
  27. package/dist/generated/sid/v1/authn/auth.js +20 -20
  28. package/dist/generated/sid/v1/authn/auth.js.map +1 -1
  29. package/dist/generated/sid/v1/common/types.d.ts +29 -0
  30. package/dist/generated/sid/v1/common/types.js +47 -0
  31. package/dist/generated/sid/v1/common/types.js.map +1 -1
  32. package/dist/generated/sid/v1/federation/upstream.d.ts +34 -16
  33. package/dist/generated/sid/v1/federation/upstream.js +53 -59
  34. package/dist/generated/sid/v1/federation/upstream.js.map +1 -1
  35. package/dist/generated/sid/v1/ids/ids.d.ts +12 -0
  36. package/dist/generated/sid/v1/ids/ids.js +6 -0
  37. package/dist/generated/sid/v1/ids/ids.js.map +1 -1
  38. package/dist/ip.d.ts +31 -0
  39. package/dist/ip.js +84 -0
  40. package/dist/ip.js.map +1 -0
  41. package/package.json +6 -2
@@ -5,7 +5,11 @@ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
5
5
  import type { IBinaryReader } from "@protobuf-ts/runtime";
6
6
  import type { PartialMessage } from "@protobuf-ts/runtime";
7
7
  import { MessageType } from "@protobuf-ts/runtime";
8
+ import { CredentialId } from "../ids/ids.js";
8
9
  import { Timestamp } from "../../../google/protobuf/timestamp.js";
10
+ import { MachineUserId } from "../ids/ids.js";
11
+ import { ProfileId } from "../ids/ids.js";
12
+ import { InviteId } from "../ids/ids.js";
9
13
  /**
10
14
  * The installation's bootstrap status, as the registration page needs it.
11
15
  *
@@ -88,11 +92,11 @@ export interface InviteConfig {
88
92
  */
89
93
  export interface Invite {
90
94
  /**
91
- * Unique invite ID (UUID).
95
+ * The invite.
92
96
  *
93
- * @generated from protobuf field: string id = 1
97
+ * @generated from protobuf field: sid.v1.ids.InviteId id = 1
94
98
  */
95
- id: string;
99
+ id?: InviteId;
96
100
  /**
97
101
  * The code that the user enters during registration.
98
102
  * Cryptographically random, URL-safe, 8-character alphanumeric (case-insensitive).
@@ -101,24 +105,41 @@ export interface Invite {
101
105
  */
102
106
  code: string;
103
107
  /**
104
- * Profile ID of the admin who created this invite; empty when a machine
105
- * user created it (created_by_machine_user_id).
106
- *
107
- * @generated from protobuf field: string created_by = 3
108
- */
109
- createdBy: string;
108
+ * Who created the invite: always exactly one.
109
+ *
110
+ * @generated from protobuf oneof: created_by
111
+ */
112
+ createdBy: {
113
+ oneofKind: "createdByProfileId";
114
+ /**
115
+ * The administrator's local profile.
116
+ *
117
+ * @generated from protobuf field: sid.v1.ids.ProfileId created_by_profile_id = 3
118
+ */
119
+ createdByProfileId: ProfileId;
120
+ } | {
121
+ oneofKind: "createdByMachineUserId";
122
+ /**
123
+ * The service holding the invite action on the enrollment API.
124
+ *
125
+ * @generated from protobuf field: sid.v1.ids.MachineUserId created_by_machine_user_id = 4
126
+ */
127
+ createdByMachineUserId: MachineUserId;
128
+ } | {
129
+ oneofKind: undefined;
130
+ };
110
131
  /**
111
132
  * Display name of the creator (for admin-ui): the Profile's name, or the
112
133
  * machine user's.
113
134
  *
114
- * @generated from protobuf field: string created_by_name = 4
135
+ * @generated from protobuf field: string created_by_name = 5
115
136
  */
116
137
  createdByName: string;
117
138
  /**
118
139
  * Optional: pre-fill profile fields on registration.
119
140
  * Example: department, role, group membership.
120
141
  *
121
- * @generated from protobuf field: map<string, string> metadata = 5
142
+ * @generated from protobuf field: map<string, string> metadata = 6
122
143
  */
123
144
  metadata: {
124
145
  [key: string]: string;
@@ -127,45 +148,39 @@ export interface Invite {
127
148
  * Maximum number of times this code can be used.
128
149
  * 1 = single-use (most common). 0 = unlimited.
129
150
  *
130
- * @generated from protobuf field: uint32 max_uses = 6
151
+ * @generated from protobuf field: uint32 max_uses = 7
131
152
  */
132
153
  maxUses: number;
133
154
  /**
134
155
  * How many times this code has been used.
135
156
  *
136
- * @generated from protobuf field: uint32 use_count = 7
157
+ * @generated from protobuf field: uint32 use_count = 8
137
158
  */
138
159
  useCount: number;
139
160
  /**
140
161
  * Expiration. Not set = no expiry.
141
162
  *
142
- * @generated from protobuf field: optional google.protobuf.Timestamp expires_at = 8
163
+ * @generated from protobuf field: optional google.protobuf.Timestamp expires_at = 9
143
164
  */
144
165
  expiresAt?: Timestamp;
145
166
  /**
146
167
  * Whether this invite is active.
147
168
  *
148
- * @generated from protobuf field: bool active = 9
169
+ * @generated from protobuf field: bool active = 10
149
170
  */
150
171
  active: boolean;
151
172
  /**
152
173
  * Computed status for display purposes.
153
174
  *
154
- * @generated from protobuf field: sid.v1.admin.InviteStatus status = 10
175
+ * @generated from protobuf field: sid.v1.admin.InviteStatus status = 11
155
176
  */
156
177
  status: InviteStatus;
157
178
  /**
158
- * @generated from protobuf field: google.protobuf.Timestamp created_at = 11
159
- */
160
- createdAt?: Timestamp;
161
- /**
162
- * Machine user ID of the service that created this invite, holding the
163
- * invite action on the enrollment API; empty when a Profile created it.
164
- * Exactly one of created_by and this is set.
179
+ * When the invite was created, set by the server.
165
180
  *
166
- * @generated from protobuf field: string created_by_machine_user_id = 12
181
+ * @generated from protobuf field: google.protobuf.Timestamp created_at = 12
167
182
  */
168
- createdByMachineUserId: string;
183
+ createdAt?: Timestamp;
169
184
  }
170
185
  /**
171
186
  * One registration that used an invite.
@@ -176,9 +191,9 @@ export interface InviteRedemption {
176
191
  /**
177
192
  * The Profile the registration created.
178
193
  *
179
- * @generated from protobuf field: string profile_id = 1
194
+ * @generated from protobuf field: sid.v1.ids.ProfileId profile_id = 1
180
195
  */
181
- profileId: string;
196
+ profileId?: ProfileId;
182
197
  /**
183
198
  * When the registration committed.
184
199
  *
@@ -186,13 +201,13 @@ export interface InviteRedemption {
186
201
  */
187
202
  redeemedAt?: Timestamp;
188
203
  /**
189
- * The credential the registration installed; empty when it installed none.
204
+ * The credential the registration installed; absent when it installed none.
190
205
  * The client that ran the registration recognizes its own redemption by the
191
206
  * credential id its registration finish returned.
192
207
  *
193
- * @generated from protobuf field: string credential_id = 3
208
+ * @generated from protobuf field: sid.v1.ids.CredentialId credential_id = 3
194
209
  */
195
- credentialId: string;
210
+ credentialId?: CredentialId;
196
211
  }
197
212
  /**
198
213
  * How a profile was created. Stored as metadata on the profile.
@@ -215,11 +230,11 @@ export interface RegistrationSource {
215
230
  */
216
231
  sourceId: string;
217
232
  /**
218
- * Referrer profile ID (if provided during registration).
233
+ * Local profile that referred the registrant; absent when none was given.
219
234
  *
220
- * @generated from protobuf field: optional string referrer_id = 3
235
+ * @generated from protobuf field: sid.v1.ids.ProfileId referrer_id = 3
221
236
  */
222
- referrerId?: string;
237
+ referrerId?: ProfileId;
223
238
  /**
224
239
  * UTM parameters (if captured from registration URL).
225
240
  *
@@ -329,9 +344,11 @@ export interface SourceBreakdown {
329
344
  */
330
345
  export interface ReferrerEntry {
331
346
  /**
332
- * @generated from protobuf field: string profile_id = 1
347
+ * The referring local profile.
348
+ *
349
+ * @generated from protobuf field: sid.v1.ids.ProfileId profile_id = 1
333
350
  */
334
- profileId: string;
351
+ profileId?: ProfileId;
335
352
  /**
336
353
  * @generated from protobuf field: string display_name = 2
337
354
  */
@@ -442,31 +459,33 @@ export interface ListInvitesResponse {
442
459
  */
443
460
  export interface RevokeInviteRequest {
444
461
  /**
445
- * @generated from protobuf field: string invite_id = 1
462
+ * Invite to revoke.
463
+ *
464
+ * @generated from protobuf field: sid.v1.ids.InviteId invite_id = 1
446
465
  */
447
- inviteId: string;
466
+ inviteId?: InviteId;
448
467
  }
449
468
  /**
450
469
  * @generated from protobuf message sid.v1.admin.GetInviteRequest
451
470
  */
452
471
  export interface GetInviteRequest {
453
472
  /**
454
- * The invite's ID (UUID).
473
+ * Invite to read.
455
474
  *
456
- * @generated from protobuf field: string invite_id = 1
475
+ * @generated from protobuf field: sid.v1.ids.InviteId invite_id = 1
457
476
  */
458
- inviteId: string;
477
+ inviteId?: InviteId;
459
478
  }
460
479
  /**
461
480
  * @generated from protobuf message sid.v1.admin.ListInviteRedemptionsRequest
462
481
  */
463
482
  export interface ListInviteRedemptionsRequest {
464
483
  /**
465
- * The invite's ID (UUID).
484
+ * Invite whose redemptions are listed.
466
485
  *
467
- * @generated from protobuf field: string invite_id = 1
486
+ * @generated from protobuf field: sid.v1.ids.InviteId invite_id = 1
468
487
  */
469
- inviteId: string;
488
+ inviteId?: InviteId;
470
489
  /**
471
490
  * Redemptions per page: 0 is the default (50), more than 500 is 500.
472
491
  *
@@ -747,7 +766,7 @@ declare class Invite$Type extends MessageType<Invite> {
747
766
  constructor();
748
767
  create(value?: PartialMessage<Invite>): Invite;
749
768
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Invite): Invite;
750
- private binaryReadMap5;
769
+ private binaryReadMap6;
751
770
  internalBinaryWrite(message: Invite, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
752
771
  }
753
772
  /**