@wix/sdk-types 1.5.9 → 1.5.11
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.
- package/build/browser/index.mjs +7 -2
- package/build/index.d.mts +9 -3
- package/build/index.d.ts +9 -3
- package/build/index.js +7 -2
- package/build/index.mjs +7 -2
- package/package.json +2 -2
package/build/browser/index.mjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// src/webhooks.ts
|
|
2
|
-
function EventDefinition(type, isDomainEvent = false) {
|
|
3
|
-
return () => ({
|
|
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
|
@@ -42,7 +42,9 @@ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctio
|
|
|
42
42
|
type AuthenticationStrategy<Host = unknown, WithAuth extends ((...args: any) => AuthenticationStrategy<Host, WithAuth>) | undefined = undefined> = {
|
|
43
43
|
getAuthHeaders: (host: Host) => Promise<{
|
|
44
44
|
headers: Record<string, string>;
|
|
45
|
-
}
|
|
45
|
+
}> | {
|
|
46
|
+
headers: Record<string, string>;
|
|
47
|
+
};
|
|
46
48
|
decodeJWT?: (token: string, verifyCallerClaims?: boolean) => Promise<{
|
|
47
49
|
decoded: {
|
|
48
50
|
data: string;
|
|
@@ -54,15 +56,19 @@ type AuthenticationStrategy<Host = unknown, WithAuth extends ((...args: any) =>
|
|
|
54
56
|
type BoundAuthenticationStrategy = {
|
|
55
57
|
getAuthHeaders: () => Promise<{
|
|
56
58
|
headers: Record<string, string>;
|
|
57
|
-
}
|
|
59
|
+
}> | {
|
|
60
|
+
headers: Record<string, string>;
|
|
61
|
+
};
|
|
58
62
|
};
|
|
59
63
|
|
|
60
64
|
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
65
|
+
__type: 'event-definition';
|
|
61
66
|
type: Type;
|
|
62
67
|
isDomainEvent?: boolean;
|
|
68
|
+
transformations?: unknown;
|
|
63
69
|
__payload: Payload;
|
|
64
70
|
};
|
|
65
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
71
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
66
72
|
type DomainEvent<ActionType extends 'create' | 'update' | 'delete' | 'action', Payload> = {
|
|
67
73
|
id: string;
|
|
68
74
|
entityFqdn: string;
|
package/build/index.d.ts
CHANGED
|
@@ -42,7 +42,9 @@ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctio
|
|
|
42
42
|
type AuthenticationStrategy<Host = unknown, WithAuth extends ((...args: any) => AuthenticationStrategy<Host, WithAuth>) | undefined = undefined> = {
|
|
43
43
|
getAuthHeaders: (host: Host) => Promise<{
|
|
44
44
|
headers: Record<string, string>;
|
|
45
|
-
}
|
|
45
|
+
}> | {
|
|
46
|
+
headers: Record<string, string>;
|
|
47
|
+
};
|
|
46
48
|
decodeJWT?: (token: string, verifyCallerClaims?: boolean) => Promise<{
|
|
47
49
|
decoded: {
|
|
48
50
|
data: string;
|
|
@@ -54,15 +56,19 @@ type AuthenticationStrategy<Host = unknown, WithAuth extends ((...args: any) =>
|
|
|
54
56
|
type BoundAuthenticationStrategy = {
|
|
55
57
|
getAuthHeaders: () => Promise<{
|
|
56
58
|
headers: Record<string, string>;
|
|
57
|
-
}
|
|
59
|
+
}> | {
|
|
60
|
+
headers: Record<string, string>;
|
|
61
|
+
};
|
|
58
62
|
};
|
|
59
63
|
|
|
60
64
|
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
65
|
+
__type: 'event-definition';
|
|
61
66
|
type: Type;
|
|
62
67
|
isDomainEvent?: boolean;
|
|
68
|
+
transformations?: unknown;
|
|
63
69
|
__payload: Payload;
|
|
64
70
|
};
|
|
65
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
71
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
66
72
|
type DomainEvent<ActionType extends 'create' | 'update' | 'delete' | 'action', Payload> = {
|
|
67
73
|
id: string;
|
|
68
74
|
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 () => ({
|
|
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 () => ({
|
|
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.
|
|
3
|
+
"version": "1.5.11",
|
|
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": "
|
|
60
|
+
"falconPackageHash": "7f942fce22de14c416d155809e4c307aa5562cd2de9d257c5031e400"
|
|
61
61
|
}
|