@wix/referral 1.0.39 → 1.0.41
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/package.json +7 -7
- package/type-bundles/context.bundle.d.ts +130 -134
- package/type-bundles/index.bundle.d.ts +130 -134
- package/type-bundles/meta.bundle.d.ts +28 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/referral",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/referral_customers": "1.0.
|
|
22
|
-
"@wix/referral_friends": "1.0.
|
|
23
|
-
"@wix/referral_programs": "1.0.
|
|
24
|
-
"@wix/referral_rewards": "1.0.
|
|
25
|
-
"@wix/referral_tracker": "1.0.
|
|
21
|
+
"@wix/referral_customers": "1.0.16",
|
|
22
|
+
"@wix/referral_friends": "1.0.13",
|
|
23
|
+
"@wix/referral_programs": "1.0.23",
|
|
24
|
+
"@wix/referral_rewards": "1.0.14",
|
|
25
|
+
"@wix/referral_tracker": "1.0.17"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"glob": "^10.4.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"fqdn": ""
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"falconPackageHash": "
|
|
50
|
+
"falconPackageHash": "3c96cd81e8111b27ba37e81db4d155e0cab2cec988e0a42a08994c35"
|
|
51
51
|
}
|
|
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
|
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
14
|
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional name of the environment, use for logging
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
21
|
*/
|
|
@@ -63,16 +67,16 @@ type APIMetadata = {
|
|
|
63
67
|
packageName?: string;
|
|
64
68
|
};
|
|
65
69
|
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
66
|
-
type EventDefinition
|
|
70
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
67
71
|
__type: 'event-definition';
|
|
68
72
|
type: Type;
|
|
69
73
|
isDomainEvent?: boolean;
|
|
70
74
|
transformations?: (envelope: unknown) => Payload;
|
|
71
75
|
__payload: Payload;
|
|
72
76
|
};
|
|
73
|
-
declare function EventDefinition
|
|
74
|
-
type EventHandler
|
|
75
|
-
type BuildEventDefinition
|
|
77
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
78
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
79
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
76
80
|
|
|
77
81
|
type ServicePluginMethodInput = {
|
|
78
82
|
request: any;
|
|
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
|
|
|
271
275
|
? Partial<Record<KeysType, never>>
|
|
272
276
|
: {});
|
|
273
277
|
|
|
278
|
+
/**
|
|
279
|
+
Returns a boolean for whether the given type is `never`.
|
|
280
|
+
|
|
281
|
+
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
282
|
+
@link https://stackoverflow.com/a/53984913/10292952
|
|
283
|
+
@link https://www.zhenghao.io/posts/ts-never
|
|
284
|
+
|
|
285
|
+
Useful in type utilities, such as checking if something does not occur.
|
|
286
|
+
|
|
287
|
+
@example
|
|
288
|
+
```
|
|
289
|
+
import type {IsNever, And} from 'type-fest';
|
|
290
|
+
|
|
291
|
+
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
292
|
+
type AreStringsEqual<A extends string, B extends string> =
|
|
293
|
+
And<
|
|
294
|
+
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
295
|
+
IsNever<Exclude<B, A>> extends true ? true : false
|
|
296
|
+
>;
|
|
297
|
+
|
|
298
|
+
type EndIfEqual<I extends string, O extends string> =
|
|
299
|
+
AreStringsEqual<I, O> extends true
|
|
300
|
+
? never
|
|
301
|
+
: void;
|
|
302
|
+
|
|
303
|
+
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
304
|
+
if (input === output) {
|
|
305
|
+
process.exit(0);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
endIfEqual('abc', 'abc');
|
|
310
|
+
//=> never
|
|
311
|
+
|
|
312
|
+
endIfEqual('abc', '123');
|
|
313
|
+
//=> void
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
@category Type Guard
|
|
317
|
+
@category Utilities
|
|
318
|
+
*/
|
|
319
|
+
type IsNever<T> = [T] extends [never] ? true : false;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
323
|
+
|
|
324
|
+
@see {@link IsNever}
|
|
325
|
+
|
|
326
|
+
@example
|
|
327
|
+
```
|
|
328
|
+
import type {IfNever} from 'type-fest';
|
|
329
|
+
|
|
330
|
+
type ShouldBeTrue = IfNever<never>;
|
|
331
|
+
//=> true
|
|
332
|
+
|
|
333
|
+
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
334
|
+
//=> 'bar'
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
@category Type Guard
|
|
338
|
+
@category Utilities
|
|
339
|
+
*/
|
|
340
|
+
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
341
|
+
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
342
|
+
);
|
|
343
|
+
|
|
274
344
|
/**
|
|
275
345
|
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
346
|
|
|
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
303
373
|
|
|
304
374
|
@category Object
|
|
305
375
|
*/
|
|
306
|
-
type ConditionalKeys<Base, Condition> =
|
|
307
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
376
|
+
type ConditionalKeys<Base, Condition> =
|
|
308
377
|
{
|
|
309
378
|
// Map through all the keys of the given base type.
|
|
310
|
-
[Key in keyof Base]
|
|
379
|
+
[Key in keyof Base]-?:
|
|
311
380
|
// Pick only keys with types extending the given `Condition` type.
|
|
312
381
|
Base[Key] extends Condition
|
|
313
|
-
// Retain this key
|
|
314
|
-
|
|
382
|
+
// Retain this key
|
|
383
|
+
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
384
|
+
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
315
385
|
// Discard this key since the condition fails.
|
|
316
386
|
: never;
|
|
317
|
-
|
|
318
387
|
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
-
}[keyof Base]
|
|
320
|
-
>;
|
|
388
|
+
}[keyof Base];
|
|
321
389
|
|
|
322
390
|
/**
|
|
323
391
|
Exclude keys from a shape that matches the given `Condition`.
|
|
@@ -367,7 +435,7 @@ ConditionalKeys<Base, Condition>
|
|
|
367
435
|
* can either be a REST module or a host module.
|
|
368
436
|
* This type is recursive, so it can describe nested modules.
|
|
369
437
|
*/
|
|
370
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
371
439
|
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
440
|
};
|
|
373
441
|
/**
|
|
@@ -380,7 +448,7 @@ type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, De
|
|
|
380
448
|
done: T;
|
|
381
449
|
recurse: T extends {
|
|
382
450
|
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition
|
|
451
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
384
452
|
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
453
|
-1,
|
|
386
454
|
0,
|
|
@@ -422,12 +490,12 @@ interface ReferralProgram {
|
|
|
422
490
|
* Date and time the program was created.
|
|
423
491
|
* @readonly
|
|
424
492
|
*/
|
|
425
|
-
_createdDate?: Date;
|
|
493
|
+
_createdDate?: Date | null;
|
|
426
494
|
/**
|
|
427
495
|
* Date and time the program was last updated.
|
|
428
496
|
* @readonly
|
|
429
497
|
*/
|
|
430
|
-
_updatedDate?: Date;
|
|
498
|
+
_updatedDate?: Date | null;
|
|
431
499
|
/**
|
|
432
500
|
* Reward configuration for the referred friend.
|
|
433
501
|
* Specifies the reward given to a new customer who was referred to the business.
|
|
@@ -734,7 +802,7 @@ interface DomainEvent$4 extends DomainEventBodyOneOf$4 {
|
|
|
734
802
|
/** ID of the entity associated with the event. */
|
|
735
803
|
entityId?: string;
|
|
736
804
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
737
|
-
eventTime?: Date;
|
|
805
|
+
eventTime?: Date | null;
|
|
738
806
|
/**
|
|
739
807
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
740
808
|
* (for example, GDPR).
|
|
@@ -763,7 +831,7 @@ interface EntityCreatedEvent$4 {
|
|
|
763
831
|
entity?: string;
|
|
764
832
|
}
|
|
765
833
|
interface RestoreInfo$4 {
|
|
766
|
-
deletedDate?: Date;
|
|
834
|
+
deletedDate?: Date | null;
|
|
767
835
|
}
|
|
768
836
|
interface EntityUpdatedEvent$4 {
|
|
769
837
|
/**
|
|
@@ -989,7 +1057,7 @@ interface SiteDeleted {
|
|
|
989
1057
|
}
|
|
990
1058
|
interface DeleteContext {
|
|
991
1059
|
/** When the meta site was deleted. */
|
|
992
|
-
dateDeleted?: Date;
|
|
1060
|
+
dateDeleted?: Date | null;
|
|
993
1061
|
/** A status. */
|
|
994
1062
|
deleteStatus?: DeleteStatus;
|
|
995
1063
|
/** A reason (flow). */
|
|
@@ -1137,7 +1205,7 @@ interface SubscriptionEvent extends SubscriptionEventEventOneOf {
|
|
|
1137
1205
|
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
1138
1206
|
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
1139
1207
|
*/
|
|
1140
|
-
eventDate?: Date;
|
|
1208
|
+
eventDate?: Date | null;
|
|
1141
1209
|
}
|
|
1142
1210
|
/** @oneof */
|
|
1143
1211
|
interface SubscriptionEventEventOneOf {
|
|
@@ -1216,13 +1284,13 @@ interface Subscription {
|
|
|
1216
1284
|
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
1217
1285
|
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
1218
1286
|
*/
|
|
1219
|
-
createdAt?: Date;
|
|
1287
|
+
createdAt?: Date | null;
|
|
1220
1288
|
/**
|
|
1221
1289
|
* Date and time the subscription was last updated in
|
|
1222
1290
|
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
1223
1291
|
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
1224
1292
|
*/
|
|
1225
|
-
updatedAt?: Date;
|
|
1293
|
+
updatedAt?: Date | null;
|
|
1226
1294
|
/**
|
|
1227
1295
|
* ID of the metasite that the subscription is assigned to.
|
|
1228
1296
|
* Available only when the subscription is assigned to a Wix site.
|
|
@@ -1250,7 +1318,7 @@ interface Subscription {
|
|
|
1250
1318
|
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
1251
1319
|
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
1252
1320
|
*/
|
|
1253
|
-
transferredAt?: Date;
|
|
1321
|
+
transferredAt?: Date | null;
|
|
1254
1322
|
/**
|
|
1255
1323
|
* ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)
|
|
1256
1324
|
* that the product, for which the subscription was purchased, belongs to.
|
|
@@ -1269,7 +1337,7 @@ interface Subscription {
|
|
|
1269
1337
|
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
1270
1338
|
* Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.
|
|
1271
1339
|
*/
|
|
1272
|
-
originalCreationDate?: Date;
|
|
1340
|
+
originalCreationDate?: Date | null;
|
|
1273
1341
|
/** Custom metadata about the subscription. */
|
|
1274
1342
|
metadata?: Record<string, string>;
|
|
1275
1343
|
/**
|
|
@@ -1351,9 +1419,9 @@ interface ReactivationData {
|
|
|
1351
1419
|
* In the event of reactivation after chargeback dispute, the subscription may be extended according to the
|
|
1352
1420
|
* number of days it was inactive during the time of resolving the dispute
|
|
1353
1421
|
*/
|
|
1354
|
-
newEndOfPeriod?: Date;
|
|
1422
|
+
newEndOfPeriod?: Date | null;
|
|
1355
1423
|
/** The original end date, before the inactive period. */
|
|
1356
|
-
oldEndOfPeriod?: Date;
|
|
1424
|
+
oldEndOfPeriod?: Date | null;
|
|
1357
1425
|
/** The difference in days between the new new_end_of_period and old_end_of_period */
|
|
1358
1426
|
differenceInDays?: number | null;
|
|
1359
1427
|
}
|
|
@@ -1757,7 +1825,7 @@ interface EventMetadata$3 extends BaseEventMetadata$3 {
|
|
|
1757
1825
|
/** ID of the entity associated with the event. */
|
|
1758
1826
|
entityId?: string;
|
|
1759
1827
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1760
|
-
eventTime?: Date;
|
|
1828
|
+
eventTime?: Date | null;
|
|
1761
1829
|
/**
|
|
1762
1830
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
1763
1831
|
* (for example, GDPR).
|
|
@@ -1850,27 +1918,9 @@ interface GetReferralProgramPremiumFeaturesSignature {
|
|
|
1850
1918
|
*/
|
|
1851
1919
|
(): Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
|
|
1852
1920
|
}
|
|
1853
|
-
declare const onProgramUpdated$1: EventDefinition
|
|
1921
|
+
declare const onProgramUpdated$1: EventDefinition<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
|
|
1854
1922
|
|
|
1855
|
-
|
|
1856
|
-
__type: 'event-definition';
|
|
1857
|
-
type: Type;
|
|
1858
|
-
isDomainEvent?: boolean;
|
|
1859
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1860
|
-
__payload: Payload;
|
|
1861
|
-
};
|
|
1862
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
1863
|
-
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
1864
|
-
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
1865
|
-
|
|
1866
|
-
declare global {
|
|
1867
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1868
|
-
interface SymbolConstructor {
|
|
1869
|
-
readonly observable: symbol;
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
|
|
1923
|
+
declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
1874
1924
|
|
|
1875
1925
|
declare const getReferralProgram: MaybeContext<BuildRESTFunction<typeof getReferralProgram$1> & typeof getReferralProgram$1>;
|
|
1876
1926
|
declare const updateReferralProgram: MaybeContext<BuildRESTFunction<typeof updateReferralProgram$1> & typeof updateReferralProgram$1>;
|
|
@@ -2030,12 +2080,12 @@ interface ReferralEvent extends ReferralEventEventTypeOneOf {
|
|
|
2030
2080
|
* Date and time the referral event was created.
|
|
2031
2081
|
* @readonly
|
|
2032
2082
|
*/
|
|
2033
|
-
_createdDate?: Date;
|
|
2083
|
+
_createdDate?: Date | null;
|
|
2034
2084
|
/**
|
|
2035
2085
|
* Date and time the referral event was last updated.
|
|
2036
2086
|
* @readonly
|
|
2037
2087
|
*/
|
|
2038
|
-
_updatedDate?: Date;
|
|
2088
|
+
_updatedDate?: Date | null;
|
|
2039
2089
|
}
|
|
2040
2090
|
/** @oneof */
|
|
2041
2091
|
interface ReferralEventEventTypeOneOf {
|
|
@@ -2248,7 +2298,7 @@ interface ReferringCustomerTotal {
|
|
|
2248
2298
|
* Date and time of the last successful referral.
|
|
2249
2299
|
* @readonly
|
|
2250
2300
|
*/
|
|
2251
|
-
lastSuccessfulReferral?: Date;
|
|
2301
|
+
lastSuccessfulReferral?: Date | null;
|
|
2252
2302
|
/**
|
|
2253
2303
|
* Total number of successful referrals made by this customer.
|
|
2254
2304
|
* @readonly
|
|
@@ -2263,7 +2313,7 @@ interface ReferringCustomerTotal {
|
|
|
2263
2313
|
* Date and time of the last friend action.
|
|
2264
2314
|
* @readonly
|
|
2265
2315
|
*/
|
|
2266
|
-
lastFriendAction?: Date;
|
|
2316
|
+
lastFriendAction?: Date | null;
|
|
2267
2317
|
/**
|
|
2268
2318
|
* Number of friends who have completed actions.
|
|
2269
2319
|
* @readonly
|
|
@@ -2306,7 +2356,7 @@ interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneO
|
|
|
2306
2356
|
* Date and time of the first action.
|
|
2307
2357
|
* @readonly
|
|
2308
2358
|
*/
|
|
2309
|
-
actionDate?: Date;
|
|
2359
|
+
actionDate?: Date | null;
|
|
2310
2360
|
/** Type of issued reward. */
|
|
2311
2361
|
rewardType?: Reward$1;
|
|
2312
2362
|
/** Number of actions completed. */
|
|
@@ -2320,7 +2370,7 @@ interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneO
|
|
|
2320
2370
|
* Date and time of friend signup.
|
|
2321
2371
|
* @readonly
|
|
2322
2372
|
*/
|
|
2323
|
-
signupDate?: Date;
|
|
2373
|
+
signupDate?: Date | null;
|
|
2324
2374
|
}
|
|
2325
2375
|
/** @oneof */
|
|
2326
2376
|
interface ReferredFriendActionRewardTypeOptionsOneOf {
|
|
@@ -2487,7 +2537,7 @@ interface DomainEvent$3 extends DomainEventBodyOneOf$3 {
|
|
|
2487
2537
|
/** ID of the entity associated with the event. */
|
|
2488
2538
|
entityId?: string;
|
|
2489
2539
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2490
|
-
eventTime?: Date;
|
|
2540
|
+
eventTime?: Date | null;
|
|
2491
2541
|
/**
|
|
2492
2542
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
2493
2543
|
* (for example, GDPR).
|
|
@@ -2516,7 +2566,7 @@ interface EntityCreatedEvent$3 {
|
|
|
2516
2566
|
entity?: string;
|
|
2517
2567
|
}
|
|
2518
2568
|
interface RestoreInfo$3 {
|
|
2519
|
-
deletedDate?: Date;
|
|
2569
|
+
deletedDate?: Date | null;
|
|
2520
2570
|
}
|
|
2521
2571
|
interface EntityUpdatedEvent$3 {
|
|
2522
2572
|
/**
|
|
@@ -2735,7 +2785,7 @@ interface EventMetadata$2 extends BaseEventMetadata$2 {
|
|
|
2735
2785
|
/** ID of the entity associated with the event. */
|
|
2736
2786
|
entityId?: string;
|
|
2737
2787
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2738
|
-
eventTime?: Date;
|
|
2788
|
+
eventTime?: Date | null;
|
|
2739
2789
|
/**
|
|
2740
2790
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
2741
2791
|
* (for example, GDPR).
|
|
@@ -2894,27 +2944,9 @@ interface QueryReferredFriendActionsSignature {
|
|
|
2894
2944
|
*/
|
|
2895
2945
|
(options?: QueryReferredFriendActionsOptions | undefined): Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
|
|
2896
2946
|
}
|
|
2897
|
-
declare const onReferralEventCreated$1: EventDefinition
|
|
2898
|
-
|
|
2899
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
2900
|
-
__type: 'event-definition';
|
|
2901
|
-
type: Type;
|
|
2902
|
-
isDomainEvent?: boolean;
|
|
2903
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2904
|
-
__payload: Payload;
|
|
2905
|
-
};
|
|
2906
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
2907
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
2908
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
2909
|
-
|
|
2910
|
-
declare global {
|
|
2911
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2912
|
-
interface SymbolConstructor {
|
|
2913
|
-
readonly observable: symbol;
|
|
2914
|
-
}
|
|
2915
|
-
}
|
|
2947
|
+
declare const onReferralEventCreated$1: EventDefinition<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
|
|
2916
2948
|
|
|
2917
|
-
declare function createEventModule$2<T extends EventDefinition
|
|
2949
|
+
declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
2918
2950
|
|
|
2919
2951
|
declare const getReferralEvent: MaybeContext<BuildRESTFunction<typeof getReferralEvent$1> & typeof getReferralEvent$1>;
|
|
2920
2952
|
declare const queryReferralEvent: MaybeContext<BuildRESTFunction<typeof queryReferralEvent$1> & typeof queryReferralEvent$1>;
|
|
@@ -3002,12 +3034,12 @@ interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewa
|
|
|
3002
3034
|
* Date and time the referral reward was created.
|
|
3003
3035
|
* @readonly
|
|
3004
3036
|
*/
|
|
3005
|
-
_createdDate?: Date;
|
|
3037
|
+
_createdDate?: Date | null;
|
|
3006
3038
|
/**
|
|
3007
3039
|
* Date and time the referral reward was last updated.
|
|
3008
3040
|
* @readonly
|
|
3009
3041
|
*/
|
|
3010
|
-
_updatedDate?: Date;
|
|
3042
|
+
_updatedDate?: Date | null;
|
|
3011
3043
|
/**
|
|
3012
3044
|
* Type of reward given.
|
|
3013
3045
|
*
|
|
@@ -3343,7 +3375,7 @@ interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
|
|
|
3343
3375
|
/** ID of the entity associated with the event. */
|
|
3344
3376
|
entityId?: string;
|
|
3345
3377
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3346
|
-
eventTime?: Date;
|
|
3378
|
+
eventTime?: Date | null;
|
|
3347
3379
|
/**
|
|
3348
3380
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
3349
3381
|
* (for example, GDPR).
|
|
@@ -3372,7 +3404,7 @@ interface EntityCreatedEvent$2 {
|
|
|
3372
3404
|
entity?: string;
|
|
3373
3405
|
}
|
|
3374
3406
|
interface RestoreInfo$2 {
|
|
3375
|
-
deletedDate?: Date;
|
|
3407
|
+
deletedDate?: Date | null;
|
|
3376
3408
|
}
|
|
3377
3409
|
interface EntityUpdatedEvent$2 {
|
|
3378
3410
|
/**
|
|
@@ -3673,12 +3705,12 @@ interface ReferredFriend {
|
|
|
3673
3705
|
* Date and time the referred friend was created.
|
|
3674
3706
|
* @readonly
|
|
3675
3707
|
*/
|
|
3676
|
-
_createdDate?: Date;
|
|
3708
|
+
_createdDate?: Date | null;
|
|
3677
3709
|
/**
|
|
3678
3710
|
* Date and time the referred friend was last updated.
|
|
3679
3711
|
* @readonly
|
|
3680
3712
|
*/
|
|
3681
|
-
_updatedDate?: Date;
|
|
3713
|
+
_updatedDate?: Date | null;
|
|
3682
3714
|
}
|
|
3683
3715
|
declare enum Status {
|
|
3684
3716
|
/** Unknown status. */
|
|
@@ -3834,7 +3866,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
|
|
|
3834
3866
|
/** ID of the entity associated with the event. */
|
|
3835
3867
|
entityId?: string;
|
|
3836
3868
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3837
|
-
eventTime?: Date;
|
|
3869
|
+
eventTime?: Date | null;
|
|
3838
3870
|
/**
|
|
3839
3871
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
3840
3872
|
* (for example, GDPR).
|
|
@@ -3863,7 +3895,7 @@ interface EntityCreatedEvent$1 {
|
|
|
3863
3895
|
entity?: string;
|
|
3864
3896
|
}
|
|
3865
3897
|
interface RestoreInfo$1 {
|
|
3866
|
-
deletedDate?: Date;
|
|
3898
|
+
deletedDate?: Date | null;
|
|
3867
3899
|
}
|
|
3868
3900
|
interface EntityUpdatedEvent$1 {
|
|
3869
3901
|
/**
|
|
@@ -3992,7 +4024,7 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
|
3992
4024
|
/** ID of the entity associated with the event. */
|
|
3993
4025
|
entityId?: string;
|
|
3994
4026
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3995
|
-
eventTime?: Date;
|
|
4027
|
+
eventTime?: Date | null;
|
|
3996
4028
|
/**
|
|
3997
4029
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
3998
4030
|
* (for example, GDPR).
|
|
@@ -4053,12 +4085,12 @@ interface UpdateReferredFriend {
|
|
|
4053
4085
|
* Date and time the referred friend was created.
|
|
4054
4086
|
* @readonly
|
|
4055
4087
|
*/
|
|
4056
|
-
_createdDate?: Date;
|
|
4088
|
+
_createdDate?: Date | null;
|
|
4057
4089
|
/**
|
|
4058
4090
|
* Date and time the referred friend was last updated.
|
|
4059
4091
|
* @readonly
|
|
4060
4092
|
*/
|
|
4061
|
-
_updatedDate?: Date;
|
|
4093
|
+
_updatedDate?: Date | null;
|
|
4062
4094
|
}
|
|
4063
4095
|
interface DeleteReferredFriendOptions {
|
|
4064
4096
|
/**
|
|
@@ -4216,29 +4248,11 @@ interface QueryReferredFriendSignature {
|
|
|
4216
4248
|
*/
|
|
4217
4249
|
(): ReferredFriendsQueryBuilder;
|
|
4218
4250
|
}
|
|
4219
|
-
declare const onReferredFriendCreated$1: EventDefinition
|
|
4220
|
-
declare const onReferredFriendUpdated$1: EventDefinition
|
|
4221
|
-
declare const onReferredFriendDeleted$1: EventDefinition
|
|
4251
|
+
declare const onReferredFriendCreated$1: EventDefinition<ReferredFriendCreatedEnvelope, "wix.loyalty.referral.v1.referred_friend_created">;
|
|
4252
|
+
declare const onReferredFriendUpdated$1: EventDefinition<ReferredFriendUpdatedEnvelope, "wix.loyalty.referral.v1.referred_friend_updated">;
|
|
4253
|
+
declare const onReferredFriendDeleted$1: EventDefinition<ReferredFriendDeletedEnvelope, "wix.loyalty.referral.v1.referred_friend_deleted">;
|
|
4222
4254
|
|
|
4223
|
-
|
|
4224
|
-
__type: 'event-definition';
|
|
4225
|
-
type: Type;
|
|
4226
|
-
isDomainEvent?: boolean;
|
|
4227
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4228
|
-
__payload: Payload;
|
|
4229
|
-
};
|
|
4230
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
4231
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
4232
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
4233
|
-
|
|
4234
|
-
declare global {
|
|
4235
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4236
|
-
interface SymbolConstructor {
|
|
4237
|
-
readonly observable: symbol;
|
|
4238
|
-
}
|
|
4239
|
-
}
|
|
4240
|
-
|
|
4241
|
-
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
4255
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4242
4256
|
|
|
4243
4257
|
declare const createReferredFriend: MaybeContext<BuildRESTFunction<typeof createReferredFriend$1> & typeof createReferredFriend$1>;
|
|
4244
4258
|
declare const getReferredFriend: MaybeContext<BuildRESTFunction<typeof getReferredFriend$1> & typeof getReferredFriend$1>;
|
|
@@ -4338,12 +4352,12 @@ interface ReferringCustomer {
|
|
|
4338
4352
|
* Date and time the referring customer was created.
|
|
4339
4353
|
* @readonly
|
|
4340
4354
|
*/
|
|
4341
|
-
_createdDate?: Date;
|
|
4355
|
+
_createdDate?: Date | null;
|
|
4342
4356
|
/**
|
|
4343
4357
|
* Date and time the referring customer was last updated.
|
|
4344
4358
|
* @readonly
|
|
4345
4359
|
*/
|
|
4346
|
-
_updatedDate?: Date;
|
|
4360
|
+
_updatedDate?: Date | null;
|
|
4347
4361
|
}
|
|
4348
4362
|
interface GenerateReferringCustomerForContactRequest {
|
|
4349
4363
|
/** Contact ID or `"me"` to generate the current identity's referring customer. */
|
|
@@ -4480,7 +4494,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
4480
4494
|
/** ID of the entity associated with the event. */
|
|
4481
4495
|
entityId?: string;
|
|
4482
4496
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
4483
|
-
eventTime?: Date;
|
|
4497
|
+
eventTime?: Date | null;
|
|
4484
4498
|
/**
|
|
4485
4499
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
4486
4500
|
* (for example, GDPR).
|
|
@@ -4509,7 +4523,7 @@ interface EntityCreatedEvent {
|
|
|
4509
4523
|
entity?: string;
|
|
4510
4524
|
}
|
|
4511
4525
|
interface RestoreInfo {
|
|
4512
|
-
deletedDate?: Date;
|
|
4526
|
+
deletedDate?: Date | null;
|
|
4513
4527
|
}
|
|
4514
4528
|
interface EntityUpdatedEvent {
|
|
4515
4529
|
/**
|
|
@@ -4611,7 +4625,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
4611
4625
|
/** ID of the entity associated with the event. */
|
|
4612
4626
|
entityId?: string;
|
|
4613
4627
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
4614
|
-
eventTime?: Date;
|
|
4628
|
+
eventTime?: Date | null;
|
|
4615
4629
|
/**
|
|
4616
4630
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
4617
4631
|
* (for example, GDPR).
|
|
@@ -4776,26 +4790,8 @@ interface DeleteReferringCustomerSignature {
|
|
|
4776
4790
|
*/
|
|
4777
4791
|
(referringCustomerId: string, options?: DeleteReferringCustomerOptions | undefined): Promise<void>;
|
|
4778
4792
|
}
|
|
4779
|
-
declare const onReferringCustomerCreated$1: EventDefinition
|
|
4780
|
-
declare const onReferringCustomerDeleted$1: EventDefinition
|
|
4781
|
-
|
|
4782
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4783
|
-
__type: 'event-definition';
|
|
4784
|
-
type: Type;
|
|
4785
|
-
isDomainEvent?: boolean;
|
|
4786
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4787
|
-
__payload: Payload;
|
|
4788
|
-
};
|
|
4789
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4790
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4791
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
4792
|
-
|
|
4793
|
-
declare global {
|
|
4794
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4795
|
-
interface SymbolConstructor {
|
|
4796
|
-
readonly observable: symbol;
|
|
4797
|
-
}
|
|
4798
|
-
}
|
|
4793
|
+
declare const onReferringCustomerCreated$1: EventDefinition<ReferringCustomerCreatedEnvelope, "wix.loyalty.referral.v1.referring_customer_created">;
|
|
4794
|
+
declare const onReferringCustomerDeleted$1: EventDefinition<ReferringCustomerDeletedEnvelope, "wix.loyalty.referral.v1.referring_customer_deleted">;
|
|
4799
4795
|
|
|
4800
4796
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4801
4797
|
|