@wix/sdk-types 1.5.9 → 1.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,11 @@
1
1
  // src/webhooks.ts
2
- function EventDefinition(type, isDomainEvent = false) {
3
- return () => ({ type, isDomainEvent });
2
+ function EventDefinition(type, isDomainEvent = false, _transformations = {}) {
3
+ return () => ({
4
+ __type: "event-definition",
5
+ type,
6
+ isDomainEvent,
7
+ transformations: _transformations
8
+ });
4
9
  }
5
10
  export {
6
11
  EventDefinition
package/build/index.d.mts CHANGED
@@ -58,11 +58,13 @@ type BoundAuthenticationStrategy = {
58
58
  };
59
59
 
60
60
  type EventDefinition<Payload = unknown, Type extends string = string> = {
61
+ __type: 'event-definition';
61
62
  type: Type;
62
63
  isDomainEvent?: boolean;
64
+ transformations?: unknown;
63
65
  __payload: Payload;
64
66
  };
65
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean): <Payload = unknown>() => EventDefinition<Payload, Type>;
67
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
66
68
  type DomainEvent<ActionType extends 'create' | 'update' | 'delete' | 'action', Payload> = {
67
69
  id: string;
68
70
  entityFqdn: string;
package/build/index.d.ts CHANGED
@@ -58,11 +58,13 @@ type BoundAuthenticationStrategy = {
58
58
  };
59
59
 
60
60
  type EventDefinition<Payload = unknown, Type extends string = string> = {
61
+ __type: 'event-definition';
61
62
  type: Type;
62
63
  isDomainEvent?: boolean;
64
+ transformations?: unknown;
63
65
  __payload: Payload;
64
66
  };
65
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean): <Payload = unknown>() => EventDefinition<Payload, Type>;
67
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
66
68
  type DomainEvent<ActionType extends 'create' | 'update' | 'delete' | 'action', Payload> = {
67
69
  id: string;
68
70
  entityFqdn: string;
package/build/index.js CHANGED
@@ -25,8 +25,13 @@ __export(src_exports, {
25
25
  module.exports = __toCommonJS(src_exports);
26
26
 
27
27
  // src/webhooks.ts
28
- function EventDefinition(type, isDomainEvent = false) {
29
- return () => ({ type, isDomainEvent });
28
+ function EventDefinition(type, isDomainEvent = false, _transformations = {}) {
29
+ return () => ({
30
+ __type: "event-definition",
31
+ type,
32
+ isDomainEvent,
33
+ transformations: _transformations
34
+ });
30
35
  }
31
36
  // Annotate the CommonJS export names for ESM import in node:
32
37
  0 && (module.exports = {
package/build/index.mjs CHANGED
@@ -1,6 +1,11 @@
1
1
  // src/webhooks.ts
2
- function EventDefinition(type, isDomainEvent = false) {
3
- return () => ({ type, isDomainEvent });
2
+ function EventDefinition(type, isDomainEvent = false, _transformations = {}) {
3
+ return () => ({
4
+ __type: "event-definition",
5
+ type,
6
+ isDomainEvent,
7
+ transformations: _transformations
8
+ });
4
9
  }
5
10
  export {
6
11
  EventDefinition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk-types",
3
- "version": "1.5.9",
3
+ "version": "1.5.10",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -57,5 +57,5 @@
57
57
  "wallaby": {
58
58
  "autoDetect": true
59
59
  },
60
- "falconPackageHash": "60a557fff40ccbf29cbab65dd635b6c045e748173ad0c9d3fd1b7b66"
60
+ "falconPackageHash": "efb91115c561f417a9474bbbb64813644684f0305d8d0ea2a205132c"
61
61
  }