@sanity/types
Advanced tools
Comparing version 3.61.0 to 3.61.1-manifests.18
{ | ||
"name": "@sanity/types", | ||
"version": "3.61.0", | ||
"version": "3.61.1-manifests.18+e5fd3d3bab", | ||
"description": "Type definitions for common Sanity data structures", | ||
@@ -64,3 +64,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "3e10823081dbdcbea5a9acb27bc2369c38b34953" | ||
"gitHead": "e5fd3d3bab3a59b8adc830c0097c0129baf2e423" | ||
} |
@@ -5,2 +5,3 @@ import {type SanityClient} from '@sanity/client' | ||
import {type Path} from '../paths' | ||
import {type BaseSchemaTypeOptions} from '../schema' | ||
@@ -60,3 +61,3 @@ /** @public */ | ||
/** @public */ | ||
export interface ReferenceBaseOptions { | ||
export interface ReferenceBaseOptions extends BaseSchemaTypeOptions { | ||
disableNew?: boolean | ||
@@ -63,0 +64,0 @@ } |
@@ -11,3 +11,8 @@ import {type InsertMenuOptions} from '@sanity/insert-menu' | ||
} from '../schemaDefinition' | ||
import {type BaseSchemaDefinition, type SearchConfiguration, type TitledListValue} from './common' | ||
import { | ||
type BaseSchemaDefinition, | ||
type BaseSchemaTypeOptions, | ||
type SearchConfiguration, | ||
type TitledListValue, | ||
} from './common' | ||
@@ -17,3 +22,3 @@ export type {InsertMenuOptions} | ||
/** @public */ | ||
export interface ArrayOptions<V = unknown> extends SearchConfiguration { | ||
export interface ArrayOptions<V = unknown> extends SearchConfiguration, BaseSchemaTypeOptions { | ||
list?: TitledListValue<V>[] | V[] | ||
@@ -20,0 +25,0 @@ // inferring the array.of value for ArrayDefinition cause too much code-noise and was removed. |
@@ -6,3 +6,3 @@ import {type ComponentType, type ReactNode} from 'react' | ||
import {type ArrayOfType} from './array' | ||
import {type BaseSchemaDefinition} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions} from './common' | ||
import {type ObjectDefinition} from './object' | ||
@@ -13,3 +13,3 @@ | ||
* @public */ | ||
export interface BlockOptions { | ||
export interface BlockOptions extends BaseSchemaTypeOptions { | ||
/** | ||
@@ -16,0 +16,0 @@ * Turn on or off the builtin browser spellchecking. Default is on. |
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions} from './common' | ||
/** @public */ | ||
export interface BooleanOptions { | ||
export interface BooleanOptions extends BaseSchemaTypeOptions { | ||
layout?: 'switch' | 'checkbox' | ||
@@ -8,0 +8,0 @@ } |
@@ -27,2 +27,29 @@ import {type ComponentType, type ReactElement, type ReactNode} from 'react' | ||
/** | ||
* Options for configuring how Sanity Create interfaces with the type or field. | ||
* | ||
* @public | ||
*/ | ||
export interface SanityCreateOptions { | ||
/** Set to true to exclude a type or field from appearing in Sanity Create */ | ||
exclude?: boolean | ||
/** | ||
* A short description of what the type or field is used for. | ||
* Purpose can be used to improve how and when content mapping uses the field. | ||
* */ | ||
purpose?: string | ||
} | ||
/** | ||
* `BaseOptions` applies to all type options. | ||
* | ||
* It can be extended by interface declaration merging in plugins to provide generic options to all types and fields. | ||
* | ||
* @public | ||
* */ | ||
export interface BaseSchemaTypeOptions { | ||
sanityCreate?: SanityCreateOptions | ||
} | ||
/** @public */ | ||
@@ -29,0 +56,0 @@ export interface BaseSchemaDefinition { |
import {type FieldReference} from '../../../validation' | ||
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions} from './common' | ||
/** @public */ | ||
export interface DateOptions { | ||
export interface DateOptions extends BaseSchemaTypeOptions { | ||
dateFormat?: string | ||
@@ -9,0 +9,0 @@ } |
import {type FieldReference} from '../../../validation' | ||
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions} from './common' | ||
/** @public */ | ||
export interface DatetimeOptions { | ||
export interface DatetimeOptions extends BaseSchemaTypeOptions { | ||
dateFormat?: string | ||
@@ -9,0 +9,0 @@ timeFormat?: string |
import {type SanityDocument} from '../../../documents/types' | ||
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty, type SortOrdering} from '../../types' | ||
import {type BaseSchemaTypeOptions} from './common' | ||
import {type ObjectDefinition} from './object' | ||
@@ -12,3 +13,3 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface DocumentOptions {} | ||
export interface DocumentOptions extends BaseSchemaTypeOptions {} | ||
@@ -15,0 +16,0 @@ /** @public */ |
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions} from './common' | ||
@@ -12,3 +12,3 @@ /** @public */ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface EmailOptions {} | ||
export interface EmailOptions extends BaseSchemaTypeOptions {} | ||
@@ -15,0 +15,0 @@ /** @public */ |
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions} from './common' | ||
@@ -40,3 +40,3 @@ /** | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface GeopointOptions {} | ||
export interface GeopointOptions extends BaseSchemaTypeOptions {} | ||
@@ -43,0 +43,0 @@ /** @public */ |
import {type FieldReference} from '../../../validation' | ||
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition, type EnumListProps} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions, type EnumListProps} from './common' | ||
/** @public */ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface NumberOptions extends EnumListProps<number> {} | ||
export interface NumberOptions extends EnumListProps<number>, BaseSchemaTypeOptions {} | ||
@@ -10,0 +10,0 @@ /** @public */ |
@@ -7,2 +7,3 @@ import {type PreviewConfig} from '../../preview' | ||
type BaseSchemaDefinition, | ||
type BaseSchemaTypeOptions, | ||
type FieldGroupDefinition, | ||
@@ -13,3 +14,3 @@ type FieldsetDefinition, | ||
/** @public */ | ||
export interface ObjectOptions { | ||
export interface ObjectOptions extends BaseSchemaTypeOptions { | ||
collapsible?: boolean | ||
@@ -16,0 +17,0 @@ collapsed?: boolean |
@@ -6,3 +6,3 @@ import {type Path} from '../../../paths' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions} from './common' | ||
@@ -20,3 +20,3 @@ /** @public */ | ||
/** @public */ | ||
export interface SlugOptions { | ||
export interface SlugOptions extends BaseSchemaTypeOptions { | ||
source?: string | Path | SlugSourceFn | ||
@@ -23,0 +23,0 @@ maxLength?: number |
import {type FieldReference} from '../../../validation' | ||
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition, type EnumListProps, type SearchConfiguration} from './common' | ||
import { | ||
type BaseSchemaDefinition, | ||
type BaseSchemaTypeOptions, | ||
type EnumListProps, | ||
type SearchConfiguration, | ||
} from './common' | ||
/** @public */ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface StringOptions extends EnumListProps<string>, SearchConfiguration {} | ||
export interface StringOptions | ||
extends EnumListProps<string>, | ||
SearchConfiguration, | ||
BaseSchemaTypeOptions {} | ||
@@ -10,0 +18,0 @@ /** @public */ |
import {type UriValidationOptions} from '../../../validation/types' | ||
import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' | ||
import {type InitialValueProperty} from '../../types' | ||
import {type BaseSchemaDefinition} from './common' | ||
import {type BaseSchemaDefinition, type BaseSchemaTypeOptions} from './common' | ||
@@ -14,3 +14,3 @@ /** @public */ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface UrlOptions {} | ||
export interface UrlOptions extends BaseSchemaTypeOptions {} | ||
@@ -17,0 +17,0 @@ /** @public */ |
@@ -26,2 +26,5 @@ /** @public */ | ||
email?: string | ||
/** global sanity user id */ | ||
sanityUserId?: string | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
403788
7326
1
1