@wix/ecom 1.0.785 → 1.0.787

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.
@@ -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$g<Payload = unknown, Type extends string = string> = {
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$g<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$g<Payload, Type>;
74
- type EventHandler$g<T extends EventDefinition$g> = (payload: T['__payload']) => void | Promise<void>;
75
- type BuildEventDefinition$g<T extends EventDefinition$g<any, string>> = (handler: EventHandler$g<T>) => void;
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> = NonNullable<
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 since the condition passes.
314
- ? Key
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$g<any> | ServicePluginDefinition<any> | {
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$g<any> ? BuildEventDefinition$g<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
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,
@@ -831,9 +899,7 @@ declare enum Type {
831
899
  /** Target type is not defined */
832
900
  UNDEFINED = "UNDEFINED",
833
901
  /** Target type is a set of specific items */
834
- SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
835
- /** Target type is a buy x get y */
836
- BUY_X_GET_Y = "BUY_X_GET_Y"
902
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS"
837
903
  }
838
904
  interface SpecificItemsInfo {
839
905
  /** All associated scopes for `"SPECIFIC_ITEMS"` target type. */
@@ -1569,29 +1635,11 @@ interface QueryDiscountRulesSignature {
1569
1635
  */
1570
1636
  (): DiscountRulesQueryBuilder;
1571
1637
  }
1572
- declare const onDiscountRuleCreated$1: EventDefinition$g<DiscountRuleCreatedEnvelope, "wix.ecom.discounts.v1.discount_rule_created">;
1573
- declare const onDiscountRuleUpdated$1: EventDefinition$g<DiscountRuleUpdatedEnvelope, "wix.ecom.discounts.v1.discount_rule_updated">;
1574
- declare const onDiscountRuleDeleted$1: EventDefinition$g<DiscountRuleDeletedEnvelope, "wix.ecom.discounts.v1.discount_rule_deleted">;
1575
-
1576
- type EventDefinition$f<Payload = unknown, Type extends string = string> = {
1577
- __type: 'event-definition';
1578
- type: Type;
1579
- isDomainEvent?: boolean;
1580
- transformations?: (envelope: unknown) => Payload;
1581
- __payload: Payload;
1582
- };
1583
- declare function EventDefinition$f<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$f<Payload, Type>;
1584
- type EventHandler$f<T extends EventDefinition$f> = (payload: T['__payload']) => void | Promise<void>;
1585
- type BuildEventDefinition$f<T extends EventDefinition$f<any, string>> = (handler: EventHandler$f<T>) => void;
1638
+ declare const onDiscountRuleCreated$1: EventDefinition<DiscountRuleCreatedEnvelope, "wix.ecom.discounts.v1.discount_rule_created">;
1639
+ declare const onDiscountRuleUpdated$1: EventDefinition<DiscountRuleUpdatedEnvelope, "wix.ecom.discounts.v1.discount_rule_updated">;
1640
+ declare const onDiscountRuleDeleted$1: EventDefinition<DiscountRuleDeletedEnvelope, "wix.ecom.discounts.v1.discount_rule_deleted">;
1586
1641
 
1587
- declare global {
1588
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1589
- interface SymbolConstructor {
1590
- readonly observable: symbol;
1591
- }
1592
- }
1593
-
1594
- declare function createEventModule$f<T extends EventDefinition$f<any, string>>(eventDefinition: T): BuildEventDefinition$f<T> & T;
1642
+ declare function createEventModule$f<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
1595
1643
 
1596
1644
  declare const createDiscountRule: MaybeContext<BuildRESTFunction<typeof createDiscountRule$1> & typeof createDiscountRule$1>;
1597
1645
  declare const getDiscountRule: MaybeContext<BuildRESTFunction<typeof getDiscountRule$1> & typeof getDiscountRule$1>;
@@ -2972,27 +3020,9 @@ interface RedirectToCheckoutSignature {
2972
3020
  */
2973
3021
  (abandonedCheckoutId: string, metasiteId: string): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
2974
3022
  }
2975
- declare const onAbandonedCheckoutRecovered$1: EventDefinition$g<AbandonedCheckoutRecoveredEnvelope, "wix.ecom.v1.abandoned_checkout_recovered">;
3023
+ declare const onAbandonedCheckoutRecovered$1: EventDefinition<AbandonedCheckoutRecoveredEnvelope, "wix.ecom.v1.abandoned_checkout_recovered">;
2976
3024
 
2977
- type EventDefinition$e<Payload = unknown, Type extends string = string> = {
2978
- __type: 'event-definition';
2979
- type: Type;
2980
- isDomainEvent?: boolean;
2981
- transformations?: (envelope: unknown) => Payload;
2982
- __payload: Payload;
2983
- };
2984
- declare function EventDefinition$e<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$e<Payload, Type>;
2985
- type EventHandler$e<T extends EventDefinition$e> = (payload: T['__payload']) => void | Promise<void>;
2986
- type BuildEventDefinition$e<T extends EventDefinition$e<any, string>> = (handler: EventHandler$e<T>) => void;
2987
-
2988
- declare global {
2989
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2990
- interface SymbolConstructor {
2991
- readonly observable: symbol;
2992
- }
2993
- }
2994
-
2995
- declare function createEventModule$e<T extends EventDefinition$e<any, string>>(eventDefinition: T): BuildEventDefinition$e<T> & T;
3025
+ declare function createEventModule$e<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
2996
3026
 
2997
3027
  declare const getAbandonedCheckout: MaybeContext<BuildRESTFunction<typeof getAbandonedCheckout$1> & typeof getAbandonedCheckout$1>;
2998
3028
  declare const deleteAbandonedCheckout: MaybeContext<BuildRESTFunction<typeof deleteAbandonedCheckout$1> & typeof deleteAbandonedCheckout$1>;
@@ -3747,29 +3777,11 @@ interface ReportItemsBackInStockSignature {
3747
3777
  */
3748
3778
  (itemDetails: BackInStockItemDetails, options?: ReportItemsBackInStockOptions | undefined): Promise<void>;
3749
3779
  }
3750
- declare const onBackInStockNotificationRequestCreated$1: EventDefinition$g<BackInStockNotificationRequestCreatedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_created">;
3751
- declare const onBackInStockNotificationRequestDeleted$1: EventDefinition$g<BackInStockNotificationRequestDeletedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_deleted">;
3752
- declare const onBackInStockNotificationRequestUpdated$1: EventDefinition$g<BackInStockNotificationRequestUpdatedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_updated">;
3780
+ declare const onBackInStockNotificationRequestCreated$1: EventDefinition<BackInStockNotificationRequestCreatedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_created">;
3781
+ declare const onBackInStockNotificationRequestDeleted$1: EventDefinition<BackInStockNotificationRequestDeletedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_deleted">;
3782
+ declare const onBackInStockNotificationRequestUpdated$1: EventDefinition<BackInStockNotificationRequestUpdatedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_updated">;
3753
3783
 
3754
- type EventDefinition$d<Payload = unknown, Type extends string = string> = {
3755
- __type: 'event-definition';
3756
- type: Type;
3757
- isDomainEvent?: boolean;
3758
- transformations?: (envelope: unknown) => Payload;
3759
- __payload: Payload;
3760
- };
3761
- declare function EventDefinition$d<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$d<Payload, Type>;
3762
- type EventHandler$d<T extends EventDefinition$d> = (payload: T['__payload']) => void | Promise<void>;
3763
- type BuildEventDefinition$d<T extends EventDefinition$d<any, string>> = (handler: EventHandler$d<T>) => void;
3764
-
3765
- declare global {
3766
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3767
- interface SymbolConstructor {
3768
- readonly observable: symbol;
3769
- }
3770
- }
3771
-
3772
- declare function createEventModule$d<T extends EventDefinition$d<any, string>>(eventDefinition: T): BuildEventDefinition$d<T> & T;
3784
+ declare function createEventModule$d<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
3773
3785
 
3774
3786
  declare const createBackInStockNotificationRequest: MaybeContext<BuildRESTFunction<typeof createBackInStockNotificationRequest$1> & typeof createBackInStockNotificationRequest$1>;
3775
3787
  declare const getBackInStockNotificationRequest: MaybeContext<BuildRESTFunction<typeof getBackInStockNotificationRequest$1> & typeof getBackInStockNotificationRequest$1>;
@@ -6594,29 +6606,11 @@ interface DeleteCartSignature {
6594
6606
  */
6595
6607
  (_id: string): Promise<void>;
6596
6608
  }
6597
- declare const onCartUpdated$3: EventDefinition$g<CartUpdatedEnvelope$1, "wix.ecom.v1.cart_updated">;
6598
- declare const onCartDeleted$3: EventDefinition$g<CartDeletedEnvelope$1, "wix.ecom.v1.cart_deleted">;
6599
- declare const onCartCreated$3: EventDefinition$g<CartCreatedEnvelope$1, "wix.ecom.v1.cart_created">;
6609
+ declare const onCartUpdated$3: EventDefinition<CartUpdatedEnvelope$1, "wix.ecom.v1.cart_updated">;
6610
+ declare const onCartDeleted$3: EventDefinition<CartDeletedEnvelope$1, "wix.ecom.v1.cart_deleted">;
6611
+ declare const onCartCreated$3: EventDefinition<CartCreatedEnvelope$1, "wix.ecom.v1.cart_created">;
6600
6612
 
6601
- type EventDefinition$c<Payload = unknown, Type extends string = string> = {
6602
- __type: 'event-definition';
6603
- type: Type;
6604
- isDomainEvent?: boolean;
6605
- transformations?: (envelope: unknown) => Payload;
6606
- __payload: Payload;
6607
- };
6608
- declare function EventDefinition$c<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$c<Payload, Type>;
6609
- type EventHandler$c<T extends EventDefinition$c> = (payload: T['__payload']) => void | Promise<void>;
6610
- type BuildEventDefinition$c<T extends EventDefinition$c<any, string>> = (handler: EventHandler$c<T>) => void;
6611
-
6612
- declare global {
6613
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
6614
- interface SymbolConstructor {
6615
- readonly observable: symbol;
6616
- }
6617
- }
6618
-
6619
- declare function createEventModule$c<T extends EventDefinition$c<any, string>>(eventDefinition: T): BuildEventDefinition$c<T> & T;
6613
+ declare function createEventModule$c<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
6620
6614
 
6621
6615
  declare const createCart: MaybeContext<BuildRESTFunction<typeof createCart$1> & typeof createCart$1>;
6622
6616
  declare const updateCart: MaybeContext<BuildRESTFunction<typeof updateCart$1> & typeof updateCart$1>;
@@ -9173,29 +9167,11 @@ interface DeleteCurrentCartSignature {
9173
9167
  */
9174
9168
  (): Promise<void>;
9175
9169
  }
9176
- declare const onCartUpdated$1: EventDefinition$g<CartUpdatedEnvelope, "wix.ecom.v1.cart_updated">;
9177
- declare const onCartDeleted$1: EventDefinition$g<CartDeletedEnvelope, "wix.ecom.v1.cart_deleted">;
9178
- declare const onCartCreated$1: EventDefinition$g<CartCreatedEnvelope, "wix.ecom.v1.cart_created">;
9179
-
9180
- type EventDefinition$b<Payload = unknown, Type extends string = string> = {
9181
- __type: 'event-definition';
9182
- type: Type;
9183
- isDomainEvent?: boolean;
9184
- transformations?: (envelope: unknown) => Payload;
9185
- __payload: Payload;
9186
- };
9187
- declare function EventDefinition$b<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$b<Payload, Type>;
9188
- type EventHandler$b<T extends EventDefinition$b> = (payload: T['__payload']) => void | Promise<void>;
9189
- type BuildEventDefinition$b<T extends EventDefinition$b<any, string>> = (handler: EventHandler$b<T>) => void;
9190
-
9191
- declare global {
9192
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
9193
- interface SymbolConstructor {
9194
- readonly observable: symbol;
9195
- }
9196
- }
9170
+ declare const onCartUpdated$1: EventDefinition<CartUpdatedEnvelope, "wix.ecom.v1.cart_updated">;
9171
+ declare const onCartDeleted$1: EventDefinition<CartDeletedEnvelope, "wix.ecom.v1.cart_deleted">;
9172
+ declare const onCartCreated$1: EventDefinition<CartCreatedEnvelope, "wix.ecom.v1.cart_created">;
9197
9173
 
9198
- declare function createEventModule$b<T extends EventDefinition$b<any, string>>(eventDefinition: T): BuildEventDefinition$b<T> & T;
9174
+ declare function createEventModule$b<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
9199
9175
 
9200
9176
  declare const getCurrentCart: MaybeContext<BuildRESTFunction<typeof getCurrentCart$1> & typeof getCurrentCart$1>;
9201
9177
  declare const updateCurrentCart: MaybeContext<BuildRESTFunction<typeof updateCurrentCart$1> & typeof updateCurrentCart$1>;
@@ -12605,29 +12581,11 @@ interface GetCheckoutPaymentSettingsSignature {
12605
12581
  /** @param - Checkout ID. */
12606
12582
  (_id: string): Promise<GetCheckoutPaymentSettingsResponse & GetCheckoutPaymentSettingsResponseNonNullableFields>;
12607
12583
  }
12608
- declare const onCheckoutCreated$1: EventDefinition$g<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;
12609
- declare const onCheckoutUpdated$1: EventDefinition$g<CheckoutUpdatedEnvelope, "wix.ecom.v1.checkout_updated">;
12610
- declare const onCheckoutCompleted$1: EventDefinition$g<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
12611
-
12612
- type EventDefinition$a<Payload = unknown, Type extends string = string> = {
12613
- __type: 'event-definition';
12614
- type: Type;
12615
- isDomainEvent?: boolean;
12616
- transformations?: (envelope: unknown) => Payload;
12617
- __payload: Payload;
12618
- };
12619
- declare function EventDefinition$a<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$a<Payload, Type>;
12620
- type EventHandler$a<T extends EventDefinition$a> = (payload: T['__payload']) => void | Promise<void>;
12621
- type BuildEventDefinition$a<T extends EventDefinition$a<any, string>> = (handler: EventHandler$a<T>) => void;
12584
+ declare const onCheckoutCreated$1: EventDefinition<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;
12585
+ declare const onCheckoutUpdated$1: EventDefinition<CheckoutUpdatedEnvelope, "wix.ecom.v1.checkout_updated">;
12586
+ declare const onCheckoutCompleted$1: EventDefinition<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
12622
12587
 
12623
- declare global {
12624
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
12625
- interface SymbolConstructor {
12626
- readonly observable: symbol;
12627
- }
12628
- }
12629
-
12630
- declare function createEventModule$a<T extends EventDefinition$a<any, string>>(eventDefinition: T): BuildEventDefinition$a<T> & T;
12588
+ declare function createEventModule$a<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
12631
12589
 
12632
12590
  declare const createCheckout: MaybeContext<BuildRESTFunction<typeof createCheckout$1> & typeof createCheckout$1>;
12633
12591
  declare const getCheckout: MaybeContext<BuildRESTFunction<typeof getCheckout$1> & typeof getCheckout$1>;
@@ -13184,27 +13142,9 @@ interface UpdateCheckoutSettingsSignature {
13184
13142
  */
13185
13143
  (checkoutSettings: CheckoutSettings): Promise<UpdateCheckoutSettingsResponse & UpdateCheckoutSettingsResponseNonNullableFields>;
13186
13144
  }
13187
- declare const onCheckoutSettingsUpdated$1: EventDefinition$g<CheckoutSettingsUpdatedEnvelope, "wix.ecom.v1.checkout_settings_updated">;
13145
+ declare const onCheckoutSettingsUpdated$1: EventDefinition<CheckoutSettingsUpdatedEnvelope, "wix.ecom.v1.checkout_settings_updated">;
13188
13146
 
13189
- type EventDefinition$9<Payload = unknown, Type extends string = string> = {
13190
- __type: 'event-definition';
13191
- type: Type;
13192
- isDomainEvent?: boolean;
13193
- transformations?: (envelope: unknown) => Payload;
13194
- __payload: Payload;
13195
- };
13196
- declare function EventDefinition$9<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$9<Payload, Type>;
13197
- type EventHandler$9<T extends EventDefinition$9> = (payload: T['__payload']) => void | Promise<void>;
13198
- type BuildEventDefinition$9<T extends EventDefinition$9<any, string>> = (handler: EventHandler$9<T>) => void;
13199
-
13200
- declare global {
13201
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
13202
- interface SymbolConstructor {
13203
- readonly observable: symbol;
13204
- }
13205
- }
13206
-
13207
- declare function createEventModule$9<T extends EventDefinition$9<any, string>>(eventDefinition: T): BuildEventDefinition$9<T> & T;
13147
+ declare function createEventModule$9<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
13208
13148
 
13209
13149
  declare const getCheckoutSettings: MaybeContext<BuildRESTFunction<typeof getCheckoutSettings$1> & typeof getCheckoutSettings$1>;
13210
13150
  declare const updateCheckoutSettings: MaybeContext<BuildRESTFunction<typeof updateCheckoutSettings$1> & typeof updateCheckoutSettings$1>;
@@ -15575,30 +15515,12 @@ interface CreateAndRedirectToCheckoutSignature {
15575
15515
  */
15576
15516
  (checkoutTemplateId: string, siteId: string): Promise<RawHttpResponse & RawHttpResponseNonNullableFields>;
15577
15517
  }
15578
- declare const onCheckoutTemplateCreated$1: EventDefinition$g<CheckoutTemplateCreatedEnvelope, "wix.ecom.v1.checkout_template_created">;
15579
- declare const onCheckoutTemplateUpdated$1: EventDefinition$g<CheckoutTemplateUpdatedEnvelope, "wix.ecom.v1.checkout_template_updated">;
15580
- declare const onCheckoutTemplateDeleted$1: EventDefinition$g<CheckoutTemplateDeletedEnvelope, "wix.ecom.v1.checkout_template_deleted">;
15581
- declare const onCheckoutTemplateUsed$1: EventDefinition$g<CheckoutTemplateUsedEnvelope, "wix.ecom.v1.checkout_template_used">;
15518
+ declare const onCheckoutTemplateCreated$1: EventDefinition<CheckoutTemplateCreatedEnvelope, "wix.ecom.v1.checkout_template_created">;
15519
+ declare const onCheckoutTemplateUpdated$1: EventDefinition<CheckoutTemplateUpdatedEnvelope, "wix.ecom.v1.checkout_template_updated">;
15520
+ declare const onCheckoutTemplateDeleted$1: EventDefinition<CheckoutTemplateDeletedEnvelope, "wix.ecom.v1.checkout_template_deleted">;
15521
+ declare const onCheckoutTemplateUsed$1: EventDefinition<CheckoutTemplateUsedEnvelope, "wix.ecom.v1.checkout_template_used">;
15582
15522
 
15583
- type EventDefinition$8<Payload = unknown, Type extends string = string> = {
15584
- __type: 'event-definition';
15585
- type: Type;
15586
- isDomainEvent?: boolean;
15587
- transformations?: (envelope: unknown) => Payload;
15588
- __payload: Payload;
15589
- };
15590
- declare function EventDefinition$8<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$8<Payload, Type>;
15591
- type EventHandler$8<T extends EventDefinition$8> = (payload: T['__payload']) => void | Promise<void>;
15592
- type BuildEventDefinition$8<T extends EventDefinition$8<any, string>> = (handler: EventHandler$8<T>) => void;
15593
-
15594
- declare global {
15595
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
15596
- interface SymbolConstructor {
15597
- readonly observable: symbol;
15598
- }
15599
- }
15600
-
15601
- declare function createEventModule$8<T extends EventDefinition$8<any, string>>(eventDefinition: T): BuildEventDefinition$8<T> & T;
15523
+ declare function createEventModule$8<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
15602
15524
 
15603
15525
  declare const createCheckoutTemplate: MaybeContext<BuildRESTFunction<typeof createCheckoutTemplate$1> & typeof createCheckoutTemplate$1>;
15604
15526
  declare const getCheckoutTemplate: MaybeContext<BuildRESTFunction<typeof getCheckoutTemplate$1> & typeof getCheckoutTemplate$1>;
@@ -17053,32 +16975,14 @@ interface UpdateExtendedFieldsSignature$3 {
17053
16975
  */
17054
16976
  (_id: string, namespace: string, options: UpdateExtendedFieldsOptions$3): Promise<UpdateExtendedFieldsResponse$4 & UpdateExtendedFieldsResponseNonNullableFields$3>;
17055
16977
  }
17056
- declare const onDeliveryProfileCreated$1: EventDefinition$g<DeliveryProfileCreatedEnvelope, "wix.ecom.v1.delivery_profile_created">;
17057
- declare const onDeliveryProfileDeliveryRegionAdded$1: EventDefinition$g<DeliveryProfileDeliveryRegionAddedEnvelope, "wix.ecom.v1.delivery_profile_delivery_region_added">;
17058
- declare const onDeliveryProfileUpdated$1: EventDefinition$g<DeliveryProfileUpdatedEnvelope, "wix.ecom.v1.delivery_profile_updated">;
17059
- declare const onDeliveryProfileDeleted$1: EventDefinition$g<DeliveryProfileDeletedEnvelope, "wix.ecom.v1.delivery_profile_deleted">;
17060
- declare const onDeliveryProfileDeliveryRegionRemoved$1: EventDefinition$g<DeliveryProfileDeliveryRegionRemovedEnvelope, "wix.ecom.v1.delivery_profile_delivery_region_removed">;
17061
- declare const onDeliveryProfileDeliveryRegionUpdated$1: EventDefinition$g<DeliveryProfileDeliveryRegionUpdatedEnvelope, "wix.ecom.v1.delivery_profile_delivery_region_updated">;
16978
+ declare const onDeliveryProfileCreated$1: EventDefinition<DeliveryProfileCreatedEnvelope, "wix.ecom.v1.delivery_profile_created">;
16979
+ declare const onDeliveryProfileDeliveryRegionAdded$1: EventDefinition<DeliveryProfileDeliveryRegionAddedEnvelope, "wix.ecom.v1.delivery_profile_delivery_region_added">;
16980
+ declare const onDeliveryProfileUpdated$1: EventDefinition<DeliveryProfileUpdatedEnvelope, "wix.ecom.v1.delivery_profile_updated">;
16981
+ declare const onDeliveryProfileDeleted$1: EventDefinition<DeliveryProfileDeletedEnvelope, "wix.ecom.v1.delivery_profile_deleted">;
16982
+ declare const onDeliveryProfileDeliveryRegionRemoved$1: EventDefinition<DeliveryProfileDeliveryRegionRemovedEnvelope, "wix.ecom.v1.delivery_profile_delivery_region_removed">;
16983
+ declare const onDeliveryProfileDeliveryRegionUpdated$1: EventDefinition<DeliveryProfileDeliveryRegionUpdatedEnvelope, "wix.ecom.v1.delivery_profile_delivery_region_updated">;
17062
16984
 
17063
- type EventDefinition$7<Payload = unknown, Type extends string = string> = {
17064
- __type: 'event-definition';
17065
- type: Type;
17066
- isDomainEvent?: boolean;
17067
- transformations?: (envelope: unknown) => Payload;
17068
- __payload: Payload;
17069
- };
17070
- declare function EventDefinition$7<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$7<Payload, Type>;
17071
- type EventHandler$7<T extends EventDefinition$7> = (payload: T['__payload']) => void | Promise<void>;
17072
- type BuildEventDefinition$7<T extends EventDefinition$7<any, string>> = (handler: EventHandler$7<T>) => void;
17073
-
17074
- declare global {
17075
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
17076
- interface SymbolConstructor {
17077
- readonly observable: symbol;
17078
- }
17079
- }
17080
-
17081
- declare function createEventModule$7<T extends EventDefinition$7<any, string>>(eventDefinition: T): BuildEventDefinition$7<T> & T;
16985
+ declare function createEventModule$7<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
17082
16986
 
17083
16987
  declare const createDeliveryProfile: MaybeContext<BuildRESTFunction<typeof createDeliveryProfile$1> & typeof createDeliveryProfile$1>;
17084
16988
  declare const getDeliveryProfile: MaybeContext<BuildRESTFunction<typeof getDeliveryProfile$1> & typeof getDeliveryProfile$1>;
@@ -18954,13 +18858,7 @@ declare enum PaymentStatus$2 {
18954
18858
  /** Payments received but not yet confirmed by the payment provider */
18955
18859
  PENDING = "PENDING",
18956
18860
  /** At least one payment was received and approved, covering less than total price amount */
18957
- PARTIALLY_PAID = "PARTIALLY_PAID",
18958
- /** Payment received but not yet confirmed by the payment provider and waits for some user action */
18959
- PENDING_MERCHANT = "PENDING_MERCHANT",
18960
- /** Payment was canceled by user on payment provider side */
18961
- CANCELED = "CANCELED",
18962
- /** Payment was declined by payment provider */
18963
- DECLINED = "DECLINED"
18861
+ PARTIALLY_PAID = "PARTIALLY_PAID"
18964
18862
  }
18965
18863
  declare enum FulfillmentStatus$3 {
18966
18864
  /** none of the order items are fulfilled or order was manually marked as unfulfilled */
@@ -18976,9 +18874,7 @@ declare enum FulfillmentStatus$3 {
18976
18874
  declare enum OrderStatus$1 {
18977
18875
  INITIALIZED = "INITIALIZED",
18978
18876
  APPROVED = "APPROVED",
18979
- CANCELED = "CANCELED",
18980
- PENDING = "PENDING",
18981
- REJECTED = "REJECTED"
18877
+ CANCELED = "CANCELED"
18982
18878
  }
18983
18879
  interface Activity$2 extends ActivityContentOneOf$1 {
18984
18880
  /** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */
@@ -19333,17 +19229,7 @@ declare enum ActivityType$2 {
19333
19229
  NEW_EXCHANGE_ORDER_CREATED = "NEW_EXCHANGE_ORDER_CREATED",
19334
19230
  ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID",
19335
19231
  DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED",
19336
- SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD",
19337
- AUTHORIZED_PAYMENT_CREATED = "AUTHORIZED_PAYMENT_CREATED",
19338
- AUTHORIZED_PAYMENT_CAPTURED = "AUTHORIZED_PAYMENT_CAPTURED",
19339
- AUTHORIZED_PAYMENT_VOIDED = "AUTHORIZED_PAYMENT_VOIDED",
19340
- REFUND_INITIATED = "REFUND_INITIATED",
19341
- PAYMENT_REFUNDED = "PAYMENT_REFUNDED",
19342
- PAYMENT_REFUND_FAILED = "PAYMENT_REFUND_FAILED",
19343
- REFUNDED_AS_STORE_CREDIT = "REFUNDED_AS_STORE_CREDIT",
19344
- PAYMENT_PENDING = "PAYMENT_PENDING",
19345
- PAYMENT_CANCELED = "PAYMENT_CANCELED",
19346
- PAYMENT_DECLINED = "PAYMENT_DECLINED"
19232
+ SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD"
19347
19233
  }
19348
19234
  declare enum AttributionSource$1 {
19349
19235
  UNSPECIFIED = "UNSPECIFIED",
@@ -21371,27 +21257,9 @@ interface BulkCreateFulfillmentsSignature {
21371
21257
  */
21372
21258
  (ordersWithFulfillments: BulkCreateOrderWithFulfillments[]): Promise<BulkCreateFulfillmentResponse & BulkCreateFulfillmentResponseNonNullableFields>;
21373
21259
  }
21374
- declare const onFulfillmentsUpdated$1: EventDefinition$g<FulfillmentsUpdatedEnvelope, "wix.ecom.v1.fulfillments_updated">;
21375
-
21376
- type EventDefinition$6<Payload = unknown, Type extends string = string> = {
21377
- __type: 'event-definition';
21378
- type: Type;
21379
- isDomainEvent?: boolean;
21380
- transformations?: (envelope: unknown) => Payload;
21381
- __payload: Payload;
21382
- };
21383
- declare function EventDefinition$6<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$6<Payload, Type>;
21384
- type EventHandler$6<T extends EventDefinition$6> = (payload: T['__payload']) => void | Promise<void>;
21385
- type BuildEventDefinition$6<T extends EventDefinition$6<any, string>> = (handler: EventHandler$6<T>) => void;
21386
-
21387
- declare global {
21388
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
21389
- interface SymbolConstructor {
21390
- readonly observable: symbol;
21391
- }
21392
- }
21260
+ declare const onFulfillmentsUpdated$1: EventDefinition<FulfillmentsUpdatedEnvelope, "wix.ecom.v1.fulfillments_updated">;
21393
21261
 
21394
- declare function createEventModule$6<T extends EventDefinition$6<any, string>>(eventDefinition: T): BuildEventDefinition$6<T> & T;
21262
+ declare function createEventModule$6<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
21395
21263
 
21396
21264
  declare const listFulfillmentsForSingleOrder: MaybeContext<BuildRESTFunction<typeof listFulfillmentsForSingleOrder$1> & typeof listFulfillmentsForSingleOrder$1>;
21397
21265
  declare const listFulfillmentsForMultipleOrders: MaybeContext<BuildRESTFunction<typeof listFulfillmentsForMultipleOrders$1> & typeof listFulfillmentsForMultipleOrders$1>;
@@ -22165,29 +22033,11 @@ interface BulkDeleteLocalDeliveryOptionSignature {
22165
22033
  /** */
22166
22034
  (ids: string[]): Promise<void>;
22167
22035
  }
22168
- declare const onLocalDeliveryOptionCreated$1: EventDefinition$g<LocalDeliveryOptionCreatedEnvelope, "wix.ecom.v1.local_delivery_option_created">;
22169
- declare const onLocalDeliveryOptionUpdated$1: EventDefinition$g<LocalDeliveryOptionUpdatedEnvelope, "wix.ecom.v1.local_delivery_option_updated">;
22170
- declare const onLocalDeliveryOptionDeleted$1: EventDefinition$g<LocalDeliveryOptionDeletedEnvelope, "wix.ecom.v1.local_delivery_option_deleted">;
22036
+ declare const onLocalDeliveryOptionCreated$1: EventDefinition<LocalDeliveryOptionCreatedEnvelope, "wix.ecom.v1.local_delivery_option_created">;
22037
+ declare const onLocalDeliveryOptionUpdated$1: EventDefinition<LocalDeliveryOptionUpdatedEnvelope, "wix.ecom.v1.local_delivery_option_updated">;
22038
+ declare const onLocalDeliveryOptionDeleted$1: EventDefinition<LocalDeliveryOptionDeletedEnvelope, "wix.ecom.v1.local_delivery_option_deleted">;
22171
22039
 
22172
- type EventDefinition$5<Payload = unknown, Type extends string = string> = {
22173
- __type: 'event-definition';
22174
- type: Type;
22175
- isDomainEvent?: boolean;
22176
- transformations?: (envelope: unknown) => Payload;
22177
- __payload: Payload;
22178
- };
22179
- declare function EventDefinition$5<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$5<Payload, Type>;
22180
- type EventHandler$5<T extends EventDefinition$5> = (payload: T['__payload']) => void | Promise<void>;
22181
- type BuildEventDefinition$5<T extends EventDefinition$5<any, string>> = (handler: EventHandler$5<T>) => void;
22182
-
22183
- declare global {
22184
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
22185
- interface SymbolConstructor {
22186
- readonly observable: symbol;
22187
- }
22188
- }
22189
-
22190
- declare function createEventModule$5<T extends EventDefinition$5<any, string>>(eventDefinition: T): BuildEventDefinition$5<T> & T;
22040
+ declare function createEventModule$5<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
22191
22041
 
22192
22042
  declare const createLocalDeliveryOption: MaybeContext<BuildRESTFunction<typeof createLocalDeliveryOption$1> & typeof createLocalDeliveryOption$1>;
22193
22043
  declare const getLocalDeliveryOption: MaybeContext<BuildRESTFunction<typeof getLocalDeliveryOption$1> & typeof getLocalDeliveryOption$1>;
@@ -22816,13 +22666,7 @@ declare enum PaymentStatus$1 {
22816
22666
  /** Payments received but not yet confirmed by the payment provider */
22817
22667
  PENDING = "PENDING",
22818
22668
  /** At least one payment was received and approved, covering less than total price amount */
22819
- PARTIALLY_PAID = "PARTIALLY_PAID",
22820
- /** Payment received but not yet confirmed by the payment provider and waits for some user action */
22821
- PENDING_MERCHANT = "PENDING_MERCHANT",
22822
- /** Payment was canceled by user on payment provider side */
22823
- CANCELED = "CANCELED",
22824
- /** Payment was declined by payment provider */
22825
- DECLINED = "DECLINED"
22669
+ PARTIALLY_PAID = "PARTIALLY_PAID"
22826
22670
  }
22827
22671
  declare enum FulfillmentStatus$1 {
22828
22672
  /** none of the order items are fulfilled or order was manually marked as unfulfilled */
@@ -23029,9 +22873,7 @@ interface ShippingRegion$1 {
23029
22873
  declare enum OrderStatus {
23030
22874
  INITIALIZED = "INITIALIZED",
23031
22875
  APPROVED = "APPROVED",
23032
- CANCELED = "CANCELED",
23033
- PENDING = "PENDING",
23034
- REJECTED = "REJECTED"
22876
+ CANCELED = "CANCELED"
23035
22877
  }
23036
22878
  interface TaxSummary$1 {
23037
22879
  /**
@@ -23513,17 +23355,7 @@ declare enum ActivityType$1 {
23513
23355
  NEW_EXCHANGE_ORDER_CREATED = "NEW_EXCHANGE_ORDER_CREATED",
23514
23356
  ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID",
23515
23357
  DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED",
23516
- SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD",
23517
- AUTHORIZED_PAYMENT_CREATED = "AUTHORIZED_PAYMENT_CREATED",
23518
- AUTHORIZED_PAYMENT_CAPTURED = "AUTHORIZED_PAYMENT_CAPTURED",
23519
- AUTHORIZED_PAYMENT_VOIDED = "AUTHORIZED_PAYMENT_VOIDED",
23520
- REFUND_INITIATED = "REFUND_INITIATED",
23521
- PAYMENT_REFUNDED = "PAYMENT_REFUNDED",
23522
- PAYMENT_REFUND_FAILED = "PAYMENT_REFUND_FAILED",
23523
- REFUNDED_AS_STORE_CREDIT = "REFUNDED_AS_STORE_CREDIT",
23524
- PAYMENT_PENDING = "PAYMENT_PENDING",
23525
- PAYMENT_CANCELED = "PAYMENT_CANCELED",
23526
- PAYMENT_DECLINED = "PAYMENT_DECLINED"
23358
+ SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD"
23527
23359
  }
23528
23360
  declare enum AttributionSource {
23529
23361
  UNSPECIFIED = "UNSPECIFIED",
@@ -27634,31 +27466,13 @@ interface BulkUpdateOrderTagsSignature {
27634
27466
  */
27635
27467
  (orderIds: string[], options?: BulkUpdateOrderTagsOptions | undefined): Promise<BulkUpdateOrderTagsResponse & BulkUpdateOrderTagsResponseNonNullableFields>;
27636
27468
  }
27637
- declare const onOrderPaymentStatusUpdated$1: EventDefinition$g<OrderPaymentStatusUpdatedEnvelope, "wix.ecom.v1.order_payment_status_updated">;
27638
- declare const onOrderUpdated$1: EventDefinition$g<OrderUpdatedEnvelope, "wix.ecom.v1.order_updated">;
27639
- declare const onOrderCreated$1: EventDefinition$g<OrderCreatedEnvelope, "wix.ecom.v1.order_created">;
27640
- declare const onOrderCanceled$1: EventDefinition$g<OrderCanceledEnvelope, "wix.ecom.v1.order_canceled">;
27641
- declare const onOrderApproved$1: EventDefinition$g<OrderApprovedEnvelope, "wix.ecom.v1.order_approved">;
27642
-
27643
- type EventDefinition$4<Payload = unknown, Type extends string = string> = {
27644
- __type: 'event-definition';
27645
- type: Type;
27646
- isDomainEvent?: boolean;
27647
- transformations?: (envelope: unknown) => Payload;
27648
- __payload: Payload;
27649
- };
27650
- declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
27651
- type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
27652
- type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
27653
-
27654
- declare global {
27655
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
27656
- interface SymbolConstructor {
27657
- readonly observable: symbol;
27658
- }
27659
- }
27469
+ declare const onOrderPaymentStatusUpdated$1: EventDefinition<OrderPaymentStatusUpdatedEnvelope, "wix.ecom.v1.order_payment_status_updated">;
27470
+ declare const onOrderUpdated$1: EventDefinition<OrderUpdatedEnvelope, "wix.ecom.v1.order_updated">;
27471
+ declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.ecom.v1.order_created">;
27472
+ declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.ecom.v1.order_canceled">;
27473
+ declare const onOrderApproved$1: EventDefinition<OrderApprovedEnvelope, "wix.ecom.v1.order_approved">;
27660
27474
 
27661
- declare function createEventModule$4<T extends EventDefinition$4<any, string>>(eventDefinition: T): BuildEventDefinition$4<T> & T;
27475
+ declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
27662
27476
 
27663
27477
  declare const preparePaymentCollection: MaybeContext<BuildRESTFunction<typeof preparePaymentCollection$1> & typeof preparePaymentCollection$1>;
27664
27478
  declare const getPaymentCollectabilityStatus: MaybeContext<BuildRESTFunction<typeof getPaymentCollectabilityStatus$1> & typeof getPaymentCollectabilityStatus$1>;
@@ -30952,27 +30766,9 @@ interface BulkUpdatePaymentStatusesSignature {
30952
30766
  */
30953
30767
  (paymentAndOrderIds: PaymentAndOrderId[], options?: BulkUpdatePaymentStatusesOptions | undefined): Promise<BulkUpdatePaymentStatusesResponse & BulkUpdatePaymentStatusesResponseNonNullableFields>;
30954
30768
  }
30955
- declare const onOrderTransactionsUpdated$1: EventDefinition$g<OrderTransactionsUpdatedEnvelope, "wix.ecom.v1.order_transactions_updated">;
30769
+ declare const onOrderTransactionsUpdated$1: EventDefinition<OrderTransactionsUpdatedEnvelope, "wix.ecom.v1.order_transactions_updated">;
30956
30770
 
30957
- type EventDefinition$3<Payload = unknown, Type extends string = string> = {
30958
- __type: 'event-definition';
30959
- type: Type;
30960
- isDomainEvent?: boolean;
30961
- transformations?: (envelope: unknown) => Payload;
30962
- __payload: Payload;
30963
- };
30964
- declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
30965
- type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
30966
- type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
30967
-
30968
- declare global {
30969
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
30970
- interface SymbolConstructor {
30971
- readonly observable: symbol;
30972
- }
30973
- }
30974
-
30975
- declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
30771
+ declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
30976
30772
 
30977
30773
  declare const listTransactionsForSingleOrder: MaybeContext<BuildRESTFunction<typeof listTransactionsForSingleOrder$1> & typeof listTransactionsForSingleOrder$1>;
30978
30774
  declare const listTransactionsForMultipleOrders: MaybeContext<BuildRESTFunction<typeof listTransactionsForMultipleOrders$1> & typeof listTransactionsForMultipleOrders$1>;
@@ -31402,27 +31198,9 @@ interface UpdateOrdersSettingsSignature {
31402
31198
  */
31403
31199
  (ordersSettings: OrdersSettings): Promise<UpdateOrdersSettingsResponse & UpdateOrdersSettingsResponseNonNullableFields>;
31404
31200
  }
31405
- declare const onOrdersSettingsUpdated$1: EventDefinition$g<OrdersSettingsUpdatedEnvelope, "wix.ecom.v1.orders_settings_updated">;
31406
-
31407
- type EventDefinition$2<Payload = unknown, Type extends string = string> = {
31408
- __type: 'event-definition';
31409
- type: Type;
31410
- isDomainEvent?: boolean;
31411
- transformations?: (envelope: unknown) => Payload;
31412
- __payload: Payload;
31413
- };
31414
- declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
31415
- type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
31416
- type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
31417
-
31418
- declare global {
31419
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
31420
- interface SymbolConstructor {
31421
- readonly observable: symbol;
31422
- }
31423
- }
31201
+ declare const onOrdersSettingsUpdated$1: EventDefinition<OrdersSettingsUpdatedEnvelope, "wix.ecom.v1.orders_settings_updated">;
31424
31202
 
31425
- declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
31203
+ declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
31426
31204
 
31427
31205
  declare const getOrdersSettings: MaybeContext<BuildRESTFunction<typeof getOrdersSettings$1> & typeof getOrdersSettings$1>;
31428
31206
  declare const updateOrdersSettings: MaybeContext<BuildRESTFunction<typeof updateOrdersSettings$1> & typeof updateOrdersSettings$1>;
@@ -32728,29 +32506,11 @@ interface UpdateExtendedFieldsSignature$1 {
32728
32506
  */
32729
32507
  (_id: string, namespace: string, options: UpdateExtendedFieldsOptions$1): Promise<UpdateExtendedFieldsResponse$1 & UpdateExtendedFieldsResponseNonNullableFields$1>;
32730
32508
  }
32731
- declare const onShippingOptionCreated$1: EventDefinition$g<ShippingOptionCreatedEnvelope, "wix.ecom.v1.shipping_option_created">;
32732
- declare const onShippingOptionUpdated$1: EventDefinition$g<ShippingOptionUpdatedEnvelope, "wix.ecom.v1.shipping_option_updated">;
32733
- declare const onShippingOptionDeleted$1: EventDefinition$g<ShippingOptionDeletedEnvelope, "wix.ecom.v1.shipping_option_deleted">;
32734
-
32735
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
32736
- __type: 'event-definition';
32737
- type: Type;
32738
- isDomainEvent?: boolean;
32739
- transformations?: (envelope: unknown) => Payload;
32740
- __payload: Payload;
32741
- };
32742
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
32743
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
32744
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
32745
-
32746
- declare global {
32747
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
32748
- interface SymbolConstructor {
32749
- readonly observable: symbol;
32750
- }
32751
- }
32509
+ declare const onShippingOptionCreated$1: EventDefinition<ShippingOptionCreatedEnvelope, "wix.ecom.v1.shipping_option_created">;
32510
+ declare const onShippingOptionUpdated$1: EventDefinition<ShippingOptionUpdatedEnvelope, "wix.ecom.v1.shipping_option_updated">;
32511
+ declare const onShippingOptionDeleted$1: EventDefinition<ShippingOptionDeletedEnvelope, "wix.ecom.v1.shipping_option_deleted">;
32752
32512
 
32753
- declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
32513
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
32754
32514
 
32755
32515
  declare const createShippingOption: MaybeContext<BuildRESTFunction<typeof createShippingOption$1> & typeof createShippingOption$1>;
32756
32516
  declare const getShippingOption: MaybeContext<BuildRESTFunction<typeof getShippingOption$1> & typeof getShippingOption$1>;
@@ -33475,27 +33235,9 @@ interface UpdateExtendedFieldsSignature {
33475
33235
  */
33476
33236
  (_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
33477
33237
  }
33478
- declare const onShippoConfigurationCreated$1: EventDefinition$g<ShippoConfigurationCreatedEnvelope, "wix.ecom.v1.shippo_configuration_created">;
33479
- declare const onShippoConfigurationUpdated$1: EventDefinition$g<ShippoConfigurationUpdatedEnvelope, "wix.ecom.v1.shippo_configuration_updated">;
33480
- declare const onShippoConfigurationDeleted$1: EventDefinition$g<ShippoConfigurationDeletedEnvelope, "wix.ecom.v1.shippo_configuration_deleted">;
33481
-
33482
- type EventDefinition<Payload = unknown, Type extends string = string> = {
33483
- __type: 'event-definition';
33484
- type: Type;
33485
- isDomainEvent?: boolean;
33486
- transformations?: (envelope: unknown) => Payload;
33487
- __payload: Payload;
33488
- };
33489
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
33490
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
33491
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
33492
-
33493
- declare global {
33494
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
33495
- interface SymbolConstructor {
33496
- readonly observable: symbol;
33497
- }
33498
- }
33238
+ declare const onShippoConfigurationCreated$1: EventDefinition<ShippoConfigurationCreatedEnvelope, "wix.ecom.v1.shippo_configuration_created">;
33239
+ declare const onShippoConfigurationUpdated$1: EventDefinition<ShippoConfigurationUpdatedEnvelope, "wix.ecom.v1.shippo_configuration_updated">;
33240
+ declare const onShippoConfigurationDeleted$1: EventDefinition<ShippoConfigurationDeletedEnvelope, "wix.ecom.v1.shippo_configuration_deleted">;
33499
33241
 
33500
33242
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
33501
33243