enonic-types
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -135,3 +135,3 @@ declare module "*/lib/xp/auth" { | ||
*/ | ||
scope?: "SESSION" | "REQUEST"; | ||
scope?: "SESSION" | "REQUEST" | "NONE"; | ||
} | ||
@@ -138,0 +138,0 @@ interface LoginResult { |
@@ -7,3 +7,3 @@ declare module "*/lib/xp/context" { | ||
*/ | ||
get(): Context; | ||
get<Attributes extends ContextAttributes>(): Context<Attributes>; | ||
/** | ||
@@ -13,6 +13,7 @@ * Runs a function within a custom context, for instance the one returned by the get() function call. | ||
*/ | ||
run<Result>(runContext: RunContext, f: () => Result): Result; | ||
run<Result, Attributes extends ContextAttributes>(runContext: RunContext<Attributes>, f: () => Result): Result; | ||
} | ||
type ContextAttributes = Record<string, string | boolean | number>; | ||
type PrincipalKey = import("/lib/xp/auth").PrincipalKey; | ||
interface Context { | ||
interface Context<Attributes extends ContextAttributes | undefined> { | ||
/** | ||
@@ -30,2 +31,6 @@ * Repository context. | ||
readonly authInfo: AuthInfo; | ||
/** | ||
* Custom attributes | ||
*/ | ||
readonly attributes: Attributes; | ||
} | ||
@@ -48,3 +53,3 @@ interface AuthInfo { | ||
} | ||
interface RunContext { | ||
interface RunContext<Attributes extends ContextAttributes | undefined> { | ||
/** | ||
@@ -78,5 +83,3 @@ * Repository context. | ||
*/ | ||
attributes?: { | ||
readonly [key: string]: string | boolean | number; | ||
}; | ||
attributes?: Attributes; | ||
} | ||
@@ -83,0 +86,0 @@ } |
@@ -124,3 +124,3 @@ declare module "*/lib/cron" { | ||
} | ||
type CronRunContext = Omit<import("/lib/xp/context").RunContext, "user"> & { | ||
type CronRunContext = Omit<import("/lib/xp/context").RunContext<import("/lib/xp/context").ContextAttributes>, "user"> & { | ||
user?: { | ||
@@ -127,0 +127,0 @@ login?: string; |
@@ -18,10 +18,72 @@ declare module "*/lib/guillotine" { | ||
} | ||
type GraphQLInputObjectType = import("/lib/graphql").GraphQLInputObjectType; | ||
type GraphQLObjectType = import("/lib/graphql").GraphQLObjectType; | ||
type GraphQLEnumType = import("/lib/graphql").GraphQLEnumType; | ||
type GraphQLInterfaceType = import("/lib/graphql").GraphQLInterfaceType; | ||
interface Context<ExecuteContext = import("./types").EmptyObject> { | ||
types: Record<string, import("/lib/graphql").GraphQLType>; | ||
dictionary: Array<unknown>; | ||
types: { | ||
principalKeyType: GraphQLObjectType; | ||
permissionType: GraphQLEnumType; | ||
accessControlEntryType: GraphQLObjectType; | ||
permissionsType: GraphQLObjectType; | ||
urlType: GraphQLEnumType; | ||
formItemTypeType: GraphQLEnumType; | ||
formItemType: GraphQLInterfaceType; | ||
occurrencesType: GraphQLObjectType; | ||
defaultValueType: GraphQLObjectType; | ||
formItemSetType: GraphQLObjectType; | ||
formLayoutType: GraphQLObjectType; | ||
formOptionSetOptionType: GraphQLObjectType; | ||
formOptionSetType: GraphQLObjectType; | ||
formInputType: GraphQLObjectType; | ||
geoPointType: GraphQLObjectType; | ||
mediaFocalPointType: GraphQLObjectType; | ||
mediaUploaderType: GraphQLObjectType; | ||
siteConfiguratorType: GraphQLObjectType; | ||
publishInfoType: GraphQLObjectType; | ||
attachmentType: GraphQLObjectType; | ||
extraDataType: GraphQLObjectType; | ||
iconType: GraphQLObjectType; | ||
contentTypeType: GraphQLObjectType; | ||
contentType: GraphQLInterfaceType; | ||
untypedContentType: GraphQLObjectType; | ||
queryContentConnectionType: GraphQLObjectType; | ||
processHtmlType: GraphQLInputObjectType; | ||
numberRangeInputType: GraphQLInputObjectType; | ||
dateRangeInputType: GraphQLInputObjectType; | ||
geoPointInputType: GraphQLInputObjectType; | ||
termsAggregationInputType: GraphQLInputObjectType; | ||
statsAggregationInputType: GraphQLInputObjectType; | ||
rangeAggregationInputType: GraphQLInputObjectType; | ||
dateRangeAggregationInputType: GraphQLInputObjectType; | ||
dateHistogramAggregationInputType: GraphQLInputObjectType; | ||
geoDistanceAggregationInputType: GraphQLInputObjectType; | ||
minAggregationInputType: GraphQLInputObjectType; | ||
maxAggregationInputType: GraphQLInputObjectType; | ||
valueCountAggregationInputType: GraphQLInputObjectType; | ||
aggregationInputType: GraphQLInputObjectType; | ||
existsFilterInputType: GraphQLInputObjectType; | ||
notExistsFilterInputType: GraphQLInputObjectType; | ||
hasValueFilterInputType: GraphQLInputObjectType; | ||
idsFilterInputType: GraphQLInputObjectType; | ||
booleanFilterInputType: GraphQLInputObjectType; | ||
filterInputType: GraphQLInputObjectType; | ||
imageStyleType: GraphQLObjectType; | ||
imageType: GraphQLObjectType; | ||
richTextType: GraphQLObjectType; | ||
componentTypeType: GraphQLEnumType; | ||
pageComponentDataType: GraphQLObjectType; | ||
layoutComponentDataType: GraphQLObjectType; | ||
partComponentDataType: GraphQLObjectType; | ||
imageComponentDataType: GraphQLObjectType; | ||
textComponentDataType: GraphQLObjectType; | ||
fragmentComponentDataType: GraphQLObjectType; | ||
componentType: GraphQLObjectType; | ||
}; | ||
dictionary: Array<GraphQLObjectType>; | ||
nameCountMap: Record<string, number>; | ||
contentTypeMap: Record<string, unknown>; | ||
contentTypeMap: Record<string, GraphQLObjectType>; | ||
options: ContextOptions<ExecuteContext>; | ||
addDictionaryType(objectType: unknown): void; | ||
putContentTypeType(name: string, objectType: unknown): void; | ||
addDictionaryType(objectType: GraphQLObjectType): void; | ||
putContentTypeType(name: string, objectType: GraphQLObjectType): void; | ||
uniqueName(name: string): string; | ||
@@ -28,0 +90,0 @@ getOption(name: string): ContextOptions<ExecuteContext>; |
{ | ||
"name": "enonic-types", | ||
"sideEffects": false, | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "TypeScript types for Enonic XP", | ||
@@ -27,5 +27,5 @@ "typings": "index.d.ts", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.2.0", | ||
"@typescript-eslint/parser": "^5.2.0", | ||
"eslint": "^8.1.0", | ||
"@typescript-eslint/eslint-plugin": "^5.4.0", | ||
"@typescript-eslint/parser": "^5.4.0", | ||
"eslint": "^8.2.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
@@ -35,4 +35,4 @@ "eslint-plugin-prettier": "^4.0.0", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.4.4" | ||
"typescript": "^4.5.2" | ||
} | ||
} |
@@ -205,5 +205,11 @@ declare module "*/lib/xp/portal" { | ||
* srcset attribute with image URLs generated for specified widths. | ||
* @since 7.7.0 | ||
* @since XP 7.7.0 | ||
*/ | ||
imageWidths?: Array<number>; | ||
/** | ||
* This string is used to set img[sizes]. | ||
* E.g a value can be '(max-width: 960px) 600px' | ||
* @since XP 7.8.0 | ||
*/ | ||
imageSizes: string; | ||
} | ||
@@ -210,0 +216,0 @@ interface MultipartItem { |
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
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
190210
4869