@sylphx/sdk 0.32.38 → 0.32.40

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.
package/dist/auth.d.ts CHANGED
@@ -95,6 +95,8 @@ export interface AuthConfigStatus {
95
95
  readonly portalOrigin?: string;
96
96
  /** The OAuth issuer URI; tokens verify from its JWKS. */
97
97
  readonly issuerUri?: string;
98
+ /** Hosting's observed state and DNS instructions for the current custom portal claim. */
99
+ readonly portalDomain?: PortalDomainStatus;
98
100
  }
99
101
  /** The request of ConfigureSocialProvider. */
100
102
  export interface ConfigureSocialProviderRequest {
@@ -126,6 +128,38 @@ export interface ConfigureSocialProviderRequest {
126
128
  */
127
129
  updateMask?: string;
128
130
  }
131
+ /**
132
+ * Append-only acceptance evidence. Personal attribution is present only
133
+ * until the user's statutory erasure; the original agreement receipt survives.
134
+ */
135
+ export interface ConsentRecord {
136
+ /** Canonical Resource name. */
137
+ name?: string;
138
+ /** Server-assigned immutable ID. */
139
+ readonly uid?: string;
140
+ /** Resource metadata. */
141
+ meta?: common.ResourceMeta;
142
+ /** The Auth end user who accepted; absent after erasure. */
143
+ readonly userId?: string;
144
+ /** The owning Access organization. */
145
+ readonly orgId?: string;
146
+ /** The owning Access project. */
147
+ readonly projectId?: string;
148
+ /** Stable agreement kind. */
149
+ readonly docSlug?: string;
150
+ /** Accepted agreement version. */
151
+ readonly version?: string;
152
+ /** Exact SHA-256 of the text accepted. */
153
+ readonly documentSha256?: string;
154
+ /** Server-observed acceptance time in UTC. */
155
+ readonly acceptTime?: string;
156
+ /** Empty if the trusted request context did not provide an IP address. */
157
+ readonly ipAddress?: string;
158
+ /** User-Agent observed on the acceptance request, if present. */
159
+ readonly userAgent?: string;
160
+ /** The Auth ceremony that recorded acceptance. */
161
+ readonly surface?: string;
162
+ }
129
163
  /** The request of CreateCustomerOrganization. */
130
164
  export interface CreateCustomerOrganizationRequest {
131
165
  /** The parent to create in. */
@@ -192,6 +226,15 @@ export interface CreateInvitationRequest {
192
226
  /** Validate and return the result without writing anything. */
193
227
  validateOnly?: boolean;
194
228
  }
229
+ /** The request of CreateLegalDocument. */
230
+ export interface CreateLegalDocumentRequest {
231
+ /** Canonical name of the parent Resource. */
232
+ parent: string;
233
+ /** Draft revision to create. */
234
+ legalDocument: LegalDocument;
235
+ /** Optional legal document TypeID; Auth assigns one if omitted. */
236
+ legalDocumentId?: string;
237
+ }
195
238
  /** The request of CreateMembership. */
196
239
  export interface CreateMembershipRequest {
197
240
  /** The parent to create in. */
@@ -537,6 +580,11 @@ export interface GetInvitationRequest {
537
580
  /** The name of the invitation to get. */
538
581
  name: string;
539
582
  }
583
+ /** The request of GetLegalDocument. */
584
+ export interface GetLegalDocumentRequest {
585
+ /** Canonical name of the legal revision. */
586
+ name: string;
587
+ }
540
588
  /** The request of GetMembership. */
541
589
  export interface GetMembershipRequest {
542
590
  /** The name of the membership to get. */
@@ -655,6 +703,65 @@ export interface Invitation {
655
703
  */
656
704
  metadata?: Record<string, unknown>;
657
705
  }
706
+ /** One immutable revision of a project's legal agreement. */
707
+ export interface LegalDocument {
708
+ /** Canonical Resource name. */
709
+ name?: string;
710
+ /** Server-assigned immutable ID. */
711
+ readonly uid?: string;
712
+ /** Resource metadata. */
713
+ meta?: common.ResourceMeta;
714
+ /** The immutable agreement text and publication policy. */
715
+ spec?: LegalDocumentSpec;
716
+ /** Computed hash and publication state. */
717
+ readonly status?: LegalDocumentStatus;
718
+ }
719
+ /** Immutable content and activation settings of a legal revision. */
720
+ export interface LegalDocumentSpec {
721
+ /** A stable agreement kind, e.g. `terms`, `privacy`, `dpa`, `eula`. */
722
+ docSlug?: string;
723
+ /** An opaque immutable version label, not used for ordering. */
724
+ version?: string;
725
+ /** Exact plain UTF-8 text shown to the user. Auth never normalizes it. */
726
+ canonicalText?: string;
727
+ /** An external HTTPS reference. Auth's canonical text, not this link, is evidence. */
728
+ documentUrl?: string;
729
+ /** User-facing summary of the changes. */
730
+ changeSummary?: string;
731
+ /** Whether previously accepted versions become insufficient. */
732
+ majorReconsentRequired?: boolean;
733
+ /** When a published revision takes effect. */
734
+ effectiveTime?: string;
735
+ }
736
+ /** Observed hash and publication state of a legal revision. */
737
+ export interface LegalDocumentStatus {
738
+ /** The spec generation observed by Auth. */
739
+ readonly observedGeneration?: string;
740
+ /** Observed conditions. */
741
+ readonly conditions?: common.Condition[];
742
+ /** Lowercase hex SHA-256 of the exact UTF-8 bytes of canonical_text. */
743
+ readonly documentSha256?: string;
744
+ /** Unset for drafts. No field can change after publication. */
745
+ readonly publishTime?: string;
746
+ }
747
+ /** The request of ListConsentRecords. */
748
+ export interface ListConsentRecordsRequest {
749
+ /** Canonical name of the parent Resource. */
750
+ parent: string;
751
+ /** Maximum number of entries to return. */
752
+ pageSize?: number;
753
+ /** Token from the previous page. */
754
+ pageToken?: string;
755
+ /** Optional end-user ID within this Auth instance. */
756
+ userId?: string;
757
+ }
758
+ /** The response of ListConsentRecords. */
759
+ export interface ListConsentRecordsResponse {
760
+ /** Page of immutable consent receipts. */
761
+ consentRecords?: ConsentRecord[];
762
+ /** Token for the next page, empty at the end. */
763
+ nextPageToken?: string;
764
+ }
658
765
  /** The request of ListCustomerOrganizations. */
659
766
  export interface ListCustomerOrganizationsRequest {
660
767
  /** The parent to list in. */
@@ -778,6 +885,22 @@ export interface ListInvitationsResponse {
778
885
  /** The token of the next page; empty on the last page. */
779
886
  nextPageToken?: string;
780
887
  }
888
+ /** The request of ListLegalDocuments. */
889
+ export interface ListLegalDocumentsRequest {
890
+ /** Canonical name of the parent Resource. */
891
+ parent: string;
892
+ /** Maximum number of entries to return. */
893
+ pageSize?: number;
894
+ /** Token from the previous page. */
895
+ pageToken?: string;
896
+ }
897
+ /** The response of ListLegalDocuments. */
898
+ export interface ListLegalDocumentsResponse {
899
+ /** Page of project legal revisions. */
900
+ legalDocuments?: LegalDocument[];
901
+ /** Token for the next page, empty at the end. */
902
+ nextPageToken?: string;
903
+ }
781
904
  /** The request of ListMemberships. */
782
905
  export interface ListMembershipsRequest {
783
906
  /**
@@ -951,6 +1074,10 @@ export interface OauthClientSpec {
951
1074
  * live clients of this environment. Clear with an explicit update mask.
952
1075
  */
953
1076
  resourceUri?: string;
1077
+ /** Optional HTTPS endpoint for OpenID Connect Back-Channel Logout. Clear it with an explicit update mask. */
1078
+ backchannelLogoutUri?: string;
1079
+ /** Require a session ID in Logout Tokens. Auth always sends a session ID. */
1080
+ backchannelLogoutSessionRequired?: boolean;
954
1081
  }
955
1082
  /** OauthClientStatus is the observed state of an OauthClient. */
956
1083
  export interface OauthClientStatus {
@@ -1031,8 +1158,10 @@ export interface PortalAppearance {
1031
1158
  /** Account Portal origin and branding. */
1032
1159
  export interface PortalConfig {
1033
1160
  /**
1034
- * A verified Network Domain serving the portal; unset uses the default
1035
- * origin.
1161
+ * The desired customer DNS hostname for the hosted Account Portal (no
1162
+ * scheme, port, or path). Set or clear it in a separate update; to clear,
1163
+ * mask this field and leave it empty. The hostname is not used until the
1164
+ * PortalDomainVerified condition is true.
1036
1165
  */
1037
1166
  customDomain?: string;
1038
1167
  /** The product name shown to end users. */
@@ -1046,11 +1175,40 @@ export interface PortalConfig {
1046
1175
  /** The hosted sign-in and account portal presentation for this environment. */
1047
1176
  appearance?: PortalAppearance;
1048
1177
  }
1178
+ /** One DNS record a customer can publish for a hosted portal. */
1179
+ export interface PortalDomainDnsRecord {
1180
+ /** TXT, CNAME or ALIAS. */
1181
+ readonly type?: string;
1182
+ /** Fully qualified DNS record name. */
1183
+ readonly dnsName?: string;
1184
+ /** Exact record value. */
1185
+ readonly value?: string;
1186
+ /** Recommended TTL, in seconds. */
1187
+ readonly ttl?: string;
1188
+ }
1189
+ /** The DNS, edge certificate and route observations for an AuthConfig portal domain. */
1190
+ export interface PortalDomainStatus {
1191
+ /** Hosting's status for the current claim: AwaitingDnsProof, Bound, Conflict, or Unavailable. */
1192
+ readonly bindingStatus?: string;
1193
+ /** DNS routing state, once the hostname is bound. */
1194
+ readonly dnsStatus?: string;
1195
+ /** Edge TLS provisioning state, once the hostname is bound. */
1196
+ readonly edgeSslStatus?: string;
1197
+ /** Whether Hosting has observed the current route generation. */
1198
+ readonly routeActive?: boolean;
1199
+ /** Records to publish. TXT proves control; CNAME or ALIAS points at the edge. */
1200
+ readonly dnsRecords?: PortalDomainDnsRecord[];
1201
+ }
1049
1202
  /** A present allowlist must contain at least one supported portal locale. */
1050
1203
  export interface PortalLocaleAllowlist {
1051
1204
  /** Distinct tags from en, zh-Hant, zh-Hans, ja, ko, in fallback order. */
1052
1205
  locales?: string[];
1053
1206
  }
1207
+ /** The request of PublishLegalDocument. */
1208
+ export interface PublishLegalDocumentRequest {
1209
+ /** Canonical name of the legal revision. */
1210
+ name: string;
1211
+ }
1054
1212
  /** The request of ReactivateEndUser. */
1055
1213
  export interface ReactivateEndUserRequest {
1056
1214
  /** The name of the end user. */
@@ -1082,7 +1240,7 @@ export interface RevokeSessionRequest {
1082
1240
  export interface RollOauthClientSecretRequest {
1083
1241
  /** The name of the OAuth client. */
1084
1242
  name: string;
1085
- /** How long the old secret keeps verifying; default 24h. */
1243
+ /** Overlap from 0s (no overlap) to 86400s; default 86400s (24h). */
1086
1244
  gracePeriod?: string;
1087
1245
  /** Act only if the current etag matches. */
1088
1246
  etag?: string;
@@ -1344,6 +1502,10 @@ export type TokenEndpointAuthMethod = 'none' | 'client_secret_basic' | 'private_
1344
1502
  * Namespace of Sylphx Auth on `Sylphx`.
1345
1503
  */
1346
1504
  export declare class AuthApi {
1505
+ /** The `legal_documents` collection. */
1506
+ readonly legalDocuments: LegalDocumentsCollection;
1507
+ /** The `consent_records` collection. */
1508
+ readonly consentRecords: ConsentRecordsCollection;
1347
1509
  /** The `end_users` collection. */
1348
1510
  readonly endUsers: EndUsersCollection;
1349
1511
  /** The `auth_configs` collection. */
@@ -1368,6 +1530,60 @@ export declare class AuthApi {
1368
1530
  readonly oauthClients: OauthClientsCollection;
1369
1531
  constructor(client: runtime.Client);
1370
1532
  }
1533
+ /** `legal_documents` of Sylphx Auth: Resource type `auth.sylphx.com/LegalDocument`. */
1534
+ export declare class LegalDocumentsCollection {
1535
+ private readonly client;
1536
+ constructor(client: runtime.Client);
1537
+ /**
1538
+ * Gets a legal revision, including draft or published state.
1539
+ *
1540
+ * `GET /v1/{name=orgs/*\/projects/*\/legal_documents/*}` · permission `auth:read` · effect `read`
1541
+ *
1542
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1543
+ */
1544
+ get(request: GetLegalDocumentRequest): Promise<LegalDocument>;
1545
+ /**
1546
+ * Creates an immutable draft revision.
1547
+ *
1548
+ * `POST /v1/{parent=orgs/*\/projects/*}/legal_documents` · permission `auth:write` · effect `write`
1549
+ *
1550
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNKNOWN_FIELD`.
1551
+ */
1552
+ create(request: CreateLegalDocumentRequest): Promise<LegalDocument>;
1553
+ /**
1554
+ * Lists all agreement revisions of the project.
1555
+ *
1556
+ * `GET /v1/{parent=orgs/*\/projects/*}/legal_documents` · permission `auth:read` · effect `read`
1557
+ *
1558
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1559
+ */
1560
+ list(request: ListLegalDocumentsRequest): Promise<ListLegalDocumentsResponse>;
1561
+ /** Every item of every page of `list`. */
1562
+ listAll(request: ListLegalDocumentsRequest): AsyncGenerator<LegalDocument>;
1563
+ /**
1564
+ * Publishes an immutable revision with its configured effective time.
1565
+ *
1566
+ * `POST /v1/{name=orgs/*\/projects/*\/legal_documents/*}:publish` · permission `auth:write` · effect `write`
1567
+ *
1568
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1569
+ */
1570
+ publish(request: PublishLegalDocumentRequest): Promise<LegalDocument>;
1571
+ }
1572
+ /** `consent_records` of Sylphx Auth: Resource type `auth.sylphx.com/ConsentRecord`. */
1573
+ export declare class ConsentRecordsCollection {
1574
+ private readonly client;
1575
+ constructor(client: runtime.Client);
1576
+ /**
1577
+ * Lists immutable consent audit receipts of an Auth environment.
1578
+ *
1579
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/consent_records` · permission `auth:read` · effect `read`
1580
+ *
1581
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1582
+ */
1583
+ list(request: ListConsentRecordsRequest): Promise<ListConsentRecordsResponse>;
1584
+ /** Every item of every page of `list`. */
1585
+ listAll(request: ListConsentRecordsRequest): AsyncGenerator<ConsentRecord>;
1586
+ }
1371
1587
  /** `end_users` of Sylphx Auth: Resource type `auth.sylphx.com/EndUser`. */
1372
1588
  export declare class EndUsersCollection {
1373
1589
  private readonly client;
@@ -1502,7 +1718,7 @@ export declare class AuthConfigsCollection {
1502
1718
  *
1503
1719
  * `PATCH /v1/{auth_config.name=orgs/*\/projects/*\/envs/*\/auth_configs/*}` · permission `auth:write` · effect `write`
1504
1720
  *
1505
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1721
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1506
1722
  */
1507
1723
  update(request: UpdateAuthConfigRequest): Promise<AuthConfig>;
1508
1724
  /**
@@ -1915,7 +2131,8 @@ export declare class OauthClientsCollection {
1915
2131
  delete(request: DeleteOauthClientRequest): Promise<Record<string, never>>;
1916
2132
  /**
1917
2133
  * Issues a new client secret, returned once; the old one verifies until
1918
- * `grace_period` ends.
2134
+ * `grace_period` ends. Rotation is refused during an existing overlap.
2135
+ * Reusing an Idempotency-Key never returns the secret or rotates again.
1919
2136
  *
1920
2137
  * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/oauth_clients/*}:rollSecret` · permission `auth:write` · effect `write`
1921
2138
  *
package/dist/auth.js CHANGED
@@ -32,6 +32,7 @@ runtime.registerSchemas({
32
32
  ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
33
33
  ['portalOrigin', 'portal_origin'],
34
34
  ['issuerUri', 'issuer_uri'],
35
+ ['portalDomain', 'portal_domain', 'sylphx.auth.v1.PortalDomainStatus'],
35
36
  ],
36
37
  'sylphx.auth.v1.ConfigureSocialProviderRequest': [
37
38
  ['clientId', 'client_id'],
@@ -40,6 +41,17 @@ runtime.registerSchemas({
40
41
  ['appleNativeAudiences', 'apple_native_audiences'],
41
42
  ['updateMask', 'update_mask'],
42
43
  ],
44
+ 'sylphx.auth.v1.ConsentRecord': [
45
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
46
+ ['userId', 'user_id'],
47
+ ['orgId', 'org_id'],
48
+ ['projectId', 'project_id'],
49
+ ['docSlug', 'doc_slug'],
50
+ ['documentSha256', 'document_sha256'],
51
+ ['acceptTime', 'accept_time'],
52
+ ['ipAddress', 'ip_address'],
53
+ ['userAgent', 'user_agent'],
54
+ ],
43
55
  'sylphx.auth.v1.CreateCustomerOrganizationRequest': [
44
56
  ['customerOrganizationId', 'customer_organization_id'],
45
57
  ['customerOrganization', 'customer_organization', 'sylphx.auth.v1.CustomerOrganization'],
@@ -61,6 +73,10 @@ runtime.registerSchemas({
61
73
  ['invitation', 'invitation', 'sylphx.auth.v1.Invitation'],
62
74
  ['validateOnly', 'validate_only'],
63
75
  ],
76
+ 'sylphx.auth.v1.CreateLegalDocumentRequest': [
77
+ ['legalDocument', 'legal_document', 'sylphx.auth.v1.LegalDocument'],
78
+ ['legalDocumentId', 'legal_document_id'],
79
+ ],
64
80
  'sylphx.auth.v1.CreateMembershipRequest': [
65
81
  ['membershipId', 'membership_id'],
66
82
  ['membership', 'membership', 'sylphx.auth.v1.Membership'],
@@ -164,6 +180,7 @@ runtime.registerSchemas({
164
180
  'sylphx.auth.v1.GetEndUserRequest': [],
165
181
  'sylphx.auth.v1.GetIdentityRequest': [],
166
182
  'sylphx.auth.v1.GetInvitationRequest': [],
183
+ 'sylphx.auth.v1.GetLegalDocumentRequest': [],
167
184
  'sylphx.auth.v1.GetMembershipRequest': [],
168
185
  'sylphx.auth.v1.GetOauthClientRequest': [],
169
186
  'sylphx.auth.v1.GetOrganizationRoleRequest': [],
@@ -191,6 +208,34 @@ runtime.registerSchemas({
191
208
  ['endUser', 'end_user'],
192
209
  ['metadata', 'metadata', undefined, 'json'],
193
210
  ],
211
+ 'sylphx.auth.v1.LegalDocument': [
212
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
213
+ ['spec', 'spec', 'sylphx.auth.v1.LegalDocumentSpec'],
214
+ ['status', 'status', 'sylphx.auth.v1.LegalDocumentStatus'],
215
+ ],
216
+ 'sylphx.auth.v1.LegalDocumentSpec': [
217
+ ['docSlug', 'doc_slug'],
218
+ ['canonicalText', 'canonical_text'],
219
+ ['documentUrl', 'document_url'],
220
+ ['changeSummary', 'change_summary'],
221
+ ['majorReconsentRequired', 'major_reconsent_required'],
222
+ ['effectiveTime', 'effective_time'],
223
+ ],
224
+ 'sylphx.auth.v1.LegalDocumentStatus': [
225
+ ['observedGeneration', 'observed_generation'],
226
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
227
+ ['documentSha256', 'document_sha256'],
228
+ ['publishTime', 'publish_time'],
229
+ ],
230
+ 'sylphx.auth.v1.ListConsentRecordsRequest': [
231
+ ['pageSize', 'page_size'],
232
+ ['pageToken', 'page_token'],
233
+ ['userId', 'user_id'],
234
+ ],
235
+ 'sylphx.auth.v1.ListConsentRecordsResponse': [
236
+ ['consentRecords', 'consent_records', 'sylphx.auth.v1.ConsentRecord'],
237
+ ['nextPageToken', 'next_page_token'],
238
+ ],
194
239
  'sylphx.auth.v1.ListCustomerOrganizationsRequest': [
195
240
  ['pageSize', 'page_size'],
196
241
  ['pageToken', 'page_token'],
@@ -246,6 +291,14 @@ runtime.registerSchemas({
246
291
  ['invitations', 'invitations', 'sylphx.auth.v1.Invitation'],
247
292
  ['nextPageToken', 'next_page_token'],
248
293
  ],
294
+ 'sylphx.auth.v1.ListLegalDocumentsRequest': [
295
+ ['pageSize', 'page_size'],
296
+ ['pageToken', 'page_token'],
297
+ ],
298
+ 'sylphx.auth.v1.ListLegalDocumentsResponse': [
299
+ ['legalDocuments', 'legal_documents', 'sylphx.auth.v1.LegalDocument'],
300
+ ['nextPageToken', 'next_page_token'],
301
+ ],
249
302
  'sylphx.auth.v1.ListMembershipsRequest': [
250
303
  ['pageSize', 'page_size'],
251
304
  ['pageToken', 'page_token'],
@@ -313,6 +366,8 @@ runtime.registerSchemas({
313
366
  ['accessTokenTtl', 'access_token_ttl'],
314
367
  ['refreshTokenTtl', 'refresh_token_ttl'],
315
368
  ['resourceUri', 'resource_uri'],
369
+ ['backchannelLogoutUri', 'backchannel_logout_uri'],
370
+ ['backchannelLogoutSessionRequired', 'backchannel_logout_session_required'],
316
371
  ],
317
372
  'sylphx.auth.v1.OauthClientStatus': [
318
373
  ['observedGeneration', 'observed_generation'],
@@ -350,7 +405,18 @@ runtime.registerSchemas({
350
405
  ['sylphxBranding', 'sylphx_branding'],
351
406
  ['appearance', 'appearance', 'sylphx.auth.v1.PortalAppearance'],
352
407
  ],
408
+ 'sylphx.auth.v1.PortalDomainDnsRecord': [
409
+ ['dnsName', 'dns_name'],
410
+ ],
411
+ 'sylphx.auth.v1.PortalDomainStatus': [
412
+ ['bindingStatus', 'binding_status'],
413
+ ['dnsStatus', 'dns_status'],
414
+ ['edgeSslStatus', 'edge_ssl_status'],
415
+ ['routeActive', 'route_active'],
416
+ ['dnsRecords', 'dns_records', 'sylphx.auth.v1.PortalDomainDnsRecord'],
417
+ ],
353
418
  'sylphx.auth.v1.PortalLocaleAllowlist': [],
419
+ 'sylphx.auth.v1.PublishLegalDocumentRequest': [],
354
420
  'sylphx.auth.v1.ReactivateEndUserRequest': [],
355
421
  'sylphx.auth.v1.RevokeEndUserSessionsRequest': [],
356
422
  'sylphx.auth.v1.RevokeEndUserSessionsResponse': [
@@ -444,6 +510,10 @@ runtime.registerSchemas({
444
510
  * Namespace of Sylphx Auth on `Sylphx`.
445
511
  */
446
512
  export class AuthApi {
513
+ /** The `legal_documents` collection. */
514
+ legalDocuments;
515
+ /** The `consent_records` collection. */
516
+ consentRecords;
447
517
  /** The `end_users` collection. */
448
518
  endUsers;
449
519
  /** The `auth_configs` collection. */
@@ -467,6 +537,8 @@ export class AuthApi {
467
537
  /** The `oauth_clients` collection. */
468
538
  oauthClients;
469
539
  constructor(client) {
540
+ this.legalDocuments = new LegalDocumentsCollection(client);
541
+ this.consentRecords = new ConsentRecordsCollection(client);
470
542
  this.endUsers = new EndUsersCollection(client);
471
543
  this.authConfigs = new AuthConfigsCollection(client);
472
544
  this.sessions = new SessionsCollection(client);
@@ -480,6 +552,124 @@ export class AuthApi {
480
552
  this.oauthClients = new OauthClientsCollection(client);
481
553
  }
482
554
  }
555
+ /** `legal_documents` of Sylphx Auth: Resource type `auth.sylphx.com/LegalDocument`. */
556
+ export class LegalDocumentsCollection {
557
+ client;
558
+ constructor(client) {
559
+ this.client = client;
560
+ }
561
+ /**
562
+ * Gets a legal revision, including draft or published state.
563
+ *
564
+ * `GET /v1/{name=orgs/*\/projects/*\/legal_documents/*}` · permission `auth:read` · effect `read`
565
+ *
566
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
567
+ */
568
+ async get(request) {
569
+ return this.client.call({
570
+ method: 'GET',
571
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/legal_documents/*', 'name')}`,
572
+ responseType: 'sylphx.auth.v1.LegalDocument',
573
+ mutation: false,
574
+ });
575
+ }
576
+ /**
577
+ * Creates an immutable draft revision.
578
+ *
579
+ * `POST /v1/{parent=orgs/*\/projects/*}/legal_documents` · permission `auth:write` · effect `write`
580
+ *
581
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNKNOWN_FIELD`.
582
+ */
583
+ async create(request) {
584
+ return this.client.call({
585
+ method: 'POST',
586
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*', 'parent')}/legal_documents`,
587
+ query: { legal_document_id: request.legalDocumentId },
588
+ body: request.legalDocument ?? {},
589
+ bodyType: 'sylphx.auth.v1.LegalDocument',
590
+ responseType: 'sylphx.auth.v1.LegalDocument',
591
+ mutation: true,
592
+ });
593
+ }
594
+ /**
595
+ * Lists all agreement revisions of the project.
596
+ *
597
+ * `GET /v1/{parent=orgs/*\/projects/*}/legal_documents` · permission `auth:read` · effect `read`
598
+ *
599
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
600
+ */
601
+ async list(request) {
602
+ return this.client.call({
603
+ method: 'GET',
604
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*', 'parent')}/legal_documents`,
605
+ query: { page_size: request.pageSize, page_token: request.pageToken },
606
+ responseType: 'sylphx.auth.v1.ListLegalDocumentsResponse',
607
+ mutation: false,
608
+ });
609
+ }
610
+ /** Every item of every page of `list`. */
611
+ async *listAll(request) {
612
+ let next = request;
613
+ for (;;) {
614
+ const page = await this.list(next);
615
+ yield* page.legalDocuments ?? [];
616
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
617
+ return;
618
+ next = { ...request, pageToken: page.nextPageToken };
619
+ }
620
+ }
621
+ /**
622
+ * Publishes an immutable revision with its configured effective time.
623
+ *
624
+ * `POST /v1/{name=orgs/*\/projects/*\/legal_documents/*}:publish` · permission `auth:write` · effect `write`
625
+ *
626
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
627
+ */
628
+ async publish(request) {
629
+ return this.client.call({
630
+ method: 'POST',
631
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/legal_documents/*', 'name')}:publish`,
632
+ body: runtime.omit(request, ['name']),
633
+ bodyType: 'sylphx.auth.v1.PublishLegalDocumentRequest',
634
+ responseType: 'sylphx.auth.v1.LegalDocument',
635
+ mutation: true,
636
+ });
637
+ }
638
+ }
639
+ /** `consent_records` of Sylphx Auth: Resource type `auth.sylphx.com/ConsentRecord`. */
640
+ export class ConsentRecordsCollection {
641
+ client;
642
+ constructor(client) {
643
+ this.client = client;
644
+ }
645
+ /**
646
+ * Lists immutable consent audit receipts of an Auth environment.
647
+ *
648
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/consent_records` · permission `auth:read` · effect `read`
649
+ *
650
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
651
+ */
652
+ async list(request) {
653
+ return this.client.call({
654
+ method: 'GET',
655
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/consent_records`,
656
+ query: { page_size: request.pageSize, page_token: request.pageToken, user_id: request.userId },
657
+ responseType: 'sylphx.auth.v1.ListConsentRecordsResponse',
658
+ mutation: false,
659
+ });
660
+ }
661
+ /** Every item of every page of `list`. */
662
+ async *listAll(request) {
663
+ let next = request;
664
+ for (;;) {
665
+ const page = await this.list(next);
666
+ yield* page.consentRecords ?? [];
667
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
668
+ return;
669
+ next = { ...request, pageToken: page.nextPageToken };
670
+ }
671
+ }
672
+ }
483
673
  /** `end_users` of Sylphx Auth: Resource type `auth.sylphx.com/EndUser`. */
484
674
  export class EndUsersCollection {
485
675
  client;
@@ -746,7 +936,7 @@ export class AuthConfigsCollection {
746
936
  *
747
937
  * `PATCH /v1/{auth_config.name=orgs/*\/projects/*\/envs/*\/auth_configs/*}` · permission `auth:write` · effect `write`
748
938
  *
749
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
939
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
750
940
  */
751
941
  async update(request) {
752
942
  return this.client.call({
@@ -1619,7 +1809,8 @@ export class OauthClientsCollection {
1619
1809
  }
1620
1810
  /**
1621
1811
  * Issues a new client secret, returned once; the old one verifies until
1622
- * `grace_period` ends.
1812
+ * `grace_period` ends. Rotation is refused during an existing overlap.
1813
+ * Reusing an Idempotency-Key never returns the secret or rotates again.
1623
1814
  *
1624
1815
  * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/oauth_clients/*}:rollSecret` · permission `auth:write` · effect `write`
1625
1816
  *