@oxy.so/contracts 1.5.0 → 2.1.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.
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Wire contract for `POST /federation/instance-fetch/sign`: Oxy's INSTANCE
3
+ * actor signs one ActivityPub GET for a first-party service, so the service can
4
+ * read an instance running in authorized-fetch ("secure") mode without holding
5
+ * a key.
6
+ *
7
+ * The caller sends a URL, never a signing string: Oxy builds the string itself
8
+ * (`(request-target): get <path>`, `host`, `date`), the method is always GET
9
+ * and the key is always the instance actor's. The caller sends the returned
10
+ * headers, unchanged, on exactly that URL, within the few minutes remote
11
+ * servers accept a `Date` for. A redirect is a new URL and needs a new
12
+ * signature.
13
+ *
14
+ * Needs a service token whose application holds the privileged
15
+ * `federation:instance-fetch` scope.
16
+ *
17
+ * Platform-agnostic — zod only.
18
+ */
19
+ import { z } from 'zod';
20
+ /** The longest URL Oxy will sign (the same cap as its own safe fetch). */
21
+ export declare const INSTANCE_FETCH_MAX_URL_LENGTH = 2048;
22
+ export declare const instanceFetchSignRequestSchema: z.ZodObject<{
23
+ /** The absolute public `https://` URL the caller is about to GET. */
24
+ url: z.ZodString;
25
+ }, "strict", z.ZodTypeAny, {
26
+ url: string;
27
+ }, {
28
+ url: string;
29
+ }>;
30
+ export type InstanceFetchSignRequest = z.infer<typeof instanceFetchSignRequestSchema>;
31
+ export declare const instanceFetchSignResponseSchema: z.ZodObject<{
32
+ /** The instance actor's key, e.g. `https://oxy.so/ap/users/instance#main-key`. */
33
+ keyId: z.ZodString;
34
+ /** Send all three on the GET, as they are. */
35
+ headers: z.ZodObject<{
36
+ Host: z.ZodString;
37
+ Date: z.ZodString;
38
+ Signature: z.ZodString;
39
+ }, "strict", z.ZodTypeAny, {
40
+ Host: string;
41
+ Date: string;
42
+ Signature: string;
43
+ }, {
44
+ Host: string;
45
+ Date: string;
46
+ Signature: string;
47
+ }>;
48
+ }, "strict", z.ZodTypeAny, {
49
+ keyId: string;
50
+ headers: {
51
+ Host: string;
52
+ Date: string;
53
+ Signature: string;
54
+ };
55
+ }, {
56
+ keyId: string;
57
+ headers: {
58
+ Host: string;
59
+ Date: string;
60
+ Signature: string;
61
+ };
62
+ }>;
63
+ export type InstanceFetchSignResponse = z.infer<typeof instanceFetchSignResponseSchema>;
@@ -43,8 +43,6 @@ export { deviceContextRelationshipSchema, deviceDirectoryProfileSchema, deviceAc
43
43
  export type { DeviceContextRelationship, DeviceDirectoryProfile, DeviceAccountContext, DevicePrincipal, DeviceDirectory, DeviceActivateRequest, DeviceActivateResponse, DeviceDirectorySync, } from './deviceDirectory';
44
44
  export { oauthConsentDecisionSchema, oauthAuthorizeCodeResponseSchema, mcpOAuthClientApplicationSchema, mcpOAuthWriteActionSchema, mcpOAuthConsentContextSchema, mcpOAuthClientInfoResponseSchema, mcpOAuthConsentResponseSchema, } from './oauth';
45
45
  export type { OauthConsentDecision, OauthAuthorizeCodeResponse, McpOAuthClientApplication, McpOAuthWriteAction, McpOAuthConsentContext, McpOAuthClientInfoResponse, McpOAuthConsentResponse, } from './oauth';
46
- export { BROWSER_HUB_COOKIE_NAME, BROWSER_HUB_COOKIE_ATTRIBUTES, BROWSER_HUB_HANDLE_TTL_MS, browserHubHandleSchema, browserHubHandleRequestSchema, browserHubHandleResponseSchema, browserHubResolveResponseSchema, browserHubErrorSchema, browserHubRevokeResponseSchema, hubSessionSchema, hubClaimRequestSchema, hubActivateRequestSchema, hubAuthorizeRequestSchema, hubAuthorizeResultSchema, } from './browserHub';
47
- export type { BrowserHubHandleRequest, BrowserHubHandleResponse, BrowserHubResolveResponse, BrowserHubError, BrowserHubRevokeResponse, HubSession, HubClaimRequest, HubActivateRequest, HubAuthorizeRequest, HubAuthorizeResult, } from './browserHub';
48
46
  export { loginResultSchema, } from './deviceBoot';
49
47
  export type { LoginSessionResult, LoginResult, SecurityAlert, SecurityAlertAnomaly, } from './deviceBoot';
50
48
  export { rotateKeyChallengeResponseSchema, rotateKeyCompleteRequestSchema, rotateKeyCompleteResponseSchema, } from './keyRotation';
@@ -106,4 +104,5 @@ export { inboxComposeRequestSchema, inboxDailyBriefRequestSchema, inboxNaturalSe
106
104
  export type { InboxComposeRequest, InboxDailyBriefRequest, InboxInferenceTextResponse, InboxNaturalSearchResponse, InboxSmartRepliesResponse, InboxThreadSummaryResponse, InboxInferenceStreamEvent, } from './inference/inbox';
107
105
  export * from './externalIdentity';
108
106
  export * from './linkedAccounts';
107
+ export * from './federationInstanceFetch';
109
108
  export * from './notifications';
@@ -141,15 +141,15 @@ export declare const aliaReleaseSignatureSchema: z.ZodObject<{
141
141
  }, "strict", z.ZodTypeAny, {
142
142
  signature: string;
143
143
  signedAt: string;
144
+ keyId: string;
144
145
  algorithm: "ed25519";
145
146
  canonicalization: "jcs";
146
- keyId: string;
147
147
  }, {
148
148
  signature: string;
149
149
  signedAt: string;
150
+ keyId: string;
150
151
  algorithm: "ed25519";
151
152
  canonicalization: "jcs";
152
- keyId: string;
153
153
  }>;
154
154
  /**
155
155
  * A signed release of an `alia/*` model revision.
@@ -377,18 +377,19 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
377
377
  }, "strict", z.ZodTypeAny, {
378
378
  signature: string;
379
379
  signedAt: string;
380
+ keyId: string;
380
381
  algorithm: "ed25519";
381
382
  canonicalization: "jcs";
382
- keyId: string;
383
383
  }, {
384
384
  signature: string;
385
385
  signedAt: string;
386
+ keyId: string;
386
387
  algorithm: "ed25519";
387
388
  canonicalization: "jcs";
388
- keyId: string;
389
389
  }>, "many">;
390
390
  }, "strict", z.ZodTypeAny, {
391
391
  schemaVersion: 1;
392
+ issuedAt: string;
392
393
  revision: {
393
394
  schemaVersion: 1;
394
395
  revision: string;
@@ -413,13 +414,12 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
413
414
  safetyCardUrl?: string | undefined;
414
415
  } | undefined;
415
416
  };
416
- issuedAt: string;
417
417
  signatures: {
418
418
  signature: string;
419
419
  signedAt: string;
420
+ keyId: string;
420
421
  algorithm: "ed25519";
421
422
  canonicalization: "jcs";
422
- keyId: string;
423
423
  }[];
424
424
  license: {
425
425
  displayName: string;
@@ -443,6 +443,7 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
443
443
  }[];
444
444
  }, {
445
445
  schemaVersion: 1;
446
+ issuedAt: string;
446
447
  revision: {
447
448
  schemaVersion: 1;
448
449
  revision: string;
@@ -467,13 +468,12 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
467
468
  knownLimitations?: string[] | undefined;
468
469
  } | undefined;
469
470
  };
470
- issuedAt: string;
471
471
  signatures: {
472
472
  signature: string;
473
473
  signedAt: string;
474
+ keyId: string;
474
475
  algorithm: "ed25519";
475
476
  canonicalization: "jcs";
476
- keyId: string;
477
477
  }[];
478
478
  license: {
479
479
  displayName: string;
@@ -497,6 +497,7 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
497
497
  }[];
498
498
  }>, {
499
499
  schemaVersion: 1;
500
+ issuedAt: string;
500
501
  revision: {
501
502
  schemaVersion: 1;
502
503
  revision: string;
@@ -521,13 +522,12 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
521
522
  safetyCardUrl?: string | undefined;
522
523
  } | undefined;
523
524
  };
524
- issuedAt: string;
525
525
  signatures: {
526
526
  signature: string;
527
527
  signedAt: string;
528
+ keyId: string;
528
529
  algorithm: "ed25519";
529
530
  canonicalization: "jcs";
530
- keyId: string;
531
531
  }[];
532
532
  license: {
533
533
  displayName: string;
@@ -551,6 +551,7 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
551
551
  }[];
552
552
  }, {
553
553
  schemaVersion: 1;
554
+ issuedAt: string;
554
555
  revision: {
555
556
  schemaVersion: 1;
556
557
  revision: string;
@@ -575,13 +576,12 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
575
576
  knownLimitations?: string[] | undefined;
576
577
  } | undefined;
577
578
  };
578
- issuedAt: string;
579
579
  signatures: {
580
580
  signature: string;
581
581
  signedAt: string;
582
+ keyId: string;
582
583
  algorithm: "ed25519";
583
584
  canonicalization: "jcs";
584
- keyId: string;
585
585
  }[];
586
586
  license: {
587
587
  displayName: string;
@@ -626,18 +626,19 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
626
626
  }, "strict", z.ZodTypeAny, {
627
627
  signature: string;
628
628
  signedAt: string;
629
+ keyId: string;
629
630
  algorithm: "ed25519";
630
631
  canonicalization: "jcs";
631
- keyId: string;
632
632
  }, {
633
633
  signature: string;
634
634
  signedAt: string;
635
+ keyId: string;
635
636
  algorithm: "ed25519";
636
637
  canonicalization: "jcs";
637
- keyId: string;
638
638
  }>, "many">;
639
639
  }, "strict", z.ZodTypeAny, {
640
640
  schemaVersion: 1;
641
+ issuedAt: string;
641
642
  revision: {
642
643
  schemaVersion: 1;
643
644
  revision: string;
@@ -662,13 +663,12 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
662
663
  safetyCardUrl?: string | undefined;
663
664
  } | undefined;
664
665
  };
665
- issuedAt: string;
666
666
  signatures: {
667
667
  signature: string;
668
668
  signedAt: string;
669
+ keyId: string;
669
670
  algorithm: "ed25519";
670
671
  canonicalization: "jcs";
671
- keyId: string;
672
672
  }[];
673
673
  license: {
674
674
  displayName: string;
@@ -692,6 +692,7 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
692
692
  }[];
693
693
  }, {
694
694
  schemaVersion: 1;
695
+ issuedAt: string;
695
696
  revision: {
696
697
  schemaVersion: 1;
697
698
  revision: string;
@@ -716,13 +717,12 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
716
717
  knownLimitations?: string[] | undefined;
717
718
  } | undefined;
718
719
  };
719
- issuedAt: string;
720
720
  signatures: {
721
721
  signature: string;
722
722
  signedAt: string;
723
+ keyId: string;
723
724
  algorithm: "ed25519";
724
725
  canonicalization: "jcs";
725
- keyId: string;
726
726
  }[];
727
727
  license: {
728
728
  displayName: string;
@@ -746,6 +746,7 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
746
746
  }[];
747
747
  }>, {
748
748
  schemaVersion: 1;
749
+ issuedAt: string;
749
750
  revision: {
750
751
  schemaVersion: 1;
751
752
  revision: string;
@@ -770,13 +771,12 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
770
771
  safetyCardUrl?: string | undefined;
771
772
  } | undefined;
772
773
  };
773
- issuedAt: string;
774
774
  signatures: {
775
775
  signature: string;
776
776
  signedAt: string;
777
+ keyId: string;
777
778
  algorithm: "ed25519";
778
779
  canonicalization: "jcs";
779
- keyId: string;
780
780
  }[];
781
781
  license: {
782
782
  displayName: string;
@@ -800,6 +800,7 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
800
800
  }[];
801
801
  }, {
802
802
  schemaVersion: 1;
803
+ issuedAt: string;
803
804
  revision: {
804
805
  schemaVersion: 1;
805
806
  revision: string;
@@ -824,13 +825,12 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
824
825
  knownLimitations?: string[] | undefined;
825
826
  } | undefined;
826
827
  };
827
- issuedAt: string;
828
828
  signatures: {
829
829
  signature: string;
830
830
  signedAt: string;
831
+ keyId: string;
831
832
  algorithm: "ed25519";
832
833
  canonicalization: "jcs";
833
- keyId: string;
834
834
  }[];
835
835
  license: {
836
836
  displayName: string;
@@ -1059,6 +1059,7 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
1059
1059
  };
1060
1060
  manifest: {
1061
1061
  schemaVersion: 1;
1062
+ issuedAt: string;
1062
1063
  revision: {
1063
1064
  schemaVersion: 1;
1064
1065
  revision: string;
@@ -1083,13 +1084,12 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
1083
1084
  safetyCardUrl?: string | undefined;
1084
1085
  } | undefined;
1085
1086
  };
1086
- issuedAt: string;
1087
1087
  signatures: {
1088
1088
  signature: string;
1089
1089
  signedAt: string;
1090
+ keyId: string;
1090
1091
  algorithm: "ed25519";
1091
1092
  canonicalization: "jcs";
1092
- keyId: string;
1093
1093
  }[];
1094
1094
  license: {
1095
1095
  displayName: string;
@@ -1150,6 +1150,7 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
1150
1150
  };
1151
1151
  manifest: {
1152
1152
  schemaVersion: 1;
1153
+ issuedAt: string;
1153
1154
  revision: {
1154
1155
  schemaVersion: 1;
1155
1156
  revision: string;
@@ -1174,13 +1175,12 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
1174
1175
  knownLimitations?: string[] | undefined;
1175
1176
  } | undefined;
1176
1177
  };
1177
- issuedAt: string;
1178
1178
  signatures: {
1179
1179
  signature: string;
1180
1180
  signedAt: string;
1181
+ keyId: string;
1181
1182
  algorithm: "ed25519";
1182
1183
  canonicalization: "jcs";
1183
- keyId: string;
1184
1184
  }[];
1185
1185
  license: {
1186
1186
  displayName: string;
@@ -1243,8 +1243,8 @@ export declare const modelReleaseIngestionResultSchema: z.ZodObject<{
1243
1243
  ingestedAt: z.ZodString;
1244
1244
  }, "strict", z.ZodTypeAny, {
1245
1245
  schemaVersion: 1;
1246
- revision: string;
1247
1246
  outcome: "ingested" | "already_ingested";
1247
+ revision: string;
1248
1248
  modelId: string;
1249
1249
  reference: string;
1250
1250
  releaseId: string;
@@ -1254,8 +1254,8 @@ export declare const modelReleaseIngestionResultSchema: z.ZodObject<{
1254
1254
  ingestedAt: string;
1255
1255
  }, {
1256
1256
  schemaVersion: 1;
1257
- revision: string;
1258
1257
  outcome: "ingested" | "already_ingested";
1258
+ revision: string;
1259
1259
  modelId: string;
1260
1260
  reference: string;
1261
1261
  releaseId: string;
@@ -855,7 +855,7 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
855
855
  };
856
856
  provider: string;
857
857
  connectionId: string;
858
- custodyState: "revoked" | "pending" | "ready" | "reconcile";
858
+ custodyState: "pending" | "revoked" | "ready" | "reconcile";
859
859
  upstreamBillsCustomerDirectly: true;
860
860
  credentialHandle?: string | undefined;
861
861
  credentialRevision?: number | undefined;
@@ -885,7 +885,7 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
885
885
  };
886
886
  provider: string;
887
887
  connectionId: string;
888
- custodyState: "revoked" | "pending" | "ready" | "reconcile";
888
+ custodyState: "pending" | "revoked" | "ready" | "reconcile";
889
889
  upstreamBillsCustomerDirectly: true;
890
890
  credentialHandle?: string | undefined;
891
891
  credentialRevision?: number | undefined;
@@ -915,7 +915,7 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
915
915
  };
916
916
  provider: string;
917
917
  connectionId: string;
918
- custodyState: "revoked" | "pending" | "ready" | "reconcile";
918
+ custodyState: "pending" | "revoked" | "ready" | "reconcile";
919
919
  upstreamBillsCustomerDirectly: true;
920
920
  credentialHandle?: string | undefined;
921
921
  credentialRevision?: number | undefined;
@@ -945,7 +945,7 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
945
945
  };
946
946
  provider: string;
947
947
  connectionId: string;
948
- custodyState: "revoked" | "pending" | "ready" | "reconcile";
948
+ custodyState: "pending" | "revoked" | "ready" | "reconcile";
949
949
  upstreamBillsCustomerDirectly: true;
950
950
  credentialHandle?: string | undefined;
951
951
  credentialRevision?: number | undefined;
@@ -82,9 +82,9 @@ export declare const linkedAccountSchema: z.ZodObject<{
82
82
  id: string;
83
83
  createdAt: string;
84
84
  verifiedAt: string;
85
- handle: string;
86
85
  network: "activitypub" | "atproto";
87
86
  actorUri: string;
87
+ handle: string;
88
88
  accountKey: string;
89
89
  host: string;
90
90
  proofMethod: "oauth";
@@ -92,9 +92,9 @@ export declare const linkedAccountSchema: z.ZodObject<{
92
92
  id: string;
93
93
  createdAt: string;
94
94
  verifiedAt: string;
95
- handle: string;
96
95
  network: "activitypub" | "atproto";
97
96
  actorUri: string;
97
+ handle: string;
98
98
  accountKey: string;
99
99
  host: string;
100
100
  proofMethod: "oauth";
@@ -117,9 +117,9 @@ export declare const completeLinkedAccountResponseSchema: z.ZodObject<{
117
117
  id: string;
118
118
  createdAt: string;
119
119
  verifiedAt: string;
120
- handle: string;
121
120
  network: "activitypub" | "atproto";
122
121
  actorUri: string;
122
+ handle: string;
123
123
  accountKey: string;
124
124
  host: string;
125
125
  proofMethod: "oauth";
@@ -127,9 +127,9 @@ export declare const completeLinkedAccountResponseSchema: z.ZodObject<{
127
127
  id: string;
128
128
  createdAt: string;
129
129
  verifiedAt: string;
130
- handle: string;
131
130
  network: "activitypub" | "atproto";
132
131
  actorUri: string;
132
+ handle: string;
133
133
  accountKey: string;
134
134
  host: string;
135
135
  proofMethod: "oauth";
@@ -139,9 +139,9 @@ export declare const completeLinkedAccountResponseSchema: z.ZodObject<{
139
139
  id: string;
140
140
  createdAt: string;
141
141
  verifiedAt: string;
142
- handle: string;
143
142
  network: "activitypub" | "atproto";
144
143
  actorUri: string;
144
+ handle: string;
145
145
  accountKey: string;
146
146
  host: string;
147
147
  proofMethod: "oauth";
@@ -151,9 +151,9 @@ export declare const completeLinkedAccountResponseSchema: z.ZodObject<{
151
151
  id: string;
152
152
  createdAt: string;
153
153
  verifiedAt: string;
154
- handle: string;
155
154
  network: "activitypub" | "atproto";
156
155
  actorUri: string;
156
+ handle: string;
157
157
  accountKey: string;
158
158
  host: string;
159
159
  proofMethod: "oauth";
@@ -177,9 +177,9 @@ export declare const linkedAccountListResponseSchema: z.ZodObject<{
177
177
  id: string;
178
178
  createdAt: string;
179
179
  verifiedAt: string;
180
- handle: string;
181
180
  network: "activitypub" | "atproto";
182
181
  actorUri: string;
182
+ handle: string;
183
183
  accountKey: string;
184
184
  host: string;
185
185
  proofMethod: "oauth";
@@ -187,9 +187,9 @@ export declare const linkedAccountListResponseSchema: z.ZodObject<{
187
187
  id: string;
188
188
  createdAt: string;
189
189
  verifiedAt: string;
190
- handle: string;
191
190
  network: "activitypub" | "atproto";
192
191
  actorUri: string;
192
+ handle: string;
193
193
  accountKey: string;
194
194
  host: string;
195
195
  proofMethod: "oauth";
@@ -199,9 +199,9 @@ export declare const linkedAccountListResponseSchema: z.ZodObject<{
199
199
  id: string;
200
200
  createdAt: string;
201
201
  verifiedAt: string;
202
- handle: string;
203
202
  network: "activitypub" | "atproto";
204
203
  actorUri: string;
204
+ handle: string;
205
205
  accountKey: string;
206
206
  host: string;
207
207
  proofMethod: "oauth";
@@ -211,9 +211,9 @@ export declare const linkedAccountListResponseSchema: z.ZodObject<{
211
211
  id: string;
212
212
  createdAt: string;
213
213
  verifiedAt: string;
214
- handle: string;
215
214
  network: "activitypub" | "atproto";
216
215
  actorUri: string;
216
+ handle: string;
217
217
  accountKey: string;
218
218
  host: string;
219
219
  proofMethod: "oauth";
@@ -244,9 +244,9 @@ export declare const serviceLinkedAccountSchema: z.ZodObject<{
244
244
  id: string;
245
245
  createdAt: string;
246
246
  verifiedAt: string;
247
- handle: string;
248
247
  network: "activitypub" | "atproto";
249
248
  actorUri: string;
249
+ handle: string;
250
250
  accountKey: string;
251
251
  host: string;
252
252
  proofMethod: "oauth";
@@ -255,9 +255,9 @@ export declare const serviceLinkedAccountSchema: z.ZodObject<{
255
255
  id: string;
256
256
  createdAt: string;
257
257
  verifiedAt: string;
258
- handle: string;
259
258
  network: "activitypub" | "atproto";
260
259
  actorUri: string;
260
+ handle: string;
261
261
  accountKey: string;
262
262
  host: string;
263
263
  proofMethod: "oauth";
@@ -284,9 +284,9 @@ export declare const serviceLinkedAccountListResponseSchema: z.ZodObject<{
284
284
  id: string;
285
285
  createdAt: string;
286
286
  verifiedAt: string;
287
- handle: string;
288
287
  network: "activitypub" | "atproto";
289
288
  actorUri: string;
289
+ handle: string;
290
290
  accountKey: string;
291
291
  host: string;
292
292
  proofMethod: "oauth";
@@ -295,9 +295,9 @@ export declare const serviceLinkedAccountListResponseSchema: z.ZodObject<{
295
295
  id: string;
296
296
  createdAt: string;
297
297
  verifiedAt: string;
298
- handle: string;
299
298
  network: "activitypub" | "atproto";
300
299
  actorUri: string;
300
+ handle: string;
301
301
  accountKey: string;
302
302
  host: string;
303
303
  proofMethod: "oauth";
@@ -309,9 +309,9 @@ export declare const serviceLinkedAccountListResponseSchema: z.ZodObject<{
309
309
  id: string;
310
310
  createdAt: string;
311
311
  verifiedAt: string;
312
- handle: string;
313
312
  network: "activitypub" | "atproto";
314
313
  actorUri: string;
314
+ handle: string;
315
315
  accountKey: string;
316
316
  host: string;
317
317
  proofMethod: "oauth";
@@ -323,9 +323,9 @@ export declare const serviceLinkedAccountListResponseSchema: z.ZodObject<{
323
323
  id: string;
324
324
  createdAt: string;
325
325
  verifiedAt: string;
326
- handle: string;
327
326
  network: "activitypub" | "atproto";
328
327
  actorUri: string;
328
+ handle: string;
329
329
  accountKey: string;
330
330
  host: string;
331
331
  proofMethod: "oauth";
@@ -339,3 +339,36 @@ export type ServiceLinkedAccountListResponse = z.infer<typeof serviceLinkedAccou
339
339
  */
340
340
  export declare const LINKED_ACCOUNT_CALLBACK_ERRORS: readonly ["access_denied", "verification_failed", "provider_unavailable"];
341
341
  export type LinkedAccountCallbackError = (typeof LINKED_ACCOUNT_CALLBACK_ERRORS)[number];
342
+ /**
343
+ * Why `POST /linked-accounts/:network/start` refused, as `details.reason` on
344
+ * its 400 (`{ error: 'BAD_REQUEST', message, details: { reason } }`). The
345
+ * message is for logs; show the user a text chosen from the reason.
346
+ *
347
+ * - `instance_invalid`: the ActivityPub `instance` is not a server name.
348
+ * - `instance_unreachable`: the server does not resolve to a public address, or
349
+ * could not be connected to.
350
+ * - `handle_unresolvable`: the atproto handle or DID does not resolve to an
351
+ * account. The only reason that means "check what you typed".
352
+ * - `provider_rejected`: the other network answered and refused Oxy's
353
+ * request — for atproto an authorization-server error such as
354
+ * `invalid_client_metadata`; for a Mastodon-API server a refused app
355
+ * registration (often: not a Mastodon-compatible server). Nothing the user
356
+ * typed is wrong.
357
+ * - `provider_unavailable`: the other network could not be asked right now
358
+ * (its OAuth metadata did not load, a 5xx, a timeout). Try again later.
359
+ *
360
+ * A refusal with no `details.reason` (a bad `returnTo`, a missing field) is a
361
+ * client bug, not something to show.
362
+ */
363
+ export declare const LINKED_ACCOUNT_START_ERROR_REASONS: readonly ["instance_invalid", "instance_unreachable", "handle_unresolvable", "provider_rejected", "provider_unavailable"];
364
+ export type LinkedAccountStartErrorReason = (typeof LINKED_ACCOUNT_START_ERROR_REASONS)[number];
365
+ export declare const linkedAccountStartErrorReasonSchema: z.ZodEnum<["instance_invalid", "instance_unreachable", "handle_unresolvable", "provider_rejected", "provider_unavailable"]>;
366
+ /** The `details` of a start refusal. */
367
+ export declare const linkedAccountStartErrorDetailsSchema: z.ZodObject<{
368
+ reason: z.ZodEnum<["instance_invalid", "instance_unreachable", "handle_unresolvable", "provider_rejected", "provider_unavailable"]>;
369
+ }, "strict", z.ZodTypeAny, {
370
+ reason: "provider_unavailable" | "instance_invalid" | "instance_unreachable" | "handle_unresolvable" | "provider_rejected";
371
+ }, {
372
+ reason: "provider_unavailable" | "instance_invalid" | "instance_unreachable" | "handle_unresolvable" | "provider_rejected";
373
+ }>;
374
+ export type LinkedAccountStartErrorDetails = z.infer<typeof linkedAccountStartErrorDetailsSchema>;
@@ -91,3 +91,29 @@ export declare const createOxyNotificationRequestSchema: z.ZodEffects<z.ZodObjec
91
91
  title?: string | undefined;
92
92
  }>;
93
93
  export type CreateOxyNotificationRequest = z.infer<typeof createOxyNotificationRequestSchema>;
94
+ /**
95
+ * Android notification channel a `system` notification is pushed on — a wire
96
+ * contract, because Android 8+ silently drops a push whose channel the app has
97
+ * not created. Created by the vault (Commons) before it registers its token.
98
+ */
99
+ export declare const OXY_ACCOUNT_PUSH_CHANNEL = "account";
100
+ /** Runtime type discriminator of the push that announces a `system` notification. */
101
+ export declare const OXY_SYSTEM_NOTIFICATION_PUSH_TYPE = "oxy_system_notification";
102
+ /**
103
+ * The ONLY data a `system` notification's push carries: its id. The title and
104
+ * message ride as the push's own title and body; the deep link does NOT travel,
105
+ * because a push payload is untrusted at the receiver. On a tap the vault
106
+ * re-reads the notification from Oxy by id (scoped to the signed-in recipient)
107
+ * and opens the `url` stored there.
108
+ */
109
+ export declare const oxySystemNotificationPushDataSchema: z.ZodObject<{
110
+ type: z.ZodLiteral<"oxy_system_notification">;
111
+ notificationId: z.ZodString;
112
+ }, "strip", z.ZodTypeAny, {
113
+ type: "oxy_system_notification";
114
+ notificationId: string;
115
+ }, {
116
+ type: "oxy_system_notification";
117
+ notificationId: string;
118
+ }>;
119
+ export type OxySystemNotificationPushData = z.infer<typeof oxySystemNotificationPushDataSchema>;