@wix/sdk-types
Advanced tools
Comparing version 1.5.9 to 1.5.10
@@ -61,7 +61,9 @@ type HostModule<T, H extends Host> = { | ||
type EventDefinition<Payload = unknown, Type extends string = string> = { | ||
__type: 'event-definition'; | ||
type: Type; | ||
isDomainEvent?: boolean; | ||
transformations?: unknown; | ||
__payload: Payload; | ||
}; | ||
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean): <Payload = unknown>() => EventDefinition<Payload, Type>; | ||
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>; | ||
type DomainEvent<ActionType extends 'create' | 'update' | 'delete' | 'action', Payload> = { | ||
@@ -68,0 +70,0 @@ id: string; |
@@ -28,4 +28,9 @@ "use strict"; | ||
// src/webhooks.ts | ||
function EventDefinition(type, isDomainEvent = false) { | ||
return () => ({ type, isDomainEvent }); | ||
function EventDefinition(type, isDomainEvent = false, _transformations = {}) { | ||
return () => ({ | ||
__type: "event-definition", | ||
type, | ||
isDomainEvent, | ||
transformations: _transformations | ||
}); | ||
} | ||
@@ -32,0 +37,0 @@ // Annotate the CommonJS export names for ESM import in node: |
{ | ||
"name": "@wix/sdk-types", | ||
"version": "1.5.9", | ||
"version": "1.5.10", | ||
"license": "UNLICENSED", | ||
@@ -60,3 +60,3 @@ "author": { | ||
}, | ||
"falconPackageHash": "60a557fff40ccbf29cbab65dd635b6c045e748173ad0c9d3fd1b7b66" | ||
"falconPackageHash": "efb91115c561f417a9474bbbb64813644684f0305d8d0ea2a205132c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
9809
154