@naughtbot/e2ee-payloads 0.3.1 → 0.5.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.
package/src/schema.ts CHANGED
@@ -43,7 +43,7 @@ export interface components {
43
43
  * @example ssh_sign
44
44
  * @enum {string}
45
45
  */
46
- MailboxEnvelopeType: "link_request" | "link_approval" | "link_rejection" | "captcha_request" | "captcha_response" | "ssh_auth" | "ssh_sign" | "gpg_sign" | "gpg_decrypt" | "age_unwrap" | "pkcs11_sign" | "pkcs11_derive" | "enroll" | "browser_approval_request" | "browser_approval_response";
46
+ MailboxEnvelopeType: "link_request" | "link_approval" | "link_rejection" | "captcha_request" | "captcha_response" | "ssh_auth" | "ssh_sign" | "gpg_sign" | "gpg_decrypt" | "age_unwrap" | "pkcs11_sign" | "pkcs11_derive" | "enroll" | "browser_approval_request" | "browser_approval_response" | "first_party_request" | "first_party_response" | "signing_request" | "signing_response";
47
47
  /**
48
48
  * ApprovalChallenge
49
49
  * @description Canonical Longfellow / attested-key-zk approval challenge. Producer sends this inside the request payload; the approver binds it into the approval proof returned in the response payload.
@@ -181,6 +181,7 @@ export interface components {
181
181
  /**
182
182
  * DisplayField
183
183
  * @description A single label/value row rendered on the approval surface.
184
+ * Superseded by the declarative `ApprovalUiV1` schema in `approval_ui.yaml` (`ApprovalUiKeyValueRow` is the direct replacement). Retained only for producers that have not yet migrated to the `ui` field; scheduled for removal in a follow-up once every producer and approver sends and renders `ApprovalUiV1`.
184
185
  */
185
186
  DisplayField: {
186
187
  /**
@@ -219,6 +220,7 @@ export interface components {
219
220
  /**
220
221
  * DisplaySchema
221
222
  * @description Optional approval-UI metadata. Producers populate this on a best-effort basis; approvers MUST render the wire payload regardless of presence.
223
+ * Superseded by the declarative `ApprovalUiV1` schema in `approval_ui.yaml`, exposed as the `ui` field on every request payload. Retained only for producers that have not yet migrated; scheduled for removal in a follow-up once every producer and approver sends and renders `ApprovalUiV1`.
222
224
  */
223
225
  DisplaySchema: {
224
226
  /**
@@ -265,6 +267,264 @@ export interface components {
265
267
  /** @description Full process tree from the current process up to init. */
266
268
  process_chain?: components["schemas"]["ProcessEntry"][];
267
269
  };
270
+ /**
271
+ * ApprovalUiV1
272
+ * @description Declarative approval-UI container. `blocks` is a flat, ordered list rendered top to bottom. The approver renders this content above its own mandatory security chrome and signing controls; nothing here can suppress, reorder, or replace that chrome. Renderers MUST skip (not reject) any block whose `type` is not recognised so that newer producers stay forward-compatible with older approvers. Producers populate this on a best-effort basis; approvers MUST still render a safe default screen when it is absent or empty.
273
+ */
274
+ ApprovalUiV1: {
275
+ /**
276
+ * @description Canonical declarative approval-UI format version. Renderers reject unknown values.
277
+ * @enum {string}
278
+ */
279
+ schema: "approval-ui/v1";
280
+ /** @description Ordered list of content blocks. An empty list is valid and renders as no requester-supplied content. */
281
+ blocks: components["schemas"]["ApprovalUiBlock"][];
282
+ };
283
+ /**
284
+ * ApprovalUiBlock
285
+ * @description One content block in an `ApprovalUiV1.blocks` list. Discriminated on `type`. Renderers MUST skip blocks whose `type` is not recognised rather than rejecting the whole payload.
286
+ */
287
+ ApprovalUiBlock: components["schemas"]["ApprovalUiHeadingBlock"] | components["schemas"]["ApprovalUiTextBlock"] | components["schemas"]["ApprovalUiKeyValuesBlock"] | components["schemas"]["ApprovalUiCalloutBlock"] | components["schemas"]["ApprovalUiBadgeBlock"] | components["schemas"]["ApprovalUiDividerBlock"] | components["schemas"]["ApprovalUiImageBlock"] | components["schemas"]["ApprovalUiSignedDataBlock"];
288
+ /**
289
+ * ApprovalUiProvenance
290
+ * @description Trust origin of a block's content. Renderers MAY group or badge blocks by provenance so the approver can tell requester-asserted content from device-derived content. `requester` is content the relying party / CLI asserted, `relay` is content the relay added, `device` is content the approving device derived locally, and `backend` is content a first-party NaughtBot backend asserted.
291
+ * @example requester
292
+ * @enum {string}
293
+ */
294
+ ApprovalUiProvenance: "requester" | "relay" | "device" | "backend";
295
+ /**
296
+ * ApprovalUiHeadingBlock
297
+ * @description A short heading rendered as a section title. `level` is visual weight only and carries no document-outline semantics.
298
+ */
299
+ ApprovalUiHeadingBlock: {
300
+ /**
301
+ * @description Block discriminator (`heading`). (enum property replaced by openapi-typescript)
302
+ * @enum {string}
303
+ */
304
+ type: "heading";
305
+ provenance: components["schemas"]["ApprovalUiProvenance"];
306
+ /**
307
+ * @description Heading text.
308
+ * @example Sign Git Commit
309
+ */
310
+ text: string;
311
+ /**
312
+ * @description Visual weight of the heading (`1` strongest). Not a document outline level; renderers map it to a font size only.
313
+ * @default 1
314
+ * @enum {integer}
315
+ */
316
+ level?: 1 | 2;
317
+ };
318
+ /**
319
+ * ApprovalUiTextBlock
320
+ * @description A paragraph of plain, non-interactive body text.
321
+ */
322
+ ApprovalUiTextBlock: {
323
+ /**
324
+ * @description Block discriminator (`text`). (enum property replaced by openapi-typescript)
325
+ * @enum {string}
326
+ */
327
+ type: "text";
328
+ provenance: components["schemas"]["ApprovalUiProvenance"];
329
+ /**
330
+ * @description Body text. Rendered as plain text; no markup is interpreted.
331
+ * @example This will create a signed commit on the main branch.
332
+ */
333
+ text: string;
334
+ /**
335
+ * @description Visual emphasis. `secondary` renders as de-emphasised supporting text.
336
+ * @default normal
337
+ * @enum {string}
338
+ */
339
+ style?: "normal" | "secondary";
340
+ };
341
+ /**
342
+ * ApprovalUiKeyValuesBlock
343
+ * @description A labelled table of label/value rows, e.g. request metadata the approver should review before approving.
344
+ */
345
+ ApprovalUiKeyValuesBlock: {
346
+ /**
347
+ * @description Block discriminator (`key_values`). (enum property replaced by openapi-typescript)
348
+ * @enum {string}
349
+ */
350
+ type: "key_values";
351
+ provenance: components["schemas"]["ApprovalUiProvenance"];
352
+ /**
353
+ * @description Optional title rendered above the rows.
354
+ * @example Request details
355
+ */
356
+ title?: string;
357
+ /** @description Ordered label/value rows. */
358
+ rows: components["schemas"]["ApprovalUiKeyValueRow"][];
359
+ };
360
+ /**
361
+ * ApprovalUiKeyValueRow
362
+ * @description A single label/value row inside an `ApprovalUiKeyValuesBlock`.
363
+ */
364
+ ApprovalUiKeyValueRow: {
365
+ /**
366
+ * @description Short row label.
367
+ * @example Repository
368
+ */
369
+ label: string;
370
+ /**
371
+ * @description Row value. Rendered as plain text; no markup is interpreted.
372
+ * @example github.com/user/repo
373
+ */
374
+ value: string;
375
+ /**
376
+ * @description Render the value in a monospace font.
377
+ * @default false
378
+ */
379
+ monospace?: boolean;
380
+ /**
381
+ * @description Value may be collapsed by default and expanded on demand.
382
+ * @default false
383
+ */
384
+ expandable?: boolean;
385
+ /**
386
+ * @description Render the value across multiple lines.
387
+ * @default false
388
+ */
389
+ multiline?: boolean;
390
+ /**
391
+ * @description Value is sensitive; the renderer MAY mask it until revealed.
392
+ * @default false
393
+ */
394
+ sensitive?: boolean;
395
+ /**
396
+ * @description Optional lookup name into the approver's curated icon set. MUST NOT be a URL or file path; renderers ignore unknown names.
397
+ * @example lock
398
+ */
399
+ icon?: string;
400
+ };
401
+ /**
402
+ * ApprovalUiCalloutBlock
403
+ * @description A highlighted callout box used to draw attention to a single message, e.g. a warning about the request.
404
+ */
405
+ ApprovalUiCalloutBlock: {
406
+ /**
407
+ * @description Block discriminator (`callout`). (enum property replaced by openapi-typescript)
408
+ * @enum {string}
409
+ */
410
+ type: "callout";
411
+ provenance: components["schemas"]["ApprovalUiProvenance"];
412
+ /**
413
+ * @description Visual severity of the callout. The renderer maps this to a fixed colour treatment; it carries no executable meaning.
414
+ * @enum {string}
415
+ */
416
+ severity: "info" | "success" | "warning" | "danger";
417
+ /**
418
+ * @description Optional callout title.
419
+ * @example Unrecognised host
420
+ */
421
+ title?: string;
422
+ /**
423
+ * @description Callout body text. Rendered as plain text.
424
+ * @example This request came from a host you have not approved before.
425
+ */
426
+ text: string;
427
+ };
428
+ /**
429
+ * ApprovalUiBadgeBlock
430
+ * @description A small inline pill / tag used to label a status or category.
431
+ */
432
+ ApprovalUiBadgeBlock: {
433
+ /**
434
+ * @description Block discriminator (`badge`). (enum property replaced by openapi-typescript)
435
+ * @enum {string}
436
+ */
437
+ type: "badge";
438
+ provenance: components["schemas"]["ApprovalUiProvenance"];
439
+ /**
440
+ * @description Badge label.
441
+ * @example Production
442
+ */
443
+ text: string;
444
+ /**
445
+ * @description Visual tone of the badge. The renderer maps this to a fixed colour treatment.
446
+ * @default neutral
447
+ * @enum {string}
448
+ */
449
+ tone?: "neutral" | "info" | "success" | "warning" | "danger";
450
+ };
451
+ /**
452
+ * ApprovalUiDividerBlock
453
+ * @description A horizontal rule used to visually separate groups of blocks.
454
+ */
455
+ ApprovalUiDividerBlock: {
456
+ /**
457
+ * @description Block discriminator (`divider`). (enum property replaced by openapi-typescript)
458
+ * @enum {string}
459
+ */
460
+ type: "divider";
461
+ provenance: components["schemas"]["ApprovalUiProvenance"];
462
+ };
463
+ /**
464
+ * ApprovalUiImageBlock
465
+ * @description An embedded raster image rendered inline. The image bytes are carried in `data`; the schema never references an external URL or file path so the approver never makes a network request to render the screen. Deferred: the schema is published now, but the mobile renderer adds image support in a later phase. Renderers that do not yet support images MUST skip this block per the `ApprovalUiBlock` skip-unknown rule.
466
+ */
467
+ ApprovalUiImageBlock: {
468
+ /**
469
+ * @description Block discriminator (`image`). (enum property replaced by openapi-typescript)
470
+ * @enum {string}
471
+ */
472
+ type: "image";
473
+ provenance: components["schemas"]["ApprovalUiProvenance"];
474
+ /**
475
+ * @description Pixel format of the embedded image bytes.
476
+ * @enum {string}
477
+ */
478
+ format: "png";
479
+ /**
480
+ * Format: byte
481
+ * @description RFC 4648 standard base64 with `=` padding for the raw image bytes. Embedded inline only; never a URL or file path.
482
+ */
483
+ data: string;
484
+ /**
485
+ * @description Optional accessibility description of the image.
486
+ * @example Repository avatar
487
+ */
488
+ alt_text?: string;
489
+ /**
490
+ * @description Maximum rendered height in layout points. The renderer scales the image down to fit and never scales it up past its native size.
491
+ * @default 120
492
+ */
493
+ max_height_points?: number;
494
+ };
495
+ /**
496
+ * ApprovalUiSignedDataBlock
497
+ * @description A read-only presentation of the exact bytes the approver is about to sign. This block carries NO content field of its own: the renderer derives the displayed bytes from the request payload's own preimage field (e.g. `signed_payload` / `raw_data`) and renders them in the selected `encoding`. This keeps the signed bytes single-sourced — a requester cannot show the approver one thing here and sign another. Because the content is device-derived, `provenance` MUST be `device`.
498
+ */
499
+ ApprovalUiSignedDataBlock: {
500
+ /**
501
+ * @description Block discriminator (`signed_data`). (enum property replaced by openapi-typescript)
502
+ * @enum {string}
503
+ */
504
+ type: "signed_data";
505
+ /**
506
+ * @description Always `device`: the displayed bytes are derived locally from the request preimage, never asserted by the requester. Constrained to the single `device` value in-schema (rather than the shared `ApprovalUiProvenance` enum) so a requester cannot mislabel the trust origin of signed bytes.
507
+ * @enum {string}
508
+ */
509
+ provenance: "device";
510
+ encoding: components["schemas"]["ApprovalUiSignedDataEncoding"];
511
+ /**
512
+ * @description Label rendered above the signed-data presentation.
513
+ * @default To be signed
514
+ */
515
+ label?: string;
516
+ /** @description Encodings the renderer MAY offer the approver to switch between. When present it SHOULD include `encoding`. */
517
+ available_encodings?: components["schemas"]["ApprovalUiSignedDataEncoding"][];
518
+ /** @description Optional caption rendered below the signed-data presentation. */
519
+ caption?: string;
520
+ };
521
+ /**
522
+ * ApprovalUiSignedDataEncoding
523
+ * @description How the signed bytes are rendered for review. `hex` and `base64` render the raw bytes, `utf8` decodes them as text, and `sha256` renders the lowercase hex SHA-256 digest of the bytes.
524
+ * @example hex
525
+ * @enum {string}
526
+ */
527
+ ApprovalUiSignedDataEncoding: "hex" | "base64" | "utf8" | "sha256";
268
528
  /**
269
529
  * MailboxSshAuthRequestPayloadV1
270
530
  * @description Request payload for the `ssh_auth` envelope type. The approver signs an SSH user-authentication challenge constructed from `raw_data`, using the on-device key selected by `device_key_id`.
@@ -297,6 +557,7 @@ export interface components {
297
557
  device_key_id: string;
298
558
  approval_challenge?: components["schemas"]["ApprovalChallenge"];
299
559
  display?: components["schemas"]["DisplaySchema"];
560
+ ui?: components["schemas"]["ApprovalUiV1"];
300
561
  source_info?: components["schemas"]["SourceInfo"];
301
562
  };
302
563
  /**
@@ -371,6 +632,7 @@ export interface components {
371
632
  device_key_id: string;
372
633
  approval_challenge?: components["schemas"]["ApprovalChallenge"];
373
634
  display?: components["schemas"]["DisplaySchema"];
635
+ ui?: components["schemas"]["ApprovalUiV1"];
374
636
  source_info?: components["schemas"]["SourceInfo"];
375
637
  };
376
638
  /**
@@ -431,6 +693,7 @@ export interface components {
431
693
  device_key_id: string;
432
694
  approval_challenge?: components["schemas"]["ApprovalChallenge"];
433
695
  display?: components["schemas"]["DisplaySchema"];
696
+ ui?: components["schemas"]["ApprovalUiV1"];
434
697
  source_info?: components["schemas"]["SourceInfo"];
435
698
  };
436
699
  /**
@@ -481,6 +744,7 @@ export interface components {
481
744
  device_key_id: string;
482
745
  approval_challenge?: components["schemas"]["ApprovalChallenge"];
483
746
  display?: components["schemas"]["DisplaySchema"];
747
+ ui?: components["schemas"]["ApprovalUiV1"];
484
748
  source_info?: components["schemas"]["SourceInfo"];
485
749
  };
486
750
  /**
@@ -578,6 +842,7 @@ export interface components {
578
842
  recipient_public_hex: string;
579
843
  approval_challenge?: components["schemas"]["ApprovalChallenge"];
580
844
  display?: components["schemas"]["DisplaySchema"];
845
+ ui?: components["schemas"]["ApprovalUiV1"];
581
846
  source_info?: components["schemas"]["SourceInfo"];
582
847
  };
583
848
  /**
@@ -624,6 +889,7 @@ export interface components {
624
889
  /** @description Hex-encoded public key selecting which on-device key the approver should use for signing. */
625
890
  device_key_id: string;
626
891
  display?: components["schemas"]["DisplaySchema"];
892
+ ui?: components["schemas"]["ApprovalUiV1"];
627
893
  approval_challenge?: components["schemas"]["ApprovalChallenge"];
628
894
  source_info?: components["schemas"]["SourceInfo"];
629
895
  };
@@ -671,6 +937,7 @@ export interface components {
671
937
  kdf?: components["schemas"]["Pkcs11DeriveKdfParams"];
672
938
  approval_challenge?: components["schemas"]["ApprovalChallenge"];
673
939
  display?: components["schemas"]["DisplaySchema"];
940
+ ui?: components["schemas"]["ApprovalUiV1"];
674
941
  source_info?: components["schemas"]["SourceInfo"];
675
942
  };
676
943
  /**
@@ -748,6 +1015,7 @@ export interface components {
748
1015
  include_certification?: boolean;
749
1016
  approval_challenge?: components["schemas"]["ApprovalChallenge"];
750
1017
  display?: components["schemas"]["DisplaySchema"];
1018
+ ui?: components["schemas"]["ApprovalUiV1"];
751
1019
  source_info?: components["schemas"]["SourceInfo"];
752
1020
  };
753
1021
  /**
@@ -826,6 +1094,86 @@ export interface components {
826
1094
  */
827
1095
  error_message?: string;
828
1096
  };
1097
+ /**
1098
+ * MailboxSigningRequestPayloadV1
1099
+ * @description Request payload for the `signing_request` envelope type. The approver signs `signed_payload` exactly as supplied with the on-device key selected by `device_key_id`; there is no protocol-specific preimage wrapping. When `approval_challenge` is present its `plaintext_hash` MUST equal `sha256:<lowercase hex of signed_payload after base64 decoding>` so the approval proof is bound to the exact signed bytes.
1100
+ */
1101
+ MailboxSigningRequestPayloadV1: {
1102
+ /**
1103
+ * Format: byte
1104
+ * @description RFC 4648 standard base64 with `=` padding for the exact preimage bytes the approver signs. The decoded payload is capped at 1 MiB (1048576 bytes); `maxLength` is the matching base64-string ceiling.
1105
+ * @example ZGF0YSB0byBzaWdu
1106
+ */
1107
+ signed_payload: string;
1108
+ /**
1109
+ * @description Signature algorithm the approver MUST use. `ecdsa-p256-sha256` signs the SHA-256 digest of `signed_payload`; `ed25519` signs the payload bytes directly.
1110
+ * @example ed25519
1111
+ * @enum {string}
1112
+ */
1113
+ signing_algorithm: "ed25519" | "ecdsa-p256-sha256";
1114
+ /** @description Device-side key identifier (e.g. iOS Secure Enclave handle) used to select among enrolled signing keys on the approver. */
1115
+ device_key_id: string;
1116
+ /**
1117
+ * @description When true, `signed_payload` is already the digest to sign and the approver MUST NOT hash it again. Only meaningful for algorithms that sign a digest (e.g. `ecdsa-p256-sha256`); ignored for `ed25519`.
1118
+ * @default false
1119
+ */
1120
+ digest_prehashed?: boolean;
1121
+ /**
1122
+ * @description Optional short human-readable label describing what the signature is for. Display only; not bound into the signature.
1123
+ * @example Release manifest
1124
+ */
1125
+ purpose_label?: string;
1126
+ ui?: components["schemas"]["ApprovalUiV1"];
1127
+ approval_challenge?: components["schemas"]["ApprovalChallenge"];
1128
+ source_info?: components["schemas"]["SourceInfo"];
1129
+ };
1130
+ /**
1131
+ * MailboxSigningResponsePayloadV1
1132
+ * @description Response payload for the `signing_response` envelope type. Discriminated on `result`: `signed` carries the signature; `failed` carries a signing error code.
1133
+ */
1134
+ MailboxSigningResponsePayloadV1: components["schemas"]["MailboxSigningResponseSignedV1"] | components["schemas"]["MailboxSigningResponseFailedV1"];
1135
+ /**
1136
+ * MailboxSigningResponseSignedV1
1137
+ * @description Signed branch of `MailboxSigningResponsePayloadV1`. Carries the raw signature over the request `signed_payload` and echoes the algorithm the approver actually used.
1138
+ */
1139
+ MailboxSigningResponseSignedV1: {
1140
+ /**
1141
+ * @description Signing outcome discriminator (`signed`). (enum property replaced by openapi-typescript)
1142
+ * @enum {string}
1143
+ */
1144
+ result: "signed";
1145
+ /**
1146
+ * Format: byte
1147
+ * @description RFC 4648 standard base64 with `=` padding for the raw signature bytes (no protocol framing).
1148
+ */
1149
+ signature: string;
1150
+ /**
1151
+ * @description Signature algorithm the approver used. Echoes the request `signing_algorithm`.
1152
+ * @example ed25519
1153
+ * @enum {string}
1154
+ */
1155
+ signing_algorithm: "ed25519" | "ecdsa-p256-sha256";
1156
+ /** @description Optional lowercase hex-encoded public key the signature verifies against (64 hex chars for an Ed25519 32-byte key, or 66 hex chars for a P-256 33-byte compressed key). */
1157
+ public_key_hex?: string;
1158
+ approval_proof?: components["schemas"]["ApprovalAttestedKeyProof"];
1159
+ };
1160
+ /**
1161
+ * MailboxSigningResponseFailedV1
1162
+ * @description Failed branch of `MailboxSigningResponsePayloadV1`. Carries the signing error code and an optional human-readable message.
1163
+ */
1164
+ MailboxSigningResponseFailedV1: {
1165
+ /**
1166
+ * @description Signing outcome discriminator (`failed`). (enum property replaced by openapi-typescript)
1167
+ * @enum {string}
1168
+ */
1169
+ result: "failed";
1170
+ error_code: components["schemas"]["SigningErrorCode"];
1171
+ /**
1172
+ * @description Human-readable error message.
1173
+ * @example User rejected the request
1174
+ */
1175
+ error_message?: string;
1176
+ };
829
1177
  /**
830
1178
  * MailboxBrowserApprovalDecision
831
1179
  * @description Mobile user's signed approval decision.
@@ -1031,6 +1379,374 @@ export interface components {
1031
1379
  request_envelope_id: string;
1032
1380
  status: components["schemas"]["MailboxBrowserApprovalResponseStatus"];
1033
1381
  };
1382
+ /**
1383
+ * MailboxFirstPartyRequestKind
1384
+ * @description First-party request category delivered to a user's devices.
1385
+ * @example privileged_action_approval
1386
+ * @enum {string}
1387
+ */
1388
+ MailboxFirstPartyRequestKind: "privileged_action_approval";
1389
+ /**
1390
+ * MailboxFirstPartyPrivilegedActionType
1391
+ * @description Privileged server-side action that requires mobile approval.
1392
+ * @example relying_party.register
1393
+ * @enum {string}
1394
+ */
1395
+ MailboxFirstPartyPrivilegedActionType: "relying_party.register" | "relying_party.rotate_secret" | "device.revoke_other";
1396
+ /**
1397
+ * MailboxFirstPartyApprovalDecision
1398
+ * @description Mobile user's signed decision for a first-party request.
1399
+ * @example approved
1400
+ * @enum {string}
1401
+ */
1402
+ MailboxFirstPartyApprovalDecision: "approved" | "denied";
1403
+ /**
1404
+ * MailboxFirstPartyResponseStatus
1405
+ * @description Response lifecycle status. The signed `decision` carries the approval outcome.
1406
+ * @example decided
1407
+ * @enum {string}
1408
+ */
1409
+ MailboxFirstPartyResponseStatus: "decided";
1410
+ /**
1411
+ * MailboxFirstPartyApprovalBindingFormat
1412
+ * @description Canonical byte format signed by the approving device key.
1413
+ * @example first-party-privileged-action-decision-binding/v1+json
1414
+ * @enum {string}
1415
+ */
1416
+ MailboxFirstPartyApprovalBindingFormat: "first-party-privileged-action-decision-binding/v1+json";
1417
+ /**
1418
+ * MailboxFirstPartyRelyingPartyRegisterActionV1
1419
+ * @description Canonical action details for `relying_party.register`. Mobile displays these exact fields before approving creation of the relying party and its paired public/confidential clients.
1420
+ */
1421
+ MailboxFirstPartyRelyingPartyRegisterActionV1: {
1422
+ /**
1423
+ * @description Discriminator for this privileged action payload.
1424
+ * @enum {string}
1425
+ */
1426
+ action_type: "relying_party.register";
1427
+ /**
1428
+ * @description Whether approval returns a one-time plaintext client secret to the initiating console flow.
1429
+ * @example true
1430
+ */
1431
+ client_secret_returned_once: boolean;
1432
+ /**
1433
+ * @description OAuth resource audience requested for confidential client credentials.
1434
+ * @example verify.api
1435
+ */
1436
+ confidential_client_audience: string;
1437
+ /**
1438
+ * @description Requested scopes for the confidential backend client.
1439
+ * @example [
1440
+ * "verify:proof"
1441
+ * ]
1442
+ */
1443
+ confidential_client_scopes: string[];
1444
+ /**
1445
+ * @description Human-readable relying-party label shown to the user.
1446
+ * @example Customer Portal
1447
+ */
1448
+ display_name: string;
1449
+ /**
1450
+ * Format: uri
1451
+ * @description Browser origin that will host the public relying-party client.
1452
+ * @example https://customer.example
1453
+ */
1454
+ origin: string;
1455
+ /**
1456
+ * @description Requested scopes for the public browser Sign in client.
1457
+ * @example [
1458
+ * "openid",
1459
+ * "offline_access",
1460
+ * "mailbox:pairing:start"
1461
+ * ]
1462
+ */
1463
+ public_client_scopes: string[];
1464
+ /**
1465
+ * @description Exact browser callback URIs for the public authorization-code client.
1466
+ * @example [
1467
+ * "https://customer.example/oauth/callback"
1468
+ * ]
1469
+ */
1470
+ redirect_uris: string[];
1471
+ };
1472
+ /**
1473
+ * MailboxFirstPartyRelyingPartyRotateSecretActionV1
1474
+ * @description Canonical action details for `relying_party.rotate_secret`. Approval authorizes replacing the confidential client's stored secret hash and returning the new secret once to the initiating console flow.
1475
+ */
1476
+ MailboxFirstPartyRelyingPartyRotateSecretActionV1: {
1477
+ /**
1478
+ * @description Discriminator for this privileged action payload.
1479
+ * @enum {string}
1480
+ */
1481
+ action_type: "relying_party.rotate_secret";
1482
+ /**
1483
+ * @description Whether approval returns a one-time plaintext client secret to the initiating console flow.
1484
+ * @example true
1485
+ */
1486
+ client_secret_returned_once: boolean;
1487
+ /**
1488
+ * @description Confidential backend client id whose secret will rotate.
1489
+ * @example rp_conf_9d58fb4c6ff84f46
1490
+ */
1491
+ confidential_client_id: string;
1492
+ /**
1493
+ * @description Human-readable relying-party label shown to the user.
1494
+ * @example Customer Portal
1495
+ */
1496
+ display_name: string;
1497
+ /**
1498
+ * Format: uri
1499
+ * @description Browser origin attached to the relying party.
1500
+ * @example https://customer.example
1501
+ */
1502
+ origin: string;
1503
+ /**
1504
+ * @description Relying-party record id whose confidential secret will rotate.
1505
+ * @example rp_2af7b1fb2b5b4b5b8
1506
+ */
1507
+ relying_party_id: string;
1508
+ };
1509
+ /**
1510
+ * MailboxFirstPartyDeviceRevokeOtherActionV1
1511
+ * @description Canonical action details for `device.revoke_other`. Approval authorizes revoking another active device on the same user account.
1512
+ */
1513
+ MailboxFirstPartyDeviceRevokeOtherActionV1: {
1514
+ /**
1515
+ * @description Discriminator for this privileged action payload.
1516
+ * @enum {string}
1517
+ */
1518
+ action_type: "device.revoke_other";
1519
+ /**
1520
+ * @description Whether approval cascades revocation to pairings involving the target device.
1521
+ * @example true
1522
+ */
1523
+ revoke_pairings: boolean;
1524
+ /**
1525
+ * @description Whether approval revokes refresh-token families bound to the target device.
1526
+ * @example true
1527
+ */
1528
+ revoke_refresh_tokens: boolean;
1529
+ /**
1530
+ * @description RFC 3339 UTC creation timestamp for the target device.
1531
+ * @example 2026-05-01T12:00:00Z
1532
+ */
1533
+ target_device_created_at: string;
1534
+ /**
1535
+ * Format: uuid
1536
+ * @description Device id that will be revoked.
1537
+ * @example 22222222-3333-4444-8555-666666666666
1538
+ */
1539
+ target_device_id: string;
1540
+ /**
1541
+ * @description Optional human-readable device name shown to the user.
1542
+ * @example Taylor's iPhone
1543
+ */
1544
+ target_device_name?: string | null;
1545
+ /**
1546
+ * @description Registered platform type for the target device.
1547
+ * @example ios
1548
+ * @enum {string}
1549
+ */
1550
+ target_device_type: "ios" | "android";
1551
+ };
1552
+ /**
1553
+ * MailboxFirstPartyPrivilegedAction
1554
+ * @description Typed canonical privileged action details shown on mobile.
1555
+ */
1556
+ MailboxFirstPartyPrivilegedAction: components["schemas"]["MailboxFirstPartyRelyingPartyRegisterActionV1"] | components["schemas"]["MailboxFirstPartyRelyingPartyRotateSecretActionV1"] | components["schemas"]["MailboxFirstPartyDeviceRevokeOtherActionV1"];
1557
+ /**
1558
+ * MailboxFirstPartyPrivilegedActionRequestV1
1559
+ * @description Privileged console action approval request. `canonical_action_bytes` are the UTF-8 JSON bytes of the typed `action` object encoded with lexicographic property order and no insignificant whitespace; the hash pins the exact action details auth will execute after approval.
1560
+ */
1561
+ MailboxFirstPartyPrivilegedActionRequestV1: {
1562
+ action: components["schemas"]["MailboxFirstPartyPrivilegedAction"];
1563
+ action_type: components["schemas"]["MailboxFirstPartyPrivilegedActionType"];
1564
+ /**
1565
+ * Format: byte
1566
+ * @description RFC 4648 standard base64 with `=` padding for the canonical privileged action JSON bytes.
1567
+ */
1568
+ canonical_action_bytes: string;
1569
+ /**
1570
+ * @description SHA-256 hash of `canonical_action_bytes` after base64 decoding.
1571
+ * @example sha256:70f1e52bd01429bc2f405b182a3abc72751bda213dba41684a12db5116698c3c
1572
+ */
1573
+ canonical_action_hash: string;
1574
+ /**
1575
+ * @description RFC 3339 UTC timestamp when auth created the privileged-action intent.
1576
+ * @example 2026-05-16T20:40:00Z
1577
+ */
1578
+ created_at: string;
1579
+ /**
1580
+ * @description OAuth client id for the console flow that initiated the intent.
1581
+ * @example naughtbot-console
1582
+ */
1583
+ initiating_client_id: string;
1584
+ /**
1585
+ * @description Base64url SHA-256 thumbprint of the initiating browser DPoP key.
1586
+ * @example 2oNQXcW2Upi5b1xHZQW1Yf3N0aYVnX_Jf7mRiS7Jm8A
1587
+ */
1588
+ initiating_dpop_jkt: string;
1589
+ /**
1590
+ * @description Opaque privileged-action intent id.
1591
+ * @example pai_2af7b1fb2b5b4b5b8
1592
+ */
1593
+ intent_id: string;
1594
+ };
1595
+ /**
1596
+ * MailboxFirstPartyRequestPayloadV1
1597
+ * @description Request payload for the `first_party_request` envelope type.
1598
+ */
1599
+ MailboxFirstPartyRequestPayloadV1: {
1600
+ /**
1601
+ * @description RFC 3339 UTC timestamp after which the request is invalid.
1602
+ * @example 2026-05-16T20:45:00Z
1603
+ */
1604
+ expires_at: string;
1605
+ /**
1606
+ * @description RFC 3339 UTC timestamp with canonical `Z` suffix.
1607
+ * @example 2026-05-16T20:40:00Z
1608
+ */
1609
+ issued_at: string;
1610
+ /**
1611
+ * @description Opaque nonce bound into the mobile-signed decision.
1612
+ * @example first-party-nonce-fixture
1613
+ */
1614
+ nonce: string;
1615
+ privileged_action: components["schemas"]["MailboxFirstPartyPrivilegedActionRequestV1"];
1616
+ /**
1617
+ * @description Opaque auth/mailbox-scoped first-party request id.
1618
+ * @example fpr_2af7b1fb2b5b4b5b8
1619
+ */
1620
+ request_id: string;
1621
+ request_kind: components["schemas"]["MailboxFirstPartyRequestKind"];
1622
+ };
1623
+ /**
1624
+ * MailboxFirstPartyPrivilegedActionDecisionBindingV1
1625
+ * @description Canonical JSON object whose UTF-8 bytes are signed by the approving device key. Producers encode these fields in lexicographic property order with no insignificant whitespace and place the resulting bytes in `MailboxFirstPartyResponsePayloadV1.approval_binding_bytes`.
1626
+ */
1627
+ MailboxFirstPartyPrivilegedActionDecisionBindingV1: {
1628
+ action_type: components["schemas"]["MailboxFirstPartyPrivilegedActionType"];
1629
+ /**
1630
+ * Format: uuid
1631
+ * @description Device id whose signing key created `approval_signature`.
1632
+ * @example 33333333-4444-4555-8666-777777777777
1633
+ */
1634
+ approving_device_id: string;
1635
+ /**
1636
+ * @description Base64url SHA-256 thumbprint of the approving device signing key.
1637
+ * @example uJx87scLEhI5vT1YdtXx5ERw2IW0aP2mMNJ1lUu1Dx4
1638
+ */
1639
+ approving_device_signing_key_jkt: string;
1640
+ /**
1641
+ * @description Hash copied from the request payload.
1642
+ * @example sha256:70f1e52bd01429bc2f405b182a3abc72751bda213dba41684a12db5116698c3c
1643
+ */
1644
+ canonical_action_hash: string;
1645
+ /**
1646
+ * @description RFC 3339 UTC timestamp of the mobile decision.
1647
+ * @example 2026-05-16T20:41:00Z
1648
+ */
1649
+ decided_at: string;
1650
+ decision: components["schemas"]["MailboxFirstPartyApprovalDecision"];
1651
+ /**
1652
+ * @description Request expiry copied from the request payload.
1653
+ * @example 2026-05-16T20:45:00Z
1654
+ */
1655
+ expires_at: string;
1656
+ /**
1657
+ * @description Privileged-action intent id copied from the request payload.
1658
+ * @example pai_2af7b1fb2b5b4b5b8
1659
+ */
1660
+ intent_id: string;
1661
+ /**
1662
+ * @description Nonce copied from the request payload.
1663
+ * @example first-party-nonce-fixture
1664
+ */
1665
+ nonce: string;
1666
+ /**
1667
+ * Format: uuid
1668
+ * @description Envelope id of the first-party request being answered.
1669
+ * @example 11111111-2222-4333-8444-555555555555
1670
+ */
1671
+ request_envelope_id: string;
1672
+ /**
1673
+ * @description Envelope `issued_at` timestamp of the request being answered.
1674
+ * @example 2026-05-16T20:40:00Z
1675
+ */
1676
+ request_envelope_issued_at: string;
1677
+ /**
1678
+ * @description Envelope type of the request being answered.
1679
+ * @example first_party_request
1680
+ * @enum {string}
1681
+ */
1682
+ request_envelope_type: "first_party_request";
1683
+ /**
1684
+ * @description First-party request id copied from the request payload.
1685
+ * @example fpr_2af7b1fb2b5b4b5b8
1686
+ */
1687
+ request_id: string;
1688
+ /**
1689
+ * @description Canonical decision binding schema version.
1690
+ * @enum {string}
1691
+ */
1692
+ version: "first-party-privileged-action-decision-binding/v1";
1693
+ };
1694
+ /**
1695
+ * MailboxFirstPartyResponsePayloadV1
1696
+ * @description Response payload for the `first_party_response` envelope type. The response carries the mobile decision, the exact canonical bytes signed by the approving device, and the raw device signature over those bytes.
1697
+ */
1698
+ MailboxFirstPartyResponsePayloadV1: {
1699
+ /**
1700
+ * Format: byte
1701
+ * @description RFC 4648 standard base64 with `=` padding for the canonical `MailboxFirstPartyPrivilegedActionDecisionBindingV1` UTF-8 JSON bytes.
1702
+ */
1703
+ approval_binding_bytes: string;
1704
+ approval_binding_format: components["schemas"]["MailboxFirstPartyApprovalBindingFormat"];
1705
+ /**
1706
+ * Format: byte
1707
+ * @description RFC 4648 standard base64 with `=` padding for the raw signature over `approval_binding_bytes` after base64 decoding.
1708
+ */
1709
+ approval_signature: string;
1710
+ /**
1711
+ * @description Device signing-key algorithm identifier.
1712
+ * @example ES256
1713
+ */
1714
+ approval_signature_algorithm: string;
1715
+ /**
1716
+ * Format: uuid
1717
+ * @description Device id whose signing key created `approval_signature`.
1718
+ * @example 33333333-4444-4555-8666-777777777777
1719
+ */
1720
+ approving_device_id: string;
1721
+ /**
1722
+ * @description Base64url SHA-256 thumbprint of the approving device signing key.
1723
+ * @example uJx87scLEhI5vT1YdtXx5ERw2IW0aP2mMNJ1lUu1Dx4
1724
+ */
1725
+ approving_device_signing_key_jkt: string;
1726
+ /**
1727
+ * @description RFC 3339 UTC timestamp of the mobile decision.
1728
+ * @example 2026-05-16T20:41:00Z
1729
+ */
1730
+ decided_at: string;
1731
+ decision: components["schemas"]["MailboxFirstPartyApprovalDecision"];
1732
+ /**
1733
+ * @description Privileged-action intent id copied from the request payload.
1734
+ * @example pai_2af7b1fb2b5b4b5b8
1735
+ */
1736
+ intent_id: string;
1737
+ /**
1738
+ * Format: uuid
1739
+ * @description Envelope id of the first-party request being answered.
1740
+ * @example 11111111-2222-4333-8444-555555555555
1741
+ */
1742
+ request_envelope_id: string;
1743
+ /**
1744
+ * @description First-party request id copied from the request payload.
1745
+ * @example fpr_2af7b1fb2b5b4b5b8
1746
+ */
1747
+ request_id: string;
1748
+ status: components["schemas"]["MailboxFirstPartyResponseStatus"];
1749
+ };
1034
1750
  };
1035
1751
  responses: never;
1036
1752
  parameters: never;