@oxy.so/contracts 4.25.0 → 5.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.
Files changed (40) hide show
  1. package/dist/cjs/client/accountEmail.js +3 -1
  2. package/dist/cjs/client/signIn.js +7 -0
  3. package/dist/cjs/identityLink.js +3 -5
  4. package/dist/cjs/index.js +11 -43
  5. package/dist/cjs/inference/catalogue.js +2 -5
  6. package/dist/cjs/inference/request.js +5 -79
  7. package/dist/cjs/inference/version.js +1 -1
  8. package/dist/cjs/signIn.js +22 -13
  9. package/dist/esm/client/accountEmail.js +3 -1
  10. package/dist/esm/client/signIn.js +7 -0
  11. package/dist/esm/identityLink.js +4 -6
  12. package/dist/esm/index.js +1 -6
  13. package/dist/esm/inference/catalogue.js +0 -3
  14. package/dist/esm/inference/request.js +4 -78
  15. package/dist/esm/inference/version.js +1 -1
  16. package/dist/esm/signIn.js +21 -12
  17. package/dist/types/client/accountEmail.d.ts +3 -1
  18. package/dist/types/client/signIn.d.ts +7 -1
  19. package/dist/types/identityLink.d.ts +32 -13
  20. package/dist/types/index.d.ts +2 -12
  21. package/dist/types/inference/catalogue.d.ts +4 -194
  22. package/dist/types/inference/economics.d.ts +2 -2
  23. package/dist/types/inference/realtime.d.ts +88 -88
  24. package/dist/types/inference/request.d.ts +28 -5055
  25. package/dist/types/inference/routingPolicy.d.ts +16 -16
  26. package/dist/types/inference/streamEvents.d.ts +8 -8
  27. package/dist/types/inference/usage.d.ts +4 -4
  28. package/dist/types/inference/version.d.ts +1 -1
  29. package/dist/types/safety.d.ts +10 -10
  30. package/dist/types/signIn.d.ts +159 -30
  31. package/package.json +1 -1
  32. package/dist/cjs/inference/decisions.js +0 -305
  33. package/dist/cjs/inference/privateAutoExecution.js +0 -153
  34. package/dist/cjs/inference/scopedExecution.js +0 -87
  35. package/dist/esm/inference/decisions.js +0 -299
  36. package/dist/esm/inference/privateAutoExecution.js +0 -149
  37. package/dist/esm/inference/scopedExecution.js +0 -83
  38. package/dist/types/inference/decisions.d.ts +0 -1853
  39. package/dist/types/inference/privateAutoExecution.d.ts +0 -694
  40. package/dist/types/inference/scopedExecution.d.ts +0 -202
@@ -263,10 +263,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
263
263
  accountId: string & z.BRAND<"OxyAccountId">;
264
264
  applicationId: string;
265
265
  };
266
- routingPolicyId: string;
267
- policyVersion: number;
268
266
  dedicatedCapacity: "disabled" | "prefer" | "require";
269
267
  optimiseFor: "price" | "latency" | "throughput" | "balanced";
268
+ routingPolicyId: string;
269
+ policyVersion: number;
270
270
  providerAllowlist: string[];
271
271
  providerDenylist: string[];
272
272
  allowedRegions: string[];
@@ -311,10 +311,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
311
311
  accountId: string;
312
312
  applicationId: string;
313
313
  };
314
- routingPolicyId: string;
315
- policyVersion: number;
316
314
  dedicatedCapacity: "disabled" | "prefer" | "require";
317
315
  optimiseFor: "price" | "latency" | "throughput" | "balanced";
316
+ routingPolicyId: string;
317
+ policyVersion: number;
318
318
  requireZeroDataRetention: boolean;
319
319
  prohibitTrainingOnCustomerData: boolean;
320
320
  oxyHostedOnly: boolean;
@@ -359,10 +359,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
359
359
  accountId: string & z.BRAND<"OxyAccountId">;
360
360
  applicationId: string;
361
361
  };
362
- routingPolicyId: string;
363
- policyVersion: number;
364
362
  dedicatedCapacity: "disabled" | "prefer" | "require";
365
363
  optimiseFor: "price" | "latency" | "throughput" | "balanced";
364
+ routingPolicyId: string;
365
+ policyVersion: number;
366
366
  providerAllowlist: string[];
367
367
  providerDenylist: string[];
368
368
  allowedRegions: string[];
@@ -407,10 +407,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
407
407
  accountId: string;
408
408
  applicationId: string;
409
409
  };
410
- routingPolicyId: string;
411
- policyVersion: number;
412
410
  dedicatedCapacity: "disabled" | "prefer" | "require";
413
411
  optimiseFor: "price" | "latency" | "throughput" | "balanced";
412
+ routingPolicyId: string;
413
+ policyVersion: number;
414
414
  requireZeroDataRetention: boolean;
415
415
  prohibitTrainingOnCustomerData: boolean;
416
416
  oxyHostedOnly: boolean;
@@ -510,8 +510,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
510
510
  }, "strict", z.ZodTypeAny, {
511
511
  provider: string;
512
512
  modelReference: string;
513
- deploymentId: string;
514
513
  regions: string[];
514
+ deploymentId: string;
515
515
  substitution: "same_model";
516
516
  maxFundingTier?: "free" | "credit" | "paid" | undefined;
517
517
  customerProviderCredential?: {
@@ -524,8 +524,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
524
524
  }, {
525
525
  provider: string;
526
526
  modelReference: string;
527
- deploymentId: string;
528
527
  regions: string[];
528
+ deploymentId: string;
529
529
  substitution: "same_model";
530
530
  maxFundingTier?: "free" | "credit" | "paid" | undefined;
531
531
  customerProviderCredential?: {
@@ -566,8 +566,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
566
566
  }, "strict", z.ZodTypeAny, {
567
567
  provider: string;
568
568
  modelReference: string;
569
- deploymentId: string;
570
569
  regions: string[];
570
+ deploymentId: string;
571
571
  substitution: "cross_model";
572
572
  authorizedByPolicy: true;
573
573
  maxFundingTier?: "free" | "credit" | "paid" | undefined;
@@ -581,8 +581,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
581
581
  }, {
582
582
  provider: string;
583
583
  modelReference: string;
584
- deploymentId: string;
585
584
  regions: string[];
585
+ deploymentId: string;
586
586
  substitution: "cross_model";
587
587
  authorizedByPolicy: true;
588
588
  maxFundingTier?: "free" | "credit" | "paid" | undefined;
@@ -596,8 +596,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
596
596
  }>]>, {
597
597
  provider: string;
598
598
  modelReference: string;
599
- deploymentId: string;
600
599
  regions: string[];
600
+ deploymentId: string;
601
601
  substitution: "same_model";
602
602
  maxFundingTier?: "free" | "credit" | "paid" | undefined;
603
603
  customerProviderCredential?: {
@@ -610,8 +610,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
610
610
  } | {
611
611
  provider: string;
612
612
  modelReference: string;
613
- deploymentId: string;
614
613
  regions: string[];
614
+ deploymentId: string;
615
615
  substitution: "cross_model";
616
616
  authorizedByPolicy: true;
617
617
  maxFundingTier?: "free" | "credit" | "paid" | undefined;
@@ -625,8 +625,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
625
625
  }, {
626
626
  provider: string;
627
627
  modelReference: string;
628
- deploymentId: string;
629
628
  regions: string[];
629
+ deploymentId: string;
630
630
  substitution: "same_model";
631
631
  maxFundingTier?: "free" | "credit" | "paid" | undefined;
632
632
  customerProviderCredential?: {
@@ -639,8 +639,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
639
639
  } | {
640
640
  provider: string;
641
641
  modelReference: string;
642
- deploymentId: string;
643
642
  regions: string[];
643
+ deploymentId: string;
644
644
  substitution: "cross_model";
645
645
  authorizedByPolicy: true;
646
646
  maxFundingTier?: "free" | "credit" | "paid" | undefined;
@@ -46,8 +46,8 @@ export declare const inferenceStreamStartEventSchema: z.ZodObject<{
46
46
  requestId: string;
47
47
  resolvedModelReference: string;
48
48
  servingProvider: string;
49
- startedAt: string;
50
49
  sequence: number;
50
+ startedAt: string;
51
51
  generationId?: string | undefined;
52
52
  }, {
53
53
  type: "start";
@@ -55,8 +55,8 @@ export declare const inferenceStreamStartEventSchema: z.ZodObject<{
55
55
  requestId: string;
56
56
  resolvedModelReference: string;
57
57
  servingProvider: string;
58
- startedAt: string;
59
58
  sequence: number;
59
+ startedAt: string;
60
60
  generationId?: string | undefined;
61
61
  }>;
62
62
  /**
@@ -225,23 +225,23 @@ export declare const inferenceStreamUsageEventSchema: z.ZodObject<{
225
225
  schemaVersion: 2;
226
226
  requestId: string;
227
227
  deploymentId: string;
228
+ sequence: number;
228
229
  units: {
229
230
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
230
231
  quantity: number;
231
232
  }[];
232
233
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
233
- sequence: number;
234
234
  }, {
235
235
  type: "usage";
236
236
  schemaVersion: 2;
237
237
  requestId: string;
238
238
  deploymentId: string;
239
+ sequence: number;
239
240
  units: {
240
241
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
241
242
  quantity: number;
242
243
  }[];
243
244
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
244
- sequence: number;
245
245
  }>;
246
246
  /**
247
247
  * What kind of re-route happened.
@@ -609,8 +609,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
609
609
  requestId: string;
610
610
  resolvedModelReference: string;
611
611
  servingProvider: string;
612
- startedAt: string;
613
612
  sequence: number;
613
+ startedAt: string;
614
614
  generationId?: string | undefined;
615
615
  }, {
616
616
  type: "start";
@@ -618,8 +618,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
618
618
  requestId: string;
619
619
  resolvedModelReference: string;
620
620
  servingProvider: string;
621
- startedAt: string;
622
621
  sequence: number;
622
+ startedAt: string;
623
623
  generationId?: string | undefined;
624
624
  }>, z.ZodObject<{
625
625
  /** See `version.ts`: each stream event is a whole message on the wire. */
@@ -730,23 +730,23 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
730
730
  schemaVersion: 2;
731
731
  requestId: string;
732
732
  deploymentId: string;
733
+ sequence: number;
733
734
  units: {
734
735
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
735
736
  quantity: number;
736
737
  }[];
737
738
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
738
- sequence: number;
739
739
  }, {
740
740
  type: "usage";
741
741
  schemaVersion: 2;
742
742
  requestId: string;
743
743
  deploymentId: string;
744
+ sequence: number;
744
745
  units: {
745
746
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
746
747
  quantity: number;
747
748
  }[];
748
749
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
749
- sequence: number;
750
750
  }>, z.ZodObject<{
751
751
  /** See `version.ts`: each stream event is a whole message on the wire. */
752
752
  schemaVersion: z.ZodLiteral<1>;
@@ -517,13 +517,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
517
517
  };
518
518
  deploymentId: string;
519
519
  completedAt: string;
520
+ startedAt: string;
520
521
  units: {
521
522
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
522
523
  quantity: number;
523
524
  }[];
524
525
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
525
526
  routeSwitches: number;
526
- startedAt: string;
527
527
  generationId?: string | undefined;
528
528
  fundingTier?: "free" | "credit" | "paid" | undefined;
529
529
  timeToFirstTokenMs?: number | undefined;
@@ -549,13 +549,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
549
549
  };
550
550
  deploymentId: string;
551
551
  completedAt: string;
552
+ startedAt: string;
552
553
  units: {
553
554
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
554
555
  quantity: number;
555
556
  }[];
556
557
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
557
558
  routeSwitches: number;
558
- startedAt: string;
559
559
  generationId?: string | undefined;
560
560
  fundingTier?: "free" | "credit" | "paid" | undefined;
561
561
  timeToFirstTokenMs?: number | undefined;
@@ -581,13 +581,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
581
581
  };
582
582
  deploymentId: string;
583
583
  completedAt: string;
584
+ startedAt: string;
584
585
  units: {
585
586
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
586
587
  quantity: number;
587
588
  }[];
588
589
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
589
590
  routeSwitches: number;
590
- startedAt: string;
591
591
  generationId?: string | undefined;
592
592
  fundingTier?: "free" | "credit" | "paid" | undefined;
593
593
  timeToFirstTokenMs?: number | undefined;
@@ -613,13 +613,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
613
613
  };
614
614
  deploymentId: string;
615
615
  completedAt: string;
616
+ startedAt: string;
616
617
  units: {
617
618
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds" | "input_transcription_milliseconds";
618
619
  quantity: number;
619
620
  }[];
620
621
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
621
622
  routeSwitches: number;
622
- startedAt: string;
623
623
  generationId?: string | undefined;
624
624
  fundingTier?: "free" | "credit" | "paid" | undefined;
625
625
  timeToFirstTokenMs?: number | undefined;
@@ -99,4 +99,4 @@
99
99
  * change to, say, the catalogue reject every in-flight inference request; the
100
100
  * per-shape `schemaVersion` is what a message is validated against.
101
101
  */
102
- export declare const INFERENCE_CONTRACT_VERSION = "3.9.0";
102
+ export declare const INFERENCE_CONTRACT_VERSION = "4.0.0";
@@ -278,6 +278,7 @@ export declare const publicationPoliciesResponseSchema: z.ZodObject<{
278
278
  federationAllowed: boolean;
279
279
  }>;
280
280
  }, "strict", z.ZodTypeAny, {
281
+ authorAccountId: string;
281
282
  policy: {
282
283
  policyVersion: "2";
283
284
  publicationAllowed: boolean;
@@ -285,8 +286,8 @@ export declare const publicationPoliciesResponseSchema: z.ZodObject<{
285
286
  collaborationAllowed: boolean;
286
287
  federationAllowed: boolean;
287
288
  };
288
- authorAccountId: string;
289
289
  }, {
290
+ authorAccountId: string;
290
291
  policy: {
291
292
  policyVersion: "2";
292
293
  publicationAllowed: boolean;
@@ -294,10 +295,10 @@ export declare const publicationPoliciesResponseSchema: z.ZodObject<{
294
295
  collaborationAllowed: boolean;
295
296
  federationAllowed: boolean;
296
297
  };
297
- authorAccountId: string;
298
298
  }>, "many">;
299
299
  }, "strict", z.ZodTypeAny, {
300
300
  items: {
301
+ authorAccountId: string;
301
302
  policy: {
302
303
  policyVersion: "2";
303
304
  publicationAllowed: boolean;
@@ -305,10 +306,10 @@ export declare const publicationPoliciesResponseSchema: z.ZodObject<{
305
306
  collaborationAllowed: boolean;
306
307
  federationAllowed: boolean;
307
308
  };
308
- authorAccountId: string;
309
309
  }[];
310
310
  }, {
311
311
  items: {
312
+ authorAccountId: string;
312
313
  policy: {
313
314
  policyVersion: "2";
314
315
  publicationAllowed: boolean;
@@ -316,7 +317,6 @@ export declare const publicationPoliciesResponseSchema: z.ZodObject<{
316
317
  collaborationAllowed: boolean;
317
318
  federationAllowed: boolean;
318
319
  };
319
- authorAccountId: string;
320
320
  }[];
321
321
  }>;
322
322
  export type PublicationPoliciesInput = z.infer<typeof publicationPoliciesInputSchema>;
@@ -1481,7 +1481,6 @@ export declare const reservePurchaseSchema: z.ZodEffects<z.ZodObject<{
1481
1481
  resourceId: string;
1482
1482
  currency: string;
1483
1483
  operationId: string;
1484
- approvalId: string;
1485
1484
  summary: string;
1486
1485
  cartFingerprint: string;
1487
1486
  merchantAccountIds: string[];
@@ -1500,12 +1499,12 @@ export declare const reservePurchaseSchema: z.ZodEffects<z.ZodObject<{
1500
1499
  roundingAdjustmentMinor: number;
1501
1500
  paymentFingerprint: string;
1502
1501
  amountMinor: number;
1502
+ approvalId: string;
1503
1503
  }, {
1504
1504
  expiresAt: string;
1505
1505
  resourceId: string;
1506
1506
  currency: string;
1507
1507
  operationId: string;
1508
- approvalId: string;
1509
1508
  summary: string;
1510
1509
  cartFingerprint: string;
1511
1510
  merchantAccountIds: string[];
@@ -1524,12 +1523,12 @@ export declare const reservePurchaseSchema: z.ZodEffects<z.ZodObject<{
1524
1523
  roundingAdjustmentMinor: number;
1525
1524
  paymentFingerprint: string;
1526
1525
  amountMinor: number;
1526
+ approvalId: string;
1527
1527
  }>, {
1528
1528
  expiresAt: string;
1529
1529
  resourceId: string;
1530
1530
  currency: string;
1531
1531
  operationId: string;
1532
- approvalId: string;
1533
1532
  summary: string;
1534
1533
  cartFingerprint: string;
1535
1534
  merchantAccountIds: string[];
@@ -1548,12 +1547,12 @@ export declare const reservePurchaseSchema: z.ZodEffects<z.ZodObject<{
1548
1547
  roundingAdjustmentMinor: number;
1549
1548
  paymentFingerprint: string;
1550
1549
  amountMinor: number;
1550
+ approvalId: string;
1551
1551
  }, {
1552
1552
  expiresAt: string;
1553
1553
  resourceId: string;
1554
1554
  currency: string;
1555
1555
  operationId: string;
1556
- approvalId: string;
1557
1556
  summary: string;
1558
1557
  cartFingerprint: string;
1559
1558
  merchantAccountIds: string[];
@@ -1572,6 +1571,7 @@ export declare const reservePurchaseSchema: z.ZodEffects<z.ZodObject<{
1572
1571
  roundingAdjustmentMinor: number;
1573
1572
  paymentFingerprint: string;
1574
1573
  amountMinor: number;
1574
+ approvalId: string;
1575
1575
  }>;
1576
1576
  export type PurchaseApprovalLine = z.infer<typeof purchaseApprovalLineSchema>;
1577
1577
  export type PurchaseApprovalSummary = z.infer<typeof purchaseApprovalSummarySchema>;
@@ -1582,12 +1582,12 @@ export declare const confirmPurchaseSchema: z.ZodObject<{
1582
1582
  receiptReference: z.ZodString;
1583
1583
  }, "strict", z.ZodTypeAny, {
1584
1584
  operationId: string;
1585
- approvalId: string;
1586
1585
  receiptReference: string;
1586
+ approvalId: string;
1587
1587
  }, {
1588
1588
  operationId: string;
1589
- approvalId: string;
1590
1589
  receiptReference: string;
1590
+ approvalId: string;
1591
1591
  }>;
1592
1592
  export declare const cancelPurchaseSchema: z.ZodObject<Omit<{
1593
1593
  approvalId: z.ZodString;
@@ -402,11 +402,11 @@ export declare const emailSignInChooseRequestSchema: z.ZodObject<{
402
402
  export type EmailSignInChooseRequest = z.infer<typeof emailSignInChooseRequestSchema>;
403
403
  /** `POST /users/me/reauth/email` */
404
404
  export declare const reauthEmailStartRequestSchema: z.ZodObject<{
405
- action: z.ZodEnum<["change_password", "totp", "link_commons", "delete_account", "credentials_manage", "supervision", "supervision_purchase"]>;
405
+ action: z.ZodEnum<["change_password", "change_email", "totp", "link_commons", "delete_account", "credentials_manage", "supervision", "supervision_purchase"]>;
406
406
  }, "strict", z.ZodTypeAny, {
407
- action: "change_password" | "totp" | "link_commons" | "delete_account" | "credentials_manage" | "supervision" | "supervision_purchase";
407
+ action: "change_password" | "change_email" | "totp" | "link_commons" | "delete_account" | "credentials_manage" | "supervision" | "supervision_purchase";
408
408
  }, {
409
- action: "change_password" | "totp" | "link_commons" | "delete_account" | "credentials_manage" | "supervision" | "supervision_purchase";
409
+ action: "change_password" | "change_email" | "totp" | "link_commons" | "delete_account" | "credentials_manage" | "supervision" | "supervision_purchase";
410
410
  }>;
411
411
  export type ReauthEmailStartRequest = z.infer<typeof reauthEmailStartRequestSchema>;
412
412
  /**
@@ -459,33 +459,6 @@ export declare const reauthProofSchema: z.ZodEffects<z.ZodObject<{
459
459
  totpCode?: string | undefined;
460
460
  }>;
461
461
  export type ReauthProof = z.infer<typeof reauthProofSchema>;
462
- /** A proof by email code only (+ TOTP): deleting an account, linking Commons. */
463
- export declare const emailReauthProofSchema: z.ZodObject<{
464
- emailCode: z.ZodObject<{
465
- verificationId: z.ZodString;
466
- code: z.ZodString;
467
- }, "strict", z.ZodTypeAny, {
468
- code: string;
469
- verificationId: string;
470
- }, {
471
- code: string;
472
- verificationId: string;
473
- }>;
474
- totpCode: z.ZodOptional<z.ZodString>;
475
- }, "strict", z.ZodTypeAny, {
476
- emailCode: {
477
- code: string;
478
- verificationId: string;
479
- };
480
- totpCode?: string | undefined;
481
- }, {
482
- emailCode: {
483
- code: string;
484
- verificationId: string;
485
- };
486
- totpCode?: string | undefined;
487
- }>;
488
- export type EmailReauthProof = z.infer<typeof emailReauthProofSchema>;
489
462
  /** `PUT /users/me/password` — set or change the password. */
490
463
  export declare const passwordSetRequestSchema: z.ZodObject<{
491
464
  newPassword: z.ZodString;
@@ -558,6 +531,162 @@ export declare const passwordSetRequestSchema: z.ZodObject<{
558
531
  revokeOtherSessions?: boolean | undefined;
559
532
  }>;
560
533
  export type PasswordSetRequest = z.infer<typeof passwordSetRequestSchema>;
534
+ /**
535
+ * `DELETE /users/me/password` — only while the account has an email to sign
536
+ * in with; `DELETE /users/me/email` — only while it has a password, and
537
+ * confirmed with that password.
538
+ */
539
+ export declare const signInMethodRemoveRequestSchema: z.ZodObject<{
540
+ reauth: z.ZodEffects<z.ZodObject<{
541
+ password: z.ZodOptional<z.ZodString>;
542
+ emailCode: z.ZodOptional<z.ZodObject<{
543
+ verificationId: z.ZodString;
544
+ code: z.ZodString;
545
+ }, "strict", z.ZodTypeAny, {
546
+ code: string;
547
+ verificationId: string;
548
+ }, {
549
+ code: string;
550
+ verificationId: string;
551
+ }>>;
552
+ /** Required when the account has an authenticator: its code or a backup code. */
553
+ totpCode: z.ZodOptional<z.ZodString>;
554
+ }, "strict", z.ZodTypeAny, {
555
+ password?: string | undefined;
556
+ emailCode?: {
557
+ code: string;
558
+ verificationId: string;
559
+ } | undefined;
560
+ totpCode?: string | undefined;
561
+ }, {
562
+ password?: string | undefined;
563
+ emailCode?: {
564
+ code: string;
565
+ verificationId: string;
566
+ } | undefined;
567
+ totpCode?: string | undefined;
568
+ }>, {
569
+ password?: string | undefined;
570
+ emailCode?: {
571
+ code: string;
572
+ verificationId: string;
573
+ } | undefined;
574
+ totpCode?: string | undefined;
575
+ }, {
576
+ password?: string | undefined;
577
+ emailCode?: {
578
+ code: string;
579
+ verificationId: string;
580
+ } | undefined;
581
+ totpCode?: string | undefined;
582
+ }>;
583
+ }, "strict", z.ZodTypeAny, {
584
+ reauth: {
585
+ password?: string | undefined;
586
+ emailCode?: {
587
+ code: string;
588
+ verificationId: string;
589
+ } | undefined;
590
+ totpCode?: string | undefined;
591
+ };
592
+ }, {
593
+ reauth: {
594
+ password?: string | undefined;
595
+ emailCode?: {
596
+ code: string;
597
+ verificationId: string;
598
+ } | undefined;
599
+ totpCode?: string | undefined;
600
+ };
601
+ }>;
602
+ export type SignInMethodRemoveRequest = z.infer<typeof signInMethodRemoveRequestSchema>;
603
+ /** `POST /users/me/email/verify/start` — a code to the address the account moves to. */
604
+ export declare const emailChangeStartRequestSchema: z.ZodObject<{
605
+ email: z.ZodString;
606
+ }, "strict", z.ZodTypeAny, {
607
+ email: string;
608
+ }, {
609
+ email: string;
610
+ }>;
611
+ export type EmailChangeStartRequest = z.infer<typeof emailChangeStartRequestSchema>;
612
+ /**
613
+ * `PUT /users/me/email` — add or change the email: the NEW address and the
614
+ * code it got (`verificationId`, `code`), and the proof it is the person (the
615
+ * password, or a code to the current email; plus the authenticator's).
616
+ */
617
+ export declare const emailSetRequestSchema: z.ZodObject<{
618
+ email: z.ZodString;
619
+ verificationId: z.ZodString;
620
+ code: z.ZodString;
621
+ reauth: z.ZodEffects<z.ZodObject<{
622
+ password: z.ZodOptional<z.ZodString>;
623
+ emailCode: z.ZodOptional<z.ZodObject<{
624
+ verificationId: z.ZodString;
625
+ code: z.ZodString;
626
+ }, "strict", z.ZodTypeAny, {
627
+ code: string;
628
+ verificationId: string;
629
+ }, {
630
+ code: string;
631
+ verificationId: string;
632
+ }>>;
633
+ /** Required when the account has an authenticator: its code or a backup code. */
634
+ totpCode: z.ZodOptional<z.ZodString>;
635
+ }, "strict", z.ZodTypeAny, {
636
+ password?: string | undefined;
637
+ emailCode?: {
638
+ code: string;
639
+ verificationId: string;
640
+ } | undefined;
641
+ totpCode?: string | undefined;
642
+ }, {
643
+ password?: string | undefined;
644
+ emailCode?: {
645
+ code: string;
646
+ verificationId: string;
647
+ } | undefined;
648
+ totpCode?: string | undefined;
649
+ }>, {
650
+ password?: string | undefined;
651
+ emailCode?: {
652
+ code: string;
653
+ verificationId: string;
654
+ } | undefined;
655
+ totpCode?: string | undefined;
656
+ }, {
657
+ password?: string | undefined;
658
+ emailCode?: {
659
+ code: string;
660
+ verificationId: string;
661
+ } | undefined;
662
+ totpCode?: string | undefined;
663
+ }>;
664
+ }, "strict", z.ZodTypeAny, {
665
+ code: string;
666
+ email: string;
667
+ reauth: {
668
+ password?: string | undefined;
669
+ emailCode?: {
670
+ code: string;
671
+ verificationId: string;
672
+ } | undefined;
673
+ totpCode?: string | undefined;
674
+ };
675
+ verificationId: string;
676
+ }, {
677
+ code: string;
678
+ email: string;
679
+ reauth: {
680
+ password?: string | undefined;
681
+ emailCode?: {
682
+ code: string;
683
+ verificationId: string;
684
+ } | undefined;
685
+ totpCode?: string | undefined;
686
+ };
687
+ verificationId: string;
688
+ }>;
689
+ export type EmailSetRequest = z.infer<typeof emailSetRequestSchema>;
561
690
  /** `GET /users/me/sign-in-methods` */
562
691
  export interface SignInMethods {
563
692
  hasEmail: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/contracts",
3
- "version": "4.25.0",
3
+ "version": "5.1.0",
4
4
  "description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",