@wix/sdk 1.9.0 → 1.9.1

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,4 +1,4 @@
1
- import { AuthenticationStrategy, BoundAuthenticationStrategy, BuildEventDefinition, BuildRESTFunction, EventDefinition, Host, HostModule, HostModuleAPI, RESTFunctionDescriptor, SPIDefinition } from '@wix/sdk-types';
1
+ import { AuthenticationStrategy, BoundAuthenticationStrategy, BuildEventDefinition, BuildRESTFunction, EventDefinition, EventIdentity, Host, HostModule, HostModuleAPI, RESTFunctionDescriptor, SPIDefinition } from '@wix/sdk-types';
2
2
  import { ConditionalExcept } from 'type-fest/source/conditional-except.js';
3
3
  import { EmptyObject } from 'type-fest/source/empty-object.js';
4
4
  import { AmbassadorFunctionDescriptor, BuildAmbassadorFunction } from './ambassador-modules.js';
@@ -97,7 +97,7 @@ type ResolvePossibleEvents<T extends EventDefinition<any>[]> = {
97
97
  } extends (infer U)[] ? U : never;
98
98
  export type ProcessedEvent<T extends EventDefinition<any>[] = []> = {
99
99
  instanceId: string;
100
- identity: unknown;
100
+ identity?: EventIdentity;
101
101
  } & (T['length'] extends 0 ? {
102
102
  eventType: string;
103
103
  payload: unknown;
@@ -132,7 +132,9 @@ export function createClient(config) {
132
132
  const parsedDecoded = JSON.parse(decoded.data);
133
133
  const eventType = parsedDecoded.eventType;
134
134
  const instanceId = parsedDecoded.instanceId;
135
- const identity = JSON.parse(parsedDecoded.identity);
135
+ const identity = parsedDecoded.identity
136
+ ? JSON.parse(parsedDecoded.identity)
137
+ : undefined;
136
138
  const payload = JSON.parse(parsedDecoded.data);
137
139
  const allExpectedEvents = [
138
140
  ...opts.expectedEvents,
@@ -1,4 +1,4 @@
1
- import { AuthenticationStrategy, BoundAuthenticationStrategy, BuildEventDefinition, BuildRESTFunction, EventDefinition, Host, HostModule, HostModuleAPI, RESTFunctionDescriptor, SPIDefinition } from '@wix/sdk-types';
1
+ import { AuthenticationStrategy, BoundAuthenticationStrategy, BuildEventDefinition, BuildRESTFunction, EventDefinition, EventIdentity, Host, HostModule, HostModuleAPI, RESTFunctionDescriptor, SPIDefinition } from '@wix/sdk-types';
2
2
  import { ConditionalExcept } from 'type-fest/source/conditional-except.js';
3
3
  import { EmptyObject } from 'type-fest/source/empty-object.js';
4
4
  import { AmbassadorFunctionDescriptor, BuildAmbassadorFunction } from './ambassador-modules.js';
@@ -97,7 +97,7 @@ type ResolvePossibleEvents<T extends EventDefinition<any>[]> = {
97
97
  } extends (infer U)[] ? U : never;
98
98
  export type ProcessedEvent<T extends EventDefinition<any>[] = []> = {
99
99
  instanceId: string;
100
- identity: unknown;
100
+ identity?: EventIdentity;
101
101
  } & (T['length'] extends 0 ? {
102
102
  eventType: string;
103
103
  payload: unknown;
@@ -135,7 +135,9 @@ function createClient(config) {
135
135
  const parsedDecoded = JSON.parse(decoded.data);
136
136
  const eventType = parsedDecoded.eventType;
137
137
  const instanceId = parsedDecoded.instanceId;
138
- const identity = JSON.parse(parsedDecoded.identity);
138
+ const identity = parsedDecoded.identity
139
+ ? JSON.parse(parsedDecoded.identity)
140
+ : undefined;
139
141
  const payload = JSON.parse(parsedDecoded.data);
140
142
  const allExpectedEvents = [
141
143
  ...opts.expectedEvents,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -67,7 +67,7 @@
67
67
  "@wix/identity": "^1.0.78",
68
68
  "@wix/image-kit": "^1.64.0",
69
69
  "@wix/redirects": "^1.0.41",
70
- "@wix/sdk-types": "^1.6.2",
70
+ "@wix/sdk-types": "^1.6.3",
71
71
  "crypto-js": "^4.2.0",
72
72
  "jose": "^5.2.1",
73
73
  "pkce-challenge": "^3.1.0",
@@ -120,5 +120,5 @@
120
120
  "wallaby": {
121
121
  "autoDetect": true
122
122
  },
123
- "falconPackageHash": "2a4c4555b4f48dd32d60e61c677f384a5ffe2bd3389542b08ab26273"
123
+ "falconPackageHash": "219609c03177070f1295b18ec0ca671a82f02205060dbcd7b9f45e2a"
124
124
  }