@sanity/types 6.12.1-next.1 → 6.13.0-next.17

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 (2) hide show
  1. package/lib/index.d.ts +6 -12
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -155,6 +155,7 @@ interface CurrentUser {
155
155
  email: string;
156
156
  profileImage?: string;
157
157
  provider?: string;
158
+ sanityUserId?: string | null;
158
159
  /** @deprecated use `roles` instead */
159
160
  role: string;
160
161
  roles: Role[];
@@ -170,6 +171,7 @@ interface User {
170
171
  displayName?: string;
171
172
  imageUrl?: string;
172
173
  email?: string;
174
+ sanityUserId?: string;
173
175
  }
174
176
  /** @public */
175
177
  interface ValidationMarker {
@@ -407,18 +409,7 @@ interface Rule {
407
409
  reference(): Rule;
408
410
  fields(rules: FieldRules): Rule;
409
411
  assetRequired(): Rule;
410
- validate(value: unknown, options: ValidationContext & {
411
- /**
412
- * @deprecated Internal use only
413
- * @internal
414
- */
415
- __internal?: {
416
- customValidationConcurrencyLimiter?: {
417
- ready: () => Promise<void>;
418
- release: () => void;
419
- };
420
- };
421
- }): Promise<ValidationMarker[]>;
412
+ validate(value: unknown, options: ValidationContext): Promise<ValidationMarker[]>;
422
413
  }
423
414
  /** @public */
424
415
  type RuleSpec = {
@@ -530,8 +521,11 @@ interface ValidationContext {
530
521
  path?: Path;
531
522
  getDocumentExists?: (options: {
532
523
  id: string;
524
+ signal?: AbortSignal;
533
525
  }) => Promise<boolean>;
534
526
  environment: 'cli' | 'studio';
527
+ /** Signal used to cancel validation and any work it starts. */
528
+ signal?: AbortSignal;
535
529
  /**
536
530
  * Whether this field is hidden for any reason (either itself or any of its ancestors).
537
531
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/types",
3
- "version": "6.12.1-next.1",
3
+ "version": "6.13.0-next.17",
4
4
  "description": "Type definitions for common Sanity data structures",
5
5
  "keywords": [
6
6
  "cms",