正在載入此比較的其餘部分。

schema-dts v2.1.0 vs 2.0.0

建立於 差異永不過期
0 刪除
303 行
0 新增
303 行
import type { JsonLdObject, IdReference, MergeLeafTypes } from "schema-dts-lib";
import type { JsonLdObject, IdReference, MergeLeafTypes } from "schema-dts-lib";
export type { JsonLdObject, IdReference, MergeLeafTypes };
export type { JsonLdObject, IdReference, MergeLeafTypes };
/** Used at the top-level node to indicate the context for the JSON-LD objects used. The context provided in this type is compatible with the keys and URLs in the rest of this generated file. */
/** Used at the top-level node to indicate the context for the JSON-LD objects used. The context provided in this type is compatible with the keys and URLs in the rest of this generated file. */
export type WithContext<T extends JsonLdObject | string> = T & {
export type WithContext<T extends JsonLdObject | string> = T & {
"@context": "https://schema.org";
"@context": "https://schema.org";
};
};
export interface Graph {
export interface Graph {
"@context": "https://schema.org";
"@context": "https://schema.org";
"@graph": readonly Thing[];
"@graph": readonly Thing[];
}
}
type SchemaValue<T, TProperty extends string> = T | Role<T, TProperty> | readonly (T | Role<T, TProperty>)[];
type SchemaValue<T, TProperty extends string> = T | Role<T, TProperty> | readonly (T | Role<T, TProperty>)[];
type InputActionConstraints<T extends ActionBase> = Partial<{
type InputActionConstraints<T extends ActionBase> = Partial<{
[K in Exclude<keyof T, `@${string}`> as `${string & K}-input`]: PropertyValueSpecification | string;
[K in Exclude<keyof T, `@${string}`> as `${string & K}-input`]: PropertyValueSpecification | string;
}>;
}>;
type OutputActionConstraints<T extends ActionBase> = Partial<{
type OutputActionConstraints<T extends ActionBase> = Partial<{
[K in Exclude<keyof T, `@${string}`> as `${string & K}-output`]: PropertyValueSpecification | string;
[K in Exclude<keyof T, `@${string}`> as `${string & K}-output`]: PropertyValueSpecification | string;
}>;
}>;
/** Provides input and output action constraints for an action. */
/** Provides input and output action constraints for an action. */
export type WithActionConstraints<T extends ActionBase> = T & InputActionConstraints<T> & OutputActionConstraints<T>;
export type WithActionConstraints<T extends ActionBase> = T & InputActionConstraints<T> & OutputActionConstraints<T>;
/** Boolean: True or False. */
/** Boolean: True or False. */
export type Boolean = "https://schema.org/False" | "False" | "https://schema.org/True" | "True" | boolean;
export type Boolean = "https://schema.org/False" | "False" | "https://schema.org/True" | "True" | boolean;
/** A date value in {@link http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 date format}. */
/** A date value in {@link http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 date format}. */
export type Date = string;
export type Date = string;
/** A combination of date and time of day in the form [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm] (see Chapter 5.4 of ISO 8601). */
/** A combination of date and time of day in the form [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm] (see Chapter 5.4 of ISO 8601). */
export type DateTime = string;
export type DateTime = string;
interface EmployeeRoleBase extends OrganizationRoleBase {
interface EmployeeRoleBase extends OrganizationRoleBase {
/** The base salary of the job or of an employee in an EmployeeRole. */
/** The base salary of the job or of an employee in an EmployeeRole. */
"baseSalary"?: SchemaValue<MonetaryAmount | Number | PriceSpecification | IdReference, "baseSalary">;
"baseSalary"?: SchemaValue<MonetaryAmount | Number | PriceSpecification | IdReference, "baseSalary">;
/** The currency (coded using {@link http://en.wikipedia.org/wiki/ISO_4217 ISO 4217}) used for the main salary information in this job posting or for this employee. */
/** The currency (coded using {@link http://en.wikipedia.org/wiki/ISO_4217 ISO 4217}) used for the main salary information in this job posting or for this employee. */
"salaryCurrency"?: SchemaValue<Text, "salaryCurrency">;
"salaryCurrency"?: SchemaValue<Text, "salaryCurrency">;
}
}
export type EmployeeRoleLeaf<TContent, TProperty extends string> = Omit<EmployeeRoleBase, TProperty> & {
export type EmployeeRoleLeaf<TContent, TProperty extends string> = Omit<EmployeeRoleBase, TProperty> & {
"@type": "EmployeeRole";
"@type": "EmployeeRole";
} & {
} & {
[key in TProperty]: TContent;
[key in TProperty]: TContent;
};
};
/** A subclass of OrganizationRole used to describe employee relationships. */
/** A subclass of OrganizationRole used to describe employee relationships. */
export type EmployeeRole<TContent = never, TProperty extends string = never> = EmployeeRoleLeaf<TContent, TProperty>;
export type EmployeeRole<TContent = never, TProperty extends string = never> = EmployeeRoleLeaf<TContent, TProperty>;
interface LinkRoleBase extends RoleBase {
interface LinkRoleBase extends RoleBase {
/** The language of the content or performance or used in an action. Please use one of the language codes from the {@link http://tools.ietf.org/html/bcp47 IETF BCP 47 standard}. See also {@link https://schema.org/availableLanguage availableLanguage}. */
/** The language of the content or performance or used in an action. Please use one of the language codes from the {@link http://tools.ietf.org/html/bcp47 IETF BCP 47 standard}. See also {@link https://schema.org/availableLanguage availableLanguage}. */
"inLanguage"?: SchemaValue<Language | Text | IdReference, "inLanguage">;
"inLanguage"?: SchemaValue<Language | Text | IdReference, "inLanguage">;
/** Indicates the relationship type of a Web link. */
/** Indicates the relationship type of a Web link. */
"linkRelationship"?: SchemaValue<Text, "linkRelationship">;
"linkRelationship"?: SchemaValue<Text, "linkRelationship">;
}
}
export type LinkRoleLeaf<TContent, TProperty extends string> = Omit<LinkRoleBase, TProperty> & {
export type LinkRoleLeaf<TContent, TProperty extends string> = Omit<LinkRoleBase, TProperty> & {
"@type": "LinkRole";
"@type": "LinkRole";
} & {
} & {
[key in TProperty]: TContent;
[key in TProperty]: TContent;
};
};
/** A Role that represents a Web link, e.g. as expressed via the 'url' property. Its linkRelationship property can indicate URL-based and plain textual link types, e.g. those in IANA link registry or others such as 'amphtml'. This structure provides a placeholder where details from HTML's link element can be represented outside of HTML, e.g. in JSON-LD feeds. */
/** A Role that represents a Web link, e.g. as expressed via the 'url' property. Its linkRelationship property can indicate URL-based and plain textual link types, e.g. those in IANA link registry or others such as 'amphtml'. This structure provides a placeholder where details from HTML's link element can be represented outside of HTML, e.g. in JSON-LD feeds. */
export type LinkRole<TContent = never, TProperty extends string = never> = LinkRoleLeaf<TContent, TProperty>;
export type LinkRole<TContent = never, TProperty extends string = never> = LinkRoleLeaf<TContent, TProperty>;
/**
/**
* Data type: Number.
* Data type: Number.
*
*
* Usage guidelines:
* Usage guidelines:
* - Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
* - Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
* - Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
* - Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
*/
*/
export type Number = Float | Integer | number | `${number}`;
export type Number = Float | Integer | number | `${number}`;
interface OrganizationRoleBase extends RoleBase {
interface OrganizationRoleBase extends RoleBase {
/** A number associated with a role in an organization, for example, the number on an athlete's jersey. */
/** A number associated with a role in an organization, for example, the number on an athlete's jersey. */
"numberedPosition"?: SchemaValue<Number, "numberedPosition">;
"numberedPosition"?: SchemaValue<Number, "numberedPosition">;
}
}
export type OrganizationRoleLeaf<TContent, TProperty extends string> = Omit<OrganizationRoleBase, TProperty> & {
export type OrganizationRoleLeaf<TContent, TProperty extends string> = Omit<OrganizationRoleBase, TProperty> & {
"@type": "OrganizationRole";
"@type": "OrganizationRole";
} & {
} & {
[key in TProperty]: TContent;
[key in TProperty]: TContent;
};
};
/** A subclass of Role used to describe roles within organizations. */
/** A subclass of Role used to describe roles within organizations. */
export type OrganizationRole<TContent = never, TProperty extends string = never> = OrganizationRoleLeaf<TContent, TProperty> | EmployeeRole<TContent, TProperty>;
export type OrganizationRole<TContent = never, TProperty extends string = never> = OrganizationRoleLeaf<TContent, TProperty> | EmployeeRole<TContent, TProperty>;
interface PerformanceRoleBase extends RoleBase {
interface PerformanceRoleBase extends RoleBase {
/** The name of a character played in some acting or performing role, i.e. in a PerformanceRole. */
/** The name of a character played in some acting or performing role, i.e. in a PerformanceRole. */
"characterName"?: SchemaValue<Text, "characterName">;
"characterName"?: SchemaValue<Text, "characterName">;
}
}
export type PerformanceRoleLeaf<TContent, TProperty extends string> = Omit<PerformanceRoleBase, TProperty> & {
export type PerformanceRoleLeaf<TContent, TProperty extends string> = Omit<PerformanceRoleBase, TProperty> & {
"@type": "PerformanceRole";
"@type": "PerformanceRole";
} & {
} & {
[key in TProperty]: TContent;
[key in TProperty]: TContent;
};
};
/** A PerformanceRole is a Role that some entity places with regard to a theatrical performance, e.g. in a Movie, TVSeries etc. */
/** A PerformanceRole is a Role that some entity places with regard to a theatrical performance, e.g. in a Movie, TVSeries etc. */
export type PerformanceRole<TContent = never, TProperty extends string = never> = PerformanceRoleLeaf<TContent, TProperty>;
export type PerformanceRole<TContent = never, TProperty extends string = never> = PerformanceRoleLeaf<TContent, TProperty>;
/** Quantities such as distance, time, mass, weight, etc. Particular instances of say Mass are strings like '3 kg' or '4 milligrams'. */
/** Quantities such as distance, time, mass, weight, etc. Particular instances of say Mass are strings like '3 kg' or '4 milligrams'. */
export type Quantity = Distance | Duration | Energy | Mass | string;
export type Quantity = Distance | Duration | Energy | Mass | string;
interface RoleBase extends ThingBase {
interface RoleBase extends ThingBase {
/** The end date and time of the item (in {@link http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 date format}). */
/** The end date and time of the item (in {@link http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 date format}). */
"endDate"?: SchemaValue<Date | DateTime, "endDate">;
"endDate"?: SchemaValue<Date | DateTime, "endDate">;
/**
/**
* A position played, performed or filled by a person or organization, as part of an organization. For example, an athlete in a SportsTeam might play in the position named 'Quarterback'.
* A position played, performed or filled by a person or organization, as part of an organization. For example, an athlete in a SportsTeam might play in the position named 'Quarterback'.
*
*
* @deprecated Consider using https://schema.org/roleName instead.
* @deprecated Consider using https://schema.org/roleName instead.
*/
*/
"namedPosition"?: SchemaValue<Text | URL, "namedPosition">;
"namedPosition"?: SchemaValue<Text | URL, "namedPosition">;
/** A role played, performed or filled by a person or organization. For example, the team of creators for a comic book might fill the roles named 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might play in the position named 'Quarterback'. */
/** A role played, performed or filled by a person or organization. For example, the team of creators for a comic book might fill the roles named 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might play in the position named 'Quarterback'. */
"roleName"?: SchemaValue<Text | URL, "roleName">;
"roleName"?: SchemaValue<Text | URL, "roleName">;
/** The start date and time of the item (in {@link http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 date format}). */
/** The start date and time of the item (in {@link http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 date format}). */
"startDate"?: SchemaValue<Date | DateTime, "startDate">;
"startDate"?: SchemaValue<Date | DateTime, "startDate">;
}
}
export type RoleLeaf<TContent, TProperty extends string> = Omit<RoleBase, TProperty> & {
export type RoleLeaf<TContent, TProperty extends string> = Omit<RoleBase, TProperty> & {
"@type": "Role";
"@type": "Role";
} & {
} & {