Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wix/sdk-types

Package Overview
Dependencies
Maintainers
26
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wix/sdk-types - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

23

build/index.d.ts

@@ -64,3 +64,14 @@ type HostModule<T, H extends Host> = {

type EventDefinition<Payload = unknown, Type extends string = string> = {
type EventIdentity = {
identityType: 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
anonymousVisitorId: string;
memberId: string;
wixUserId: string;
appId: string;
};
type BaseEventMetadata = {
instanceId: string;
identity: EventIdentity;
};
type EventDefinition<Payload = unknown, Type extends string = string, Metadata = BaseEventMetadata> = {
__type: 'event-definition';

@@ -71,4 +82,5 @@ type: Type;

__payload: Payload;
__metadata: Metadata;
};
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown, Metadata = BaseEventMetadata>() => EventDefinition<Payload, Type, Metadata>;
type DomainEvent<ActionType extends 'create' | 'update' | 'delete' | 'action', Payload> = {

@@ -97,4 +109,5 @@ id: string;

} : never);
type PayloadOfEventDefinition<T extends EventDefinition<any, any>> = T extends EventDefinition<infer P, any> ? P : never;
type EventHandler<T extends EventDefinition> = (payload: PayloadOfEventDefinition<T>, metadata: unknown) => void | Promise<void>;
type PayloadOfEventDefinition<T extends EventDefinition<any, any, any>> = T extends EventDefinition<infer P, any, any> ? P : never;
type MetadataOfEventDefinition<T extends EventDefinition<any, any, any>> = T extends EventDefinition<any, any, infer M> ? M : never;
type EventHandler<T extends EventDefinition> = (payload: PayloadOfEventDefinition<T>, metadata: MetadataOfEventDefinition<T>) => void | Promise<void>;
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;

@@ -107,2 +120,2 @@

export { type APIMetadata, type AuthenticationStrategy, type BoundAuthenticationStrategy, type BuildEventDefinition, type BuildRESTFunction, type DomainEvent, EventDefinition, type EventHandler, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type RESTFunctionDescriptor, type RequestOptions, type RequestOptionsFactory, type SPIDefinition };
export { type APIMetadata, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildEventDefinition, type BuildRESTFunction, type DomainEvent, EventDefinition, type EventHandler, type EventIdentity, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type RESTFunctionDescriptor, type RequestOptions, type RequestOptionsFactory, type SPIDefinition };
{
"name": "@wix/sdk-types",
"version": "1.6.0",
"version": "1.6.1",
"license": "UNLICENSED",

@@ -60,3 +60,3 @@ "author": {

},
"falconPackageHash": "dfd4b7c02207e404e4c5aef688534e4416df961e3a6b42271666041b"
"falconPackageHash": "3f500110266751683931624a48ec5ccf57781bd46b01deaffd4e4b81"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc